Sources:


For Equivalences in Lambda Calculus and Reductions, see the connected pages.

Application

An application in lambda calculus is an operation , also written as where the algorithm is applied to the input .

Abstraction

An abstraction is another basic operation. denotes a function that takes in input and execute the expression , which depends on the input .

Free and Bound variables

In an abstraction, there are bound and free variables.

  • free: are the variables that do not appear in the input. We denote that a variable is a free variable of the -term with .
  • bound: are the variables that are taken in input. We formally denote it with . The bound variables are dummy variables, since their name doesn’t modify the final result. here is a bound variable, and is a free variable.

Combinators

is a combinator (or closed -term) if . The set of all -terms is denoted with (capital Lambda), and the one of closed -terms .

Functions with more arguments

In order to express a function with more than one argument, we can use iteration of application (this is often called currying).

We can define: where and so we can see that . We can also see that we need association to the left on iterated applications for this to work, so that would be the standard from now on. denotes .

On the other hand, iterated abstractions uses association to the right:

Substitution

We denote the substitution operation as which means that we substitute the free occurrences of in with .

Standard Combinators

There are several standard combinators in lambda calculus that have specific names and properties. The most common ones are:

  1. Identity Combinator () : it takes an argument and returns the same argument unchanged. It represents the identity function.
  2. Constant Combinator () : it takes two arguments and returns the first argument while ignoring the second one. It represents a constant function.
  3. Constant Combinator * () : is the opposite of the combinator, and returns the second argument instead of the first one.
  4. Duplication Combinator (D) : it takes an argument and applies it to itself. It is also known as the “self-application” combinator.
  5. Composition Combinator (B) : it takes two functions, and , and an argument , then applies to and to the result of .
  6. Flip Combinator (C) : it takes a binary function and two arguments and , then applies to and instead of the usual order.
  7. S Combinator (S) : it’s used to apply two functions and to the same argument and then combine their results.
  8. Y Combinator (Y) : it’s used to implement recursion in lambda calculus. It allows defining recursive functions without named recursion.

Church Numerals


tags: lambda-calculus