General Formulation
In its more general formulation, the Curry–Howard correspondence is a correspondence between formal proof calculi and type systems for models of computation. In particular, it splits into two correspondences. One at the level of formulas and types that is independent of which particular proof system or model of computation is considered, and one at the level of proofs and programs which, this time, is specific to the particular choice of proof system and model of computation considered.
At the level of formulas and types, the correspondence says that implication behaves the same as a function type, conjunction as a "product" type (this may be called a tuple, a struct, a list, or some other term depending on the language), disjunction as a sum type (this type may be called a union), the false formula as the empty type and the true formula as the singleton type (whose sole member is the null object). Quantifiers correspond to dependent function space or products (as appropriate). This is summarized in the following table:
Logic side | Programming side |
---|---|
universal quantification | generalised function space (Π type) |
existential quantification | generalised cartesian product (Σ type) |
implication | function type |
conjunction | product type |
disjunction | sum type |
true formula | unit type |
false formula | bottom type |
At the level of proof systems and models of computations, the correspondence mainly shows the identity of structure, first, between some particular formulations of systems known as Hilbert-style deduction system and combinatory logic, and, secondly, between some particular formulations of systems known as natural deduction and lambda calculus.
Logic side | Programming side |
---|---|
Hilbert-style deduction system | type system for combinatory logic |
natural deduction | type system for lambda calculus |
Between the natural deduction system and the lambda calculus there there are the following correspondences:
Logic side | Programming side |
---|---|
hypotheses | free variables |
implication elimination (modus ponens) | application |
implication introduction | abstraction |
Read more about this topic: Curry–Howard Correspondence
Famous quotes containing the words general and/or formulation:
“No doubt, the short distance to which you can see in the woods, and the general twilight, would at length react on the inhabitants, and make them savages. The lakes also reveal the mountains, and give ample scope and range to our thought.”
—Henry David Thoreau (18171862)
“Art is an experience, not the formulation of a problem.”
—Lindsay Anderson (b. 1923)