Hosted by Ryan Peterman
Written by a model from the transcript; not yet reviewed.
This episode features a detailed discussion with the creator of Lean, a programming language and proof assistant used for software verification and formal mathematics. The conversation explores how Lean provides machine-checkable proofs to show the absence of bugs, contrasting with traditional program testing. The guest explains how artificial intelligence is transforming formal verification by automating the tedious process of writing and maintaining complex proofs, enabling achievements like solving International Mathematical Olympiad problems and verifying C libraries. Listeners will gain insight into how formal specifications could eventually replace test suites and change how software and mathematics are developed.
The host opens the episode, introduces Lean, and references Dijkstra’s quote about bug testing.
The guest explains Lean as both a programming language and a proof assistant, outlining its core capabilities.
Discussion of Lean’s two main use cases: reasoning about Lean programs and verifying programs written in other languages via shallow and deep embeddings.
A step‑by‑step illustration of proving a C buffer‑overrun property using Lean and the N‑E‑S tool.
Comparison between test suites and formal proofs, highlighting the ability of proofs to guarantee absence of bugs.
Exploration of how AI can generate Lean code, rewrite proofs, and automate verification tasks, reducing human effort.
Description of Lean’s build system, IDE support, and extensibility, emphasizing the importance of the Info View and community extensions.
Overview of Lean’s impact on mathematics, including high‑profile formalizations and the role of the Lean Mathematical Library.
Speculation on how AI will further reduce verification costs, expand Lean’s adoption, and shape the future of handwritten mathematics.
Explanation of Z3’s role as a constraint solver, its differences from Lean, and how Lean complements Z3 in verification workflows.
Insight into the technical hurdles of porting Lean from C++ to Lean itself, including proof maintenance and kernel design.
The host discusses Lean’s ambition to become a leading tool for software and hardware verification, highlighting AWS support and the need for funding.
Defining Lean and Proofsinsight
The guest defines Lean as both a programming language and a proof platform that generates machine-checkable proofs for absolute assurance.
Verifying C Array Boundsstrategy
The guest explains how to write a mathematical statement in Lean to ensure C array accesses stay within valid bounds.
AI Verifies Compression Librarystory
The guest shares a story where an AI successfully translated the C compression library Z Lib into Lean and proved it correctly decompresses data after one week.
Inefficient Programs as Specsstrategy
The guest suggests writing a naive, inefficient program as a specification and asking AI to generate and prove an optimized equivalent.
Lean Implemented in Leaninsight
The discussion covers how Lean is implemented in Lean itself, with independent kernels checking the typing of proofs.
The guest discusses how AI combined with Lean has achieved gold medals on International Mathematical Olympiad problems.
The Liquid Tensor Experimentstory
The guest recounts how researchers formalized a complex mathematical result by Peter Scholze using Lean without fully understanding the original proof.
Z3 Versus Lean Differencesinsight
The guest contrasts the fully automated Z3 SMT constraint solver with the interactive proof assistant Lean.
“And in my understanding is that Lean and formalizing proofs can be used to show the absence of bugs.”
“You can check your proofs and get absolute assurance they are correct.”
“And A I synthesizing the codes and a proof that's the code that was synthesized meets your specification, right?”
“And believe it or not, the A I, after one week, succeeded doing the whole thing.”
“But with a proof, you're covering all possible cases.”
“where you can prove things about your programs, right?”
“not writing units tests anymore, I'm writing properties and proving them, the AI is proving most of them for me.”
“the proof, this is game changer in my point of view.”
“and I would tell, look, you should work on your people skills, I mean, because it helps a lot, I mean, when you have to interact with a community, with people.”
Leonardo de Moura is the creator of Lean and the Z3 theorem prover. I talked with him about how Lean works and why LLMs plus Lean will fundamentally change how we write software and do math. • My ergonomic keyboard project I mentioned, you can follow along here: https://read.compose.llc/ • The Kickstarter page for it: https://www.kickstarter.com/projects/ryanlpeterman/compose-simple-ergonomics-beautifully-done Podcast links: • YouTube: https://youtu.be/KzdYKeAqWhY • Apple: https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835 • Transcript: https://www.developing.dev/p/creator-of-lean-the-end-of-handwritten Thank you to this episode's sponsor for supporting my work: • WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at https://workos.com/ Timestamps: (00:00) Intro (00:28) How formal verification works (05:21) A new way of writing software (13:15) Proof assistants vs programming languages (21:06) How Lean has assisted in mathematical breakthroughs (32:03) When is it worth formalizing software (33:29) How Lean will impact handwritten math (38:55) The Z3 theorem prover project he started (45:44) The most technically challenging work of his career (51:10) Lean vs its competitors (01:00:37) The future of Lean (01:04:10) Technical book recommendations (01:06:15) Advice for his younger self (01:07:10) Outro Where to find Leonardo: • Wikipedia: https://en.wikipedia.org/wiki/Leonardo_de_Moura • Website: https://leodemoura.github.io/ • GitHub: https://github.com/leodemoura • LinkedIn: https://www.linkedin.com/in/leonardo-de-moura-26a27b5/ • X/Twitter: https://x.com/Leonard41111588 Where to find Ryan: • Newsletter: https://www.developing.dev/ • X/Twitter: https://x.com/ryanlpeterman • LinkedIn: https://www.linkedin.com/in/ryanlpeterman/ • Threads: https://www.threads.com/@ryanlpeterman • Instagram: https://www.instagram.com/ryanlpeterman • TikTok: https://www.tiktok.com/@ryanlpeterman Referenced in this episode: • Lean 4: https://github.com/leanprover/lean4 • Mathlib: Lean Mathematical Library: https://github.com/leanprover-community/mathlib4 • Lean4Lean: https://github.com/digama0/lean4lean • Liquid Tensor Experiment: https://xenaproject.wordpress.com/2020/12/05/liquid-tensor-experiment/ • Veil protocol verification language: https://veil.dev/ • Z3 theorem prover: https://github.com/Z3Prover/z3 • seL4 formally verified microkernel: https://github.com/seL4/seL4
9,989 words · 2 speakers
Speaker names marked are inferred from speaking time and the show’s known hosts — they are not voice-verified.
Page updated · transcript and summary are machine-generated