Improving Real Analysis in Coq: A User-Friendly Approach to Integrals and Derivatives

  • Sylvie Boldo
  • Catherine Lelay
  • Guillaume Melquiond
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7679)

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Boldo, S.: Floats & Ropes: a case study for formal numerical program verification. In: 36th International Colloquium on Automata, Languages and Programming. LNCS - ARCoSS, vol. 5556, pp. 91–102. Rhodos, Greece (2009)CrossRefGoogle Scholar
  2. 2.
    Boldo, S., Clément, F., Filliâtre, J.-C., Mayero, M., Melquiond, G., Weis, P.: Formal Proof of a Wave Equation Resolution Scheme: The Method Error. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 147–162. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  3. 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
  4. 4.
    Butler, R.W.: Formalization of the integral calculus in the PVS theorem prover. Journal of Formalized Reasoning 2(1), 1–26 (2009)MathSciNetMATHGoogle Scholar
  5. 5.
    Cruz-Filipe, L.: Constructive Real Analysis: a Type-Theoretical Formalization and Applications. Ph.D. thesis, University of Nijmegen (April 2004)Google Scholar
  6. 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. 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
  8. 8.
    Fleuriot, J.: On the Mechanization of Real Analysis in Isabelle/HOL. In: Aagaard, M.D., Harrison, J. (eds.) TPHOLs 2000. LNCS, vol. 1869, pp. 145–161. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  9. 9.
    Gamboa, R.: Continuity and differentiability in ACL2. In: Computer-Aided Reasoning: ACL2 Case Studies, ch. 18. Kluwer Academic Publisher (2000)Google Scholar
  10. 10.
    Gamboa, R., Kaufmann, M.: Non-standard analysis in ACL2. Journal of Automated Reasoning 27(4), 323–351 (2001)MathSciNetMATHCrossRefGoogle Scholar
  11. 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. 12.
    Harrison, J.: Theorem Proving with the Real Numbers. Springer (1998)Google Scholar
  13. 13.
    Harrison, J.V.: A HOL Theory of Euclidean Space. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 114–129. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  14. 14.
    Hölzl, J., Heller, A.: Three Chapters of Measure Theory in Isabelle/HOL. In: van Eekelen, M., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) ITP 2011. LNCS, vol. 6898, pp. 135–151. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  15. 15.
    Kaliszyk, C., O’Connor, R.: Computing with classical real numbers. Journal of Formalized Reasoning 2(1), 27–39 (2009)MathSciNetGoogle Scholar
  16. 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. 17.
    Raczkowski, K., Sadowski, P.: Real function differentiability. Journal of Formalized Mathematics 1(4), 797–801 (1990)Google Scholar
  18. 18.
    Spitters, B., van der Weegen, E.: Type classes for mathematics in type theory. Mathematical Structures in Computer Sciences 21(4), 795–825 (2011)MATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Sylvie Boldo
    • 1
    • 2
  • Catherine Lelay
    • 1
    • 2
  • Guillaume Melquiond
    • 1
    • 2
  1. 1.Inria Saclay Île-de-France, ProValPalaiseauFrance
  2. 2.LRI, Université Paris-Sud, CNRSOrsayFrance

Personalised recommendations