
Lambda cube ( λ-cube ) is a visual classification of eight typed lambda calculi with explicit type assignment ( Church typed systems). The cube is organized in accordance with the possible dependencies between the types and terms of this calculus and forms a natural structure for calculus of constructions . The idea of a λ-cube was proposed in 1991 by the Dutch logician and mathematician Henk Barendregt .
Content
Λ-cube structure
In λ-cube systems, variables are assigned to one of two varieties: or . All valid expressions are also sorted. The statement that the expression belongs to the variety is built on the statement of typification, that is, the statement read like this: element has type and belongs to the grade . Grade used for ordinary variables and terms of λ-calculus, sort - for variables and type expressions. Therefore, in the systems of the λ-cube, the types of the variety and grade elements are considered as intersecting. For example, term type can be written as an element of a "higher" grade . Variety Types sometimes called childbirth .
Dependence refers to the ability to define and use functions that display elements of one sort in another (or the same). Variety Elements depend on the elements of the variety , if:
- for a valid expression possibly containing a variable we can define a lambda abstraction ;
- for function its application to an element must be permissible , while the result should be an element of type varieties , i.e .
The base vertex of the cube is the system corresponding to a simply typed lambda calculus . Terms (grade elements ) depend on terms; types (grade elements ) do not participate in dependencies. The three axes emerging from the base vertex generate the following systems:
- type-dependent terms: system (lambda calculus with polymorphic types, system F );
- type dependent types: system (lambda calculus with operators over types);
- term dependent types: system (lambda calculus with dependent types ).
The remaining systems are various combinations of these dependencies. Richest system (polymorphic lambda calculus of higher order with dependent types) is actually a calculus of constructions .
Properties of λ-cube systems
All lambda cube systems have the property of strong normalization : any admissible term (and type) for a finite number of β-reductions is reduced to a single normal form.
Support in programming languages
Different functional languages support a different subset of the type systems represented in the lambda cube.
- Haskell , ML - λ2 ( system F )
- In a limited form, Haskell (in the GHC implementation since the latest versions) supports using type families.
- Coq , Agda - ( calculus of constructions )
Links
- Henk Barendregt, Lambda Calculi with Types (English) , Handbook of Logic in Computer Science, Volume II, Oxford University Press.
- Simon Peyton Jones and Erik Meijer, 1997. Henk: A Typed Intermediate Language
- Lennart Augustsson, 2007. Simpler, Easier! (English) Description of the implementation of lambda cube systems in the Haskell language.
- Lambda cube on SpbHUG (Russian) with translation by Denis Moskvin of the section on lambda cube from the book Henk Barendregt, Lambda Calculi with Types