Combining de Bruijn Indices and Higher-Order Abstract Syntax in Coq

  • Venanzio Capretta
  • Amy P. Felty
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4502)

Abstract

The use of higher-order abstract syntax is an important approach for the representation of binding constructs in encodings of languages and logics in a logical framework. Formal meta-reasoning about such object languages is a particular challenge. We present a mechanism for such reasoning, formalized in Coq, inspired by the Hybrid tool in Isabelle. At the base level, we define a de Bruijn representation of terms with basic operations and a reasoning framework. At a higher level, we can represent languages and reason about them using higher-order syntax. We take advantage of Coq’s constructive logic by formulating many definitions as Coq programs. We illustrate the method on two examples: the untyped lambda calculus and quantified propositional logic. For each language, we can define recursion and induction principles that work directly on the higher-order syntax.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ambler, S.J., Crole, R.L., Momigliano, A.: Combining higher order abstract syntax with tactical theorem proving and (co)induction. In: Carreño, V.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2002. LNCS, vol. 2410, pp. 13–30. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  2. 2.
    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: RSCTC 2000. LNCS, pp. 50–65. Springer, Heidelberg (2005), http://fling-l.seas.upenn.edu/~plclub/cgi-bin/poplmark/index.php?title=The_POPLmark_Challenge Google Scholar
  3. 3.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)MATHGoogle Scholar
  4. 4.
    Coq Development Team, LogiCal Project. The Coq Proof Assistant reference manual: Version 8.0. Technical report, INRIA (2006)Google Scholar
  5. 5.
    Coquand, T., Huet, G.: The Calculus of Constructions. Information and Computation 76, 95–120 (1988)MATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    de Bruijn, N.G.: Lambda-calculus notation with nameless dummies: a tool for automatic formula manipulation with application to the Church-Rosser theorem. Indag. Math. 34, 381–392 (1972)Google Scholar
  7. 7.
    Despeyroux, J., Felty, A., Hirschowitz, A.: Higher-order abstract syntax in Coq. In: Dezani-Ciancaglini, M., Plotkin, G. (eds.) TLCA 1995. LNCS, vol. 902, pp. 124–138. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  8. 8.
    Felty, A.P.: Two-level meta-reasoning in Coq. In: Carreño, V.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2002. LNCS, vol. 2410, pp. 198–213. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  9. 9.
    Gabbay, M.J., Pitts, A.M.: A new approach to abstract syntax with variable binding. Formal Aspects of Computing 13, 341–363 (2001)CrossRefGoogle Scholar
  10. 10.
    Gordon, A.D.: A mechanisation of name-carrying syntax up to alpha-conversion. In: Sixth International Workshop on Higher-Order Logic Theorem Proving and its Applications. LNCS, pp. 413–425. Springer, Heidelberg (1993)Google Scholar
  11. 11.
    Gordon, A.D., Melham, T.: Five axioms of alpha-conversion. In: Lanzi, P.L., Stolzmann, W., Wilson, S.W. (eds.) IWLCS 2000. LNCS (LNAI), vol. 1996, pp. 173–190. Springer, Heidelberg (2001)Google Scholar
  12. 12.
    McDowell, R., Miller, D.: Reasoning with higher-order abstract syntax in a logical framework. ACM Transactions on Computational Logic 3(1), 80–136 (2002)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Melham, T.F.: A mechanized theory of the Π-calculus in HOL. Nordic Journal of Computing 1(1), 50–76 (1994)MathSciNetGoogle Scholar
  14. 14.
    Miculan, M.: Developing (meta)theory of λ-calculus in the theory of contexts. Electronic Notes in Theoretical Computer Science 58(1), 37–58 (2001) (MERLIN 2001: Mechanized Reasoning about Languages with Variable Binding)CrossRefMathSciNetGoogle Scholar
  15. 15.
    Miculan, M.: On the formalization of the modal μ-calculus in the calculus of inductive constructions. Information and Computation 164(1), 199–231 (2001)MATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Miller, D., Tiu, A.: A proof theory for generic judgments. ACM Transactions on Computational Logic 6(4), 749–783 (2005)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Momigliano, A., Ambler, S.J.: Multi-level meta-reasoning with higher-order abstract syntax. In: Sixth International Conference on Foundations of Software Science and Computational Structures, April 2003. LNCS, pp. 375–391. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  18. 18.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS. Springer, Heidelberg (2002)MATHGoogle Scholar
  19. 19.
    Nogin, A., Kopylov, A., Yu, X., Hickey, J.: A computational approach to reflective meta-reasoning about languages with bindings. In: MERLIN 2005. Proceedings of the 3rd ACM SIGPLAN Workshop on MEchanized Reasoning about Languages with varIable biNding, pp. 2–12. ACM Press, New York (2005)CrossRefGoogle Scholar
  20. 20.
    Norrish, M.: Recursive function definition for types with binders. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 241–256. Springer, Heidelberg (2004)Google Scholar
  21. 21.
    Pfenning, F., Schürmann, C.: System description: Twelf — a meta-logical framework for deductive systems. In: Ganzinger, H. (ed.) Automated Deduction - CADE-16. LNCS (LNAI), vol. 1632, pp. 202–206. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  22. 22.
    Pollack, R.: Reasoning about languages with binding. Presentation (2006), available at http://homepages.inf.ed.ac.uk/rap/export/bindingChallenge_slides.pdf
  23. 23.
    Schürmann, C.: Automating the Meta Theory of Deductive Systems. PhD thesis, Carnegie Mellon University (2000)Google Scholar
  24. 24.
    Schürmann, C., Despeyroux, J., Pfenning, F.: Primitive recursion for higher-order abstract syntax. Theoretical Computer Science 266, 1–57 (2001)MATHCrossRefMathSciNetGoogle Scholar
  25. 25.
    Schürmann, C., Poswolsky, A., Sarnat, J.: The ∇-calculus. Functional programming with higher-order encodings. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 339–353. Springer, Heidelberg (2005)Google Scholar
  26. 26.
    Stump, A.: POPLmark 1a with named bound variables. Presented at the Progress on Poplmark Workshop (January 2006)Google Scholar
  27. 27.
    Werner, B.: Méta-théorie du Calcul des Constructions Inductives. PhD thesis, Université Paris 7 (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Venanzio Capretta
    • 1
  • Amy P. Felty
    • 1
  1. 1.School of Information Technology and Engineering, and Department of Mathematics and Statistics, University of OttawaCanada

Personalised recommendations