Abstract:We describe the formalization of the existence and uniqueness of Haar measure in the Lean theorem prover. The Haar measure is an invariant regular measure on locally compact groups, and it has not been formalized in a proof assistant before. We will also discuss the measure theory library in Lean's mathematical library \textsf{mathlib}, and discuss the construction of product measures and the proof of Fubini's theorem for the Bochner integral.
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to formalize the existence and uniqueness of the Haar measure and implement this formalization in the Lean theorem prover. Specifically, the author describes how to define the Haar measure in Lean and prove its uniqueness. In addition, the author also discusses the measure - theory library in Lean's mathlib, especially the construction of product measures and the proof of Fubini's theorem (for Bochner integrals).
### Specific Background of the Problem
1. **Concept of Haar Measure**:
Haar measure is an invariant regular measure on a locally compact group and has translation invariance. For non - Abelian groups, it is necessary to distinguish between left Haar measure and right Haar measure. The Haar measure is essentially unique, which means that any invariant measure is a constant multiple of a selected Haar measure.
2. **Challenges of Formalization**:
Before this, the Haar measure had not been formalized in any proof assistant. The author uses the Lean theorem prover and its mathlib to complete this task. In the process, the author not only extends the measure - theory library in mathlib but also adds content such as product measures and Fubini's theorem.
3. **Contributions and Innovations**:
- **Formalizing Haar Measure**: For the first time, formalize the existence and uniqueness of the Haar measure in Lean.
- **Extending mathlib**: Improve and extend the measure - theory library in mathlib, including product measures and Fubini's theorem.
- **Technical Details**: Solve the technical problems encountered in the formalization process, such as fixing the loopholes in the key theorems in Halmos' book.
### Main Content of the Paper
1. **Introduction**:
Introduce the importance of measure theory and its applications in integration and probability theory, with special emphasis on the concepts of Lebesgue measure and translation invariance. Then introduce the Haar measure as an important generalization of the Lebesgue measure.
2. **Preliminaries**:
- **Lean and mathlib**: Briefly introduce Lean and its dependent - type theory, as well as the basic structure of the mathlib library.
- **Mathematical Foundations**: Provide the necessary topological, analytical and algebraic backgrounds.
3. **Measure - theory Library**:
Describe the existing measure - theory library in mathlib, including the definitions of σ - algebras, measurable functions, outer measures and measures.
4. **Product Measures and Fubini's Theorem**:
Discuss in detail the definition and properties of product measures and give the proof of Fubini's theorem. This part of the content is crucial for proving the uniqueness of the Haar measure.
5. **Existence of Haar Measure**:
Define the left Haar measure and prove its existence. Discuss how to derive the right Haar measure from the left Haar measure.
6. **Uniqueness of Haar Measure**:
Prove the uniqueness of the Haar measure on second - countable locally compact groups. The author points out that since there are loopholes in some proofs in Halmos' book, they have been corrected during the formalization process.
### Summary
This paper fills a gap in this field by formalizing the existence and uniqueness of the Haar measure in Lean. At the same time, the author's extension of the mathlib library also provides valuable resources and technical support for future mathematical formalization work.