Revision as of 03:53, 20 February 2014 editThepigdog (talk | contribs)Extended confirmed users5,174 edits →Domain of lambda calculus← Previous edit | Revision as of 04:25, 20 February 2014 edit undoThepigdog (talk | contribs)Extended confirmed users5,174 edits →Domain of lambda calculusNext edit → | ||
Line 210: | Line 210: | ||
So ''g'' is an element of ''F'' and not an element of ''F''. Therefore there is no set ''F'' satisfying the above definition of "all functions", or there is no function that may not be applied to itself. | So ''g'' is an element of ''F'' and not an element of ''F''. Therefore there is no set ''F'' satisfying the above definition of "all functions", or there is no function that may not be applied to itself. | ||
==Domain of lambda calculus== | == Domain of lambda calculus == | ||
The problems with the lambda abstraction arose when a domain was imposed on it. If the lambda abstraction is allowed to define the domain, instead of imposing the domain upon the lambda abstraction, these problems no longer appear. | The problems with the lambda abstraction arose when a domain was imposed on it. If the lambda abstraction is allowed to define the domain, instead of imposing the domain upon the lambda abstraction, these problems no longer appear. | ||
Line 219: | Line 219: | ||
* The eta reduction of a lambda term has the same value. | * The eta reduction of a lambda term has the same value. | ||
=== Example: No solutions -> One solution === | |||
⚫ | For example the equation <math>x = \neg x</math> may be coded with ] and using |
||
⚫ | For example the equation <math>x = \neg x</math> may be coded with ] and using ] as, | ||
:<math>\operatorname{not}_1 = \lambda p.\lambda a.\lambda b.p\ b\ a</math> | :<math>\operatorname{not}_1 = \lambda p.\lambda a.\lambda b.p\ b\ a</math> | ||
:<math>(\lambda f.(\lambda x.f\ (x\ x))\ (\lambda x.f\ (x\ x))) (\lambda p.\lambda a.\lambda b.p\ b\ a) </math> | :<math>(\lambda f.(\lambda x.f\ (x\ x))\ (\lambda x.f\ (x\ x))) (\lambda p.\lambda a.\lambda b.p\ b\ a) </math> |
Revision as of 04:25, 20 February 2014
Deductive lambda calculus considers what happens when lambda terms are regarded as mathematical expressions. Lambda calculus is defined as a programming language where evaluation proceeds by performing reductions on an expression until it is in normal form. Considered as mathematics, each reduction would not alter the value of the expression. The expression would equal the reduction of the expression.
History
Alonzo Church invented the Lambda Calculus in the 1930s, originally to provide a new and simpler basis for mathematics. However soon after inventing it major logic problems were identified with the definition of the Lambda Abstraction.
The Kleene–Rosser paradox is an implementation of Richard's paradox in Combinatory logic. Combinatory Logic is closely related to Lambda Calculus. Haskell Curry found that the key step in this paradox could be used to implement the simpler Curry's Paradox. The existence of this paradox meant that the Combinatory Logic, and Lambda Calculus, could not be both consistent and complete as a deductive system.
Later the Lambda Calculus was resurrected as a definition of a programming language.
Interpretation of Lambda calculus as mathematics
In the mathematical interpretation, lambda expressions represent values. Eta and beta reductions are deductive steps that do not alter the values of expressions.
Eta reduction as mathematics
An eta-redex is defined by,
In the mathematical interpretation,
Taking f to be a variable then,
or by letting
This definition defines to be the solution for f in the equation,
Beta reduction as mathematics
A beta redex is,
and as,
then,
This rule is implied by the instantiation of quantified variables. If,
then is the expression y with the quantified variable x instantiated as z.
so,
As beta reduction is implied from eta reduction, there is no contradiction between the two definitions.
Logical inconsistency
From eta reduction,
This rule may be interpreted as defining to be the solution of the equation . In defining the solution to the equation in terms of x and y the definition implicitly assumes that there is one and only function f that satisfies the equation. However, for some equations there may be none or multiple solutions. The definition may be compared with defining by,
This is not a valid definition as the equation has two solutions. The proper definition is,
An expression in mathematics may represent multiple values if it has free variables. The variables may be existentially quantified. Existential quantification turns an equation into a disjunction of equations, with each variable populated with single value in each equation.
The solution set for in is,
For the definition to be valid there must be only one solution in this solution set.
The mathematical (or extensional) definition of function equality is that two functions are equal if they perform the same mapping;
Using this definition the cardinality condition giving a valid definition of a lambda abstraction is,
The left hand side may often be shown to be false where
No solutions
Starting with the equation,
defining gives,
or
The cardinality is,
so it is not valid to get,
If we go ahead anyway and translate the let expression into lambda calculus,
Then,
There is no solution to the equation, and the value does not exist.
Multiple solutions
Also it is possible to construct lambda expressions for which there are multiple values. For example,
gives,
Defining
or,
The cardinality is given by,
If we go ahead anyway and translate the let expression into lambda calculus,
Then,
so,
Intensional versus extensional equality
Another difficulty for the interpretation of lambda calculus as a deductive system is the representation of values as functions. The untyped lambda calculus is implemented by performing reductions on a lambda term, until the term is in normal form. The intensional interpretation of equality is that the reduction of a lambda term to normal form is the value of the lambda term.
This interpretation considers the identify of a lambda expression to be its structure. Two lambda terms are equal if they are alpha convertible.
The mathematical (or extensional) definition of function equality is that two functions are equal if they perform the same mapping;
The extensional definition of equality is incompatible with the intensional definition. This can be seen in the example below, where applying a mathematical law changes a function to an equivalent function, yet the intensional interpretation of equality says that the two functions are not equal. This shows the untyped lambda calculus with intensional equality is inconsistent with mathematics as a deductive system.
This incompatibly is created by considering lambda terms as values. In typed lambda calculus this is not a significant problem, because built-in types may be added to carry values that are in a canonical form and have both extensional and intensional equality.
Example
In arithmetic, the distributive law implies that . Using the Church encoding of numerals the left and right hand sides may be represented as lambda terms.
Left hand side;
Right hand side;
Comparison;
The two expressions beta reduce to similar expressions. Still they are not alpha convertible, so according to intensional equality, the distributive law does not hold.
Set theoretic domain
The set of all functions from a domain D to a range R is defined by,
Then the definition of the set of all functions of functions is,
This definition is an unsolved equation for F. So is there a solution for F?
Consider a version of Russell's paradox. Suppose there is a function g that is defined on all functions other than itself.
Then consider g is in F.
instantiate x as g.
which is false because.
Now consider g not in F,
So g is an element of F and not an element of F. Therefore there is no set F satisfying the above definition of "all functions", or there is no function that may not be applied to itself.
Domain of lambda calculus
The problems with the lambda abstraction arose when a domain was imposed on it. If the lambda abstraction is allowed to define the domain, instead of imposing the domain upon the lambda abstraction, these problems no longer appear.
Lambda calculus is defined by beta reductions and eta reductions. Interpreting reduction as defining equality gives an implicit domain for the lambda calculus. The rules are,
- Every lambda abstraction has one value.
- The beta reduction of a lambda term has the same value.
- The eta reduction of a lambda term has the same value.
Example: No solutions -> One solution
For example the equation may be coded with Church encoding and using Curry's Y combinator as,
And the recursion is,
- ...
- ... (beta and then eta reduction)
Which is the first line and will recurse indefinitely. The expression never reduces to normal form. However every lambda term in the reduction represents the same value. This value is distinct from the encodings for true or false. It is not part of the Boolean domain but it exists in the lambda calculus domain.
References
- A. Church, "A set of postulates for the foundation of logic", Annals of Mathematics, Series 2, 33:346–366 (1932).
- For a full history, see Cardone and Hindley's "History of Lambda-calculus and Combinatory Logic" (2006).
- Kleene, S. C.; Rosser, J. B. (1935). "The inconsistency of certain formal logics". Annals of Mathematics. 36 (3): 630–636. doi:10.2307/1968646.
{{cite journal}}
: Unknown parameter|lastauthoramp=
ignored (|name-list-style=
suggested) (help) - The Inconsistency of Certain Formal Logic Haskell B. Curry The Journal of Symbolic Logic Vol. 7, No. 3 (Sep., 1942), pp. 115-117 Published by: Association for Symbolic Logic Article Stable URL: http://www.jstor.org/stable/2269292
- Selinger, Peter. "Lecture Notes on Lambda Calculus (PDF)" (PDF). p. 6.
- "Lambda calculus - intensionality". Stanford. p. 1.2 Intensionality.
This mathematics-related article is a stub. You can help Misplaced Pages by expanding it. |