A Comprehensive Overview of the Lebesgue Differentiation Theorem in Coq
Reynald Affeldt, Zachary Stone
TL;DR
This work presents a comprehensive formalization of the Lebesgue Differentiation Theorem in the Coq proof assistant within the MathComp-Analysis library, enabling the first Fundamental Theorem of Calculus for Lebesgue integration as a corollary. The approach decomposes the proof into modular, independently useful components—topological extensions (subspace topology, uniform convergence), measure-theoretic results (Egorov/Lusin/Tietze), and a novel proof of Urysohn's lemma—then derives the Hardy-Littlewood maximal inequality and Vitali covering lemmas to control averages. The combination of these intermediate results yields the differentiation theorem and key corollaries such as the first FTC and Lebesgue density, illustrating the practicality of large-scale formalization in Coq and advancing MathComp-Analysis with robust, reusable theory. The work also emphasizes incremental, collaborative development and documents nuances in formalizing real analysis, paving the way for future extensions like the Radon-Nikodym-based second FTC.
Abstract
Formalization of real analysis offers a chance to rebuild traditional proofs of important theorems as unambiguous theories that can be interactively explored. This paper provides a comprehensive overview of the Lebesgue Differentiation Theorem formalized in the Coq proof assistant, from which the first Fundamental Theorem of Calculus (FTC) for the Lebesgue integral is obtained as a corollary. Proving the first FTC in this way has the advantage of decomposing into loosely-coupled theories of moderate size and of independent interest that lend themselves well to incremental and collaborative development. We explain how we formalize all the topological constructs and all the standard lemmas needed to eventually relate the definitions of derivability and of Lebesgue integration of MathComp-Analysis, a formalization of analysis developed on top of the Mathematical Components library. In the course of this experiment, we substantially enrich MathComp-Analysis and even devise a new proof for Urysohn's lemma.
