Skip to main content
Log in

Measure Construction by Extension in Dependent Type Theory with Application to Integration

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We report on an original formalization of measure and integration theory in the Coq proof assistant. We build the Lebesgue measure following a standard construction that had not yet been formalized in proof assistants based on dependent type theory: by extension of a measure over a semiring of sets. We achieve this formalization by leveraging on existing techniques from the Mathematical Components project. We explain how we extend Mathematical Components’ iterated operators and mathematical structures for analysis to provide support for infinite sums and extended real numbers. We introduce new mathematical structures for measure theory and incidentally provide an illustrative, concrete application of Hierarchy-Builder, a generic tool for the formalization of hierarchies of mathematical structures. This formalization of measure theory provides the basis for a new formalization of the Lebesgue integration compatible with the Mathematical Components project.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

Notes

  1. The Odd Order theorem, a.k.a. the Feit-Thompson Theorem, states that groups of odd order are solvable. This theorem relies on finite group theory, character theory, and Galois theory.

  2. https://github.com/math-comp/.

  3. Table 1 also contains notations that we will introduce later in this paper. We summarize these notations together to highlight their resemblances and serve as a reading guide.

  4. https://github.com/math-comp/analysis/blob/7d4ed9cf0e32f6be5b50c092cc8d93a21ec4dee3/theories/lebesgue_integral.v#L668

  5. https://depot.lipn.univ-paris13.fr/mayero/coq-num-analysis/-/blob/d76dc70b06f70e2f1e99fd2ba3b22bba6ea78c91/Lebesgue/simple_fun.v#L809

  6. https://us.metamath.org/mpeuni/df-vol.html

