|
Lambda calculus (often referred to as -calculus) was invented in the 1930s by Alonzo Church, as a form of mathematical logic dealing primarly with functions and the application of functions to their arguments. In pure lambda calculus, there are no constants. Instead, there are only lambda abstractions (which are simply specifications of functions), variables, and applications of functions to functions. For instance, Church integers are used as a substitute for actual constants representing integers.
A lambda abstraction is typically specified using a lambda expression, which might look like the following.
The above specifies a function of one argument, that can be reduced by applying the function to its argument (function application is left-associative by default, and parentheses can be used to specify associativity).
The -calculus is equivalent to combinatory logic (though much more concise). Most functional programming languages are also equivalent to -calculus, to a degree (any imperative features in such languages are, of course, not equivalent).
We can specify the Church integer in -calculus as
Suppose we have a function
, which when given a string representing an integer, returns a new string representing the number following that integer. Then
Addition of Church integers in -calculus is
Multiplication is
The -calculus readily admits Russell's Paradox. Let us define a function that takes a function as an argument, and is reduced to the application of the logical function
to the application of to itself.
Now what happens when we apply to itself?
Since we have
, we have a paradox.
|