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
2 answers

Lambda expression Evaluation

( (λf.λx.f(f(x)))(λy.y ^2 ) ) (5) I tried finding out the order of evaluation for this lambda expression. How is this lambda expression evaluated?
0
votes
0 answers

A normal form for a chaotic combinator term?

Here is the term: $M M C$, where $M = S (S S) S$, which involves the combinators $C = λxλyλz((xz)y)$ and $S = λxλyλz((xz)(yz))$. What does $M M C$ reduce to, under β-equivalence? Or ... if its β-reduction sequences are all infinite (as they appear…
NinjaDarth
  • 540
  • 2
  • 4
0
votes
0 answers

Induction on the length of a lambda-term

Let M be a λ -term, with length m, that is: m = lgh(M). Well... I think "induction on lgh(M)" means the same as "finite induction on m". But I'm not sure. I ask for help.
Paulo Argolo
  • 4,210
0
votes
0 answers

Why does alpha equivalence not apply to free variables?

It's mentioned in the book "Haskell programming from first principles" in the first chapter that one free variables don't have equivalence that is: $$ \lambda x.xy \overset{\alpha-\text{eq.}}{\neq} \lambda x.xb$$ Could someone explain why this is…
0
votes
0 answers

Lambda Calculus Equivalence and Call by name

I am new to lambda Calculus and wanted to understand the 2 following questions: 1) The term λx.x a b is equivalent to which of the following? a. (λx.x) (a b) b. (((λx.x) a) b) c. λx.(x (a b)) d d. (λx.((x a) b)) I saw the answer is d…
Ran123
  • 3
0
votes
2 answers

How do you formally show that “being a subterm of” is a transitive relation (on λ-terms)?

I see in a book on Type Theory the following definition of a subterm of a $λ$-term: We call $L$ a subterm of $M$ if $L ∈ \mathrm{Sub}(M)$. $\mathrm{Sub}(x) = \{x\}$, for each $x ∈ V. (V$ is the set of variables.) $\mathrm{Sub}(MN) =…
Paulo Argolo
  • 4,210
0
votes
1 answer

Alpha conversion and free variables

I am studying lambda calculus from "Lectures on the Curry-Howard isomorphism" and I want to clear out a small detail in a proof using induction on the definition of alpha conversion. Alpha conversion is defined as: The relation $=_{\alpha}$…
0
votes
0 answers

Substitution of M in Beta Reduction (Lambda Calculus)

I am preparing for an exam where I have a Beta reduction question. The question goes as follows: $M=(\lambda xy.x(\lambda z.xyz))(\lambda x .xz )(\lambda y.ya)$ I have been working this out and following a solution from my professor. If you notice…
eoan
  • 1
0
votes
1 answer

What is infinitary lambda calculus?

I've recently discovered the existence of infinitary lambda calculus, or infinite lambda calculus, and am interested but unclear about some of its properties. So what is infinitary lambda calculus and how is it different compared to conventional…
0
votes
1 answer

The contraction of a given redex yields a unique result

I want to prove that if $$(\lambda x. P)Q=(\lambda y. M)N$$ then $$P[x:=Q]= M[y:=N]$$ which means that the contraction of a given redex yields a unique result (so we don't have beta equivalence, but alpha equivalence). I would go for a proof by…
0
votes
1 answer

Can in polymorphic lambda calculus two terms have identical normal forms if we assume that set of their possible types does not intersect?

Let us assume, that we have context $\Gamma$ and two terms $M_1$ and $M_2$ in polymorphic lambda calculus. Let us also assume, that intersection of their possible types in context $\Gamma$ is empty(we assume that both of these terms can be…
0
votes
1 answer

Showing a function that behaves like pred to be primitive recursive

Let's define $M$ such that for $x \ge 0$: $$ M(0)=0 $$ $$ M(x+1)=x $$ Now, I want to show that $M$ is primitive recursive. How should I go about doing this? Thanks a bunch!
Logan Lee
  • 249
0
votes
0 answers

Show multiply function is primitive recursive

I'm trying to answer the following question: Show that $f(x,y)=xy$ is primitive recursive. Basically, multiply function. Here's my try: To start with, we try to define it in terms of itself: $$ f(x,0)=0, \ f(x,1)=f(x,0)+x, \ f(x,2)=f(x,1)+x, \ ...…
Logan Lee
  • 249
0
votes
0 answers

Proving curried and uncurried functions

We are given $$ \underline{add} \ \underline{m} \ \underline{n} = \underline{m+n} $$ $$ \underline{mult} \ \underline{m} \ \underline{n} = \underline{m \times n} $$ and $$ \underline{sum} \ (\underline{m}, \underline{n}) =…
Logan Lee
  • 249
0
votes
1 answer

Why does ($\lambda$c.x) $\lambda$e.f simplify to x?

Why does ($\lambda$c.x) $\lambda$e.f simplify to x? The next step in this reduction I thought was to replace all c's with x. But there are no c's. What happens with the $\lambda$e.f? I have gotten it from this example on YouTube, which I could…
drumfire
  • 103