Treemap of the Riemann Hypothesis Lean Proof

(pengowray.github.io)

196 points | by pengowray 1 day ago

9 comments

  • nl 1 day ago
    This is great, because it graphically makes the point that the headline "17 million lines" is huge mostly because it contains formalizations of many long-proven theorems.

    It's not really fair to say "its rubbish because it is so big" when 13% of the modules are algebra alone.

    • Achshar 1 day ago
      Does that mean lean community needs a package manager of sorts? So that it can import all these as pre-proven packages that they collectively build on. I can't imagine this to be something that they already haven't thought of or done in some form.

      Ideally they sholuld be able to just do a `import riemann_hypothesis;` from a verified registry and then build on that.

      • BLanen 1 day ago
        In my opinion, it does, but it needs more than that. But it already has a package manager(lake) and the main package all these mathematical proofs and definitions and such are contributed to is mathlib.

        I would argue it needs something like content-addressed code/"packages" like the newish programming language unison. But it also needs more than that even. I would argue that a (cubical)-HoTT language/environment/proof-assistant is probably better for the future of mathematical research because it does not have "proof irrelevance" and does not treat different proofs as equals because they often take different "paths" and those paths are often interesting and analysable in themselves. I also would argue that it needs to have a sort of decentralised way of certifying computations of proofs that goes beyond the ad-hoc way they are currently done in lean/mathlib.

        These are all not original points by me but have often been stated as a sort of criticism of lean/math-lib(although I acknowledge them as a massively successful and admirable engineering feats) by other people way more knowledgable than me.

      • sd9 1 day ago
        They've been working on it, but there are centuries of maths to formalise and it's not trivial. Maths papers are kind of... hand-wavy, in a way. Getting a piece of machinery into Lean requires making everything absolutely concrete, down to the lowest level of detail, and some of the objects involved are very complex, built upon layers and layers of abstraction.

        Kevin Buzzard is a prominent mathematician who's been working on formalising FLT in Lean (https://github.com/ImperialCollegeLondon/FLT/blob/main/GENER...). He was one of the first mathematicians I encountered leading the charge on this, many many years before LLMs.

        There's a _lot_ of groundwork to build. But it's getting easier now of course.

        • btown 23 hours ago
          It makes me curious whether vendoring/reimplementing dependencies is actually, in an odd way, optimal for these frontier proofs.

          I've certainly seen that when doing normal coding, LLMs will often take documentation of used libraries at face value, and try to save context by not reading the underlying implementations into context. This is genuinely useful!

          But for math, is there a use to a set of agents being forced to reimplement the entire stack of formalized dependencies? Each sub-effort would leave artifacts, and send messages to other sessions, on ways in which the underlying mechanics or subtleties might prove helpful to the broader effort. No need to fight terseness with system prompts, when a full survey of the broader field is impossible to avoid.

      • kccqzy 22 hours ago
        A package manager doesn’t help when there are insufficient human volunteers to produce the packages in the first place. In practice the only package relevant is Mathlib. There are just not enough people working on it to formalize all sorts of already proven theorems.
    • adgjlsfhk1 1 day ago
      About 10% trivially was unused. it's pretty clearly very sloppy and rushed. By next week, I would be surprised if the proof hasn't been shrunk by more than half.
      • lou1306 1 day ago
        "Make it work, then make it beautiful" (Joe Armstrong, Erlang and OTP in Action)
      • 0c3ca83 1 day ago
        It tells me that they didn't care to look at the output, and don't understand anything they produced.

        They don't know or care if it'll shrink, because they don't know or care what the proof contains.

        • QuesnayJr 23 hours ago
          He and Buckmaster tried doing it the careful way with Navier-Stokes, and then OpenAI blew past him to solve the problem. He's not dumb enough to make the same mistake twice.
        • scrollaway 1 day ago
          Why would Levent care about the Lean output, beyond “it works”?

          What on earth do you think was going on during the steering?

          • 0c3ca83 1 day ago
            And yet he's confidently claiming other people will clean up his turds.

            Obviously he doesn't care, I get that.

            • gus_massa 22 hours ago
              It's actually quite common. Most of the time the first proof is far from optimal. For example they have a ridicule bound in some part like 10^(10^1000). Later people get better bounds and more accurate calculations, and after a few years the bound may be something like 200.

              In the first proof nobody knows what they are doing, even the author. After a while, people understand the proof and the new theory and get better results.

              • dualvariable 21 hours ago
                > In the first proof nobody knows what they are doing, even the author. After a while, people understand the proof and the new theory and get better results.

                The latter are the people doing all the hard work and getting little of the credit and praise.

                Seems to work kind of like a CEO getting all the accolades and massive amounts of money on the backs of the productivity of all the workers.

                • gus_massa 13 hours ago
                  Nobody force you do do the cleanup, but it may be fun, similar to contributing to an open source project.
            • letmevoteplease 1 day ago
              Sounds like something you just made up in your head to get mad at. His remark.pdf says, "The argument is incredibly long at the moment, and while its formalization is finished and it is routine to produce a huge, unreadable document containing sufficient detail, in my view of my path I have just taken a step. I intend to do my best to understand and impart understanding of this argument and its certain simplifications, to speak about it, to write it properly."

              Although, even if he had no intention to go further, I think he would be correct to believe lots of people are going to be thrilled to clean up the "turd" of a Riemann hypothesis proof.

              • 0c3ca83 21 hours ago
                Again, there's 17 million lines of turd to understand here. You go read the Linux kernel and tell me when you fully understand every part.
                • nl 16 hours ago
                  Are you trying to imply that the Linux kernel is a turd too?
                  • imtringued 15 hours ago
                    His point is that the Linux kernel consists of hand curated code. Hence if you're okay with reviewing a turd you should think that reviewing most of Linux is a pleasant experience.
      • DangIsATyrant 1 day ago
        [flagged]
        • Scea91 1 day ago
          If I had a compiling Lean proof of GRH, I'd also be releasing that ASAP. It is a complete solution. What value does witholding that to polish internally hold when now the whole world can polish it?

          It makes little sense to hold Lean proofs to the same comprehensibility and elegance standards as classic proofs. Classic proofs need that to be verifiable, Lean doesn't.

        • shawabawa3 1 day ago
          Much more likely that they suspected openAI could scoop them any second and so published as soon as possible
        • nl 1 day ago
          Or... there is a cut-throat competition between OpenAI and Anthropic.

          OpenAI landed a couple of important results and Anthropic needed a result, especially around their IPO date...

        • Amekedl 1 day ago
          He is right. Ppl show me stuff they do with opus, I keep offering deepseek, the ones who took me up on that are dumbfounded by how much cheaper (and sometimes how much quicker) it is.

          It also never been easier to do that, because of how dirt cheap it is.

        • HotHotLava 1 day ago
          This is the same guy who was beaten on Navier-Stokes by a month or so.

          He wasn't worried about some random math professor suddenly solving the problem that all living mathematicians expected to be out of human reach for at least 20 years (and from what we know so far, Massulo didn't), he was worried about OpenAI sniping him again.

        • nifets 1 day ago
          except there is no such thing as a "partially complete" proof. a proof either is complete or it's not. you cannot deem a proof being close until after the fact when you have completed it. unexpected dead-ends can emerge at any point in time in the process, rendering the entire thing unworkable. so the human only solution wasn't really in review at all because it wasn't complete and hence not a solution. the missing arguments it has could be (and often are) what prove fatal to the whole attempt. and that "human only solution" had not even been formalised in Lean.
    • utopiah 1 day ago
      I don't know Lean but couldn't those be proven dependencies in a public repository with DOIs or equivalent? Feels like a lot could be factored this way.

      Edit: Reservoir

      • QuesnayJr 1 day ago
        The Tau Ceti project is one effort along those lines: https://taucetiproject.org/
      • nl 1 day ago
        It relies on mathlib, but that doesn't cover as much math as was needed.
        • lanstin 23 hours ago
          As someone for whom this proof is way out of my league, it is fascinating to see how many fields of mathematics are in the Lean proof. Fields, where I know one fact to illustrate what it is, have 3% of the subdirectories etc.
      • pas 1 day ago
        • utopiah 1 day ago
          If it's not relying on it, why not? Not discoverable enough or outdated or both?
          • vidarh 1 day ago
            It is relying heavily on it:

            > each module imports 4.3 other modules of the project on average, and 136,003 modules import all of Mathlib

            But most known mathematics is still not formalised.

          • 0c3ca83 1 day ago
            It's LLM slop. Have you ever looked at what an LLM produces? It's always bad quality by default. You still have to look at every line and reverse engineer the structure, then fix it, if you care about quality.

            And at 17 million lines of output, this is the default.

            • NoDodgeQuestion 21 hours ago
              Riemann proof is like pizza and something else, when it's good it's good, when it's bad it's still pretty good
              • 0c3ca83 11 hours ago
                Ah, so you've read it all?
    • Davidzheng 23 hours ago
      Why is being algebra mean it's not a substantial contribution???
      • gus_massa 22 hours ago
        It probably means "It's well known algebra that nobody formalized before for lack of resources or because Claude likes to copy/paste it instead of linking to mathlib". It should be in a library, not in the main proof. Expect that to be refactored in a few weeks.
    • odyssey7 22 hours ago
      Everything old is new again. See also: Principia Mathematica.
  • jrflo 1 day ago
    Grant Sanderson of 3b1b said in an interview that he thinks Math will become a data-rich field. I wonder if something like this is the beginnings of that.

    (Sidenote, I love how you can take the Zeta function of the entire map via that slider, very fun)

    • pengowray 1 day ago
      I've been really enjoying the 3b1b Podcast (new and old episodes) to get perspectives of mathematicians
    • alansaber 1 day ago
      As reality is data-rich, it follows that the toolset would be the same, no? To me this is all part of the same movement, meta-analysis and scaling for every task.
  • qwertyforce 1 day ago
    I think we should have some sort of a competition, shortest RH proof in lean. Maybe shorter proofs are simpler
    • pengowray 1 day ago
      I agree with the sentiment, but there are competitions to do things with the shortest amount of code in other programming languages, and it does not lead to anything simple or understandable.
      • Zambyte 1 day ago
        Code golfing often measures by character count or things like that, which leads to hard to understand results due to short symbol naming. This seems avoidable by measuring by something other than character count.

        It also leads to hacks taking advantage of underlying hardware or runtime quirks, which are anything but easy to follow. I don't know Lean, but it seems like it wouldn't expose abstractions that would allow for these kinds of hacks either.

        If there was a challenge that was something like "provide GRH in the fewest Lean symbols", that seems like it could produce comprehensible results.

      • qwertyforce 1 day ago
        Nice example with code golfing, indeed most code golfing code I've seen is awful :)
    • Philpax 1 day ago
      There's several of these now. Here's one: https://rh-shrink.github.io/
      • imtringued 15 hours ago
        This guarantees that nobody will ever look at the original proof.

        It also means that if you think someone is going to publish a proof, you should publish your own slop proof early just to reserve the seat. Even if the proof is wrong and the second guy turns up, you could just update your proof with a smaller one.

    • luckystarr 1 day ago
      Proof golfing
    • Davidzheng 23 hours ago
      As much as I really really hate appeal to authority, I think LLMs as of late November 2026 still aren't very reliable at writing mathematics well--so I think in this specific instance, it's better to leave it to mathematicians to digest and simplify it simply bc it's not always about minimizing lengths but it's kind of a minimizing maximum local complexity sort of game
    • westurner 1 day ago
      From "Yes, 17M lines of Lean is a lot" https://news.ycombinator.com/item?id=50607668#50611572 :

      > How to tree-shake Lean4 .lean code to produce only the transitive closure for one or more selected results?

      > Then, how to calculate branch coverage for lean? Of only the transitive closure? As a test, is that even distinct from compilation with no worries?

    • lou1306 1 day ago
      It is happening as we speak: https://riemann.verifytask.cn/
  • wscottc 1 day ago
    Excellent! I made something in the same spirit, working with Claude: navigable SVG posters of the proof's dependency graph from the reading blueprint, e.g. Main.lean theorem by theorem, chapter by chapter, the longest chains of reductions, new vs. published results, and every statement by depth from the main theorems.

    All pinned to sources.

    https://scottcochran.github.io/riemann-diagrams/

    Credit to Levent Alpöge, the riemann-blueprint authors and the leanprover-community mirror. Everything drawn is theirs.

  • d_silin 1 day ago
    Proof tree looks like a CPU floorplan.
  • pengowray 1 day ago
    Wanted to get a feel for the size and scope of the 17 million line machine-verifiable solution to the Riemann Hypothesis. Something which was once the holy grail of mathematics, and now seen as a threat, an attack, or dismissed as missing the point. I don't expect to understand it, as it is now, any more than I expect to understand a rainforest.
  • 1970-01-01 1 day ago
    Still calling it a hypothesis, eh?
    • mmmmmmmike 1 day ago
      I think it’ll be called the Riemann Hypothesis forever. People still generally refer to the “Poincaré conjecture”, despite it being resolved by (Hamilton and) Perelman. In this case, naming the theorem after the first person to discover a proof seems even less appropriate.
      • QuesnayJr 1 day ago
        They still call "the Riemann hypothesis over finite fields" by that name, even though it was a conjecture of Weil's, proven by Deligne.
    • alansaber 1 day ago
      Once enough of this generation dies off, the common nomenclature will change.
    • pengowray 1 day ago
      Funnily enough, I deliberately avoided putting the word hypothesis in the repo name/url
    • bemtevi 1 day ago
      Fermat's last theorem was called a theorem long before it was proved. Go figure!
      • 1970-01-01 23 hours ago
        Because he claimed to have a proof but the margin just wasn't large enough to write it down.
  • chvid 1 day ago
    I am somewhat annoyed with Anthropic (though it is on brand for big AI).

    It is well within their resources to publish a polished human-readable version of this proof that at least in broad terms can be understood by a professional mathematician.

    Yet they choose to publish it in a footnote to a sloppy written pdf, knowing very well the impact a proof of GRH would have.

    • chvid 1 day ago
      I am reminded of this statement signed by a host of prominent maths people:

      https://mathandai.org

      A Severe Misalignment of AI in Mathematics

      Over the last few months, the mathematical capabilities of LLMs have improved dramatically, to the point that they can solve major outstanding problems in many fields of mathematics. However, the push by AI companies to solve mathematical problems as a benchmark is detrimental to the science of mathematics, and to the mathematical community. The goals of the AI companies and the goals of the mathematical community are severely misaligned. We see these as part of broader alignment issues impacting other scientific and creative professions, as well as the whole of society.

    • nifets 1 day ago
      you cannot afford to do this with OpenAI looming in the other corner
    • pengowray 1 day ago
      There's really no good way to do it. It would also be weird to keep it a secret while Alpöge "mastered a massive neighbourhood around its mathematics" and spent some time getting the copy editing advice and poetical assistance he needed for a coherent announcement. Mathematicians would have been crying to just release the lean files.
      • chvid 1 day ago
        There is certainly a better way; what Ant is doing here is incredibly disrespectful to the field of maths.
        • SubiculumCode 1 day ago
          Waahhhhhh!!! We were the smartest elites of magical writs, now we are common chaff. Wahhhhhhhhhh!!!

          As a society, we will need to figure out what to do about AI, but please do spare us the objections that are obviously rooted in self-pity.

    • throw310822 1 day ago
      > It is well within their resources to publish a polished human-readable version of this proof

      You remember what happened to that guy who wanted to publish a polished, human-readable version of the GRH, right?

      • chvid 1 day ago
        You can announce and pre-publish without the incredible arrogance and disrespect that is on display here.
        • throw310822 1 day ago
          How?
          • chvid 1 day ago
            Have a Dario, Levent and some maths professor appear in a video and announce this potentially massive discovery and set up a committee to verify and understand the proof. Open source the progress so far.

            What they have done instead is immature guerrilla marketing unbecoming of a company as significant as Anthropic.

            • throw310822 1 day ago
              Seems to me exactly what they've done, minus the video. Announced the discovery, open sourced it and let anyone look into it and verify it.
              • scrollaway 1 day ago
                The person you’re responding to is just someone who is eternally unhappy, with a constant need to have a contrarian opinion of sorts.

                There is no reasoning anymore.

                • maxdo 1 day ago
                  agree, this is the early days of neo-Luddites. This discovery is really the most non-polarizing ai event ever. One of the greatest discovery of the decade. Yet, it's posted in the wrong way, by wrong person bla bla bla.
            • otabdeveloper4 1 day ago
              If superintelligence and AGI were real, then Anthropic wouldn't be itching for an IPO.