I was working on this week's post on Lean after reading Kevin Hartnett's book The Proof in the Code: How a Truth Machine Is Transforming Math and AI. And then yesterday OpenAI announced a solution to Navier-Stokes, one of the Millennium problems. An incredible accomplishment to say the least. Hours earlier Tristan Buckmaster posted about his progress with Levent Alpöge based on a program started by Diego Córdoba and Luis Martínez-Zoroa, and his interactions with OpenAI. I'm still trying to understand what happened and will write more later but I recommend the Quanta article to get you up to speed.
Lean plays a major role for both projects. OpenAI fully formulated their results in Lean. Buckmaster said they have Lean-verified proofs for the three results they made public but held back on the "blowup for hypo-dissipative Navier Stokes" because the Lean verification has not finished. So it's worth taking a look back.
Leonardo de Moura developed the first version of Lean in 2013 as a Microsoft project for proving code correct. Hartnett tells the story of the people involved in the development of the various versions of Lean capturing the excitements and disagreements. What caught me was the lack of backward compatibility, the definitions and theorems formalized in one version of Lean might break in the next. There was a constant need to get the libraries back up to date until the development stabilized.
The best part of the book focused on some big projects in Lean.
- Tom Hales wanting to convince the world that his proof of the Kepler Conjecture was correct.
- Peter Scholze wanting to convince himself of the correctness of his liquid tensor experiment.
- Kevin Buzzard, Johan Commelin and Patrick Massot formalizing Scholze's Perfectoid Spaces to show Lean can handle modern mathematical objects.
- Terence Tao wanting to formalize in Lean the proof with Tim Gowers, Ben Green and Freddie Manners of the polynomial Freiman-Ruzsa conjecture, just to show it could be done.
And now Lean, particularly in Navier-Stokes papers, is being used as a time-stamp, a way to claim your theorem before having to write it up properly in an explainable way. Buckmaster even held back a result because it wasn't yet Lean verified. The way we even publish results is a-changing.
I think that Lean made the PCP theorem obsolete, at least there is no need to use it for proofs. I need to find another application for my students when I teach it.
ReplyDelete"I don't expect P vs NP to be solved anytime soon." Was written in a recent post on this blog website. Sure, P vs. NP might be bigger than or less understood than Navier Stokes (although I doubt one can rank these things so easily), but why should we not expect to see a P vs. NP proof any time soon, which uses terms from all the common ideas and theorems that we already know in computational complexity theory and just mixes these up in a way that leads to a correct end result? Maybe all the proof will be in the end is just a loooong series of characters that can be checked in Lean and won't contain anything extremely surprising. Doesn't mean it won't be thought of as a clever proof with a clever proof strategy.
ReplyDeleteHere is that post where I give my reasons. The proof in the end will be a long sequence of characters, but it will have to be surprising because the usual tools won't work.
DeleteI gave talks at the Simons institute (https://m.youtube.com/watch?v=pa5mURjUNFI) and CSL 2025 (https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CSL.2025.3) on why using proof assistants in TCS is extra hard.
ReplyDeleteAnd I worked on formalising computational complexity a long time ago, including the first construction of a universal Turing machine that's "good" for both time and space. Our recommendation was "don't do that's, it's too painful" https://dl.acm.org/doi/10.1145/3372885.3373816
Small nitpick: Tom Hales worked mainly in Isabelle/HOL with a bit of (I believe) HOL light. This was before the Lean project was started ;)
Thank you for quickly answering
ReplyDelete“ longer do you need to write Lean code, any more than you need to write Python code, you can just use AI to generate it. “ -> unless you know lean, you don’t know what you have formalized. There are a number of trivial ways to make mistakes in writing definitions and stating theorems.In Python if you make a mistake you might get tolerable bugs. If you get contradictory or incorrect definitions, everything is wrong.
ReplyDeleteHow confident are we that Navier-Stokes is correct based on just the Lean cert? The Lean compiler does still have bugs, right? I don't seriously doubt it's correct, just wondering what level of certainty we're talking about exactly.
ReplyDelete