Abstract
Real analysis is pervasive to many applications, if only because it is a suitable tool for modeling physical or socio-economical systems. As such, its support is warranted in proof assistants, so that the users have a way to formally verify mathematical theorems and correctness of critical systems. The Coq system comes with an axiomatization of standard real numbers and a library of theorems on real analysis. Unfortunately, this standard library is lacking some widely used results. For instance, power series are not developed further than their definition. Moreover, the definitions of integrals and derivatives are based on dependent types, which make them especially cumbersome to use in practice. To palliate these inadequacies, we have designed a user-friendly library: Coquelicot. An easier way of writing formulas and theorem statements is achieved by relying on total functions in place of dependent types for limits, derivatives, integrals, power series, and so on. To help with the proof process, the library comes with a comprehensive set of theorems that cover not only these notions, but also some extensions such as parametric integrals, two-dimensional differentiability, asymptotic behaviors. It also offers some automation for performing differentiability proofs. Moreover, Coquelicot is a conservative extension of Coq’s standard library and we provide correspondence theorems between the two libraries. We have exercised the library on several use cases: in an exam at university entry level, for the definitions and properties of Bessel functions, and for the solution of the one-dimensional wave equation.
Similar content being viewed by others
References
Baccalauréat général, Série S, Mathématiques, Session 2013, June 2013 (2013). http://eduscol.education.fr/prep-exam/sujets/13MASCOMLR1.pdf
Bertot, Y.: Proving the convergence of a sequence based on algebraic-geometric means to π (2013). http://www-sop.inria.fr/members/Yves.Bertot/proofs.html
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, Berlin (2004)
Besson, F.: Fast reflexive arithmetic tactics: the linear case and beyond. In: Proceedings of the International Workshop on Types for Proofs and Programs (TYPES’06), Nottingham, UK. Lecture Notes in Computer Science, vol. 4502, pp. 48–62 (2006)
Boldo S., Clément F., Filliâtre J.-C., Mayero M., Melquiond G., Weis P.: Wave equation numerical resolution: a comprehensive mechanized proof of a C program. J. Autom. Reason. 50(4), 423–456 (2013)
Boldo, S., Lelay, C., Melquiond, G.: Improving real analysis in Coq: a user-friendly approach to integrals and derivatives. In: Hawblitzel, C., Miller, D. (eds.) Proceedings of the 2nd International Conference on Certified Programs and Proofs (CPP), Kyoto, Japan. Lecture Notes in Computer Science, vol. 7679, pp. 289–304 (2012)
Boldo, S., Lelay, C., Melquiond, G.: Formalization of real analysis: a survey of proof assistants and libraries. Math. Struct. Comput. Sci. (2014, to be published). http://hal.inria.fr/hal-00806920
Cohen, C.: Reasoning about big enough numbers in Coq. In: Proceedings of the 4th Coq Workshop, Princeton, NJ, USA (2012)
Cruz-Filipe, L., Geuvers, H., Wiedijk, F.: C-CoRN: the constructive Coq repository at Nijmegen. In: Asperti, A., Bancerek, G., Trybulec, A. (eds.) Proceedings of the 3rd International Conference of Mathematical Knowledge Management (MKM). Lecture Notes in Computer Science, vol. 3119, pp. 88–103 (2004)
Cruz-Filipe, L.: A constructive formalization of the fundamental theorem of calculus. In: Geuvers, H., Wiedijk, F. (eds.) Proceedings of the International Workshop on Types for Proofs and Programs (TYPES’02). Lecture Notes in Computer Science, vol. 2646, pp. 108–126. Springer, Berlin (2003)
Daumas M., Lester D., Muñoz C.: Verified real number calculations: a library for interval arithmetic. IEEE Trans. Comput. 58(2), 226–237 (2009)
Dutertre, B.: Elements of mathematical analysis in PVS. In: von Wright, J., Grundy, J., Harrison, J. (eds.) Proceedings of the 9th International Conference Theorem Proving in Higher Order Logics (TPHOLs). Lecture Notes in Computer Science, vol. 1125, pp. 141–156 (1996)
Fleuriot, J.: On the mechanization of real analysis in Isabelle/HOL. In: Aagaard, M., Harrison, J. (eds.) Proceeding of the 13th International Conference of Theorem Proving in Higher Order Logics (TPHOLs). Lecture Notes in Computer Science, vol. 1869, pp. 145–161 (2000)
Gamboa R., Kaufmann M.: Nonstandard analysis in ACL2. J. Autom. Reason. 27(4), 323–351 (2001)
Geuvers, H., Niqui, M.: Constructive reals in Coq: axioms and categoricity. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) Proceedings of the International Workshop on Types for Proofs and Programs (TYPES’00). Lecture Notes in Computer Science, vol. 2277, pp. 79–95 (2002)
Harrison J.: Constructing the real numbers in HOL. Form. Methods Syst. Des. 5(1–2), 35–59 (1994)
Harrison, J.: HOL light: an overview. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Proceedings of the 22nd International Conference on Theorem Proving in Higher Order Logics (TPHOLs), Munich, Germany. Lecture Notes in Computer Science, vol. 5674, pp. 60–66 (2009)
Harrison J.: The HOL light theory of Euclidean space. J. Autom. Reason. 50, 173–190 (2013)
Hölzl, J., Immler, F., Huffman, B.: Type classes and filters for mathematical analysis in Isabelle/HOL. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds) Proceedings of the 4th International Conference on Interactive Theorem Proving (ITP), Rennes, France. Lecture Notes in Computer Science, vol. 7998, pp. 279–294 (2013)
Kaliszyk C., O’Connor R.: Computing with classical real numbers. J. Formaliz. Reason. 2(1), 27–39 (2009)
Krebbers, R., Spitters, B.: Type classes for efficient exact real arithmetic in Coq. Log. Methods Comput. Sci. 9(1:1), 1–27 (2013)
Lelay, C.: A new formalization of power series in Coq. In: 5th Coq Workshop, Rennes, France, July 2013, pp. 1–2 (2013). http://coq.inria.fr/coq-workshop/2013#Lelay
Lelay, C., Melquiond, G.: Différentiabilité et intégrabilité en Coq. Application à la formule de d’Alembert. In: 23èmes Journées Francophones des Langages Applicatifs, Carnac, France, pp. 119–133 (2012)
Mayero, M.: Formalisation et automatisation de preuves en analyses réelle et numérique. PhD thesis, Université Paris VI (2001)
McLaughlin, S., Harrison, J.: A proof-producing decision procedure for real arithmetic. In: Nieuwenhuis, R. (ed.) Proceedings of the 20th International Conference on Automated Deduction (CADE-20), Tallinn, Estonia. Lecture Notes in Computer Science, vol. 3632, pp. 295–314 (2005)
Melquiond, G.: Proving bounds on real-valued functions with computations. In: Armando, A., Baumgartner, P., Dowek, G. (eds.) Proceedings of the 4th International Joint Conference on Automated Reasoning (IJCAR), Sydney, Australia. Lecture Notes in Artificial Intelligence, vol. 5195, pp. 2–17 (2008)
Muñoz C., Narkawicz A.: Formalization of a Bernstein polynomials and applications to global optimization. J. Autom. Reason. 51(2), 151–196 (2013)
Naumowicz, A., Korniłowicz, A.: A brief overview of Mizar. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Proceedings of the 22th International Conference on Theorem Proving in Higher Order Logics (TPHOLs). Lecture Notes in Computer Science, vol. 5674, pp. 67–72 (2009)
O’Connor R.: A monadic, functional implementation of real numbers. Math. Struct. Comput. Sci. 17(1), 129–159 (2007)
O’Connor R., Spitters B.: A computer-verified monadic functional implementation of the integral. Theor. Comput. Sci. 411(37), 3386–3402 (2010)
Owre, S., Rushby, J., Shankar, N.: PVS: a prototype verification system. In: Kapur, D. (ed.) Proceedings of the 11th International Conference on Automated Deduction (CADE), Saratoga, NY, June 1992. Lecture Notes in Artificial Intelligence, vol. 607, pp. 748–752 (1992)
Pottier, L.: Connecting Gröbner bases programs with Coq to do proofs in algebra, geometry and arithmetics. In: Sutcliffe, G., Rudnicki, P., Schmidt, R.A., Konev, B., Schulz, S. (eds.) Knowledge Exchange: Automated Provers and Proof Assistants. CEUR Workshop Proceedings, Doha, Qatar, pp. 67–76 (2008)
Rushby J., Owre S., Shankar N.: Subtypes for specifications: predicate subtyping in PVS. IEEE Trans. Softw. Eng. 24(9), 709–720 (1998)
Trybulec, A.: Some features of the Mizar language. In: Proceedings of the ESPRIT Workshop, Torino, Italy (1993)
Trybulec, A.: Non negative real numbers. Part I. J. Formal. Math. (1998). Addenda
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was supported by Project Coquelicot from RTRA Digiteo and Région Île-de-France.
Rights and permissions
About this article
Cite this article
Boldo, S., Lelay, C. & Melquiond, G. Coquelicot: A User-Friendly Library of Real Analysis for Coq. Math.Comput.Sci. 9, 41–62 (2015). https://doi.org/10.1007/s11786-014-0181-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11786-014-0181-1