# The Lambda Calculus

## Some history

• 1932: Alonzo Church develops the (type-free) Lambda Calculus as part of a general theory of functions and logic, intended as a foundation for mathematics. The whole system was proved inconsistent by Kleene and Rosser (1935), but the Lambda Calculus (taken alone) was proved consistent by Chuch and Rosser (as a consequence of the Church-Rosser property of the Lambda Calculus).
• 1936: Kleene proves that all Recursive functions (defined by Gödel in 1931) can be represented in the Lambda Calculus.
• 1937: Turing proves that every function computable by a Turing machine can be represented in the Lambda Calculus, and viceversa.
• In the same years, Church formulates the statement which is known as Church's Thesis:
Every computable function can be defined in the Lambda Calculus
Namely every function which can ever be computed algoritmically can be expressed in the Lambda Calculus. This statement cannot be proved formally, of course, because the notion of "algoritmic computability" is not defined formally. But, as a matter of fact, this "conjecture" has never been "disproved": not even the most sophisticated modern machines and programming languages can define more functions than those defined by the lambda calculus (or any of the other equivalent formalisms: Recursive functions, Turing machines, etc.).
• Based on the Lambda Calculus, a class of programming languages have been developed: the so-called Functional Languages (Lisp, Scheme, ML, Haskell, ...)

## The Type-Free Lambda Calculus

### Sintax

The terms of the lambda calculus are constructed over variables and two basic operations:
• Abstraction: if M = M[x] is an expression depending on x, then \x.M[x] denotes the mapping x |-> M[x]. Namely the function that, for each term x, gives the term M[x]. The symbol "\" stands for the Greek letter lambda.

Example (assuming a language enriched with numerical constant and primitive operations): (\x. x+1) represents the function which, on input x, outputs x+1.

• Application: M N represents the function M applied to the argument N.

#### Formal syntax

Variables: V ::= x | y | z | ...
Lambda-Terms: M ::= V | (\V M) | (M M)

#### Notational convention

M1M2 ... Mk stands for ( ... (M1M2) ... Mk)
\x1x2 ... xk.M stands for (\x1(\x2 ... (\xk M) ... ))