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

Lambda calculus free and bound variables

Currently I am trying to use substitution in Lamdba Calculus but I haven't cleared up free and bound variables quite like I thought I had. For example, I have the following expression: λx.xy where y is a free variable and x is a bound variable. I'm…
Chris
  • 151
1
vote
1 answer

lambda calculus in some type system

look at my system type (rules of them): $$\frac{\Gamma(x:\tau)\vdash e:\rho}{\Gamma(x:\tau)\vdash \lambda x .e:\tau\rightarrow\rho}$$ $$\frac{\Gamma\vdash e_1:\tau\rightarrow\rho\ \ \ \ \ \Gamma\vdash e_2\rightarrow \tau}{\Gamma\vdash e_1e_2 :…
user343207
1
vote
1 answer

On the Y-Combinator in Lambda Calculus

I am trying to follow this explanation on the Y-combinator Fairly at the beginning the author shows this function definition and claims that stepper(stepper(stepper(stepper(stepper()))) (5) were equal to factorial(5). stepper = function(next_step) …
user3578468
  • 1,371
1
vote
1 answer

lambda calculus: predecessor function

Apparently this expression can be used to calculate the predecessor of a given church numeral: $\renewcommand{\l}{\lambda}$ $\l n.(n\ \l p . (p.2,\ s p.2)\ (\overline{0},\ \overline{0})).1$ $.n$ being the projection onto the $n$th…
user3578468
  • 1,371
1
vote
0 answers

Examples of Partial Combinatory Algebras with surjective pairing?

What are some good examples of partial combinatory algebras (a.k.a. Schoenfinkel algebras) with surjective pairing? I mean this in the sense that, if $\mathsf{D}$ is the pairing combinator and $\pi_0,\pi_1$ the projection combinators, then…
1
vote
1 answer

Understand free and bound variable associations in Lambda Calculus

I understand that free variables in Lambda calculus are those that are not bound to a specific metavariable inside of an abstraction, while bound variables are the direct opposite. The idea that confuses me is that of parenthetical placement inside…
ryan
  • 11
1
vote
1 answer

Lambda calculus typing

I'm trying to find a type T such that I can create a derivation tree for the following expression: λx.λy.((xy)y) : T Am I right in thinking that there is no such T for this to be possible? If I'm wrong, how would I go about finding T? Thanks.
hunterge
  • 153
1
vote
1 answer

Solve recursive equation in lambda calculus

I need to find such F, so that for any M $FM = MF$. I can't figure out, how to bring this equation to the form like this: $F = TF$, so that I could just apply Y combinator
Alex
  • 137
1
vote
2 answers

lambda calculus, equalities

Help would be appreciated. The notes are poor on the subject, and I am clueless. Verify the following equalities: Verify the equality $$\mathsf{SIII}=_β\mathsf{I}$$ where $\mathsf{S} = λxyz.(xz)(yz) \quad \mathsf{I}= λx.x$ Verify the equality…
jack
1
vote
1 answer

Map a set in mathematical notation

How would express the following JavaScript which takes a set and applies a lambda to each member of the set (resulting in a new set) in mathematical notation? var set = [1, 2, 3]; var set2 = set.map(function(n){ return n * 2; }); set2 === [2, 4,…
0
votes
1 answer

implementation of xnor with lambda

i dont know how to ask my question but here it is... i have implementation of "NOT" and "True" and "false",but if i want to have "xnor" according to the example beneath: (true) T--->λx.λy.x (false) F----> λx.λy.y (true) Q =((TQ)P) => ((λX.λY.X Q)P=…
sam
  • 21
0
votes
1 answer

Beta reduction: how to?

I'm trying to beta-reduce the following: $$\lambda xy.y((\lambda xyz.xyz)(\lambda u.u)(\lambda u.uu))$$ Anyway I think that I didn't understand terms' scope. Considering the application in the shape of $ (\lambda x.y)M $ and evaluating by leftmost…
MoreOver
  • 101
  • 2
0
votes
1 answer

Why is this lambda calculus expression already in normal form?

I don't quite follow why the following expression is in normal form $$\lambda y.(y (\lambda z.w) (\lambda z.w))$$ I would have thought that reduces to $\lambda y.y w$, but according to http://www.itu.dk/people/sestoft/lamreduce/lamframes.html it is…
JPC
  • 101
  • 4
0
votes
1 answer

Lambda calculus -reducing expression

I have following expression to reduce: $(λmnfx.mf(nfx) λfx.fx λzy.zzy)$ After some substitutions i get the result: $(λfx. f(f(f x)))$ Is it correct answer? If not, please tell me what is correct one so i could try to get into it. Thanks in advance.
Sheil
  • 11
  • 2
0
votes
1 answer

Lambda Calculus using $\beta$-reductions

Use $\beta$ reductions to compute the final answer for the following $\lambda$ terms. Use a "fake" reduction step for "+" operator. Identify each redex for $\beta$-reduction steps. Does the order in which you apply these $\beta$-reduction steps make…
petrov
  • 335
  • 2
  • 5
  • 12