English

Markov kernels in Mathlib's probability library

Digital Libraries 2026-04-24 v2 Probability

Abstract

The probability folder of Mathlib, Lean's mathematical library, makes a heavy use of Markov kernels. We present their definition and properties and describe the formalization of the disintegration theorem for Markov kernels. That theorem is used to define conditional probability distributions of random variables as well as posterior distributions. We then explain how Markov kernels are used in a more unusual way to get a common definition of independence and conditional independence and, following the same principles, to define sub-Gaussian random variables. Finally, we also discuss the role of kernels in our formalization of entropy and Kullback-Leibler divergence.

Cite

@article{arxiv.2510.04070,
  title  = {Markov kernels in Mathlib's probability library},
  author = {Rémy Degenne},
  journal= {arXiv preprint arXiv:2510.04070},
  year   = {2026}
}

Comments

33 pages

R2 v1 2026-07-01T06:17:41.726Z