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

In lambda calculus substitution why is y[x := N] ≡ y, if x ≠ y meaningful when y is a variable

From the wiki about lambda calculus, substitution section "Substitution, written E[V := R], is the process of replacing all free occurrences of the variable V in the expression E with expression R. Substitution on terms of the λ-calculus is defined…
Abe
  • 113
1
vote
0 answers

Lambda Calculus substitution

I am trying to wrap my head around substitution in lambda calculus and not sure if I am heading in the right direction. For example, $[(\lambda y.xy)/x](x(\lambda x.yx))$ Here, we must substitute all free variables of $x$ in the right lambda…
1
vote
1 answer

Lambda calculus; lazy evaluation and normal evaluation

I'm relatively new to functional programming and while learning about it, I bumped into lambda calculus. The thing is that I found some questions but I don't really have the notions to answer them, and I was unable to find them so I am asking for…
1
vote
1 answer

is M in beta-normal form?

Let $M \equiv \lambda z.zy$ is $M$ in $\beta$-normal form? I know that the $\beta\text{-}nf$ class is defined as following: (1) all atoms are in $\beta\text{-}nf$ (2) $M_1 ,...,M_n ∈ β\text{-}nf ⇒ aM_1 ...M_n ∈ β\text{-}nf\quad$ for all atoms…
Daniel
  • 732
1
vote
1 answer

is a lambda-term alpha-equivalent to its beta-reduction?

Let $M$ be a $\lambda$-term and $M'$ its $\beta$-reduction (any of them, including the $\beta$-normal form). I'd like to know if $$ M \equiv_{\alpha} M'$$ What I thought is: After some $\beta$-reductions, some of the bound-variables of $M$ may…
Daniel
  • 732
1
vote
0 answers

lambda-calculus proof of the identity substitution

given a $\lambda \text{-}$term $M$, how does one prove that the identity substitution on $M$ results in $M$ ? That is:$$[x/x] M \equiv M$$ Should I go for the cases, trying to prove for $M$ atomic, for $M = \lambda x.N$ and for $M = AB\;$? If not,…
Daniel
  • 732
1
vote
0 answers

how to represent free variables within lambda-calculus expression

Given I have the expression $\lambda x (y(\lambda y(xy)))$, I know that $x$ is a bound variable because of the initial $\lambda x$, but I'm not sure how I could express the $y$ since it is free before the scope of $\lambda y$ and bound within this…
Daniel
  • 732
1
vote
2 answers

By this definition, can a lambda term be of 'infinite length'?

In untyped lambda calculus, if we define (as is common) the set $\Lambda$ of all $\lambda$-terms with: \begin{align} &(1) & \text{if } u \in V, \text{then } u \in \Lambda \\ &(2) & \text{if } M \text{ and } N \in V, \text{then } (MN) \in \Lambda…
jadn
  • 459
1
vote
1 answer

Can we abstract over kinds in $\lambda\underline{\omega}$?

I am reading "Lambda Calculi with Types" by Henk Barendregt. According to the definitions, $\lambda\underline{\omega}$ (types depending on types) allows us to assign types to type constructors such as $(\lambda \alpha : *. \alpha \to \alpha) : * \to…
user80458
1
vote
0 answers

Is lambda-calculus built over ZFC theory?

I would like to know if lambda-calculus have been built using ZFC theory ? Or if it is not, on what kind of theory lambda-calculus is based on ?
toto
  • 165
1
vote
1 answer

Is the application of a free variable valid in lambda calculus

Can you apply a free variable to something in lambda calculus? It is my understanding that an unbound variable equals itself, for example, $(\lambda x . y) a = y$. So, if a free variable just equals itself, then would the fully reduced form of…
Vityou
  • 183
1
vote
1 answer

Trouble Replicating Proof of a Lambda Calculus Fixed Point Theorem Corollary

From pg. 35 of Lambda Calculus and Combinators An Introduction: Corollary 3.3.1 in $\lambda$ and $CL$: for every $Z$ and $n \ge 0$, the equation $$ xy_1 \ldots y_n = Z $$ can be solved for $x$. That is, there is a term $X$ such that $$ Xy_1 \ldots…
user1770201
  • 5,195
  • 6
  • 39
  • 71
1
vote
0 answers

Proving the Existence of the "Bureaucrat Term" in the Lambda Calculus

From pg. 35 of Lambda Calculus and Combinators An Introduction: Corollary 3.3.1 in $\lambda$ and $CL$: for every $Z$ and $n \ge 0$, the equation $$ xy_1 \ldots y_n = Z $$ can be solved for $x$. That is, there is a term $X$ such that $$ Xy_1 \ldots…
user1770201
  • 5,195
  • 6
  • 39
  • 71
1
vote
0 answers

Lambda Calculus, defining the AND boolean operator.

I am learning lambda calculus and I was given the following assignment: Working with these definitions of TRUE and FALSE: λx y . x ≡ T λx y . y ≡ F I am asked to form the AND operator, that even though functions similarly, is not equivalent to the…
Rad
  • 33
  • 1
  • 3
1
vote
2 answers

Understanding `tru` in Lambda Calculus from TAPL

In Dr. Benjamin Pierce's Types and Programming Languages, page 58 notes: Another language feature than can be easily encoded in the lambda-calculus is boolean values and conditions. Define the terms tru and fals as follows: tru = $\lambda$t.…