This episode explores a 2021 formal proof, in the Lean theorem prover, that decision stumps (one-threshold classifiers) are PAC learnable. It starts from a simple learner that places its threshold at the largest positively labeled training point, so it can only err by calling true positives negative. The discussion explains why formalizing this on the real line is hard. Probability over uncountable spaces needs sigma-algebras and measurability, which textbooks skip, and the Giry monad lets the formal statement stay close to the pencil-and-paper one. It also compares this work with earlier formal ML efforts, including Certigrad's proof of unbiased stochastic backpropagation gradients in Lean, Coq-verified Hoeffding bounds for finite hypothesis classes, and VC-dimension theory, which the paper deliberately leaves out. The episode also sets up the claim that a step in the standard textbook proofs doesn't hold as stated. That claim should interest anyone curious about what machine-checked proofs reveal about familiar learning-theory results.
Sources:
1. A Formal Proof of PAC Learnability for Decision Stumps — Joseph Tassarotti, Koundinya Vajjha, Anindya Banerjee, Jean-Baptiste Tristan, 2019
http://arxiv.org/abs/1911.003852. A Formal Proof of PAC Learnability for Decision Stumps — Joseph Tassarotti, Koundinya Vajjha, Anindya Banerjee, Jean-Baptiste Tristan, 2021 (CPP '21; arXiv 1911.00385)
https://scholar.google.com/scholar?q=A+Formal+Proof+of+PAC+Learnability+for+Decision+Stumps3. Developing Bug-Free Machine Learning Systems With Formal Mathematics — Daniel Selsam, Percy Liang, David L. Dill, 2017 (ICML)
https://scholar.google.com/scholar?q=Developing+Bug-Free+Machine+Learning+Systems+With+Formal+Mathematics4. Formal Verification of Neural Network Robustness and Related Surveys (e.g., Reluplex: An Efficient SMT Solver for Verifying Deep Neural Networks) — Guy Katz, Clark Barrett, David Dill, Kyle Julian, Mykel Kochenderfer, 2017 (CAV)
https://scholar.google.com/scholar?q=Formal+Verification+of+Neural+Network+Robustness+and+Related+Surveys+%28e.g.%2C+Reluplex%3A+An+Efficient+SMT+Solver+for+Verifying+Deep+Neural+Networks%295. Formal Verification of a Stochastic Gradient Descent Convergence Proof / Formal Verification of Stochastic Gradient Descent (Lean and Coq lines of work) — Various, including Koundinya Vajjha, Avraham Shinnar, Barry Trager, Vincent Pestun, Nathan Fulton (Coq), 2021-2022
https://scholar.google.com/scholar?q=Formal+Verification+of+a+Stochastic+Gradient+Descent+Convergence+Proof+%2F+Formal+Verification+of+Stochastic+Gradient+Descent+%28Lean+and+Coq+lines+of+work%296. A Theory of the Learnable — Leslie G. Valiant, 1984
https://scholar.google.com/scholar?q=A+Theory+of+the+Learnable7. A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting — Yoav Freund, Robert E. Schapire, 1997
https://scholar.google.com/scholar?q=A+Decision-Theoretic+Generalization+of+On-Line+Learning+and+an+Application+to+Boosting8. Greedy Function Approximation: A Gradient Boosting Machine — Jerome H. Friedman, 2001
https://scholar.google.com/scholar?q=Greedy+Function+Approximation%3A+A+Gradient+Boosting+Machine9. Understanding Machine Learning: From Theory to Algorithms — Shai Shalev-Shwartz, Shai Ben-David, 2014
https://scholar.google.com/scholar?q=Understanding+Machine+Learning%3A+From+Theory+to+Algorithms10. Interactive Theorem Proving and Program Development: Coq'Art / Formalization of measure theory and Lebesgue integration in Isabelle/HOL — Johannes Hölzl and Armin Heller, 2011
https://scholar.google.com/scholar?q=Interactive+Theorem+Proving+and+Program+Development%3A+Coq%27Art+%2F+Formalization+of+measure+theory+and+Lebesgue+integration+in+Isabelle%2FHOL11. Formalization of Lebesgue Integration and Probability in Coq / Verified probabilistic reasoning (e.g., Coq-based measure theory by Affeldt, Cohen and collaborators) — Reynald Affeldt, Cyril Cohen, and collaborators, 2019-2023
https://scholar.google.com/scholar?q=Formalization+of+Lebesgue+Integration+and+Probability+in+Coq+%2F+Verified+probabilistic+reasoning+%28e.g.%2C+Coq-based+measure+theory+by+Affeldt%2C+Cohen+and+collaborators%2912. Formalizing Probability Theory in Lean's mathlib — Mathlib community, including Kexing Ying, Rémy Degenne and others, 2020-2024
https://scholar.google.com/scholar?q=Formalizing+Probability+Theory+in+Lean%27s+mathlib13. Machine Learning and Measure Theory textbook treatment: Foundations of Machine Learning / Foundations of Modern Probability — Mohri, Rostamizadeh, Talwalkar; Olav Kallenberg, 2018 / 2002
https://scholar.google.com/scholar?q=Machine+Learning+and+Measure+Theory+textbook+treatment%3A+Foundations+of+Machine+Learning+%2F+Foundations+of+Modern+Probability14. The Lean Theorem Prover (System Description) — Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, Jakob von Raumer, 2015 (CADE)
https://scholar.google.com/scholar?q=The+Lean+Theorem+Prover+%28System+Description%2915. The Lean 4 Theorem Prover and Programming Language — Leonardo de Moura and Sebastian Ullrich, 2021 (CADE)
https://scholar.google.com/scholar?q=The+Lean+4+Theorem+Prover+and+Programming+Language16. Formal Verification of a Realistic Compiler (CompCert) — Xavier Leroy, 2009
https://scholar.google.com/scholar?q=Formal+Verification+of+a+Realistic+Compiler+%28CompCert%2917. seL4: Formal Verification of an OS Kernel — Gerwin Klein et al., 2009
https://scholar.google.com/scholar?q=seL4%3A+Formal+Verification+of+an+OS+Kernel18. Certified Programming with Dependent Types / Developing Bug-Free Machine Learning Systems With Formal Mathematics (Certigrad) — Daniel Selsam, Percy Liang, David L. Dill, 2017
https://scholar.google.com/scholar?q=Certified+Programming+with+Dependent+Types+%2F+Developing+Bug-Free+Machine+Learning+Systems+With+Formal+Mathematics+%28Certigrad%2919. Certifying the True Error: Machine Learning in Coq with Verified Generalization Guarantees — Alexander Bagnall, Gordon Stewart, 2019
https://scholar.google.com/scholar?q=Certifying+the+True+Error%3A+Machine+Learning+in+Coq+with+Verified+Generalization+Guarantees20. Learnability and the Vapnik-Chervonenkis Dimension — Anselm Blumer, Andrzej Ehrenfeucht, David Haussler, Manfred K. Warmuth, 1989
https://scholar.google.com/scholar?q=Learnability+and+the+Vapnik-Chervonenkis+Dimension21. Verified Analysis of Random Trees — Manuel Eberl, Max W. Haslbeck, Tobias Nipkow, 2018
https://scholar.google.com/scholar?q=Verified+Analysis+of+Random+Trees22. Formal-ML: formal machine learning library for Lean — Martin Zinkevich, 2020
https://scholar.google.com/scholar?q=Formal-ML%3A+formal+machine+learning+library+for+Lean23. A Formal Proof of the Expressiveness of Deep Learning — Alexander Bentkamp, Jasmin Christian Blanchette, Dietrich Klakow, 2019
https://scholar.google.com/scholar?q=A+Formal+Proof+of+the+Expressiveness+of+Deep+Learning24. A Formally Verified Proof of the Central Limit Theorem — Jeremy Avigad, Johannes Hölzl, Luke Serafin, 2017
https://scholar.google.com/scholar?q=A+Formally+Verified+Proof+of+the+Central+Limit+Theorem25. Verified Tail Bounds for Randomized Programs — Joseph Tassarotti, Robert Harper, 2018
https://scholar.google.com/scholar?q=Verified+Tail+Bounds+for+Randomized+Programs26. Formal verification of generalization / PAC-Bayes and Rademacher complexity bounds in Lean 4 / mathlib (2023-2025 follow-up work) — Various (Lean/mathlib community; Zinkevich-style learning-theory libraries; Lean 4 'LeanMachineLearning' efforts), 2023-2025
https://scholar.google.com/scholar?q=Formal+verification+of+generalization+%2F+PAC-Bayes+and+Rademacher+complexity+bounds+in+Lean+4+%2F+mathlib+%282023-2025+follow-up+work%29Interactive Visualization: Formal Lean Proof of PAC Learnability for Decision Stumps