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
1
vote
1 answer

Scope of the first x in $(\lambda x. (\lambda x. x x) \ (\lambda x. x x))$

I want to reduce this to normal form. I think it's already in normal form, but that one can get the same expression infinitely. But that necessarily means the first $x$ does not bind any of the inner $x$ variables? I am struggling to get rules for…
1
vote
0 answers

Theorem on alpha conversion in type free lambda calculus

I am going through Lemma 1.2.11 of "Lectures on the Curry-Howard Isomorphism" by Morten Heine Sørensen and Pawel Urzyczyn. There is a free sample that includes this lemma here: https://play.google.com/store/books/details?id=_mtnm-9KtbEC 1.2.11…
1
vote
0 answers

Lemma relating to alpha equivalence of lambda terms

From Type Theory and Formal Proof, An Introduction by Rob Nederpelt and Herman Geuvers: Lemma 1.7.1 Let $M_{1} =_{\alpha} N_{1}$ and $M_{2} =_{\alpha} N_{2}$. Then also: (1) $M_{1}N_{1} =_{\alpha} M_{2}N_{2}$, (2) $\lambda x . M_{1} =_{\alpha}…
1
vote
1 answer

Ambiguity of definition of substitution in lambda calculus

From Type Theory and Formal Proof, An Introduction by Rob Nederpelt and Herman Geuvers: Definition 1.6.1 (Substitution) (1a) $x[x := N] \equiv N$, (1b) $y[x := N] \equiv y$ if $x \not \equiv y$, (2) $(PQ)[x := N] \equiv (P[x := N])(Q[x := N])$, (3)…
1
vote
1 answer

How are fractional numbers most effectively encoded in lambda calculus?

I haven't been able to find any information on this, but I think that if someone knows it, it's someone here. I need it for some theoretical knowledge about lambda calculus and compiler optimizations. I'm sorry if this is the wrong stackexchange…
Anonymous
  • 113
1
vote
1 answer

How does lambda calculus explain relation between the name and the value?

In some textbook I have met a statement, that discovery of lambda calculus explained the relation between name and value. How it did this in a simple example? UPDATE I don't remember the context, this is the part of the problem :)
1
vote
1 answer

Reducing Lambda to Normal Form

I'm having issues trying to reduce (λx. (λy. y x) (λz. x z)) (λy. y y) to its normal form. I get to (λy. y (λy. y y) (λz. (λy. y y) z) then get kind of lost. I don't know where to go from here.
1
vote
1 answer

Confused by the explanation of beta reduction of lambda calculus on wikipedia.

On this wikipedia article, there is an explanation of lambda calculus. In the section of Beta reduction, there is an Omega example, which says Omega = (lambda x.xx)(lambda x.xx), which reduces to itself in a single beta reduction, and therefore…
cmal
  • 135
1
vote
0 answers

Confused about applicative order

Applicative order is said to be leftmost, innermost. But I often here, it means "first evaluate the arguments". Sometimes I'm confused to what actually applies in what case. Here's an example: $$(λxyz. (λwvu. M) N O P) ((λz.z)f) O P$$ What does…
hgiesel
  • 1,257
1
vote
3 answers

parentheses in free and bound variable in lambda calculus

I'm now starting the syntax of the lambda calculus, and have a very simple question about the parentheses for free and bound variable. Are " x1:= λx.x x " and " x2:= (λx.x) x " represent the same? In other word, is the second "x" in x1 free? I know…
Student
  • 119
1
vote
1 answer

What are the differences between these two Lambda expressions?

What are the diffs between these two? $$\lambda x.((\lambda x.x)x)$$ $$(\lambda x.(\lambda x.x))x$$ and why? My understanding is that: For the first one, it is a lambda abstraction, without application. The 2nd one is an application on the final x,…
1
vote
1 answer

Can F be diverging in "forall M FM = F"?

Using the $Y$ combinator I got $F (Y F) = Y F = F \Rightarrow F = YY$. The problem is $YY$ diverges. Is it correct to state that $\forall M\;YYM = YY$, because both statements diverge?
Alex
  • 137
  • 5
1
vote
1 answer

Compatibility of $\beta$-reduction

In the Introduction to Lambda Calculus, on pages 23-24, the author introduces one-step $\beta$-reduction and $\beta$-reduction, which I write as $\to_1$ and $\to$ respectively (cannot find the symbols in the document on Detexify). In Definition…
1
vote
1 answer

Evaluating a Function: Bracketing Issues

I have the following and am asked to evaluate it (I've posted this question elsewhere but I have a new worry with evaluating the function). $[[\lambda f.\lambda m. f(m + m^2))]([\lambda n.2n])](3)$ I'm worried about mis-evaluating this because I'm…
Rusty
  • 245
1
vote
0 answers

Lambda Calculus: Types, Denotations & Evaluations

I have a sentence: "Ann introduces Marie to Jacob.' (I don't know how to do the syntax tree in Latex, I apologize if it looks awful). I need to do three things. First, determine the types associated with every node in the syntax tree. Second, assign…
Rusty
  • 245