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
0
votes
0 answers

XOR operation using lamba calculus and pré-operation

I recently posted a question with a similar title, but reading the community guidelines, I decided to improve it :) We can define the $AND$, $OR$ and $NOT$ operations in terms of the $T$ and $F$ operators and the standard combiners as follows: $K…
gmn_1450
  • 519
0
votes
1 answer

Evaluating lambda expression call by value Beta reduction

$ + = λmnab.m a((n a) b)$ I have to show that $2 + 3 \triangleright_\beta $ 5 what I understand from the lambda expression of + is that it takes 4 arguments m, n , a , b But when I have to evaluate $2 + 3$, I only have $2$ arguments How do I…
0
votes
1 answer

What is the result of (λx.λy.x + ( λx.x+1) (x+y)) ( λz.z-4 5) 10?

Could you explain what should I do about λx.λy.x part? Thanks.
jason
  • 119
0
votes
2 answers

Defining a lambda expression to swap the order of lambda abstractions

I want to define a lambda term $\mathrm{swapQ}$ such that $$\begin{align} \mathrm{swapQ}\ &(\lambda P Q_1 Q_2. Q_1(\lambda x_1. Q_2 (\lambda x_2. Px_1x_2)))\\ \triangleright_\beta\ & (\lambda P Q_1 Q_2. Q_2 (\lambda x_2. Q_1(\lambda x_1. Px_1…
0
votes
1 answer

evaluate the lambda expression call by value

$(\lambda x.\lambda y.(\lambda x.yx)xy)(\lambda y.y)(\lambda x.x(\lambda y.y))$ I know in $(\lambda x.M)N$, if M has bound variables same as free variables in N, we rename the bound variables. IN this problem I tried taking M as $\lambda y.(\lambda…
user55531
  • 309
0
votes
0 answers

Weak Normalization of Beta-Reduction on typable lambda-terms

I have to directly show weak normalization of the β-reduction on typable λ-terms, without showing (a property that entails) strong normalization. Hint: an idea analogous to that for the cut elimination procedure in the book (First-Order Logic and…
0
votes
1 answer

Lambda Calculus Expression Evaluation

I am looking at the following lambda calculus expression: (λx.(λy.(x(λx.xy))))y. Could somebody help me to evaluate it? I am guessing that the first step would be to pass the outermost y into the outer most function λx, but I am unsure where to go…
0
votes
1 answer

How do I simplify these lambda calculus equations?

How do I solve these lambda calculus equations? $\lambda x y z . x y (z x)$ $\lambda x y z . x y (z x y)$ For 1, is this correct? $xy[xyz := zx] = x$?
llamaro25
  • 289
0
votes
0 answers

Lambda calculus' syntax disambiguation

I've got a few questions about $\lambda$ calculus' syntax and how to interpret it. Most of these questions sparked from reading this notes. First thing first, an application 's syntax is defined as the juxtaposition of two $\lambda$ terms : $M…
MFranc
  • 213
0
votes
1 answer

Adding Parentheses to Lambda Expression

I'm new to lambda calculus and was wondering if transforming the lambda expression $v\lambda v.v$ into $v(\lambda v.)v$ produces the same expression. Could someone help out?
0
votes
1 answer

Overriding order of substitution in a lambda calculus expression

I'm studying from Introduction to Lambda Calculus book, and working on proving this substitution lemma from one of the exercise: 2.2. Prove the following substitution lemma. Let $x \not \equiv y$ and $x \not \in FV(L) $. Then $M[x := N][y := L]…
abbe
  • 103
0
votes
1 answer

Brackets in Lambda Calculus with multiple lambdas

How would you evaluate $\lambda x.\lambda x.\lambda x.x 1 2 3$? I cant figure out if the first lambda takes the 1 beta reduces, then the second lambda takes the 2 then beta reduces and finally the third lambda takes the 3 and beta reduces or if it…
0
votes
1 answer

Use of parenthesis in the body of abstraction in lambda expression

In the lambda expression $(λx. (λy. (x y)) y) z$, the body of the abstraction is taken as $(λy. (x y))y$ and not just $(λy. (x y))$. Why isn't $(λy. (x y))$ considered as the body and the following $y$ as an argument to it instead of $z$ being an…
Arka Pal
  • 111
0
votes
1 answer

Thinning lemma in simply typed lambda calculus

From "Type Theory and Formal Proof" by Rob Nederpelt and Herman Geuvers: Definition 2.4.2 (1) A statement is of the form $M : \alpha$, where $M \in \Lambda_{\mathbb{T}}$ and $\sigma \in \mathbb{T}$. In such a statement, $M$ is called the subject…
0
votes
1 answer

Flipping to terms in lamda calculus

I am very new to the concept of lambda calculus. My question is mainly about the first bracketed term in the below expression. The first term is supposed to flip the next two terms but I feel uneasy about using different letters. The whole aim of…