Skip to main content
Open Access Publications from the University of California

UC San Diego

UC San Diego Electronic Theses and Dissertations bannerUC San Diego

Formalizing the Beginnings of Bayesian Probability Theory in the Lean Theorem Prover


In this master's thesis, we present the beginnings of a formalization of Bayesian Probability Theory in the Lean Theorem Prover, a rapidly developing software for mathematical proof checking principally developed by Leonardo de Moura at Microsoft Research that has enabled the rapid growth of a substantial digitized mathematics library (known as ``mathlib'') over the past few years. We start with a short introduction to Lean, describing the very basics of its theory and how definitions and proofs are written in its type-theoretic syntax.

We then move on to a mathematical description a particular part of Lean's mathematics library that provides all of the theoretical foundation we need for our formalization. This includes a description of the measure-theoretic foundations of probability theory, including concepts of outer measures, measurable spaces, the Carathéodory criterion, measures, measure maps, and measure restrictions. We then relate these foundations to probability theory as we know it, defining independence, conditional probability, random variables, joint distributions, marginal distributions, and conditional distributions and proving interesting facts about these constructions. We reveal that many of the definitions and properties that may be taken for granted (as "axioms") in probability theory actually have a fundamentally formal definition from the very basics of measure theory. This work sets up myself and other members of the Lean Community for many more exciting developments and first formalizations in probability theory in the coming months.

Main Content
For improved accessibility of PDF content, download the file to your device.
Current View