Coq formalization of the higher-order recursive path ordering

Article

Abstract

The recursive path ordering (RPO) is a well-known reduction ordering introduced by Dershowitz, that is useful for proving termination of term rewriting systems (TRSs). Jouannaud and Rubio generalized this ordering to the higher-order case thus creating the higher-order recursive path ordering (HORPO). They proved that this ordering can be used for proving termination of higher-order TRSs, which essentially comes down to proving well-foundedness of HORPO. This result entails well-foundedness of RPO and termination of simply typed lambda calculus (as the β-reduction relation is included in HORPO). This paper describes our undertaking of providing a complete, axiom-free, fully constructive formalization of those results in the proof assistant Coq. The formalization can be divided into three parts:
  • finite multisets and two variants of multiset extensions of a relation,

  • simply typed lambda calculus with termination of β-reduction as the main result,

  • HORPO with a proof of its well-foundedness; also decidability of HORPO has been proved and, due to its constructive nature, a certified algorithm to verify whether two terms can be oriented with HORPO can be extracted from the proof.

Keywords

Coq HORPO Higher-order rewriting 

References

  1. 1.
    Altenkirch, T.: A formalization of the strong normalization proof for system F in LEGO. In: Proceedings of the 1st International Conference on Typed Lambda Calculi and Applications (TLCA ’93). Lecture Notes in Computer Science, vol. 664, pp. 13–28 (1993)Google Scholar
  2. 2.
    Altenkirch, T.: Proving strong normalization of CC by modifying realizability semantics. In: Proceedings of the International Workshop on Types for Proofs and Programs (TYPES ’93). Lecture Notes in Computer Science, vol. 806, pp. 3–18 (1993)Google Scholar
  3. 3.
    Altenkirch, T., Dybjer, P., Hofmann, M., Scott, P.J.: Normalization by evaluation for typed lambda calculus with coproducts. In: Proceedings of the 16th Annual IEEE Symposium on Logic in Computer Science (LICS ’01), pp. 303–310 (2001)Google Scholar
  4. 4.
    Aydemir, B.E., Bohannon, A., Fairbairn, M., Foster, J.N., Pierce, B.C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S., Zdancewic, S.: Mechanized metatheory for the masses: the POPLmark challenge. In: Proceedings of the 18th International Conference on Theorem Proving in Higher Order Logics (TPHOLs ’05). Lecture Notes in Computer Science, vol. 3603, pp. 50–65 (2005)Google Scholar
  5. 5.
    Baader F., Nipkow T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)Google Scholar
  6. 6.
    Barendregt, H.P.: Lambda Calculi with Types. Handbook of Logic in Computer Science, vol. II, pp. 117–309 (1992)Google Scholar
  7. 7.
    Barras, B.: Auto-validation d’un système de preuves avec familles inductives. Ph.D. thesis, Université Paris 7, Paris, France (1999)Google Scholar
  8. 8.
    Berger U., Berghofer S., Letouzey P., Schwichtenberg H.: Program extraction from normalization proofs. Studia Logica 82, 25–49 (2006)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Berghofer, C.: A constructive proof of Higman’s lemma in Isabelle. In: Proceedings of the International Workshop on Types for Proofs and Programs (TYPES ’03). Lecture Notes in Computer Science, vol. 3085, pp. 66–82 (2004)Google Scholar
  10. 10.
    Bertot Y., Castéran P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, New York (2004)Google Scholar
  11. 11.
    Blanqui, F., Delobel, W., Coupet-Grimal, S., Hinderer, S., Koprowski, A.: CoLoR, a Coq library on rewriting and termination. In: 8th International Workshop on Termination (WST ’06), pp. 69–73 (2006)Google Scholar
  12. 12.
    Blanqui, F., Jouannaud, J.P., Rubio, A.: Horpo with computability closure: a reconstruction. In: Proceedings of the 14th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR ’07). Lecture Notes in Computer Science, vol. 4790, pp. 138–150 (2007)Google Scholar
  13. 13.
    Bruijn N.G.d.: Lambda-calculus notation with nameless dummies: a tool for automatic formula manipulation with application to the Church-Rosser theorem. Indag. Math. 34(5), 381–392 (1972)Google Scholar
  14. 14.
    Church A.: A formulation of the simple theory of types. J. Symb. Logic 5(2), 56–68 (1940)MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    CoLoR: a Coq library on rewriting and termination. http://color.loria.fr/
  16. 16.
    Contejean, E., Courtieu, P., Forest, J., Pons, O., Urbain, X.: Certification of automated termination proofs. In: Proceedings of the 6th International Symposium on Frontiers of Combining Systems (FroCoS ’07). Lecture Notes in Computer Science, vol. 4720, pp. 148–162 (2007)Google Scholar
  17. 17.
    Coupet-Grimal S., Delobel W.: An effective proof of the well-foundedness of the multiset path ordering. Appl. Algebra Eng. Commun. Comput. 17(6), 453–469 (2006)MATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Dershowitz N.: Orderings for term-rewriting systems. Theor. Comput. Sci. 17, 279–301 (1982)MATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Gabbay, M., Pitts, A.M.: A new approach to abstract syntax involving binders. In: Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science (LICS ’99), pp. 214–224 (1999)Google Scholar
  20. 20.
    Gallier J.H.: What’s so special about Kruskal’s theorem and the ordinal Gamma0? A survey of some results in proof theory. Ann. Pure Appl. Logic 53(3), 199–260 (1991)MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Girard J.Y., Taylor P., Lafont Y.: Proofs and Types, Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (1989)Google Scholar
  22. 22.
    Hindley J.R.: Basic Simple Type Theory. Cambridge University Press, Cambridge (1997)MATHGoogle Scholar
  23. 23.
    Jouannaud, J.P., Okada, M.: A computation model for executable higher-order algebraic specification languages. In: Proceedings of the 6th Annual IEEE Symposium on Logic in Computer Science (LICS ’91), pp. 350–361 (1991)Google Scholar
  24. 24.
    Jouannaud, J.P., Rubio, A.: The higher-order recursive path ordering. In: Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science (LICS ’99), pp. 402–411 (1999)Google Scholar
  25. 25.
    Jouannaud, J.P., Rubio, A.: Higher-order recursive path orderings ‘à la carte’. http://www.lix.polytechnique.fr/Labo/Jean-Pierre.Jouannaud/biblio.html(2001)
  26. 26.
    Jouannaud, J.P., Rubio, A.: Higher-order orderings for normal rewriting. In: Proceedings of the 17th International Conference on Rewriting Techniques and Applications (RTA ’06), Lecture Notes in Computer Science, vol. 4098, pp. 387–399 (2006)Google Scholar
  27. 27.
    Jouannaud J.P., Rubio A.: Polymorphic higher-order recursive path orderings. J. ACM 54(1), 1–48 (2007)CrossRefMathSciNetGoogle Scholar
  28. 28.
    Kleijn, N.d.: Well-foundedness of RPO in Coq. Master’s thesis, Vrije Universiteit, Amsterdam, The Netherlands (2003)Google Scholar
  29. 29.
    Koprowski, A.: Well-foundedness of the higher-order recursive path ordering in Coq. Tech. Rep. TI-IR-004, Vrije Universiteit, Amsterdam, The Netherlands. Master’s thesis (2004)Google Scholar
  30. 30.
    Koprowski, A.: Certified higher-order recursive path ordering. In: Proceedings of the 17th International Conference on Rewriting Techniques and Applications (RTA ’06). Lecture Notes in Computer Science, vol. 4098, pp. 227–241 (2006)Google Scholar
  31. 31.
    Koprowski A.: Coq formalization of the higher-order recursive path ordering. Tech. Rep. CSR-06-21. Eindhoven University of Technology, Eindhoven, The Netherlands (2006)Google Scholar
  32. 32.
    Koprowski, A., Zantema, H.: Certification of proving termination of term rewriting by matrix interpretations. In: Proceedings of the 34th International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM ’08), Lecture Notes in Computer Science, vol. 4910, pp. 328–339 (2008)Google Scholar
  33. 33.
    Leclerc, F.: Termination proof of term rewriting systems with the multiset path ordering: a complete development in the system Coq. In: Proceedings of the 2nd International Conference on Typed Lambda Calculi and Applications (TLCA ’95). Lecture Notes in Computer Science, vol. 902, pp. 312–327 (1995)Google Scholar
  34. 34.
    Murthy, C.: Extracting constructive content from classical proofs. Ph.D. thesis, Cornell University, New York, USA (1990)Google Scholar
  35. 35.
    Nipkow, T.: Higher-order critical pairs. In: Proceedings of the 6th Annual IEEE Symposium on Logic in Computer Science (LICS ’91), pp. 342–349 (1991)Google Scholar
  36. 36.
    Nipkow, T.: An inductive proof of the wellfoundedness of the multiset order. http://www4.informatik.tu-muenchen.de/~nipkow/misc/index.html. A proof due to W. Buchholz (1998)
  37. 37.
    Persson, H.: Type theory and the integrated logic of programs. Ph.D. thesis, Göteborg University, Göteborg, Sweden (1999)Google Scholar
  38. 38.
    Pfenning, F., Elliot, C.: Higher-order abstract syntax. In: Proceedings of the Conference on Programming Language Design and Implementation (PLDI ’88), SIGPLAN Notices, vol. 23, pp. 199–208 (1988)Google Scholar
  39. 39.
    Raoult J.C.: Proving open properties by induction. Inf. Process. Lett. 29, 19–23 (1988)MATHCrossRefMathSciNetGoogle Scholar
  40. 40.
    Stoevring, K., Danvy, O., Biernacka, M.: Program extraction from proofs of weak head normalization. In: Proceedings of the 21st Conference on the Mathematical Foundations of Programming Semantics (MFPS ’06), Electronic Notes in Theoretical Computer Science, vol. 155 (2006)Google Scholar
  41. 41.
    Tait W.W.: Intentional interpretation of functionals of finite type I. J. Symb. Logic 32(2), 198–212 (1967)MATHCrossRefMathSciNetGoogle Scholar
  42. 42.
    The Coq development team: The Coq proof assistant reference manual, version 8.0. http://pauillac.inria.fr/coq/doc-eng.html (2004)
  43. 43.
    van Raamsdonk, F.: On termination of higher-order rewriting. In: Proceedings of the 12th International Conference on Rewriting Techniques and Applications (RTA ’01). Lecture Notes in Computer Science, vol. 2051, pp. 261–275 (2001)Google Scholar

Copyright information

© Springer-Verlag 2009

Authors and Affiliations

  1. 1.Institute for Computing and Information ScienceRadboud University NijmegenNijmegenThe Netherlands
  2. 2.MLstateParisFrance

Personalised recommendations