Maintaining a Library of Formal Mathematics

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12236)


The Lean mathematical library mathlib is developed by a community of users with very different backgrounds and levels of experience. To lower the barrier of entry for contributors and to lessen the burden of reviewing contributions, we have developed a number of tools for the library which check proof developments for subtle mistakes in the code and generate documentation suited for our varied audience.


Formal mathematics Library development Linting 



We thank Jeremy Avigad and Jasmin Blanchette for comments on a draft of this paper, and Bryan Gin-ge Chen for many contributions to the mathlib documentation effort.


  1. 1.
    Andronick, J.: Successes in deployed verified software (and insights on key social factors). In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 11–17. Springer, Cham (2019). Scholar
  2. 2.
    Avigad, J., de Moura, L., Kong, S.: Theorem Proving in Lean. Carnegie Mellon University (2014)Google Scholar
  3. 3.
    Bancerek, G., et al.: The role of the Mizar Mathematical Library for interactive proof development in Mizar. J. Autom. Reasoning 61(1–4), 9–32 (2018). Scholar
  4. 4.
    Bourke, T., Daum, M., Klein, G., Kolanski, R.: Challenges and experiences in managing large-scale proofs. In: Jeuring, J., et al. (eds.) CICM 2012. LNCS (LNAI), vol. 7362, pp. 32–48. Springer, Heidelberg (2012). Scholar
  5. 5.
    Buzzard, K., Commelin, J., Massot, P.: Formalising perfectoid spaces. In: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2020, pp. 299–312. Association for Computing Machinery, New York (2020).
  6. 6.
    Cohen, C., Sakaguchi, K., Tassi, E.: Hierarchy Builder: algebraic hierarchies made easy in Coq with Elpi, February 2020.
  7. 7.
    Dahmen, S.R., Hölzl, J., Lewis, R.Y.: Formalizing the solution to the cap set problem. In: Harrison, J., O’Leary, J., Tolmach, A. (eds.) 10th International Conference on Interactive Theorem Proving (ITP 2019). Leibniz International Proceedings in Informatics (LIPIcs), vol. 141, pp. 15:1–15:19. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany (2019).
  8. 8.
    Ebner, G., Ullrich, S., Roesch, J., Avigad, J., de Moura, L.: A metaprogramming framework for formal verification. PACMPL 1(ICFP), 34:1–34:29 (2017). Scholar
  9. 9.
    Giesl, J., et al.: Analyzing program termination and complexity automatically with AProVE. J. Autom. Reasoning 58(1), 3–31 (2017). Scholar
  10. 10.
    Gonthier, G., et al.: A machine-checked proof of the odd order theorem. In: ITP 2013, pp. 163–179 (2013).
  11. 11.
    Han, J.M., van Doorn, F.: A formal proof of the independence of the continuum hypothesis. In: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2020, pp. 353–366. Association for Computing Machinery, New York (2020).
  12. 12.
    Kaliszyk, C., Sternagel, T.: Initial experiments on deriving a complete HOL simplification set. In: Blanchette, J.C., Urban, J. (eds.) PxTP 2013. EPiC Series in Computing, vol. 14, pp. 77–86. EasyChair (2013)Google Scholar
  13. 13.
    Mahboubi, A., Tassi, E.: Mathematical Components (2017)Google Scholar
  14. 14.
    Marlow, S., Peyton-Jones, S.: The Glasgow Haskell Compiler. In: Brown, A., Wilson, G. (eds.) The Architecture of Open Source Applications, Volume II (2012)Google Scholar
  15. 15.
    The mathlib Community: The Lean mathematical library. In: CPP, pp. 367–381. ACM, New York(2020).
  16. 16.
    de Moura, L., Kong, S., Avigad, J., van Doorn, F., von Raumer, J.: The Lean theorem prover (system description). In: Felty, A.P., Middeldorp, A. (eds.) CADE 2015. LNCS (LNAI), vol. 9195, pp. 378–388. Springer, Cham (2015). Scholar
  17. 17.
    Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002). Scholar
  18. 18.
    Ringer, T., Palmskog, K., Sergey, I., Gligoric, M., Tatlock, Z.: QED at large: a survey of engineering of formally verified software. Found. Trends® Program. Lang. 5(2–3), 102–281 (2019).
  19. 19.
    Sakaguchi, K.: Validating mathematical structures. arXiv (2020).
  20. 20.
    Selsam, D., Ullrich, S., de Moura, L.: Tabled typeclass resolution (2020).
  21. 21.
    Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad-hoc. In: Proceedings of POPL 1989, pp. 60–76 (1989).
  22. 22.
    Wenzel, M.: Isabelle technology for the Archive of Formal Proofs with application to MMT (2019).

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.University of PittsburghPittsburghUSA
  2. 2.Vrije Universiteit AmsterdamAmsterdamThe Netherlands

Personalised recommendations