References

  1. Abate, C., Haselwarter, P.G., Rivas, E., Muylder, A. V., Winterhalter, T., Hritcu, C., Maillard, K., Spitters, B.: SSProve: a foundational framework for modular cryptographic proofs in Coq. In: 34th IEEE Computer Security Foundations Symposium (CSF 2021), Dubrovnik, Croatia, June 21–25, 2021, pp 1–15. IEEE (2021)

  2. Affeldt, R., Cohen, C., Kerjean, C., Mahboubi, A., Rouhling, D., Sakaguchi, K.: Competing inheritance paths in dependent type theory: a case study in functional analysis. In: 10th International Joint Conference on Automated Reasoning (IJCAR 2020), Paris, France, June 29–July 6, vol. 12167(2) of Lecture Notes in Artifical Intelligence, pp. 3–20. Springer (2020)

  3. Affeldt, R., Cohen, C., Rouhling, D.: Formalization techniques for asymptotic reasoning in classical analysis. J. Formaliz. Reason. 11(1), 43–76 (2018)

    MathSciNet  MATH  Google Scholar 

  4. Affeldt, R., Cohen, C., Saito, A.: Semantics of probabilistic programs using s-finite kernels in coq. In: 12th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2023) Boston, MA, USA, January 16–17, 2023, pp. 3–16. ACM (2023)

  5. Affeldt, R., Garrigue, J., Nowak, D., Saikawa, T.: A trustful monad for axiomatic reasoning with probability and nondeterminism. J. Funct. Program. 31(E17) (2021)

  6. Affeldt, R., Garrigue, J., Saikawa, T.: Reasoning with conditional probabilities and joint distributions in Coq. Comput. Softw. 37(3), 79–95 (2020)

    MATH  Google Scholar 

  7. Affeldt, R., Ishiguro, Y.: Formalization of the Lebesgue-Stieltjes measure in MathComp-Analysis. https://github.com/math-comp/analysis/pull/677, 2023. Pull request to [42]. Completed in (2022)

  8. Affeldt, R., Ishiguro, Y.: Formalization of the Radon-Nikodým theorem in MathComp-Analysis. https://github.com/math-comp/analysis/pull/818, 2023. Pull request to [42]. Completed in (2022)

  9. Bancerek, G., Bylinski, C., Grabowski, A., Kornilowicz, A., Matuszewski, R., Naumowicz, A., Pa̧k, K.: The role of the Mizar Mathematical Library for interactive proof development in Mizar. J. Autom. Reason. 61(1–4), 9–32 (2018)

  10. Bertot, Y., Gonthier, G., Biha, S. O., Pasca, I.: Canonical big operators. In: 21st International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2008), Montreal, Canada, August 18–21, 2008, volume 5170 of Lecture Notes in Computer Science, pp. 86–101. Springer (2008)

  11. Bialas, J.: Properties of Caratheodor’s measure. Technical report (1992). Formalized Mathematics 4

  12. Bialas, J.: The one-dimensional Lebesgue measure. Technical report (1995). Formalized Mathematics 7

  13. Boldo, S., Clément, F., Martin, V., Mayero, M., Mouhcine, H.: A Coq formalization of Lebesgue induction principle and Tonelli’s theorem. In: 25th International Symposium on Formal Methods (FM 2023), Lübeck, Germany, March 6–10, 2023, volume 14000 of Lecture Notes in Computer Science, pp 39–55. Springer (2023)

  14. Boldo, S., Clément, F., Faissole, F., Martin, V., Mayero, M.: A Coq formalization of Lebesgue Integration of nonnegative functions. J. Autom. Reason. 66(2), 175–213 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  15. Boldo, S., Clément, F., Leclerc, L.: A Coq formalization of the Bochner integral (2022). arXiv cs.LO arXiv:2201.03242

  16. Clément, F., Martin, V.: Lebesgue integration, detailed proofs to be formalized in Coq (2021). arXiv cs.LO arXiv:2101.05678

  17. Coble, A. R.: Anonymity, information, and machine-assisted proof. PhD thesis, University of Cambridge, King’s College (2010). TR UCAM-CL-TR-785

  18. Cohen, C.: Formalized algebraic numbers: construction and first-order theory. PhD thesis, École Doctorale de l’École Polytechnique, Laboratoire d’Informatique de l’École Polytechnique (2012)

  19. Cohen, C., Sakaguchi, K., Tassi, E.: Hierarchy Builder: Algebraic hierarchies made easy in Coq with Elpi (system description). In: 5th International Conference on Formal Structures for Computation and Deduction (FSCD 2020), June 29–July 6, 2020, Paris, France (Virtual Conference), vol. 167 of LIPIcs, pp. 34:1–34:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020)

  20. Constable, R.L., Allen, S.F., Bromley, M., Cleaveland, R., Cremer, J.F., Harper, R., Howe, D.J., Knoblock, T.B., Mendler, N.P., Panangaden, P., Sasaki, J.T., Smith, S.F.: Implementing mathematics with the Nuprl proof development system. Prentice Hall, Upper Saddle River (1986)

    Google Scholar 

  21. Cruz-Filipe, L.: A constructive formalization of the fundamental theorem of calculus. In: Selected Papers of the Second International Workshop on Types for Proofs and Programs (TYPES 2002), Berg en Dal, The Netherlands, April 24–28, 2002, volume 2646 of Lecture Notes in Computer Science, pp. 108–126. Springer (2002)

  22. Endou, N.: Reconstruction of the one-dimensional Lebesgue measure. Technical report, National Institute of Technology, Gifu College. Formalized Mathematics 28(1), 93–104 (2020)

  23. Garillot, F., Gonthier, G., Mahboubi, A., Rideau, L.: Packaging mathematical structures. In: 22nd International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2009), Munich, Germany, August 17–20, 2009, volume 5674 of Lecture Notes in Computer Science, pp. 327–342. Springer (2009)

  24. Gonthier, G., Asperti, A., Avigad, J., Bertot, Y., Cohen, C., Garillot, F., Roux, S. L., Mahboubi, A., O’Connor, R., Biha, S. O., Pasca, I., Rideau, L., Solovyev, A., Tassi, E., Théry, L.: A machine-checked proof of the odd order theorem. In: 4th International Conference on Interactive Theorem Proving (ITP 2013), Rennes, France, July 22–26, 2013, volume 7998 of Lecture Notes in Computer Science, pp 163–179. Springer (2013)

  25. Harrison, J.: The HOL light theory of Euclidean space. J. Autom. Reason. 50(2), 173–190 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  26. Hölzl, J., Heller, A.: Three chapters of measure theory in Isabelle/HOL. In: Second International Conference on Interactive Theorem Proving (ITP 2011), Berg en Dal, The Netherlands, August 22–25, 2011, volume 6898 of Lecture Notes in Computer Science, pp 135–151. Springer (2011)

  27. Hurd, J.: Formal verification of probabilistic algorithms. PhD thesis, University of Cambridge (2002). UCAM-CL-TR-566

  28. Ishiguro, Y., Affeldt, R.: A progress report on formalization of measure theory with MathComp-analysis. In: 25th Workshop on Programming and Programming Languages (PPL2023), Nagoya University, March 6–8, 2023. Japan Society for Software Science and Technology (2023)

  29. Klenke, A.: Probability Theory: A Comprehensive Course, 2nd edn. Springer, New Year (2014)

    Book  MATH  Google Scholar 

  30. Le projet MILC. Numerical analysis in Coq. https://depot.lipn.univ-paris13.fr/mayero/coq-num-analysis, 2023. Since 2018. See also https://lipn.univ-paris13.fr/MILC

  31. Lester, D. R.: Topology in PVS: Continuous mathematics with applications. In: 2nd Workshop on Automated Formal Methods (AFM 2007), pp. 11–20. Association for Computing Machinery (2007)

  32. Li, D.: Intégration et applications—Cours et exercices corrigés. Eyrolles (2016)

  33. Mathematical Components Team. Mathematical Components library. https://github.com/math-comp/math-comp, 2007. Last stable version: 2.0 (2023)

  34. Megill, N.: Metamath: A Computer Language for Mathematical Proofs. (2019). https://us.metamath.org/downloads/metamath.pdf. With extensive revisions by David A. Wheeler

  35. Mhamdi, T., Hasan, O., Tahar, S.: On the formalization of the Lebesgue integration theory in HOL. In: First International Conference on Interactive Theorem Proving (ITP 2010), Edinburgh, UK, July 11–14, 2010, volume 6172 of Lecture Notes in Computer Science, pp. 387–402. Springer (2010)

  36. Owre, S., Rushby, J. M., Shankar, N.: PVS: A prototype verification system. In: 11th International Conference on Automated Deduction (CADE-11), Saratoga Springs, NY, USA, June 15–18, 1992, vol. 607 of Lecture Notes in Computer Science, pp. 748–752. Springer (1992)

  37. Rushby, J.M., Owre, S., Shankar, N.: Subtypes for specifications: predicate subtyping in PVS. IEEE Trans. Softw. Eng. 24(9), 709–720 (1998)

    Article  Google Scholar 

  38. Tassarotti, J., Tristan, J., Palmskog, K.: coq-proba: A probability theory library for the Coq theorem prover. https://github.com/jtassarotti/coq-proba, 2023. Since (2019)

  39. Tassarotti, J., Vajjha, K., Banerjee, A., Tristan, J.: A formal proof of PAC learnability for decision stumps. In: 10th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2021), Virtual Event, Denmark, January 17–19, 2021, pp. 5–17. ACM (2021)

  40. The Agda Team. Agda’s documentation v2.6.3, 2023. https://agda.readthedocs.io/en/v2.6.3

  41. The Coq Development Team. The Coq Proof Assistant Reference Manual. Inria, 2023. https://coq.inria.fr/refman/. Version 8.17.0

  42. The MathComp-Analysis Team. MathComp-Analysis: Mathematical components compliant analysis library. https://github.com/math-comp/analysis, 2023. Since 2017. Last stable version: 0.6.2. This paper refers to the branch hierarchy-builder

  43. The mathlib community. Lean mathematical components library. https://github.com/leanprover-community/mathlib 2023. Since (2017)

  44. The NASALib development team. NASA PVS library of formal developments. Current version: 7.1.1. https://github.com/nasa/pvslib. (2023)

  45. van Doorn, F.: Formalized Haar measure. In: 12th International Conference on Interactive Theorem Proving (ITP 2021) June 29–July 1, 2021, Rome, Italy (Virtual Conference), volume 193 of LIPIcs, pp. 18:1–18:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021)

  46. Wiedijk, F.: Formalizing 100 theorems. http://www.cs.ru.nl/~freek/100 (2023)

Download references

Author information

Authors and Affiliations

Authors

Contributions

RA and CC wrote the main manuscript text, prepared figures and tables, and reviewed the manuscript.

Corresponding author

Correspondence to Reynald Affeldt.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Affeldt, R., Cohen, C. Measure Construction by Extension in Dependent Type Theory with Application to Integration. J Autom Reasoning 67, 28 (2023). https://doi.org/10.1007/s10817-023-09671-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10817-023-09671-5

Keywords

Navigation