A Fine-Grained Notation for Lambda Terms and Its Use in Intensional Operations

We discuss issues relevant to the practical use of a previously proposed notation for lambda terms in contexts where the intensions of such terms have to be manipulated. This notation uses the `nameless'' scheme of de Bruijn, includes expressions for encoding terms together with substitutions to be performed on them and contains a mechanism for combining such substitutions so that they can be effected in a common structure traversal. The combination mechanism is a general one and consequently difficult to implement. We propose a simplification to it that retains its functionality in situations that occur commonly in beta reduction. We then describe a system for annotating terms to determine if they can be affected by substitutions generated by external beta contractions. These annotations can lead to a conservation of space and time in implementations of reduction by permitting substitutions to be performed trivially in certain situations. The use of the resulting notation in the reduction and comparison of terms is examined. Notions of head normal forms and head reduction sequences are defined in its context and shown to be useful in equality computations. Our head reduction sequences generalize the usual ones for lambda terms so that they subsume the sequences of terms produced by a variety of graph- and environment-based reduction procedures for the lambda calculus. They can therefore be used in correctness arguments for such procedures. This fact and the efficacy of our notation are illustrated in the context of a particular reduction procedure that we present. The relevance of the present discussions to the unification of lambda terms is also outlined.

[1]  Paul-Andr Typed -calculi with Explicit Substitutions May Not Terminate , 1995 .

[2]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[3]  Pierre-Louis Curien,et al.  The Categorical Abstract Machine , 1987, Sci. Comput. Program..

[4]  John Field,et al.  On laziness and optimality in lambda interpreters: tools for specification and analysis , 1989, POPL '90.

[5]  Fairouz Kamareddine,et al.  Extending a lambda-Calculus with Explicit Substitution which Preserves Strong Normalisation Into a Confluent Calculus on Open Terms , 1997, J. Funct. Program..

[6]  F. Dick A survey of the project Automath , 1980 .

[7]  Tim Teitelbaum,et al.  Incremental reduction in the lambda calculus , 1990, LISP and Functional Programming.

[8]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[9]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[10]  Michael J. C. Gordon,et al.  Edinburgh LCF: A mechanised logic of computation , 1979 .

[11]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[12]  Peter B. Andrews Resolution in type theory , 1971, Journal of Symbolic Logic.

[13]  Robert Harper Introduction to standard ml , 1986 .

[14]  T. Nipkom Functional unification of higher-order patterns , 1993, LICS 1993.

[15]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[16]  Gopalan Nadathur,et al.  A Notation for Lambda Terms: A Generalization of Environments , 1998, Theor. Comput. Sci..

[17]  Pierre-Louis Curien Categorical Combinators, Sequential Algorithms, and Functional Programming , 1993, Progress in Theoretical Computer Science.

[18]  Olivier Ridoux,et al.  Naïve Reverse Can be Linear , 1991, ICLP.

[19]  César A. Muñoz,et al.  Confluence and preservation of strong normalisation in an explicit substitutions calculus , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[20]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[21]  Claude Kirchner,et al.  Higher-order unification via explicit substitutions , 1995, Proceedings of Tenth Annual IEEE Symposium on Logic in Computer Science.

[22]  Gopalan Nadathur,et al.  Implementation Considerations for Higher-Order Features in Logic Programming , 1993 .

[23]  M. Debbabi,et al.  The Journal of Functional and Logic Programming , 2007 .

[24]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[25]  Martín Abadi,et al.  Explicit substitutions , 1989, POPL '90.

[26]  Frank Pfenning,et al.  Elf: a language for logic definition and verified metaprogramming , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[27]  Peter Henderson,et al.  A lazy evaluator , 1976, POPL.

[28]  Luigia Carlucci Aiello,et al.  An Efficient Interpreter for the Lambda-Calculus , 1981, J. Comput. Syst. Sci..

[29]  Gopalan Nadathur,et al.  A representation of Lambda terms suitable for operations on their intensions , 1990, LISP and Functional Programming.

[30]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[31]  Lawrence C. Paulson,et al.  Isabelle: The Next 700 Theorem Provers , 2000, ArXiv.