SIMPLY TYPED LAMBDA CALCULUS

The 'simply typed lambda calculus' (lambda^ o) is a typed lambda calculus whose only connective is o (function type). This makes it the canonical, and in many ways simplest, example of a typed lambda calculus.
The word ''simple types'' is also used to refer to extensions of the simply typed lambda calculus such as products, coproducts or natural numbers (System T) or even full recursion (like PCF). In contrast, systems which introduce polymorphic types (like System F) or dependent types (like the Logical Framework) are not considered ''simply typed''. The simply typed lambda calculus was originally introduced by Alonzo Church in 1940 as an attempt to avoid paradoxical uses of the untyped lambda calculus.

Contents
Types
Terms
Important results
References

Types


The types of the simply typed lambda calculus are constructed from base types (or type variables) lpha,eta,gamma,dots, and given types sigma, au we can construct sigma o au. Church used only two base types o for the type of propositions and iota for the type of individuals. Frequently the calculus with only one base type, usually o, is considered.
o associates to the right: we read sigma o au o
ho as sigma o( au o
ho). To each type sigma we assign a number o(sigma), the order of sigma. For base types we set o(lpha)=0 and for function types we define recursively o(sigma o au)=mbox{max}(o(sigma)+1,o( au)).

Terms


To define the set of well typed lambda terms of a given type, we introduce typing contexts Gamma,Delta,dots which are sequences of typing assumptions of the form x:sigma where x is a variable. We introduce the judgment Gamma dash t : sigma which means that t is a term of type sigma in context Gamma and which is given by the following typing rules :
{| align="center" cellpadding="9"
| align="center" | {}over{x:sigma dash x : sigma } (1)
| align="center" | {Gamma dash x:sigmaquad x
ot=y}over{Gamma.y: au dash x : sigma} (2)
|-
| align="center" | {Gamma.x:sigma dash t: au}over{Gamma dash lambda x : sigma.t : sigma o au} (3)
| align="center" | {Gamma dash t:sigma o auquadGamma dash u:sigma}over{Gamma dash t,u : au} (4)
|}
In other words,
# If ''x'' has type sigma, we know that ''x'' has type sigma.
# If in a certain context ''x'' has type sigma and we have some ''y'' which isn't ''x'', then the fact that ''y'' has type au, along with that same context, allows us to infer that ''x'' has type sigma. Even more clearly, adding a new value to a context doesn't change existing ones (provided that the new value isn't the same as one of the previous ones).
# If, in a certain context, ''x'' has type sigma and ''t'' type au, then we can construct, in the same context, the lambda abstraction lambda x : sigma. t which then has type sigma o au.
# If, in a certain context, ''t'' has type sigma o au, and ''u'' has type sigma, then we can construct the expression t,u, which has type au. This captures the concept of function application.
Examples of closed terms, i.e. terms typable in the empty context, are:

lambda x:lpha.x : lpha olpha (the I-combinator),

lambda x:lpha.lambda y:eta.x:lpha o eta o lpha (the K-combinator), and

lambda x:lpha oeta ogamma.lambda y:lpha oeta.lambda z:lpha.x z (y z) : (lpha oeta ogamma) o(lpha oeta) olpha ogamma (the S-combinator).
These are the typed lambda calculus representations of the basic combinators of combinatory logic.
The simply typed lambda calculus is closely related to propositional intuitionistic logic using only implication ( o) as a connective (minimal logic) via the Curry-Howard isomorphism: the types inhabited by closed terms are precisely the tautologies of minimal logic.
Terms of the same type are identified via etaeta-equivalence, which is generated by the equations (lambda x:sigma.t),u =_{eta} t[x:=u], where t[x:=u] stands for t with all ''free'' occurrences of x replaced by u, and lambda x:sigma.t,x =_eta t , if x does not appear free in t. The simply typed lambda calculus (with etaeta-equivalence) is the internal language of 'Cartesian Closed Categories' (CCCs), this was first observed by Lambek.

Important results



★ Tait showed in 1967 that eta-reduction is strongly normalizing. As a corollary etaeta-equivalence is decidable. Statman showed in 1977 that the normalisation problem is not elementary recursive. A purely semantic normalisation proof (see normalisation by evaluation) was given by Berger and Schwichtenberg in 1991.

★ The unification problem for etaeta-equivalence is undecidable. Huet showed in 1973 that 3rd order unification is undecidable and this was improved upon by Goldfarb in 1981 by showing that 2nd order unification is already undecidable. Whether higher order matching (unification where only one term contains existential variables) is decidable is still open. [2006: Colin Stirling, Edinburgh, has published a proof-sketch in which he claims that the problem is decidable; however, the complete version of the proof is still unpublished]

★ We can encode natural numbers by terms of the type (o o o) o(o o o) (Church numerals). Schwichtenberg showed in 1976 that in lambda^ o exactly the extended polynomials are representable as functions over Church numerals; these are roughly the polynomials closed up under a conditional operator.

★ A ''full model'' of lambda^ o is given by interpreting base types as sets and function types by the set-theoretic function space. Friedman showed in 1975 that this interpretation is complete for etaeta-equivalence, if the base types are interpreted by infinite sets. Statman showed in 1983 that etaeta-equivalence is the maximal equivalence which is ''typically ambiguous'',i.e. closed under type substitutions (''Statman's Typical Ambiguity Theorem''). A corollary of this is that the ''finite model property'' holds, i.e. finite sets are sufficient to distinguish terms which are not identified by etaeta-equivalence.

★ Plotkin introduced logical relations in 1973 to characterize the elements of a model which are definable by lambda terms. In 1993 Jung and Tiuryn showed that a general form of logical relation (Kripke logical relations with varying arity) exactly characterizes lambda definability. Plotkin and Statman conjectured that it is decidable whether a given element of a model generated from finite sets is definable by a lambda term (''Plotkin-Statman-conjecture''). The conjecture was shown to be false by Loader in 1993.

References



★ A. Church: A Formulation of the Simple Theory of Types, JSL 5, 1940

★ W.W.Tait: Intensional Interpretations of Functionals of Finite Type I, JSL 32(2), 1967

★ G.D. Plotkin: Lambda-definability and logical relations, Technical report, 1973

★ G.P. Huet: The Undecidability of Unification in Third Order Logic Information and Control 22(3): 257-267 (1973)

★ H. Friedman: Equality between functionals. LogicColl. '73, pages 22-37, LNM 453, 1975.

★ H. Schwichtenberg: Functions definable in the simply-typed lambda calculus, Arch. Math Logik 17 (1976) 113-114.

★ R. Statman: The Typed lambda-Calculus Is not Elementary Recursive FOCS 1977: 90-94

★ W. D. Goldfarb: The undecidability of the 2nd order unification problem, TCS (1981), no. 13, 225- 230.

★ R. Statman. lambda-definable functionals and etaeta conversion. Arch. Math. Logik, 23:21--26, 1983.

★ J. Lambek: Cartesian Closed Categories and Typed Lambda-calculi. Combinators and Functional Programming Languages 1985: 136-175

★ U. Berger, H. Schwichtenberg: An Inverse of the Evaluation Functional for Typed lambda-calculus LICS 1991: 203-211

★ Jung, A.,Tiuryn, J.:A New Characterization of Lambda Definability, TLCA 1993

★ R. Loader: The Undecidability of λ-definability, appeared in the Church Festschrift, 2001

This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves