Author:
BIRD RICHARD S.,PATERSON ROSS
Abstract
“I have no data yet. It is a capital mistake to
theorise before one has data.”
Sir Arthur Conan Doyle The Adventures of Sherlock Holmesde Bruijn notation is a coding of lambda terms in which each occurrence of a bound variable
x is replaced by a natural number, indicating the ‘distance’
from the occurrence to the abstraction
that introduced x. One might suppose that in any datatype for representing de Bruijn terms,
the distance restriction on numbers would have to be maintained as an explicit datatype invariant.
However, by using a nested (or non-regular) datatype, we can define a representation in which
all terms are well-formed, so that the invariant is enforced automatically by the type system.
Programming with nested types is only a little more difficult than programming with regular
types, provided we stick to well-established structuring techniques. These involve expressing
inductively defined functions in terms of an appropriate fold function for the type, and using
fusion laws to establish their properties. In particular, the definition of lambda abstraction
and beta reduction is particularly simple, and the proof of their associated properties is
entirely mechanical.
Publisher
Cambridge University Press (CUP)
Cited by
87 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Intrinsically Typed Syntax, a Logical Relation, and the Scourge of the Transfer Lemma;Proceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development;2024-08-28
2. Free Foil: Generating Efficient and Scope-Safe Abstract Syntax;2024 4th International Conference on Code Quality (ICCQ);2024-06-22
3. Variable binding and substitution for (nameless) dummies;Logical Methods in Computer Science;2024-03-01
4. Scoped and Typed Staging by Evaluation;Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation;2024-01-11
5. Nominal Recursors as Epi-Recursors;Proceedings of the ACM on Programming Languages;2024-01-05