Higher-order abstract syntax in Coq

  • Joëlle Despeyroux
  • Amy Felty
  • André Hirschowitz
Conference paper

DOI: 10.1007/BFb0014049

Part of the Lecture Notes in Computer Science book series (LNCS, volume 902)
Cite this paper as:
Despeyroux J., Felty A., Hirschowitz A. (1995) Higher-order abstract syntax in Coq. In: Dezani-Ciancaglini M., Plotkin G. (eds) Typed Lambda Calculi and Applications. TLCA 1995. Lecture Notes in Computer Science, vol 902. Springer, Berlin, Heidelberg


The terms of the simply-typed λ-calculus can be used to express the higher-order abstract syntax of objects such as logical formulas, proofs, and programs. Support for the manipulation of such objects is provided in several programming languages (e.g. λProlog, Elf). Such languages also provide embedded implication, a tool which is widely used for expressing hypothetical judgments in natural deduction. In this paper, we show how a restricted form of second-order syntax and embedded implication can be used together with induction in the Coq Proof Development system. We specify typing rules and evaluation for a simple functional language containing only function abstraction and application, and we fully formalize a proof of type soundness in the system. One difficulty we encountered is that expressing the higher-order syntax of an object-language as an inductive type in Coq generates a class of terms that contains more than just those that directly represent objects in the language. We overcome this difficulty by defining a predicate in Coq that holds only for those terms that correspond to programs. We use this predicate to express and prove the adequacy for our syntax.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag 1995

Authors and Affiliations

  • Joëlle Despeyroux
    • 1
  • Amy Felty
    • 2
  • André Hirschowitz
    • 3
  1. 1.Sophia-AntipolisINRIAValbonne CedexFrance
  2. 2.AT&T Bell LaboratoriesMurray HillUSA
  3. 3.CNRS URA 168University of NiceNice Cedex 2France

Personalised recommendations