Improving Real Analysis in Coq: A User-Friendly Approach to Integrals and Derivatives
Verification of numerical analysis programs requires dealing with derivatives and integrals. High confidence in this process can be achieved using a formal proof checker, such as Coq. Its standard library provides an axiomatization of real numbers and various lemmas about real analysis, which may be used for this purpose. Unfortunately, its definitions of derivative and integral are unpractical as they are partial functions that demand a proof term. This proof term makes the handling of mathematical formulas cumbersome and does not conform to traditional analysis. Other proof assistants usually do not suffer from this issue; for instance, they may rely on Hilbert’s epsilon to get total operators. In this paper, we propose a way to define total operators for derivative and integral without having to extend Coq’s standard axiomatization of real numbers. We proved the compatibility of our definitions with the standard library’s in order to leverage existing results. We also greatly improved automation for real analysis proofs that use Coq standard definitions. We exercised our approach on lemmas involving iterated partial derivatives and differentiation under the integral sign, that were missing from the formal proof of a numerical program solving the wave equation.
Unable to display preview. Download preview PDF.
- 3.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. Journal of Automated Reasoning (accepted for publication on May 20, 2012), http://hal.inria.fr/hal-00649240
- 5.Cruz-Filipe, L.: Constructive Real Analysis: a Type-Theoretical Formalization and Applications. Ph.D. thesis, University of Nijmegen (April 2004)Google Scholar
- 6.Cruz-Filipe, L., Geuvers, H., Wiedijk, F.: C-CoRN: the constructive Coq repository at Nijmegen. In: 3th International Conference on Mathematical Knowledge Management (MKM), Bialowieza, Poland, pp. 88–103 (2004)Google Scholar
- 7.Endou, N., Korniłowicz, A.: The definition of the Riemann definite integral and some related lemmas. Journal of Formalized Mathematics 8(1), 93–102 (1999)Google Scholar
- 9.Gamboa, R.: Continuity and differentiability in ACL2. In: Computer-Aided Reasoning: ACL2 Case Studies, ch. 18. Kluwer Academic Publisher (2000)Google Scholar
- 11.Gonthier, G., Mahboubi, A., Tassi, E.: A small scale reflection extension for the Coq system. Tech. Rep. RR-6455, INRIA (2008), http://hal.inria.fr/inria-00258384
- 12.Harrison, J.: Theorem Proving with the Real Numbers. Springer (1998)Google Scholar
- 16.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)Google Scholar
- 17.Raczkowski, K., Sadowski, P.: Real function differentiability. Journal of Formalized Mathematics 1(4), 797–801 (1990)Google Scholar