Typed lambda calculus

Source: Wikipedia, the free encyclopedia.

A typed

formalism
that uses the lambda-symbol () to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a type depends on the calculus considered (see kinds below). From a certain point of view, typed lambda calculi can be seen as refinements of the
untyped lambda calculus, but from another point of view, they can also be considered the more fundamental theory and untyped lambda calculus a special case with only one type.[1]

Typed lambda calculi are foundational

type systems
for programming languages; here, typability usually captures desirable properties of the program (e.g., the program will not cause a memory access violation).

Typed lambda calculi are closely related to

internal language of certain classes of categories. For example, the simply typed lambda calculus is the language of Cartesian closed categories (CCCs)[2]

Kinds of typed lambda calculi

Various typed lambda calculi have been studied. The simply typed lambda calculus has only one type constructor, the arrow , and its only types are

basic types and function types
.
logical framework (LF), a pure lambda calculus with dependent types. Based on work by Berardi on pure type systems, Henk Barendregt proposed the Lambda cube to systematize the relations of pure typed lambda calculi (including simply typed lambda calculus, System F, LF and the calculus of constructions).[3]

Some typed lambda calculi introduce a notion of subtyping, i.e. if is a subtype of , then all terms of type also have type . Typed lambda calculi with subtyping are the simply typed lambda calculus with conjunctive types and

System F<:
.

All the systems mentioned so far, with the exception of the untyped lambda calculus, are

Programming language for Computable Functions
" (PCF), are not normalizing, but they are not intended to be interpreted as a logic. Indeed, PCF is a prototypical, typed functional programming language, where types are used to ensure that programs are well-behaved but not necessarily that they are terminating.

Applications to programming languages

In

strongly typed programming languages closely correspond to typed lambda expressions.[5]

See also

  • Kappa calculus—an analogue of typed lambda calculus which excludes higher-order functions

Notes

  1. ^ Brandl, Helmut (27 April 2024). "Typed Lambda Calculus / Calculus of Constructions" (PDF). Calculus of Constructions (PDF). Retrieved 27 April 2024. {{cite web}}: Check |archive-url= value (help)CS1 maint: url-status (link)
  2. .
  3. ^ since the halting problem for the latter class was proven to be undecidable
  4. ^ "What to know before debating type systems | Ovid [blogs.perl.org]". blogs.perl.org. Retrieved 2024-04-26.

Further reading