Clever Geek Handbook
📜 ⬆️ ⬇️

Lambda cube

λ cc An arrow along each edge indicates the direction of inclusion; a simpler system is a special case of a more complex one.

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:∗ {\ displaystyle \ ast}   or◻ {\ displaystyle \ Box}   . 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 statementA:B:C {\ displaystyle A: B: C}   read like this: elementA {\ displaystyle A}   has typeB {\ displaystyle B}   and belongs to the gradeC {\ displaystyle C}   . Grade∗ {\ displaystyle \ ast}   used for ordinary variables and terms of λ-calculus, sort◻ {\ displaystyle \ Box}   - for variables and type expressions. Therefore, in the systems of the λ-cube, the types of the variety∗ {\ displaystyle \ ast}   and grade elements◻ {\ displaystyle \ Box}   are considered as intersecting. For example, term type(λx:α.x):(α→α):∗ {\ displaystyle (\ lambda x: \ alpha. \, x): (\ alpha \ to \ alpha): \ ast}   can be written as an element of a "higher" grade(α→α):∗:◻ {\ displaystyle (\ alpha \ to \ alpha): \ ast: \ Box}   . Variety Types◻ {\ displaystyle \ Box}   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 Elementssone {\ displaystyle s_ {1}}   depend on the elements of the varietys2 {\ displaystyle s_ {2}}   , if:

  • for a valid expressionF[x]:τ:sone {\ displaystyle F [x]: \ tau: s_ {1}}   possibly containing a variablex:σ:s2 {\ displaystyle x: \ sigma: s_ {2}}   we can define a lambda abstraction(λx:σ.F[x]):(σ→τ):sone {\ displaystyle (\ lambda x: \ sigma. \, F [x]): (\ sigma \ to \ tau): s_ {1}}   ;
  • for functionG:(σ→τ):sone {\ displaystyle G: (\ sigma \ to \ tau): s_ {1}}   its application to an element must be permissibleY:σ:s2 {\ displaystyle Y: \ sigma: s_ {2}}   , while the result should be an element of typeτ {\ displaystyle \ tau}   varietiessone {\ displaystyle s_ {1}}   , i.e(GY):τ:sone {\ displaystyle (G \, Y): \ tau: s_ {1}}   .

The base vertex of the cube is the systemλ→ {\ displaystyle \ lambda ^ {\ rightarrow}}   corresponding to a simply typed lambda calculus . Terms (grade elements∗ {\ displaystyle \ ast}   ) depend on terms; types (grade elements◻ {\ displaystyle \ Box}   ) do not participate in dependencies. The three axes emerging from the base vertex generate the following systems:

  • type-dependent terms: systemλ2 {\ displaystyle \ lambda 2}   (lambda calculus with polymorphic types, system F );
  • type dependent types: systemλω_ {\ displaystyle \ lambda {\ underline {\ omega}}}   (lambda calculus with operators over types);
  • term dependent types: systemλP {\ displaystyle \ lambda P}   (lambda calculus with dependent types ).

The remaining systems are various combinations of these dependencies. Richest systemλPω {\ displaystyle \ lambda P \ omega}   (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λω_ {\ displaystyle \ lambda {\ underline {\ omega}}}   using type families.
  • Coq , Agda -λPω {\ displaystyle \ lambda P \ omega}   ( 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
Source - https://ru.wikipedia.org/w/index.php?title=Lambda-cube&oldid=94115981


More articles:

  • Red diplomatic couriers
  • Long Hot Summer
  • Sakuleu
  • Vlasov, Nikolai Dmitrievich
  • Manor, Amos
  • Limit (film)
  • Shenyang J-11
  • Cohen - Sutherland Algorithm
  • Adult
  • Baby (ATGM)

All articles

Clever Geek | 2019