ResearchPapers, evidence & method
Kevin Hartnett and Lean's builders trace the proof assistant's path from a Microsoft Research project to a checker for AI-written math and code
A Machine Learning Street Talk documentary built around Kevin Hartnett's book The Proof in the Code follows Lean from a Microsoft Research project to a checker for AI-written mathematics and software. It also warns that verified proofs can still certify the wrong specification.
From the Machine Learning Street Talk podcast episode of October 26, 2026 and cited sources: AI coding agents working under loose supervision wrote lean-zip, a DEFLATE, zlib and gzip library written entirely in Lean. [5] [2]
SOURCES[5] lean-zip github.com[2] Transcript: Mathematics Just Changed Forever — Kevin… youtube.com
AI-assisted, not human-edited. Methodology Corrections Who owns this site
- What happened
- AI coding agents working under loose supervision wrote lean-zip, a DEFLATE, zlib and gzip library written entirely in Lean. [5] [2]
- Original source
- Machine Learning Street Talk podcast episode, independent perspective
- Brief by
- AT Pulse research desk AI-assisted; publisher and contact on the desk page
- Studies
- arXiv 2311.00007 (Nov 2023) [10] date from arXiv ID
- When
- October 26, 2026 podcast episode published
- Covered
- Oct 27 edition
- Evidence
- 15 sources across 12 sites; transcript sourced
- 1Mathematics Just Changed Forever — Kevin Hartnettpodcasters.spotify.com
- 2Transcript: Mathematics Just Changed Forever — Kevin…youtube.com
- 3With Kevin Hartnett (@KSHartnett), Leonardo de Moura…x.com
- 4Mathematics just changed forever. https://t.co/HCToGkemYfx.com
- 5lean-zipgithub.com
- 6Kepler conjecture — Wikipediaen.wikipedia.org
RisingHow it’s measured
YouTube video · 11.2K views · 97 likes
Reach blends public engagement (views, likes, comments, shares, stars) from the platforms where the story or its original source lives: YouTube, Hacker News, GitHub, Substack and similar. A video and the article written from its transcript share one score, taken from the video. Platforms with no data are left out rather than counted as zero, and the age of a story never lowers its score.
AI coding agents working under loose supervision wrote lean-zip, a DEFLATE, zlib and gzip library written entirely in Lean. Its machine-checked proof shows that decompressing compressed data returns the original for every input and every compression level. The proof has more than 1,100 theorems, about 32,000 lines and no unproven gaps. A pull request could merge only if that proof still passed. [5] [2]
A checked proof certifies only the formal statement as written. Leonardo de Moura notes that a 'compressor' that simply returns its input unchanged would still pass a round-trip check. Extra properties, such as smaller output, are needed to rule that out. Hartnett reports doubt that complex real-world programs can ever be fully specified. [2]
Lean grew out of de Moura's work on the Z3 automated prover at Microsoft Research. Jeremy Avigad pushed for dependent types, which made Lean suitable for abstract mathematics. Its community math library, Mathlib, started at about 30,000 lines. Lean was later used to complete Peter Scholze's Liquid Tensor challenge in 2022, and DeepMind's AlphaProof wrote its 2024 International Mathematical Olympiad (IMO) proofs in Lean, reaching silver-medal level. [2] [9] [11] [13]
Correctness is not the same as understanding. Paul Lessard notes that Thomas Hales's proof of the Kepler conjecture settled the question but produced little new mathematics. Kevin Buzzard expects AI-built Lean libraries, produced by spending heavily on compute, to be less well designed than the carefully curated Mathlib. [2] [6]
lean-zip shows that AI agents can produce code with a public, machine-checked correctness proof that gates every merge.
Read the full assessment
Implication: if review is what limits agentic coding, formal specifications could take over part of that work, but only to the extent the specifications are complete.
Executive brief
A pure-Lean compression library, lean-zip, was written entirely by "loosely supervised" AI coding agents. It ships a machine-checked proof that decompressing compressed data returns the original, for every input and every compression level. The proof spans more than 1,100 theorems and about 32,000 lines, with no unproven gaps. Machine Learning Street Talk's documentary, built around Kevin Hartnett's book The Proof in the Code, uses examples like this to trace Lean's path from a Microsoft Research side project to working infrastructure for mathematics and AI. Its main warning is the "formalisation gap": a proof can be fully checked and still prove the wrong statement.
What changed and event timeline
Kepler proof published unverified
After years of refereeing, the Annals published Hales's computer-heavy proof. Reviewers reported being "99% certain" but unable to check all the computations ().
Flyspeck completes a formal proof
Hales's team finished a formal proof of the Kepler conjecture in HOL Light and Isabelle. It was published in Forum of Mathematics, Pi in 2017 (;).
Liquid Tensor challenge finished
Scholze's December 2020 challenge was completed in Lean by a team of more than twenty people, led by Commelin and Topaz (;).
AlphaProof reaches silver-medal level
It produced Lean proofs for three IMO problems. Together with AlphaGeometry 2 the system scored 28/42, with some problems taking up to three days ().
Capabilities and access
- Lean 4 is an open-source interactive theorem prover built on dependent type theory (lean-lang.org). Mathlib is its community-maintained mathematics library (GitHub).
- lean-zip handles DEFLATE, zlib and gzip in pure Lean. It is whole-buffer only and decompresses about 1.45× slower than miniz_oxide.
- AlphaProof is not publicly released. Its method is described in Nature, November 2025 (Google Research).
Read the full section
- Lean 4 is an open-source interactive theorem prover built on dependent type theory (lean-lang.org). Mathlib is its community-maintained mathematics library (GitHub).
- lean-zip handles DEFLATE, zlib and gzip in pure Lean. It is whole-buffer only and decompresses about 1.45× slower than miniz_oxide. Four small C primitives are trusted, and each is checked against a pure-Lean reference (repo).
- AlphaProof is not publicly released. Its method is described in Nature, November 2025 (Google Research).
Technical analysis for researchers and developers
- Only a small kernel needs to be trusted. A checked proof certifies the formal statement as written, not what the author meant (0:01:24).
- It works like AlphaZero: reinforcement learning on about a million problems that a Gemini-based formalizer translated automatically into Lean (DeepMind).
- In lean-zip, a pull request could not merge unless the round-trip proof still passed. The proof acted as the CI gate (repo).
Read the full section
- Trust model. Only a small kernel needs to be trusted. A checked proof certifies the formal statement as written, not what the author meant (0:01:24).
- AlphaProof pipeline. It works like AlphaZero: reinforcement learning on about a million problems that a Gemini-based formalizer translated automatically into Lean (DeepMind). For the hardest problems it trains further at inference time on generated variants of the problem (Google Research).
- Agent workflow. In lean-zip, a pull request could not merge unless the round-trip proof still passed. The proof acted as the CI gate (repo).
- Cost of formalizing. The de Bruijn factor (lines of Lean per line of informal math) is often around 20:1 (0:11:49).
Claims and evidence
- Nobody had read the details. This is Buzzard's account (0:48:40). The later formalization itself is documented (lean-liquid).
- The proof is in a public repo with full history, so anyone can check it (repo).
- AlphaProof's score. The silver-level result was first reported by DeepMind and later peer-reviewed in Nature (Google Research).
Read the full section
- Nobody had read the details. Scholze told Buzzard that no one had checked a six-page technical proof in his preprint. This is Buzzard's account (0:48:40). The later formalization itself is documented (lean-liquid).
- lean-zip's round-trip theorem. The proof is in a public repo with full history, so anyone can check it (repo).
- AlphaProof's score. The silver-level result was first reported by DeepMind and later peer-reviewed in Nature (Google Research).
- AI labs formalizing math. Buzzard says OpenAI and Anthropic produce mathematics and then translate it into Lean (1:05:02). No reviewed source corroborates this.
- "Changed forever." The title is the channel's framing. No single discrete event is documented.
Context and prior work
Read the full section
- Lean grew out of de Moura's work on Z3. He moved from automated provers to an interactive prover to get a more expressive language. Avigad pushed for dependent types over HOL Light's simpler foundation (0:18:12).
- Buzzard recalls Mathlib starting at about 30,000 lines, without even the real or complex numbers (0:32:14).
- Hartnett covered Mathlib for Quanta in 2020 (Quanta).
- Tao's Equational Theories Project (September 2024) combined ATPs such as Vampire and Z3 with Lean to check about 22 million implications (GitHub).
Limitations, safety and contested findings
- De Moura notes that a compressor implemented as the identity function would satisfy the round-trip property.
- Buzzard expects AI-built libraries to be "more poorly thought out" than Mathlib, because pouring in tokens replaces finding the right abstraction (1:04:22).
- Lessard separates correctness from understanding. He also points out that Hales's proof settled the question but created little new mathematics (0:09:57).
Read the full section
- Specification gaming. De Moura notes that a compressor implemented as the identity function would satisfy the round-trip property. Extra properties, such as the output being smaller, are needed to rule that out (1:19:47). Hartnett reports skepticism that real programs can be fully specified (1:21:15).
- Library quality. Buzzard expects AI-built libraries to be "more poorly thought out" than Mathlib, because pouring in tokens replaces finding the right abstraction (1:04:22).
- Correctness vs. understanding. Lessard separates correctness from understanding. He also points out that Hales's proof settled the question but created little new mathematics (0:09:57).
- Test conditions. AlphaProof had far more time than human contestants and could not solve either combinatorics problem (DeepMind).
- The book. Science News calls its structure jumpy (Science News).
Business and practitioner implications
- Review is the bottleneck. Hartnett argues that agentic coding is currently limited by review and verification (1:21:56).
- Specs are the new risk. Value now depends on writing complete specifications. A gap in the spec becomes a gap in assurance.
- Agentic tools reduce the cost of learning Lean's syntax (1:05:32).
Read the full section
- Review is the bottleneck. Hartnett argues that agentic coding is currently limited by review and verification (1:21:56). Machine-checked properties can act as merge gates, as lean-zip shows.
- Specs are the new risk. Value now depends on writing complete specifications. A gap in the spec becomes a gap in assurance.
- Lower barrier to entry. Agentic tools reduce the cost of learning Lean's syntax (1:05:32). This is likely to widen use in cryptography and other mathematically heavy software, which de Moura names as targets (0:20:03).
The source trail.
Sources (15)
Mathematics Just Changed Forever — Kevin Hartnett
Transcript retrieved via companion_video_youtube_manual_captions; language en. Timestamped text, not direct audiovisual review. Source: https://www.youtube.com/watch?v=IRJDwtAreB4. Automatic captions/transcription may contain errors.
podcasters.spotify.comTranscript: Mathematics Just Changed Forever — Kevin Hartnett
companion_video_youtube_manual_captions
www.youtube.comWith Kevin Hartnett (@KSHartnett), Leonardo de Moura (@Leonard41111588), Kevin Buzzard, Jeremy Avigad and Paul Lessard. Kevin's new book, The Proof in the Code: How a Tru
Related coverage; assess separately
x.comMathematics just changed forever. https://t.co/HCToGkemYf
Related coverage; assess separately
x.com