HOME

TheInfoList



OR:

In
mathematical logic Mathematical logic is the study of Logic#Formal logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory (also known as computability theory). Research in mathematical logic com ...
and
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, the lambda-mu calculus is an extension of the
lambda calculus In mathematical logic, the lambda calculus (also written as ''λ''-calculus) is a formal system for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using var ...
introduced by Michel Parigot. It introduces two new operators: the μ operator (which is completely different both from the
μ operator In computability theory, the μ-operator, minimization operator, or unbounded search operator searches for the least natural number with a given property. Adding the μ-operator to the primitive recursive functions makes it possible to define all ...
found in
computability theory Computability theory, also known as recursion theory, is a branch of mathematical logic, computer science, and the theory of computation that originated in the 1930s with the study of computable functions and Turing degrees. The field has since ex ...
and from the μ operator of modal μ-calculus) and the bracket operator. Proof-theoretically, it provides a well-behaved formulation of classical natural deduction. One of the main goals of this extended calculus is to be able to describe expressions corresponding to theorems in
classical logic Classical logic (or standard logic) or Frege–Russell logic is the intensively studied and most widely used class of deductive logic. Classical logic has had much influence on analytic philosophy. Characteristics Each logical system in this c ...
. According to the Curry–Howard isomorphism, lambda calculus on its own can express theorems in
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems ...
only, and several classical logical theorems can't be written at all. However with these new operators one is able to write terms that have the type of, for example,
Peirce's law In logic, Peirce's law is named after the philosopher and logician Charles Sanders Peirce. It was taken as an Axiom#Mathematics, axiom in his first axiomatisation of propositional logic. It can be thought of as the law of excluded middle written ...
. The μ operator corresponds to Felleisen's undelimited control operator and bracket corresponds to calling a captured
continuation In computer science, a continuation is an abstract representation of the control state of a computer program. A continuation implements ( reifies) the program control state, i.e. the continuation is a data structure that represents the computat ...
.


Formal definition

The three forms of expressions in
lambda calculus In mathematical logic, the lambda calculus (also written as ''λ''-calculus) is a formal system for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using var ...
are as follows: #A ''variable'' , where ''x'' is any
identifier An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique ''class'' of objects, where the "object" or class may be an idea, person, physical countable object (or class thereof), or physical mass ...
. #An ''abstraction'' , where ''x'' is any identifier and ''M'' is any lambda expression. #An ''application'' , where ''M'' and ''N'' are any lambda expressions. In addition to the traditional λ-variables, the lambda-mu calculus includes a distinct set of μ-variables, which can be understood as continuation variables. The set of terms is divided into ''unnamed'' (all traditional lambda expressions are of this kind) and ''named'' terms. The terms that are added by the lambda-mu calculus are of the form: # is a named term, where ''α'' is a μ-variable and ''M'' is an unnamed term. # is an unnamed term, where ''α'' is a μ-variable and ''t'' is a named term.


Reduction

The basic reduction rules used in the lambda-mu calculus are the following: ; beta reduction : (\lambda x.M)N \to M /x/math> ; structural reduction : (\mu \alpha.t)M \to \mu \alpha. t \left [\alphaN M)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaN M)/[\alphaN \right ">alpha">[\alpha<_a>N_M)_[\alpha.html" ;"title="[\alpha.html" ;"title="[\alpha">[\alphaN M)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaN M)/[\alphaN \right /math>, where the substitutions are to be made for all subterms of t of the form [\alpha]N. ; renaming : [\alpha] \mu \beta. t \to t [\alpha / \beta] ; μη-reduction : \mu \alpha.[\alpha]M \to M, if ''α'' does not occur freely in ''M'' These rules cause the calculus to be confluent.


Variations


Call-by-value lambda-mu calculus

To obtain call-by-value semantics, one must refine the beta reduction rule and add another form of structural reduction: ;call-by-value beta reduction : (\lambda x.M) V \to M /x/math>, where ''V'' is a value ; right structural reduction : V (\mu \alpha.t) \to \mu \alpha. t \left [\alphaV N)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaV N)/[\alphaN \right ">alpha">[\alpha<_a>V_N)_[\alpha.html" ;"title="[\alpha.html" ;"title="[\alpha">[\alphaV N)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaV N)/[\alphaN \right /math>, where ''V'' is a value This addition corresponds to the addition of an additional Operational semantics">evaluation context former when moving from call-by-name to call-by-value evaluation.


De Groote's unstratified syntax

For a closer correspondence with conventional formalizations of control operators, the distinction between named and unnamed terms can be abolished, meaning that [α]M is of the same sort as other lambda-expressions and the body of μ-abstraction can also be any expression. Another variant in this vein is the Λμ-calculus.


Symmetric lambda-mu calculus

One can consider a structural reduction rule symmetric to the original one: M(\mu \alpha.t) \to \mu \alpha. t \left [\alphaMN)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaMN)/[\alphaN \right ">alpha">[\alpha<_a>MN)_[\alpha.html" ;"title="[\alpha.html" ;"title=" [\alphaMN)/[\alpha">[\alpha.html" ;"title="[\alpha">[\alphaMN)/[\alphaN \right /math> This, however, breaks Confluence (abstract rewriting)">confluence In geography, a confluence (also ''conflux'') occurs where two or more watercourses join to form a single channel (geography), channel. A confluence can occur in several configurations: at the point where a tributary joins a larger river (main ...
and the correspondence to control operators.


See also

* Classical pure type system">pure type systems for typed generalizations of lambda calculi with control


References

{{reflist, 1


External links


Lambda-mu
relevant discussion on Lambda the Ultimate. Lambda calculus Proof theory