Top
Best
New

Posted by nb-t 5 hours ago

Much shorter version of GRH Lean verification from Anthropic(github.com)
303 points | 137 comments
spootydooty 4 hours ago|
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.
tito 1 hour ago|
You can verify it yourself at home in a couple of hours.

Inspired by SETI@home, we have a leaderboard and 18 independent validators so far who ran the 17M line proof. Now up and running with the 300k line proof!

https://riemann-at-home.github.io/riemann-at-home

bananaflag 4 hours ago||
From ~17M lines to just ~76k lines, a 99.56% reduction.
gregdeon 1 hour ago||
It's worth noting that the 76k line version is heavily "golfed" (e.g., cramming the same content into fewer lines), which heavily hurts readability for the sake of a smaller line count. A more sane version is around 300k lines. Still, a massive reduction!

The proof also still contains a few unused intermediate results. Sounds like these were neat findings where the proof of RH ultimately only needed a weaker version of the result, but folks at Anthropic thought it would be worthwhile to finish fleshing out the details.

DonsDiscountGas 1 hour ago||
> The proof also still contains a few unused intermediate results.

This is exactly the type of thing that moves a field forward, that many people were (inexplicably IMHO) saying we wouldn't get with an AI proof

w-m 4 hours ago|||
Meanwhile, the community-driven compression with a hundred contributors and thousands of pull requests sits at a mere 33% reduction.

Why this huge discrepancy?

https://riemann.verifytask.cn/

jychang 3 hours ago|||
1. That chinese website might be the wrong dashboard, I think there's a chinese group that's doing the same thing. The main Lean community work is at https://github.com/leanprover-community/riemann-hypothesis

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 maybe ~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, I guess 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

lwarfield 1 hour ago|||
As somebody who tried the other way around, I think you made the right decision. I was able to condense down the proof by a lot, but in retrospect, it would have been much faster to just build it from scratch again.
jwpapi 3 hours ago|||
I praise people like you!
rtpg 3 hours ago||||
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!

seizethecheese 1 hour ago||
There’s someone in this thread who is doing it on a $100 per month plan and claims to be under the Anthropic size so far. It looks like they are a software developer
rtpg 49 minutes ago||
Sure, I just mean like.... someone who isn't just asking a robot to "make it smaller and cleaner".

Like just a bit of direction can make you spend an order of magnitude less time on this kind of stuff

kccqzy 3 hours ago||||
The community-driven one is here: https://rh-shrink.github.io/

Edit: they just switched to the version in this repo.

bananaflag 3 hours ago||||
The internal models are smarter.
jeltz 3 hours ago||
Or they just have access to way more compute.
conradkay 3 hours ago||
Nah, you can see how little progress that project has been making recently. Even with 1000x compute I doubt it'd hit 80%

These hill climb-y tasks tends to hit a limit based on model capability (and getting stuck making tiny improvements in bad directions)

traes 2 hours ago||||
I unfortunately can't recall the exact source but I saw some Lean experts early on commenting that those efforts appeared to be a poorly organized dead end that were focusing on cheap "easy wins" that don't actually reduce the fundamental complexity of the proof, like inlining imports.
lightbendover 3 hours ago|||
[dead]
josephg 3 hours ago|||
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.
perching_aix 3 hours ago||
Consider: https://news.ycombinator.com/item?id=50611593

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.

chubot 2 hours ago|||
That is some ratio! I picture Alpoge just hacking like crazy on Claude and not looking at the code! I guess he has a strong intuition and just keeps piling stuff on in parallel.

Then he makes it "go green", and doesn't care about cleaning it up

I only did CTF once or twice, long ago, pre-AI ... but that's how I felt: just keep writing code and trying things. No cleanup. Whereas when I write code I plan to maintain, I probably do too much cleanup and refactoring.

tyre 40 minutes ago||
He admitted to including a bunch of crap to troll people. It was unprofessional, especially with how much attention this got and the amount of people’s time he wasted.

Still an incredible result! Not taking away from it. And with how much he poured into it, I can understand going a bit crazy and not empathizing with the eventual reviewers.

But, it’s able to be optimized to such an extent because it was purposefully long before.

