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

Lambda Calculus: Prove $m \ Succ\ n = m+n$

Given $Succ = \lambda n. \lambda fx. f(n f(x))$ and church's numeral: $n = \lambda fx.f^n(x)$ Show that $ m\ Succ\ n = m + n$ I don't get how it can be shown. I get stuck on this step: $\lambda fx. f^m(x) \ \lambda fx.f^{n+1}(x)$ Many thanks.
0
votes
1 answer

Find a lambda-expressions F, K such that for all M, FM = F and KM = MK

Find a lambda-expression F such that for all M, FM = F Find a lambda-expression K such that for all M, KM = MK My guess is to somehow use the combinator Y := \f. (\x.f(xx))(\x.f(xx)) so that YF = F(YF)
Jevin
  • 1
0
votes
1 answer

Expressions: What is a "sub-expression?"

Again, I'm trying to understand Martin Henson's "Elements of Functional Languages." He talks about "maximal free expression." For example, M of EXP is a maximal free expression of N of EXP iff M is a free expression of N, and whenever M is a proper…
0
votes
0 answers

Representing "not" in lambda calculus

Is there any lambda function which takes as input a lambda term $\lambda x_1x_2...x_n.f$ which is a function of $n$ variables and produces, $\lambda x_1x_2...x_n.\sim f$ . $\sim$ denotes "not". If we know the value of $n$, we can come up with the…
arindam mitra
  • 1,421
  • 1
  • 12
  • 20
0
votes
1 answer

Lambda calculus: How to define a function that simulates $\neg p\vee q$?

I am making my first steps in lambda calculus, so please bear with me. I want to create a lambda function, that given two boolean expressions (either $F$ or $T$ - defined below), simulates the formula $\neg p\vee q$ where the $p$ is its first…
0
votes
1 answer

Lambda calculus: Simplifying booleans with beta reductions

I have been doing a homework assignment wherein I have been trying to determine the result of ((or true) false) using beta reduction. I began by writing the entire expression using lambda notation and performed the following steps: ((λx.λy.((x…
-1
votes
2 answers

how to show two expressions have the same $\beta-\eta$ normal form

======================= Original Post ====================== In lambda calculus, we define the boolean operators as below: $$ AND \to \lambda{}pq.pq\boldsymbol{F} \to \lambda{}p.\lambda{}q.pq(\lambda{}x.\lambda{}y.y) $$ $$ OR \to…
-1
votes
1 answer

How to show beta equivalence of property of Y combinator

How to show that $\underline{Y}f =_{\beta} f(\underline{Y}f)$ where $\underline{Y}$ is the usual Y combinator? Thanks.
Logan Lee
  • 249
-1
votes
1 answer

Prove that equality is symmetric in lambda calculus

I want to prove that = is symmetric in lambda calculus. ie. If $E=E'$ then $E'=E$. From text I came across that if for instance $$ E_1 \to_\beta E_2 \to_\beta E_3 $$ and $E \equiv E_1$ and $E' \equiv E_3$ then $E=E'$. From this to prove that $E'=E$…
Logan Lee
  • 249
-1
votes
1 answer

Evaluating lambda expression

$((λfx.f(f(x))) (λy.y^2)$ (1) is finally evaluated to $1^4=1$ $(3)(3) (\text{inc})(0)=(27)(\text{inc})(0)=27$ Is λfx the same as λf.λx That is is $((λfx.f(f(x))) (λy.y^2) equivalent to $(λf.λx.f(f(x)) (λy.y^2) ? Is it correct? Thanks much in…
user60465
  • 147
-1
votes
1 answer

Map a set with it's index

Let's say I have the set: $$ A = \{1,2,3,4\} $$ How would I express something like this: A.map(function (number, index, set) { return number - set[set.length - index - 1]] }); Which would result in: $$ B = \{-3, -1, 1, 3\} $$
Downgoat
  • 167
-2
votes
1 answer

Question about de Bruijn Notation of lambda calculus

https://www.cs.cornell.edu/courses/cs4110/2016fa/lectures/lecture15.pdf One way to avoid the tricky interaction between free and bound names in the substitution operator is to pick a representation for expressions that doesn’t have any names at…
1 2 3
15
16