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
37
votes
3 answers

What's the point of eta-conversion in lambda calculus?

I think I'm not understanding it, but eta-conversion looks to me as a beta-conversion that does nothing, a special case of beta-conversion where the result is just the term in the lambda abstraction because there is nothing to do, kind of a…
Trylks
  • 533
12
votes
4 answers

How do lambda calculus most basic definitions work?

Good afternoon, I'm trying to learn lambda calculus, and I do understand the notation (it's not hard, $f=\lambda a_1.\cdots\lambda a_n.x=\lambda a_1\cdots a_n.x\Leftrightarrow f(a_1;\cdots;a_n)=x$), but not what is defined by it. For an example of…
JMCF125
  • 2,738
  • 1
  • 20
  • 34
11
votes
2 answers

What is the shortest function of lambda calculus that generates all functions of lambda calculus?

I suspect there's a good chance the answer to this is unknown and hard (or at least extremely tedious), but I figured it would be worth asking. It's well known that the functions $K:=\lambda x.\lambda y.x$ and $S:=\lambda x.\lambda y.\lambda…
Harry Altman
  • 4,652
10
votes
1 answer

How to multiply in Lambda Calculus?

I have trouble, when attempting to multiply Church numerals with lambda. First, does this work? MULT := $\lambda$mnfx.m ( PLUS n ) MULT := $\lambda$mnfx.m ( m SUCC n ) MULT := $\lambda$mnfx.m(m f(n f x)) Therefore if I multiply 3 ($\lambda$fx.f(f(f…
Reed Oei
  • 556
9
votes
2 answers

Representing lists and trees in System F

System F (also known as second-order lambda calculus or polymorphic lambda calculus) is defined as follows. Types are defined starting from type variables $X, Y, Z, \ldots$ by means of two operations: if U and V are types, then $U\rightarrow V$ is…
8
votes
2 answers

Is $S(K (S I I))(S(S (K S)(S(K K)I)))(K (S I I))$ really a fixed-point combinator or is this a typo?

I was reading nLab’s article on fixed-point combinators and it mentions that $$Y = S(K (S I I))(S(S (K S)(S(K K)I)))(K (S I I))$$ is a fixed-point combinator. However, when I convert it to a lambda calculus term using SKI combinator interpreter, I…
joseville
  • 1,477
7
votes
1 answer

Lambda calculus normal order - what is "outermost"?

I have a question regarding lambda calculus normal order reduction. Essentially every explanation I've found is similar to this answer, which describes the order as ([reduce] the leftmost outermost $\beta$-redex first" (bold is mine), and then…
Ben I.
  • 173
7
votes
2 answers

Substitution in lambda calculus

I have just started reading lambda calculus. In substitution it says $(\lambda x.M)N= [N/x]M$ (means all the free occurrences of $x$ in $M$ will be substituted by $N$) But $x$ is a bound variable. I dont get this point. Thanks
user55531
  • 309
7
votes
2 answers

Lambda Calc: bound and free variables?

I'm trying to work through "Elements of Functional Languages" by Martin Henson. On p. 17 he says: $v$ occurs free in $v$, $(\lambda v.v)v$, $vw$ and $(\lambda w.v)$ but not in $\lambda v.v$ or in $\lambda v.w$. And $v$ occurs bound in $\lambda v.v$…
6
votes
1 answer

Lambda calculus logical operators

Define the and operator in lambda calculus and prove your definition Define the exclusive or operator in lambda calculus, and prove your definition My answer for #1 is: AND $\equiv$ $\lambda$x.$\lambda$y.((x y) false) Because if x is true then it…
petrov
  • 335
  • 2
  • 5
  • 12
4
votes
1 answer

$Mx =_{\beta\eta} Nx$ implies $M =_{\beta\eta} N$

In the context of $\lambda$-calculus, I was thinking about whether or not $$Mx =_{\beta\eta} Nx \implies M =_{\beta\eta} N$$ if $x\notin FV(M)\cup FV(N)$. I have been around this issue for quite some time now, but didn't reach anywhere useful. Is it…
Alistair -L.
  • 163
  • 4
4
votes
2 answers

Mutually recursive definition of the terms to nonreqursive defenition with Y combinator.

Can't solve this task: Let there be a mutually recursive definition of the terms ${foo}$ and ${bar}$. In general, it can be written as $$ {foo} = P {foo} {bar} $$ $$ {bar} = Q {foo} {bar} $$ Here $P$ and $Q$ are some terms that contain neither…
replikeit
  • 171
4
votes
1 answer

Lambda calculus function with unrestricted domain and nontrivial finite range?

In the untyped lambda calculus, one of the first encountered expressions is: $F = Const(I) = \lambda x.\lambda y.y$ It is easily seen that a property of this expression is that the set of possible evaluation "results" - the normal / non-reducible…
BadZen
  • 201
4
votes
1 answer

Lambda-Calculus: binding precedence

I'm utterly confused and hope to find clarification here. I came across a $\lambda$-calculus Interpreter by Liang Gong (who ever that is :)) claiming to be of California University of Berkley. Link:…
Rolle
  • 67
4
votes
1 answer

Lambda Calculus Equivalence

I'm a bit new to lambda calculus and was wondering about the equivalence of two expressions $$(\lambda x.\lambda y.xy)\lambda z.z\overset{?}=(\lambda x.\lambda y.xy)(\lambda z.z)$$ Can anyone help out?
1
2 3
15 16