Article · Wikipedia archive · Last revised Jun 21, 2026

Lambda-mu calculus

In mathematical logic and computer science, the lambda-mu calculus is an extension of the lambda calculus introduced by Michel Parigot. It introduces two new operators: the μ operator and the bracket operator. Proof-theoretically, it provides a well-behaved formulation of classical natural deduction.

Last revised
Jun 21, 2026
Read time
≈ 11 min
Length
2,574 w
Citations
13
Source

In mathematical logic and computer science, the lambda-mu calculus is an extension of the lambda calculus introduced by Michel Parigot.1 It introduces two new operators: the μ operator (which is completely different both from the μ operator found in computability theory 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. According to the Curry–Howard isomorphism, lambda calculus on its own can express theorems in intuitionistic logic 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, for example, the type of Peirce's law.

According to de Groote, the μ operator corresponds to Felleisen's undelimited control operator C and bracket corresponds to calling a captured continuation.2

Formal definition

The three forms of expressions in lambda calculus are as follows:

  1. A variable x.
  2. An abstraction λx. M, where x is any variable and M is any lambda expression.
  3. An application (M N), 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:

  1. [α]M is a named term, where α is a μ-variable and M is an unnamed term.
  2. (μ α. t) 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
( λ x . M ) N M [ N / x ] {\displaystyle (\lambda x.M)N\to M[N/x]}
structural reduction
( μ α . t ) M μ α . t [ [ α ] ( N M ) / [ α ] N ] {\displaystyle (\mu \alpha .t)M\to \mu \alpha .t\left[[\alpha ](NM)/[\alpha ]N\right]} , where the substitutions are to be made for all subterms of t {\displaystyle t} of the form [ α ] N {\displaystyle [\alpha ]N} .
renaming
[ α ] μ β . t t [ α / β ] {\displaystyle [\alpha ]\mu \beta .t\to t[\alpha /\beta ]}
μη-reduction
μ α . [ α ] M M {\displaystyle \mu \alpha .[\alpha ]M\to M} , if α does not occur freely in M

These rules cause the calculus to be confluent.

Typed lambda-mu calculus

The lambda-mu calculus can be typed. The basic theory of the typed lambda-mu calculus is to classical propositional logic as the simply typed lambda calculus is to intuitionistic propositional logic.3

Typed lambda-mu calculus can be presented in sequent calculus:3: Figure 6.2  Γ , x : τ x : τ Γ , x : σ M : τ Γ ( λ x : σ . M ) : σ τ Γ , M : σ τ Γ N : σ Γ ( M N ) : τ Γ , α : ¬ σ M : Γ ( μ α : ¬ σ . M ) : σ Γ , α : ¬ σ M : σ Γ , α : ¬ σ ( [ α ] M ) : {\displaystyle {\begin{aligned}\Gamma ,x\mathbin {:} \tau &\vdash x\mathbin {:} \tau \\\\{\frac {\Gamma ,x\mathbin {:} \sigma \vdash M\mathbin {:} \tau }{\Gamma \vdash (\lambda x\mathbin {:} \sigma .M)\mathbin {:} \sigma \to \tau }}&\quad {\frac {\Gamma ,\vdash M\mathbin {:} \sigma \to \tau \quad \Gamma \vdash N\mathbin {:} \sigma }{\Gamma \vdash (MN)\mathbin {:} \tau }}\\\\{\frac {\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash M\mathbin {:} \bot }{\Gamma \vdash (\mu \alpha \mathbin {:} \neg \sigma .M)\mathbin {:} \sigma }}&\quad {\frac {\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash M\mathbin {:} \sigma }{\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash ([\alpha ]M)\mathbin {:} \bot }}\end{aligned}}} The first 3 rules are the same as simply typed lambda calculus. The next 2 are new to the lambda-mu calculus.

Curry–Howard correspondence

Simply typed lambda calculus, by the Curry–Howard correspondence, corresponds to purely functional programs that can only redirect their inputs.

A sequent Γ t : τ {\displaystyle \Gamma \vdash t:\tau } states that, within a program context Γ {\displaystyle \Gamma } , one can construct an object t {\displaystyle t} of type τ {\displaystyle \tau } .

The rule Γ , x : τ x : τ {\displaystyle \Gamma ,x\mathbin {:} \tau \vdash x\mathbin {:} \tau } states that, within a context that includes some x : τ {\displaystyle x:\tau } , one can construct an object x {\displaystyle x} with type τ {\displaystyle \tau } . This is obvious, by simply taking that same x : τ {\displaystyle x:\tau } .

The lambda-introduction rule Γ , x : σ M : τ Γ ( λ x : σ . M ) : σ τ {\displaystyle {\frac {\Gamma ,x\mathbin {:} \sigma \vdash M\mathbin {:} \tau }{\Gamma \vdash (\lambda x\mathbin {:} \sigma .M)\mathbin {:} \sigma \to \tau }}} states that, if one can construct M : τ {\displaystyle M:\tau } within a context of Γ , x : τ {\displaystyle \Gamma ,x\mathbin {:} \tau } , then one can construct ( λ x : σ . M ) : σ τ {\displaystyle (\lambda x:\sigma .M):\sigma \to \tau } within a context of Γ {\displaystyle \Gamma } . This object ( λ x : σ . M ) {\displaystyle (\lambda x:\sigma .M)} is a function-object defined within the context of Γ {\displaystyle \Gamma } . It takes an object x : σ {\displaystyle x:\sigma } as input, and internally reproduces the context of Γ , x : τ {\displaystyle \Gamma ,x\mathbin {:} \tau } , in which one then constructs M : τ {\displaystyle M:\tau } . This is a form of closure.

The lambda-reduction rule Γ , M : σ τ Γ N : σ Γ ( M N ) : τ {\displaystyle {\frac {\Gamma ,\vdash M\mathbin {:} \sigma \to \tau \quad \Gamma \vdash N\mathbin {:} \sigma }{\Gamma \vdash (MN)\mathbin {:} \tau }}} is a reverse of the previous rule.

The typed lambda-mu calculus is similar to the simply typed lambda calculus, but it allows redirecing both the inputs and the outputs. The redirection of input is by lambda abstraction, or closure. The redirection of output is by mu abstraction, or call/cc, jumps, or control operators.

The negation symbol ¬ {\displaystyle \neg } denotes duality. Whereas x : σ {\displaystyle x:\sigma } in the program context denotes an input from which an object with type σ {\displaystyle \sigma } appears, α : ¬ σ {\displaystyle \alpha :\neg \sigma } denotes an output for an object with type σ {\displaystyle \sigma } goes to.

M : {\displaystyle M:\bot } denotes a computational process that does not return any value, because its value would be returned to an output in context.

The address abstraction rule Γ , α : ¬ σ M : Γ ( μ α : ¬ σ . M ) : σ {\displaystyle {\frac {\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash M\mathbin {:} \bot }{\Gamma \vdash (\mu \alpha \mathbin {:} \neg \sigma .M)\mathbin {:} \sigma }}} closes an output from context. This corresponds to catch in call/cc.

The address application rule Γ , α : ¬ σ M : σ Γ , α : ¬ σ ( [ α ] M ) : {\displaystyle {\frac {\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash M\mathbin {:} \sigma }{\Gamma ,\alpha \mathbin {:} \neg \sigma \vdash ([\alpha ]M)\mathbin {:} \bot }}} redirects the output of a process M : σ {\displaystyle M:\sigma } to the output α {\displaystyle \alpha } in context. This corresponds to throw in call/cc.

The μ {\displaystyle \mu } is a channel device. The address α : ¬ p {\displaystyle \alpha :\neg p} is a channel that values of type p {\displaystyle p} can be transmitted along, and [ α ] M {\displaystyle [\alpha ]M} represents transmittal of M {\displaystyle M} to α {\displaystyle \alpha } , provided that M {\displaystyle M} is of type p {\displaystyle p} .3: 134 

Examples

Peirce's law ( ( p q ) p ) p {\displaystyle ((p\to q)\to p)\to p} is the type of the following term: λ x ( p q ) p . μ α ¬ p . [ α ] x ( λ y p . μ β ¬ q . [ α ] y ) {\displaystyle \lambda x^{(p\to q)\to p}.\mu \alpha ^{\neg p}.[\alpha ]x(\lambda y^{p}.\mu \beta ^{\neg q}.[\alpha ]y)} where we write x τ {\displaystyle x^{\tau }} for x : τ {\displaystyle x:\tau } , in order to save space.

Intuitively, one can understand this construction as follows. The program opens an input context x : ( p q ) p {\displaystyle x:(p\to q)\to p} , and an output context α : ¬ p {\displaystyle \alpha :\neg p} . One way to satisfy the output requirement of α : ¬ p {\displaystyle \alpha :\neg p} is to construct something of type p q {\displaystyle p\to q} , and give it to x {\displaystyle x} . That something is λ y p . μ β ¬ q . [ α ] y : p q {\displaystyle \lambda y^{p}.\mu \beta ^{\neg q}.[\alpha ]y:p\to q} . If x {\displaystyle x} takes this object without trying to use it, then it will return an object of type p {\displaystyle p} , which can then be given to α {\displaystyle \alpha } . Alternatively, x {\displaystyle x} might attempt to use it by providing it with an object y : p {\displaystyle y:p} , which can then be given to α {\displaystyle \alpha } without ever replying an object of type q {\displaystyle q} to x {\displaystyle x} .

The Łukasiewicz axiom is the type of the following term: λ x ( p q ) r λ y r p . λ z s . μ α ¬ p . [ α ] y ( μ β ¬ r . [ β ] x ( λ u p . μ γ ¬ q . [ α ] u ) ) {\displaystyle \lambda x^{(p\to q)\to r}\lambda y^{r\to p}.\lambda z^{s}.\mu \alpha ^{\neg p}.[\alpha ]y(\mu \beta ^{\neg r}.[\beta ]x(\lambda u^{p}.\mu \gamma ^{\neg q}.[\alpha ]u))} The double-negation translation corresponds to continuation-passing style. That is, the double-negation translation turns every formula provable in classical propositional logic into a provable formula in intuitionistic propositional logic. This corresponds to converting a program with catch/throw into a purely functional program that uses continuation-passing.3: Sec. 6.4 

For example, the double-negation translation of Peirce's law ( ( ¬ ¬ p ¬ ¬ q ) ¬ ¬ p ) ¬ ¬ p {\displaystyle ((\neg \neg p\to \neg \neg q)\to \neg \neg p)\to \neg \neg p} is the type of the following term: λ x ( ¬ ¬ p ¬ ¬ q ) ¬ ¬ p . λ α ¬ p x ( λ y ¬ ¬ p . λ β ¬ q . y α ) α {\displaystyle \lambda x^{(\neg \neg p\to \neg \neg q)\to \neg \neg p}.\lambda \alpha ^{\neg p}x(\lambda y^{\neg \neg p}.\lambda \beta ^{\neg q}.y\alpha )\alpha } Compare these two, in parallel: λ x ( p q ) p . μ α ¬ p . [ α ] x ( λ y p . μ β ¬ q . [ α ] y ) λ x ( ¬ ¬ p ¬ ¬ q ) ¬ ¬ p . λ α ¬ p . x ( λ y ¬ ¬ p . λ β ¬ q . y α ) α {\displaystyle {\begin{aligned}&\lambda x^{(p\to q)\to p}.&\mu \alpha ^{\neg p}.[\alpha ]&x(\lambda y^{p}.&\mu \beta ^{\neg q}.[\alpha ]&y)\\&\lambda x^{(\neg \neg p\to \neg \neg q)\to \neg \neg p}.&\lambda \alpha ^{\neg p}.\quad \;&x(\lambda y^{\neg \neg p}.&\lambda \beta ^{\neg q}.y\alpha )\alpha \end{aligned}}} The "jump to a different output" control behavior, as defined by μ α [ α ] {\displaystyle \mu \alpha \cdots [\alpha ]} , is translated into a pure lambda expression λ α α {\displaystyle \lambda \alpha \cdots \alpha } . Instead of allowing a jump to the address α : ¬ p {\displaystyle \alpha :\neg p} , one encodes the entire "the rest of the computation after the jumping to α : ¬ p {\displaystyle \alpha :\neg p} " as a single object, called the continuation object. This continuation object can then be called for as many times as one wants, as long as that continuation object remains in context.

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:4

call-by-value beta reduction
( λ x . M ) V M [ V / x ] {\displaystyle (\lambda x.M)V\to M[V/x]} , where V is a value
right structural reduction
V ( μ α . t ) μ α . t [ [ α ] ( V N ) / [ α ] N ] {\displaystyle V(\mu \alpha .t)\to \mu \alpha .t\left[[\alpha ](VN)/[\alpha ]N\right]} , where V is a value

This addition corresponds to the addition of an additional 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.2 Another variant in this vein is the Λμ-calculus.5

Symmetric lambda-mu calculus

One can consider a structural reduction rule symmetric to the original one:1

M ( μ α . t ) μ α . t [ [ α ] ( M N ) / [ α ] N ] {\displaystyle M(\mu \alpha .t)\to \mu \alpha .t\left[[\alpha ](MN)/[\alpha ]N\right]}

This, however, breaks confluence and the correspondence to control operators.

See also

See also

References

References

  1. Michel Parigot (1992). λμ-Calculus: An algorithmic interpretation of classical natural deduction. Lecture Notes in Computer Science. Vol. 624. pp. 190–201. doi:10.1007/BFb0013061. ISBN 3-540-55727-X.
  2. de Groote, Philippe (1994). "On the relation between the λμ-calculus and the syntactic theory of sequential control". In Pfenning, Frank (ed.). Logic Programming and Automated Reasoning, 5th International Conference, LPAR'94, Kiev, Ukraine, July 16–22, 1994, Proceedings. Lecture Notes in Computer Science. Vol. 822. Springer. pp. 31–43. doi:10.1007/3-540-58216-9_27. ISBN 978-3-540-58216-8.
  3. Sørensen, Morten Heine; Urzyczyn, Paweł (2006). "6. Classical logic and control operators". Lectures on the Curry-Howard isomorphism. Studies in logic and the foundations of mathematics. ScienceDirect (Online service) (1 ed.). Amsterdam Boston [MA]: Elsevier. ISBN 978-0-444-52077-7.
  4. Ong, C.-H. L.; Stewart, C. A. (1997-01-01). "A Curry-Howard foundation for functional computation with control". Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '97. New York, NY, USA: Association for Computing Machinery. pp. 215–227. doi:10.1145/263699.263722. ISBN 978-0-89791-853-4.
  5. Saurin, Alexis (2005). "Separation with Streams in the λμ-calculus". 20th IEEE Symposium on Logic in Computer Science (LICS 2005), 26–29 June 2005, Chicago, IL, USA, Proceedings. IEEE Computer Society. pp. 356–365. doi:10.1109/LICS.2005.48.
External links
  • Lambda-mu relevant discussion on Lambda the Ultimate.