6thbit 3 hours ago|||
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.
seizethecheese 4 hours ago|||
76k lines sounds like it would just about fit into a 1m token context window. Cool.
jychang 4 hours ago||
It doesn't quite fit with the o200k tokenizer, I just checked.
qwrt1a 4 hours ago||
[flagged]
Sharlin 4 hours ago|||
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!)
12h590 4 hours ago|||
[flagged]
dward 4 hours ago||
Zulip discussion here: https://leanprover.zulipchat.com/#narrow/channel/658556-Riem...
est 32 minutes ago||
https://math.mit.edu/~drew/shortgrh/

looks like it passed most of the tests

qwrt1a 4 hours ago||
[flagged]
gre 4 hours ago||
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?
colechristensen 3 hours ago||
>Does this challenge Tao's point from a month ago that getting huge proofs with no insight is a problem?

It's reducing the proof to make it more likely that insights are possible.

But no it doesn't reduce Tao's point.

drusepth 3 hours ago|||
Am I misreading/missing something?

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]?

traes 3 hours ago||
All that means is that this particular proof wasn't ACTUALLY impossibly huge, just very poorly written. Tao's thought experiment concerns proofs that are fundamentally gigantic.
apetresc 1 hour ago||
Well presumably those problems were outside of human reach to begin with. So there’s no “opportunity cost” to having an AI proof vs no proof at all.
objektif 2 hours ago|||
His point was never valid anyways. We will eventually understand what was going on it is not a secret. It is just that he did not come up with it.
traes 3 hours ago|||
Not really. There's no guarantee that all proofs remain golfable.
jgord 3 hours ago||
does golf-able mean understandable by a human well trained in the domain ?
traes 3 hours ago||
Golf-able in the sense of code golf; writing a program in a minimal amount of characters, like how you try to get a golf ball in the hole in a minimal amount of strokes. My point is that not all long AI generated proofs are going to be possible to compress in the way this one was.
objektif 2 hours ago||
Why do we care as long as it works? We will understand it though even if it’s lacrossable.
animal_spirits 44 minutes ago|||
We should understand the equations if we are going to be using them in critical applications; you don't want to base an economic model off of an AI generated equation no economist understands
measurablefunc 1 hour ago|||
It works until it doesn't and then whatever you thought you understood might turn out to be an illusion. There is a certain amount of complexity that people can deal with and 17M lines of Lean is beyond that threshold.
c7b 4 hours ago||
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.
ipdashc 3 hours ago||
> 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.

c7b 50 minutes ago|||
Terrence Tao himself has used AI to understand one of the first results in this wave that was published as a tweet with no explanations (counterexample to the Jacobian conjecture). Which we know because he published it. It's clear that he considered the discussion useful. I think it's a misrepresentation to say that he thinks that LLM-driven math research fundamentally cannot produce papers that aid understanding. I think the better representation of his intervention was that he was complaining about the form, specifically of the several-hundred papers drop by OpenAI, some with atrocious writing quality. I think it was a point well taken, and OpenAI has visibly tried to incorporate his feedback in the subsequent release. But right now their focus seems to be more on the perceived race with Anthropic.
ipdashc 12 minutes ago||
They can help aid understanding, I don't disagree at all. An LLM is certainly the first tool I would reach for to start wading through (ironically?) LLM-generated code or math, or really anything where you're swamped with a large number of noisy/wordy documents.

I just disagree that they're somehow going to make human explanation obsolete, as the parent comment was somewhat implying. Given the choice (which of course, isn't often available) I'd almost always want to read decent human writing over LLM writing, it's just better at keeping one's attention and conveying info

senderista 2 hours ago||||
Not all models are as bad at technical writing as Claude.
chasd00 2 hours ago|||
Idk I point Claude at a mountain of bad code and ask it to produce docs + diagrams and exec summmaries regularly. It does better than any human I’ve ever worked with and effectively instantly too.
foltik 1 hour ago||
It only looks like it does a better job.

If you haven’t spent the time to deeply understand and form your own mental model about the system it’s documenting, you won’t notice all the inconsistencies, contradictions, omissions, overcomplication, etc. in the AI output.

