## Combining de Bruijn indices and higher-order abstract syntax in Coq (2006)

### Cached

### Download Links

- [www.cs.ru.nl]
- [cs.ru.nl]
- [www.cs.nott.ac.uk]
- [www.cs.kun.nl]
- [www.duplavis.com]
- [www.csi.uottawa.ca]
- [www.site.uottawa.ca]
- DBLP

### Other Repositories/Bibliography

Venue: | Proceedings of TYPES 2006, volume 4502 of Lecture Notes in Computer Science |

Citations: | 13 - 2 self |

### BibTeX

@INPROCEEDINGS{Capretta06combiningde,

author = {Venanzio Capretta and Amy P. Felty},

title = {Combining de Bruijn indices and higher-order abstract syntax in Coq},

booktitle = {Proceedings of TYPES 2006, volume 4502 of Lecture Notes in Computer Science},

year = {2006},

pages = {63--77},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

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. 1

### Citations

795 |
M.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. Volume 2283 of LNCS
- Nipkow, Paulson, et al.
- 2002
(Show Context)
Citation Context ...ibraries of operations and lemmas to reason on the higher-order syntax, hiding the details of the de Bruijn representation. This approach is inspired by the Hybrid system [1], implemented in Isabelle =-=[18]-=-. The general structure is the same, but our basic definitions and operators to build a higher level ontopofdeBruijntermsarequitedifferent. Coq’s constructive logic allows us to define operators as fu... |

515 |
Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. An EATCS series
- Bertot, Castéran
- 2004
(Show Context)
Citation Context ...of type (term → term) → term and app of type term → term → term. We represent binding by negative occurrences of the defined type. (Here, the single negative occurrence is underlined.) The Coq system =-=[3,4]-=- implements the Calculus of Inductive Constructions (CIC) [5,27]: Like many other systems, it does not allow negative occurrences in constructors of inductive types. Our approach realizes higher-order... |

496 |
The Calculus of Constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context .... We represent binding by negative occurrences of the defined type. (Here, the single negative occurrence is underlined.) The Coq system [3,4] implements the Calculus of Inductive Constructions (CIC) =-=[5,27]-=-: Like many other systems, it does not allow negative occurrences in constructors of inductive types. Our approach realizes higher-order syntax encodings of terms with an underlying de Bruijn represen... |

321 | System description: Twelf - a meta-logical framework for deductive systems
- Pfenning, Schürmann
- 1999
(Show Context)
Citation Context ... freshness, and a new “freshness quantifier.” Using this set theory, it is possible to prove properties by structural induction and also to define functions by recursion over syntax. The Twelf system =-=[21]-=-, which implements the Logical Framework (LF) has also been used as a framework for reasoning using higher-order syntax. In particular Schürmann [23] has developed a logic which extends LF with suppor... |

320 | Lambda-calculus notation with nameless dummies: a tool for automatic formula manipulation with application to the Church-Rosser theorem
- Bruijn
- 1972
(Show Context)
Citation Context ...many other systems, it does not allow negative occurrences in constructors of inductive types. Our approach realizes higher-order syntax encodings of terms with an underlying de Bruijn representation =-=[6]-=-. De Bruijn syntax has two advantages: α-convertibility is just equality and there is no variable capture in substitution. A main advantage of higher-order syntax is that it allows substitution by fun... |

226 | A new approach to abstract syntax with variable binding
- Gabbay, Pitts
(Show Context)
Citation Context ...vel encodings [8,17]. This approach also aims to capture more than term-level abstraction, and is inspired by the work of McDowell and Miller but uses Coq and Isabelle, respectively. Gabbay and Pitts =-=[9]-=- define a variant of classical set theory that includes primitives for variable renaming and variable freshness, and a new “freshness quantifier.” Using this set theory, it is possible to prove proper... |

144 | Mechanized metatheory for the masses: the POPLMARK challenge
- Aydemir, Bohannon, et al.
(Show Context)
Citation Context ...within the same framework. Pollack’s notes on the problem of reasoning about binding [22] give a high-level summary of many of them. Some of them were used to solve the POPLmark challenge problem set =-=[2]-=-. We mention a few here. Several approaches have used Coq. These include the use of weak higher-order abstract syntax [7,14]. In weak higher-order syntax, the problem of negative occurrences in syntax... |

125 | Primitive Recursion for Higherorder Abstract syntax
- Schurmann, Despeyroux, et al.
(Show Context)
Citation Context ..., it is based on a realizability interpretation of proof terms. The Twelf implementation of this approach includes powerful automated support for inductive proofs. Schürmann, Despeyroux, and Pfenning =-=[24]-=- develop a modal metatheory that allows the formalization of higher-order abstract syntax with a primitive recursion principle. They introduce a modal operator ✷.Intuitively,foreverytypeA there is a t... |

93 | Reasoning with higher-order abstract syntax in a logical framework
- McDowell, Miller
(Show Context)
Citation Context ...ulan’s approach [14,15] introduces a “theory of contexts” to handle this representation of variables, with extensive use of axioms whose soundness must be justified independently. McDowell and Miller =-=[12]-=- introduce a new logic specifically designed for reasoning with higher-order syntax. Their logic is intuitionistic and higher-order with support for natural number induction and definitions. In genera... |

84 | Automating the Meta Theory of Deductive Systems
- Schürmann
- 2000
(Show Context)
Citation Context ...nctions by recursion over syntax. The Twelf system [21], which implements the Logical Framework (LF) has also been used as a framework for reasoning using higher-order syntax. In particular Schürmann =-=[23]-=- has developed a logic which extends LF with support for metareasoning about object logics expressed in LF. The design of the component for reasoning by induction does not include induction principles... |

65 | A proof theory for generic judgments
- Miller, Tiu
(Show Context)
Citation Context ...tic and higher-order with support for natural number induction and definitions. In general, higherorder syntax mainly addresses encodings of term-level abstraction. More recent work by Miller and Tiu =-=[16]-=- includes a new quantifier for this style of logic, which provides an elegant way to handle abstractions at the level of proofs. Another approach uses multi-level encodings [8,17]. This approach also ... |

53 | Five axioms of alpha conversion
- Gordon, Melham
- 1996
(Show Context)
Citation Context ...abstractions using names paired with expressions [13]. Working at this level requires dealing with low-level details about α-conversion, free and bound variables, substitution, etc. Gordon and Melham =-=[11]-=- generalize this name-carrying syntax approach and develop a general theory of untyped λ-terms up to α-conversion, including induction and recursion principles. They illustrate that their theory can b... |

44 | Higher-order abstract syntax in Coq
- Despeyroux, Felty, et al.
- 1995
(Show Context)
Citation Context ...or n to be a new variable for a function f : term → term. In Coq, the function space term → term includes meta-terms that do not encode terms of the object language LC, often called exotic terms (see =-=[7]-=-). Functions that do encode terms are those that work uniformly on all arguments. Since we do not require uniformity, (fx) may have a different set of free variables for each argument x. It is in gene... |

35 | Combining higher order abstract syntax with tactical theorem proving and (co)induction
- Ambler, Crole, et al.
- 2002
(Show Context)
Citation Context ...a and A.P. Felty We provide libraries of operations and lemmas to reason on the higher-order syntax, hiding the details of the de Bruijn representation. This approach is inspired by the Hybrid system =-=[1]-=-, implemented in Isabelle [18]. The general structure is the same, but our basic definitions and operators to build a higher level ontopofdeBruijntermsarequitedifferent. Coq’s constructive logic allow... |

33 |
A mechanisation of name-carrying syntax up to alpha-conversion
- Gordon
- 1994
(Show Context)
Citation Context ... in such a way that the user is free from concerns of α-conversion. Norrish [20] improves the recursion principles, allowing greater flexibility in defining recursive functions on this syntax. Gordon =-=[10]-=- was able to take a step further in improving the name-carrying syntax approach by defining this kind of syntax in terms of an underlying de Bruijn notation. Gordon’s work was the starting point for H... |

25 | The ∇-Calculus. Functional Programming with Higher-Order Encodings
- Schürmann, Poswolsky, et al.
- 2005
(Show Context)
Citation Context ...e system has not yet been extended to a framework with dependent types. Schürmann et. al. have also worked on designing a new calculus for defining recursive functions directly on higher-order syntax =-=[25]-=-. Built-in primitives are provided for the reduction equations for the higher-order case, in contrast to our approach where we define the recursion principle on top of the base level de Bruijn encodin... |

16 |
Méta-théorie du Calcul des Constructions Inductives
- Werner
- 1994
(Show Context)
Citation Context .... We represent binding by negative occurrences of the defined type. (Here, the single negative occurrence is underlined.) The Coq system [3,4] implements the Calculus of Inductive Constructions (CIC) =-=[5,27]-=-: Like many other systems, it does not allow negative occurrences in constructors of inductive types. Our approach realizes higher-order syntax encodings of terms with an underlying de Bruijn represen... |

14 | Recursive function definition for types with binders
- Norrish
- 2004
(Show Context)
Citation Context ...and recursion principles. They illustrate that their theory can be used as a meta-language for representing object languages in such a way that the user is free from concerns of α-conversion. Norrish =-=[20]-=- improves the recursion principles, allowing greater flexibility in defining recursive functions on this syntax. Gordon [10] was able to take a step further in improving the name-carrying syntax appro... |

13 | Multi-level meta-reasoning with higher order abstract syntax
- Momigliano, Ambler
- 2003
(Show Context)
Citation Context ...work by Miller and Tiu [16] includes a new quantifier for this style of logic, which provides an elegant way to handle abstractions at the level of proofs. Another approach uses multi-level encodings =-=[8,17]-=-. This approach also aims to capture more than term-level abstraction, and is inspired by the work of McDowell and Miller but uses Coq and Isabelle, respectively. Gabbay and Pitts [9] define a variant... |

12 | A computational approach to reflective meta-reasoning about languages with bindings
- Nogin, Kopylov, et al.
- 2005
(Show Context)
Citation Context ... for the higher-order case, in contrast to our approach where we define the recursion principle on top of the base level de Bruijn encoding, and prove the reduction equations as lemmas. Nogin et. al. =-=[19]-=- build a theory in MetaPRL that includes both a higher-order syntax and a de Bruijn representation of terms, with a translation between the two. Induction principles are defined at the de Bruijn level... |

10 |
Two-level meta-reasoning in Coq
- Felty
(Show Context)
Citation Context ...work by Miller and Tiu [16] includes a new quantifier for this style of logic, which provides an elegant way to handle abstractions at the level of proofs. Another approach uses multi-level encodings =-=[8,17]-=-. This approach also aims to capture more than term-level abstraction, and is inspired by the work of McDowell and Miller but uses Coq and Isabelle, respectively. Gabbay and Pitts [9] define a variant... |

6 |
A Mechanized Theory of the π-calculus in HOL
- Melham
- 1994
(Show Context)
Citation Context ...ices for free variables, and solves part 1a of POPLmark. Another earlier first-order approach by Melham avoids de Bruijn syntax altogether and encodes abstractions using names paired with expressions =-=[13]-=-. Working at this level requires dealing with low-level details about α-conversion, free and bound variables, substitution, etc. Gordon and Melham [11] generalize this name-carrying syntax approach an... |

6 | On the formalization of the modal µ–calculus in the calculus of inductive constructions
- Miculan
(Show Context)
Citation Context ...ect. 1 has type (var → term) → term,wherevar is a type of variables. Some additional operations are needed to encode and reason about this new type, which at times is inconvenient. Miculan’s approach =-=[14,15]-=- introduces a “theory of contexts” to handle this representation of variables, with extensive use of axioms whose soundness must be justified independently. McDowell and Miller [12] introduce a new lo... |

3 |
Developing (meta)theory of λ-calculus in the theory of contexts
- Miculan
- 2001
(Show Context)
Citation Context ...ny of them. Some of them were used to solve the POPLmark challenge problem set [2]. We mention a few here. Several approaches have used Coq. These include the use of weak higher-order abstract syntax =-=[7,14]-=-. In weak higher-order syntax, the problem of negative occurrences in syntax encodings is handled by replacing them by a new type. For example, the abs constructor for the untyped λ-terms introduced i... |

2 |
Reasoning about languages with binding. Presentation (2006), available at http://homepages.inf.ed.ac.uk/rap/export/bindingChallenge slides.pdf
- Pollack
- 2006
(Show Context)
Citation Context ...ensive literature on approaches to representing object languages with higher-order syntax and reasoning about them within the same framework. Pollack’s notes on the problem of reasoning about binding =-=[22]-=- give a high-level summary of many of them. Some of them were used to solve the POPLmark challenge problem set [2]. We mention a few here. Several approaches have used Coq. These include the use of we... |

2 | Choosing among Signalling Equilibria in Lobbying Games: A Reply to Sloof
- unknown authors
- 2006
(Show Context)
Citation Context ...properties about specific object logics is left as future work. Solutions to the POPLmark challenge also include first-order approaches which adopt de Bruijn representations, such as the one by Stump =-=[26]-=- that uses named bound variables and indices for free variables, and solves part 1a of POPLmark. Another earlier first-order approach by Melham avoids de Bruijn syntax altogether and encodes abstracti... |