Questions tagged [lambda-calculus]

For questions on the formal system in mathematical logic for expressing computation using abstract notions of functions and combining them through binding and substitution.

Lambda calculus (also written as λ-calculus) is a formal system in mathematical and theoretical for expressing computation based on function abstraction and application using variable binding and substitution. Its namesake, the Greek letter lambda (λ), is used in lambda expressions and lambda terms to denote binding a variable in a function.

It was first introduced by mathematician Alonzo Church in the 1930s as part of his research of the of mathematics. The original system was shown to be logically inconsistent because of the Kleene–Rosser paradox. Subsequently, in 1936 Church isolated and published just the portion relevant to computation, what is now called the untyped lambda calculus.

Untyped lambda calculus is Turing complete, that is, it is a universal model of computation that can be used to simulate any (see ). It may be used to model booleans, arithmetic, data structures and recursion.

Lambda calculus may be untyped or typed. In typed lambda calculus (see ), functions can be applied only if they are capable of accepting the given input's "type" of data. Typed lambda calculi are weaker than the untyped lambda calculus, in the sense that typed lambda calculi can express less than the untyped calculus can, but on the other hand typed lambda calculi allow more things to be proved; in the simply typed lambda calculus it is for example a theorem that every evaluation strategy terminates for every simply typed lambda-term, whereas evaluation of untyped lambda-terms need not terminate. One reason there are many different typed lambda calculi has been the desire to do more (of what the untyped calculus can do) without giving up on being able to prove strong theorems about the calculus.

Typed lambda calculi are closely related to mathematical and via the Curry–Howard isomorphism: types correspond to logic formulas, lambda-terms correspond to derivations in a logic system (depending on the kind of typed lambda calculus) and computation steps in the lambda calculus correspond to normalization (i.e. cut-elimination) steps for derivations.

Lambda calculus has applications in many different areas in mathematics, philosophy, linguistics, and computer science. Lambda calculus has played an important role in the development of the theory of languages, since functional programming languages implement the lambda calculus. Lambda calculus also is a current research topic in .

655 questions
2
votes
0 answers

Lambda Calculus: terms without β-normal form, but have a β-normal form when combined?

I need to find two λ-terms $A$ and $B$ where neither $A$ nor $B$ have a β-normal form, but $(A\ B)$ has a β-normal form. How would I go about doing this?
Alex
  • 36
2
votes
2 answers

Basic problem with lambda-calculus syntax

I have a problem with lambda-calculus, that is, I just don't get the formalism at all. So, I found in a previous question a lot of resources to study it from the scratch, and I was focusing on the notes by Selinger. Thus, at page 8, concerning the…
Kolmin
  • 4,083
2
votes
1 answer

Exercise: Is $(\lambda x. (x\,x))\; y \neq_{\beta} (\lambda x (\lambda y. (y\;x)))\; x\;x $ true?

In exercise 1.8 of the book 'Type Theory and Formal Proof: An Introduction', it is asked to show that $$(\lambda x. x\,x) y$$ is not beta convertible to $$(\lambda xy. y\,x) x\,x.$$ Using the book's notation abbreviations, this is equivalent to…
jadn
  • 459
2
votes
1 answer

Is Alpha Conversion needed?

Is there any lambda expression $E$, that when "computed" ($\beta$-reduced) leads to substitution mistakes, even though you never reused a variable in $E$? EDIT: I certainly know the importance of $\alpha$-equivalence in theoretical lambda calculus,…
Zonko
  • 322
  • 1
  • 13
2
votes
1 answer

Understanding Abstract Syntax Tree

Benjamin C. Pierce's Types and Programming Languages presents on page 54: The following expression, (1 + 2) * 3, becomes the following concrete Abstract Syntax Tree: Pierce goes onto say: To saving writing too many parentheses, we adopt two…
2
votes
0 answers

Lambda Calculus - reduction with a shorthand term

I'm new to lambda calculus and am having trouble understand how a shorthand acts when reducing. Given: $((\lambda xy.x)(\lambda y.y))y$ What I have: since $\lambda xy.x = \lambda x.\lambda y.x$ $((\lambda x.\lambda y.x)(\lambda y.y))y$ Now from…
greenteam
  • 333
2
votes
0 answers

lambda calculus nesting order

I don't understand if there is a proper ordering to nested functions in lambda calculus and, if so, what that is. Regardless of the order in which they are nested, if the same reduction strategy is used (e.g. normal order) for all permutations it…
2
votes
0 answers

A kind of reverse Church-Rosser

In the $\lambda$-calculus. Proposition: For any terms $M$,$N$ such that $M =_\beta N$, there is a term $L$ such that $L \twoheadrightarrow_\beta M$ and $L \twoheadrightarrow_\beta N$. Is this true or false? A proof sketch or counterexample would be…
drdo
  • 23
2
votes
2 answers

Doing alpha conversions and beta reductions, Lambda Calculus

I am attempting to perform Lambda calculations. I have the following information. T = $\lambda xy.x$ F = $\lambda xy.y$ A = $\lambda xy.xyF$ I attempted to perform Beta reduction and alpha conversion on ATF. $\lambda xy.xyF (TF) $ =$[(\lambda…
Jonathan
  • 121
2
votes
1 answer

Church's definition of "or" in Lambda Calculus

I have been working through Church's Postulates for the foundation of logic. In the paper he has some four definitions that he will then use in order to formulate the later postulates. If someone could illuminate one of these for me, I am sure I…
gremble
  • 95
2
votes
2 answers

Lambda calculus: composition of SKI

I am doing some exercises on writing a lambda term as a composition of the terms: S=$\lambda$xyz.xz(yz), K=$\lambda$xy.y, I=$\lambda$x.x. I know that all lambda terms can be written using S K and I with the following rules: 0) $\lambda$x.Fx=F…
hiat
  • 65
1
vote
0 answers

Union and intersection of Bohm trees

When I study the Bohm tree defined in The Lambda Calculus: Its Syntax and Semantics, H.P. Barendregt, Elseviser,$\cap\Phi$ or $\cup_i(M_i)$ always occurs. But I'm confused about the union and the intersection operation of Bohm trees. For…
Lily
  • 131
1
vote
2 answers

In lambda calculus, why do we define $n=\lambda f.\lambda x.f^n(x)$ instead of $n=\lambda f.f^n$?

I just started learning lambda calculus and I understood most of it but i was thinking that why do we define $n=\lambda f.\lambda x.f^n(x)$ instead of $n=\lambda f.f^n$? I think it would be more simple in that way? Eg.: $$0\equiv\lambda f.\;\lambda…
Kartik
  • 1,413
1
vote
1 answer

Lambda calculus expression reduction

I don't know the correct answer how this reduction should've be done. Should I simply put λfx.fx in a place of m and λzy.zzy in a place of n? (λmnfx.mf(nfx) λfx.fx λzy.zzy)
Sheil
  • 11
  • 2
1
vote
1 answer

Lambda calculus: encoding lists and projectors

Given a pair $[M_1,M_2]$ there is an easy encoding $\lambda x.x M_1 M_2$. For the n-tuple we have two options. First encoding: $$\lambda x.x M_1, M_2, \ldots , M_n$$ Second encoding: $$[M_0, [M_1 , [M_2, \ldots ]]] = \lambda x.xM_0 \lambda y.y M_1…