lgas 41 minutes ago||
This was certainly true a year ago, but it seems to be less and less true with every passing day. I've had Claude successfully complete a number of tasks like this which all held up to thorough vetting.
galoisrepresent 51 minutes ago||
This (https://github.com/tzu-chen/slim) can be used to navigate the lean source and take a look at the shape of the project without setting up lean or building.
delegate 4 hours ago||
I don't know Lean..

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 ?

ngruhn 3 hours ago||
Lean syntax is alright. You can get used to it. The hardcore part is the jargon.

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

Paracompact 3 hours ago|||
Most of the hard-to-grok code there is proof bodies rather than theorem statements. Assuming you can parse the statements, you can follow the proof pretty loosely and reconstruct it yourself. Such is the tradition in math generally

Plus, these proofs are actually quite tame compared to human-written Lean proofs.

> How realistic is it for a human to read this code, 'grok' it and verify that it is correct ?

You don't need to verify any of this, but for the final theorem statements. That's the point of formal methods.

greenknight 1 hour ago|||
Just for your reference. you linked to the compact version

https://github.com/lsernau/grh-lean/blob/main/grh/src/New/Up...

This is the non-compact 'Human Readable' version. Still pretty intense!

IsTom 3 hours ago|||
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.
kachnuv_ocasek 3 hours ago|||
For me, this is more readable than many "human-language" paper proofs.
aeonik 3 hours ago|||
I don't understand the math or logic here, but the syntax is not half bad.
spootydooty 3 hours ago|||
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.
rvba 2 hours ago|||
This is nearly as ugly as ABAP, only misses the comments in German

Something that I wonder where is the "eureka" part of this proof, or perhaps the top 10 "eureka" moments.

colechristensen 3 hours ago||
Code in the sciences often looks like that. You have to have domain-specific knowledge to read it and there's no escaping that.

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

gus_massa 2 hours ago||
> and using only the axioms propext, Classical.choice and Quot.sound

Is there an ELI35 explanation for mathematicians that don't speak Lean?

kccqzy 2 hours ago||
Just read the official documentation. https://lean-lang.org/theorem_proving_in_lean4/Axioms-and-Co...

The summary is that these are the axiom of propositional extensionality, choice, and a quotient construction (which implies function extensionality, i.e. what makes two functions equal).

kennethallen 2 hours ago|||
The Generalized Riemann Hypothesis is proved making no assumptions and accepting no axioms except the basic tenets of the type theory Lean is based on. No "todo"s, no "assume this is true while I debug", no escape hatches used.
nialv7 2 hours ago||
propext is propositional extensionality. extensionality is basically "what does it mean for things to be equal?". propositional extensionality is saying two propositions are equal if they imply each other.

Classical.choice is the axiom of choice.

idk what Quot.sound is.

eggsome 1 hour ago||
Have any of the labs pointed a internal model at foundational lean proofs made by humans to see if they could be simplified?
aborsy 3 hours ago||
I have no experience with Lean.

How difficult is it to learn to use Lean?

Any similar example to see the level of difficulty?

ajs1998 3 hours ago||
Start with the natural number game. https://adam.math.hhu.de/#/g/leanprover-community/nng4

Lean is like a universal DSL. Learning the syntax is one thing, but learning the background domains of a Lean proof is another.

gameshot911 2 hours ago||
Great resource, thanks!
kccqzy 3 hours ago|||
All Lean Books And Where To Find Them: https://lakesare.brick.do/all-lean-books-and-where-to-find-t...

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?

conradkay 3 hours ago||
I think by the time you go from 0->1 learning it, the internal models will have gone from 1000->2000.

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)

traes 2 hours ago||
Still useful to be able to accurately state and read theorems in Lean IMO if you want to have any concrete idea what you're having your computer work on. For example, the recent statement from the Yang-Mills group[0] said that OpenAI's formal proofs establishing a Yang-Mills theory were actually too weak to do so and needed to be updated.

[0] https://www.kitp.ucsb.edu/sites/default/files/4th-Statement-...

formerly_proven 3 hours ago|
Why do they even bother putting a copyright license in a repo like this? The contained materials are clearly not copyrightable.
More comments...