HOME

TheInfoList



OR:

In
programming language theory Programming language theory (PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of formal languages known as programming languages. Programming language theory is clo ...
and proof theory, the Curry–Howard correspondence (also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-programs and propositions- or formulae-as-types interpretation) is the direct relationship between
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer progra ...
s and
mathematical proof A mathematical proof is an Inference, inferential Argument-deduction-proof distinctions, argument for a Proposition, mathematical statement, showing that the stated assumptions logically guarantee the conclusion. The argument may use other previo ...
s. It is a generalization of a syntactic analogy between systems of formal logic and computational calculi that was first discovered by the American
mathematician A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems. Mathematicians are concerned with numbers, data, quantity, mathematical structure, structure, space, Mathematica ...
Haskell Curry and the
logician Logic is the study of correct reasoning. It includes both Mathematical logic, formal and informal logic. Formal logic is the science of Validity (logic), deductively valid inferences or of logical truths. It is a formal science investigating h ...
William Alvin Howard. It is the link between logic and computation that is usually attributed to Curry and Howard, although the idea is related to the operational interpretation of
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, system ...
given in various formulations by L. E. J. Brouwer, Arend Heyting and
Andrey Kolmogorov Andrey Nikolaevich Kolmogorov ( rus, Андре́й Никола́евич Колмого́ров, p=ɐnˈdrʲej nʲɪkɐˈlajɪvʲɪtɕ kəlmɐˈɡorəf, a=Ru-Andrey Nikolaevich Kolmogorov.ogg, 25 April 1903 – 20 October 1987) was a Sovi ...
(see Brouwer–Heyting–Kolmogorov interpretation) and Stephen Kleene (see
Realizability In mathematical logic, realizability is a collection of methods in proof theory used to study constructive proofs and extract additional information from them. Formulas from a formal theory are "realized" by objects, known as "realizers", in a way ...
). The relationship has been extended to include category theory as the three-way Curry–Howard–Lambek correspondence.


Origin, scope, and consequences

The beginnings of the Curry–Howard correspondence lie in several observations: # In 1934
Curry A curry is a dish with a sauce seasoned with spices, mainly associated with South Asian cuisine. In southern India, leaves from the curry tree may be included. There are many varieties of curry. The choice of spices for each dish in trad ...
observes that the
type Type may refer to: Science and technology Computing * Typing, producing text via a keyboard, typewriter, etc. * Data type, collection of values used for computations. * File type * TYPE (DOS command), a command to display contents of a file. * Ty ...
s of the combinators could be seen as
axiom-scheme In mathematical logic, an axiom schema (plural: axiom schemata or axiom schemas) generalizes the notion of axiom. Formal definition An axiom schema is a formula in the metalanguage of an axiomatic system, in which one or more schematic variables ap ...
s for intuitionistic implicational logic. # In 1958 he observes that a certain kind of proof system, referred to as Hilbert-style deduction systems, coincides on some fragment to the typed fragment of a standard
model of computation In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes h ...
known as combinatory logic. # In 1969
Howard Howard is an English-language given name originating from Old French Huard (or Houard) from a Germanic source similar to Old High German ''*Hugihard'' "heart-brave", or ''*Hoh-ward'', literally "high defender; chief guardian". It is also prob ...
observes that another, more "high-level" proof system, referred to as
natural deduction In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use a ...
, can be directly interpreted in its intuitionistic version as a typed variant of the
model of computation In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes h ...
known as
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
. In other words, the Curry–Howard correspondence is the observation that two families of seemingly unrelated formalisms—namely, the proof systems on one hand, and the models of computation on the other—are in fact the same kind of mathematical objects. If one abstracts on the peculiarities of either formalism, the following generalization arises: ''a proof is a program, and the formula it proves is the type for the program''. More informally, this can be seen as an analogy that states that the return type of a function (i.e., the type of values returned by a function) is analogous to a logical theorem, subject to hypotheses corresponding to the types of the argument values passed to the function; and that the program to compute that function is analogous to a proof of that theorem. This sets a form of
logic programming Logic programming is a programming paradigm which is largely based on formal logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of log ...
on a rigorous foundation: ''proofs can be represented as programs, and especially as lambda terms'', or ''proofs can be run''. The correspondence has been the starting point of a large spectrum of new research after its discovery, leading in particular to a new class of
formal system A formal system is an abstract structure used for inferring theorems from axioms according to a set of rules. These rules, which are used for carrying out the inference of theorems from axioms, are the logical calculus of the formal system. A for ...
s designed to act both as a proof system and as a typed
functional programming language In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that ...
. This includes Martin-Löf's intuitionistic type theory and Coquand's Calculus of Constructions, two calculi in which proofs are regular objects of the discourse and in which one can state properties of proofs the same way as of any program. This field of research is usually referred to as modern
type theory In mathematics, logic, and computer science, a type theory is the formal system, formal presentation of a specific type system, and in general type theory is the academic study of type systems. Some type theories serve as alternatives to set theor ...
. Such
typed lambda calculi A typed lambda calculus is a typed formalism that uses the lambda-symbol (\lambda) to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a ...
derived from the Curry–Howard paradigm led to software like Coq in which proofs seen as programs can be formalized, checked, and run. A converse direction is to ''use a program to extract a proof'', given its correctness—an area of research closely related to
proof-carrying code Proof-carrying code (PCC) is a software mechanism that allows a host system to verify properties about an application via a formal proof that accompanies the application's executable code. The host system can quickly verify the validity of the pro ...
. This is only feasible if the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
the program is written for is very richly typed: the development of such type systems has been partly motivated by the wish to make the Curry–Howard correspondence practically relevant. The Curry–Howard correspondence also raised new questions regarding the computational content of proof concepts that were not covered by the original works of Curry and Howard. In particular, classical logic has been shown to correspond to the ability to manipulate the
continuation In computer science, a continuation is an abstract representation of the control state of a computer program. A continuation implements ( reifies) the program control state, i.e. the continuation is a data structure that represents the computat ...
of programs and the symmetry of
sequent calculus In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology (called a sequent by Gerhard Gentzen) instead of an unconditional tautology. Each conditional tautology ...
to express the duality between the two evaluation strategies known as call-by-name and call-by-value. Speculatively, the Curry–Howard correspondence might be expected to lead to a substantial unification between mathematical logic and foundational computer science: Hilbert-style logic and natural deduction are but two kinds of proof systems among a large family of formalisms. Alternative syntaxes include
sequent calculus In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology (called a sequent by Gerhard Gentzen) instead of an unconditional tautology. Each conditional tautology ...
,
proof net In proof theory, proof nets are a geometrical method of representing proofs that eliminates two forms of ''bureaucracy'' that differentiate proofs: (A) irrelevant syntactical features of regular proof calculi, and (B) the order of rules applied in ...
s,
calculus of structures The calculus of structures is a proof calculus with deep inference for studying the structural proof theory of noncommutative logic. The calculus has since been applied to study linear logic, classical logic, modal logic, and process calculi, and m ...
, etc. If one admits the Curry–Howard correspondence as the general principle that any proof system hides a model of computation, a theory of the underlying untyped computational structure of these kinds of proof system should be possible. Then, a natural question is whether something mathematically interesting can be said about these underlying computational calculi. Conversely, combinatory logic and
simply typed lambda calculus The simply typed lambda calculus (\lambda^\to), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (\to) that builds function types. It is the canonical and simplest example of a typed lambda ...
are not the only
models of computation In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes ho ...
, either. Girard's linear logic was developed from the fine analysis of the use of resources in some models of lambda calculus; is there typed version of Turing's machine that would behave as a proof system?
Typed assembly language In computer science, a typed assembly language (TAL) is an assembly language that is extended to include a method of annotating the datatype of each value that is manipulated by the code. These annotations can then be used by a program (type check ...
s are such an instance of "low-level" models of computation that carry types. Because of the possibility of writing non-terminating programs,
Turing-complete In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Tu ...
models of computation (such as languages with arbitrary recursive functions) must be interpreted with care, as naive application of the correspondence leads to an inconsistent logic. The best way of dealing with arbitrary computation from a logical point of view is still an actively debated research question, but one popular approach is based on using monads to segregate provably terminating from potentially non-terminating code (an approach that also generalizes to much richer models of computation, and is itself related to modal logic by a natural extension of the Curry–Howard isomorphism). A more radical approach, advocated by total functional programming, is to eliminate unrestricted recursion (and forgo
Turing completeness In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Tu ...
, although still retaining high computational complexity), using more controlled
corecursion In computer science, corecursion is a type of operation that is dual to recursion. Whereas recursion works analytically, starting on data further from a base case and breaking it down into smaller data and repeating until one reaches a base case, ...
wherever non-terminating behavior is actually desired.


General formulation

In its more general formulation, the Curry–Howard correspondence is a correspondence between formal proof calculi and
type systems In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
for
models of computation In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes ho ...
. 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 Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of managing several related projects * Time management * Program, a part of planning Arts and entertainment Audio * Programm ...
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 A dependant is a person who relies on another as a primary source of income. A common-law spouse who is financially supported by their partner may also be included in this definition. In some jurisdictions, supporting a dependant may enab ...
function space or products (as appropriate). This is summarized in the following table: 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 In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use a ...
and
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
. Between the natural deduction system and the lambda calculus there are the following correspondences:


Corresponding systems


Hilbert-style deduction systems and combinatory logic

It was at the beginning a simple remark in Curry and Feys's 1958 book on combinatory logic: the simplest types for the basic combinators K and S of combinatory logic surprisingly corresponded to the respective axiom schemes ''α'' → (''β'' → ''α'') and (''α'' → (''β'' → ''γ'')) → ((''α'' → ''β'') → (''α'' → ''γ'')) used in Hilbert-style deduction systems. For this reason, these schemes are now often called axioms K and S. Examples of programs seen as proofs in a Hilbert-style logic are given
below Below may refer to: *Earth * Ground (disambiguation) * Soil * Floor * Bottom (disambiguation) * Less than *Temperatures below freezing * Hell or underworld People with the surname * Ernst von Below (1863–1955), German World War I general * Fr ...
. If one restricts to the implicational intuitionistic fragment, a simple way to formalize logic in Hilbert's style is as follows. Let Γ be a finite collection of formulas, considered as hypotheses. Then δ is ''derivable'' from Γ, denoted Γ ⊢ δ, in the following cases: * δ is an hypothesis, i.e. it is a formula of Γ, * δ is an instance of an axiom scheme; i.e., under the most common axiom system: ** δ has the form ''α'' → (''β'' → ''α''), or ** δ has the form (''α'' → (''β'' → ''γ'')) → ((''α'' → ''β'') → (''α'' → ''γ'')), * δ follows by deduction, i.e., for some ''α'', both ''α'' → ''δ'' and ''α'' are already derivable from Γ (this is the rule of modus ponens) This can be formalized using
inference rules In the philosophy of logic, a rule of inference, inference rule or transformation rule is a logical form consisting of a function which takes premises, analyzes their syntax, and returns a conclusion (or conclusions). For example, the rule of ...
, as in the left column of the following table. Typed combinatory logic can be formulated using a similar syntax: let Γ be a finite collection of variables, annotated with their types. A term T (also annotated with its type) will depend on these variables � ⊢ T:''δ''when: * T is one of the variables in Γ, * T is a basic combinator; i.e., under the most common combinator basis: ** T is K:''α'' → (''β'' → ''α'') here ''α'' and ''β'' denote the types of its arguments or ** T is S:(''α'' → (''β'' → ''γ'')) → ((''α'' → ''β'') → (''α'' → ''γ'')), * T is the composition of two subterms which depend on the variables in Γ. The generation rules defined here are given in the right-column below. Curry's remark simply states that both columns are in one-to-one correspondence. The restriction of the correspondence to
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, system ...
means that some classical tautologies, such as
Peirce's law In logic, Peirce's law is named after the philosopher and logician Charles Sanders Peirce. It was taken as an axiom in his first axiomatisation of propositional logic. It can be thought of as the law of excluded middle written in a form tha ...
((''α'' → ''β'') → ''α'') → ''α'', are excluded from the correspondence. Seen at a more abstract level, the correspondence can be restated as shown in the following table. Especially, the deduction theorem specific to Hilbert-style logic matches the process of abstraction elimination of combinatory logic. Thanks to the correspondence, results from combinatory logic can be transferred to Hilbert-style logic and vice versa. For instance, the notion of reduction of terms in combinatory logic can be transferred to Hilbert-style logic and it provides a way to canonically transform proofs into other proofs of the same statement. One can also transfer the notion of normal terms to a notion of normal proofs, expressing that the hypotheses of the axioms never need to be all detached (since otherwise a simplification can happen). Conversely, the non provability in intuitionistic logic of
Peirce's law In logic, Peirce's law is named after the philosopher and logician Charles Sanders Peirce. It was taken as an axiom in his first axiomatisation of propositional logic. It can be thought of as the law of excluded middle written in a form tha ...
can be transferred back to combinatory logic: there is no typed term of combinatory logic that is typable with type :((''α'' → ''β'') → ''α'') → ''α''. Results on the completeness of some sets of combinators or axioms can also be transferred. For instance, the fact that the combinator X constitutes a one-point basis of (extensional) combinatory logic implies that the single axiom scheme :(((''α'' → (''β'' → ''γ'')) → ((''α'' → ''β'') → (''α'' → ''γ''))) → ((''δ'' → (''ε'' → ''δ'')) → ''ζ'')) → ''ζ'', which is the
principal type In type theory, a type system is said to have the principal type property if, given a term and an environment, there exists a principal type for this term in this environment, i.e. a type such that all other types for this term in this environment a ...
of X, is an adequate replacement to the combination of the axiom schemes :''α'' → (''β'' → ''α'') and :(''α'' → (''β'' → ''γ'')) → ((''α'' → ''β'') → (''α'' → ''γ'')).


Natural deduction and lambda calculus

After
Curry A curry is a dish with a sauce seasoned with spices, mainly associated with South Asian cuisine. In southern India, leaves from the curry tree may be included. There are many varieties of curry. The choice of spices for each dish in trad ...
emphasized the syntactic correspondence between Hilbert-style deduction and combinatory logic,
Howard Howard is an English-language given name originating from Old French Huard (or Houard) from a Germanic source similar to Old High German ''*Hugihard'' "heart-brave", or ''*Hoh-ward'', literally "high defender; chief guardian". It is also prob ...
made explicit in 1969 a syntactic analogy between the programs of
simply typed lambda calculus The simply typed lambda calculus (\lambda^\to), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (\to) that builds function types. It is the canonical and simplest example of a typed lambda ...
and the proofs of
natural deduction In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use a ...
. Below, the left-hand side formalizes intuitionistic implicational natural deduction as a calculus of
sequent In mathematical logic, a sequent is a very general kind of conditional assertion. : A_1,\,\dots,A_m \,\vdash\, B_1,\,\dots,B_n. A sequent may have any number ''m'' of condition formulas ''Ai'' (called " antecedents") and any number ''n'' of ass ...
s (the use of sequents is standard in discussions of the Curry–Howard isomorphism as it allows the deduction rules to be stated more cleanly) with implicit weakening and the right-hand side shows the typing rules of
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
. In the left-hand side, Γ, Γ1 and Γ2 denote ordered sequences of formulas while in the right-hand side, they denote sequences of named (i.e., typed) formulas with all names different. To paraphrase the correspondence, proving Γ ⊢ ''α'' means having a program that, given values with the types listed in Γ, manufactures an object of type ''α''. An axiom corresponds to the introduction of a new variable with a new, unconstrained type, the rule corresponds to function abstraction and the rule corresponds to function application. Observe that the correspondence is not exact if the context Γ is taken to be a set of formulas as, e.g., the λ-terms λ''x''.λ''y''.''x'' and λ''x''.λ''y''.''y'' of type would not be distinguished in the correspondence. Examples are given
below Below may refer to: *Earth * Ground (disambiguation) * Soil * Floor * Bottom (disambiguation) * Less than *Temperatures below freezing * Hell or underworld People with the surname * Ernst von Below (1863–1955), German World War I general * Fr ...
. Howard showed that the correspondence extends to other connectives of the logic and other constructions of simply typed lambda calculus. Seen at an abstract level, the correspondence can then be summarized as shown in the following table. Especially, it also shows that the notion of normal forms in
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
matches Prawitz's notion of normal deduction in
natural deduction In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use a ...
, from which it follows that the algorithms for the
type inhabitation problem In type theory, a branch of mathematical logic, in a given typed calculus, the type inhabitation problem for this calculus is the following problem: given a type \tau and a typing environment \Gamma, does there exist a \lambda-term M such that \Gamm ...
can be turned into algorithms for deciding intuitionistic provability. Howard's correspondence naturally extends to other extensions of
natural deduction In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use a ...
and
simply typed lambda calculus The simply typed lambda calculus (\lambda^\to), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (\to) that builds function types. It is the canonical and simplest example of a typed lambda ...
. Here is a non-exhaustive list: * Girard-Reynolds System F as a common language for both second-order propositional logic and polymorphic lambda calculus, *
higher-order logic mathematics and logic, a higher-order logic is a form of predicate logic that is distinguished from first-order logic by additional quantifiers and, sometimes, stronger semantics. Higher-order logics with their standard semantics are more expres ...
and Girard's System Fω * inductive types as
algebraic data type In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type formed by combining other types. Two common classes of algebraic types are product types (i.e., ...
* necessity \Box in modal logic and staged computation * possibility \Diamond in modal logic and monadic types for effects * The calculus corresponds to relevant logic. * The local truth (∇) modality in
Grothendieck topology In category theory, a branch of mathematics, a Grothendieck topology is a structure on a category ''C'' that makes the objects of ''C'' act like the open sets of a topological space. A category together with a choice of Grothendieck topology is c ...
or the equivalent "lax" modality (◯) of Benton, Bierman, and de Paiva (1998) correspond to CL-logic describing "computation types".


Classical logic and control operators

At the time of Curry, and also at the time of Howard, the proofs-as-programs correspondence concerned only
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, system ...
, i.e. a logic in which, in particular,
Peirce's law In logic, Peirce's law is named after the philosopher and logician Charles Sanders Peirce. It was taken as an axiom in his first axiomatisation of propositional logic. It can be thought of as the law of excluded middle written in a form tha ...
was ''not'' deducible. The extension of the correspondence to Peirce's law and hence to classical logic became clear from the work of Griffin on typing operators that capture the evaluation context of a given program execution so that this evaluation context can be later on reinstalled. The basic Curry–Howard-style correspondence for classical logic is given below. Note the correspondence between the
double-negation translation In proof theory, a discipline within mathematical logic, double-negation translation, sometimes called negative translation, is a general approach for embedding classical logic into intuitionistic logic, typically by translating formulas to formul ...
used to map classical proofs to intuitionistic logic and the continuation-passing-style translation used to map lambda terms involving control to pure lambda terms. More particularly, call-by-name continuation-passing-style translations relates to
Kolmogorov Andrey Nikolaevich Kolmogorov ( rus, Андре́й Никола́евич Колмого́ров, p=ɐnˈdrʲej nʲɪkɐˈlajɪvʲɪtɕ kəlmɐˈɡorəf, a=Ru-Andrey Nikolaevich Kolmogorov.ogg, 25 April 1903 – 20 October 1987) was a Sovi ...
's double negation translation and call-by-value continuation-passing-style translations relates to a kind of double-negation translation due to Kuroda. A finer Curry–Howard correspondence exists for classical logic if one defines classical logic not by adding an axiom such as
Peirce's law In logic, Peirce's law is named after the philosopher and logician Charles Sanders Peirce. It was taken as an axiom in his first axiomatisation of propositional logic. It can be thought of as the law of excluded middle written in a form tha ...
, but by allowing several conclusions in sequents. In the case of classical natural deduction, there exists a proofs-as-programs correspondence with the typed programs of Parigot's λμ-calculus.


Sequent calculus

A proofs-as-programs correspondence can be settled for the formalism known as Gentzen's
sequent calculus In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology (called a sequent by Gerhard Gentzen) instead of an unconditional tautology. Each conditional tautology ...
but it is not a correspondence with a well-defined pre-existing model of computation as it was for Hilbert-style and natural deductions. Sequent calculus is characterized by the presence of left introduction rules, right introduction rule and a cut rule that can be eliminated. The structure of sequent calculus relates to a calculus whose structure is close to the one of some
abstract machine An abstract machine is a computer science theoretical model that allows for a detailed and precise analysis of how a computer system functions. It is analogous to a mathematical function in that it receives inputs and produces outputs based on p ...
s. The informal correspondence is as follows:


Related proofs-as-programs correspondences


The role of de Bruijn

N. G. de Bruijn Nicolaas Govert (Dick) de Bruijn (; 9 July 1918 – 17 February 2012) was a Dutch mathematician, noted for his many contributions in the fields of analysis, number theory, combinatorics and logic.
used the lambda notation for representing proofs of the theorem checker Automath, and represented propositions as "categories" of their proofs. It was in the late 1960s at the same period of time Howard wrote his manuscript; de Bruijn was likely unaware of Howard's work, and stated the correspondence independently (Sørensen & Urzyczyn 9982006, pp 98–99). Some researchers tend to use the term Curry–Howard–de Bruijn correspondence in place of Curry–Howard correspondence.


BHK interpretation

The BHK interpretation interprets intuitionistic proofs as functions but it does not specify the class of functions relevant for the interpretation. If one takes lambda calculus for this class of function, then the BHK interpretation tells the same as Howard's correspondence between natural deduction and lambda calculus.


Realizability

Kleene Stephen Cole Kleene ( ; January 5, 1909 – January 25, 1994) was an American mathematician. One of the students of Alonzo Church, Kleene, along with Rózsa Péter, Alan Turing, Emil Post, and others, is best known as a founder of the branch o ...
's recursive
realizability In mathematical logic, realizability is a collection of methods in proof theory used to study constructive proofs and extract additional information from them. Formulas from a formal theory are "realized" by objects, known as "realizers", in a way ...
splits proofs of intuitionistic arithmetic into the pair of a recursive function and of a proof of a formula expressing that the recursive function "realizes", i.e. correctly instantiates the disjunctions and existential quantifiers of the initial formula so that the formula gets true. Kreisel's modified realizability applies to intuitionistic higher-order predicate logic and shows that the simply typed lambda term inductively extracted from the proof realizes the initial formula. In the case of propositional logic, it coincides with Howard's statement: the extracted lambda term is the proof itself (seen as an untyped lambda term) and the realizability statement is a paraphrase of the fact that the extracted lambda term has the type that the formula means (seen as a type). Gödel's dialectica interpretation realizes (an extension of) intuitionistic arithmetic with computable functions. The connection with lambda calculus is unclear, even in the case of natural deduction.


Curry–Howard–Lambek correspondence

Joachim Lambek showed in the early 1970s that the proofs of intuitionistic propositional logic and the combinators of typed combinatory logic share a common equational theory which is the one of
cartesian closed categories In category theory, a category is Cartesian closed if, roughly speaking, any morphism defined on a product of two objects can be naturally identified with a morphism defined on one of the factors. These categories are particularly important in ma ...
. The expression Curry–Howard–Lambek correspondence is now used by some people to refer to the three way isomorphism between intuitionistic logic, typed lambda calculus and cartesian closed categories, with objects being interpreted as types or propositions and morphisms as terms or proofs. The correspondence works at the equational level and is not the expression of a syntactic identity of structures as it is the case for each of Curry's and Howard's correspondences: i.e. the structure of a well-defined morphism in a cartesian-closed category is not comparable to the structure of a proof of the corresponding judgment in either Hilbert-style logic or natural deduction. To clarify this distinction, the underlying syntactic structure of cartesian closed categories is rephrased below. Objects (types) are defined by * \top is an object * if and are objects then \alpha \times \beta and \alpha \rightarrow \beta are objects. Morphisms (terms) are defined by * id, \star, \operatorname, \pi_1 and \pi_2 are morphisms * if is a morphism, λ is a morphism * if and are morphisms, (t, u) and u \circ t are morphisms. Well-defined morphisms (typed terms) are defined by the following typing rules (in which the usual categorical morphism notation f : \alpha \to \beta is replaced with
sequent calculus In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology (called a sequent by Gerhard Gentzen) instead of an unconditional tautology. Each conditional tautology ...
notation f :\!\!-~~ \alpha ~\vdash~ \beta). Identity: :\frac Composition: :\frac
Unit type In the area of mathematical logic and computer science known as type theory, a unit type is a type that allows only one value (and thus can hold no information). The carrier (underlying set) associated with a unit type can be any singleton set. ...
(
terminal object In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism . The dual notion is that of a terminal object (also called terminal element) ...
): :\frac Cartesian product: :\frac Left and right projection: :\frac\qquad\frac
Currying In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, currying a function f tha ...
: :\frac
Application Application may refer to: Mathematics and computing * Application software, computer software designed to help the user to perform specific tasks ** Application layer, an abstraction layer that specifies protocols and interface methods used in a c ...
: :\frac Finally, the equations of the category are * id \circ t = t * t \circ id = t * (v \circ u) \circ t = v \circ (u \circ t) * \star = id (if well-typed) * \star \circ u = \star * \pi_1 \circ (t, u) = t * \pi_2 \circ (t,u) = u * (\pi_1, \pi_2) = id * (t_1, t_2) \circ u = (t_1 \circ u, t_2 \circ u) * eval \circ (\lambda t \circ \pi_1, \pi_2) = t * \lambda eval = id * \lambda t \circ u = \lambda (t \circ (u \circ \pi_1, \pi_2)) These equations imply the following \eta-laws: * (\pi_1 \circ t, \pi_2 \circ t) = t * \lambda (eval \circ (t \circ \pi_1, \pi_2)) = t Now, there exists such that t:\!\!-~ \alpha_1 \times \ldots \times \alpha_n \vdash \beta iff \alpha_1, \ldots, \alpha_n \vdash \beta is provable in implicational intuitionistic logic,.


Examples

Thanks to the Curry–Howard correspondence, a typed expression whose type corresponds to a logical formula is analogous to a proof of that formula. Here are examples.


The identity combinator seen as a proof of ''α'' → ''α'' in Hilbert-style logic

As an example, consider a proof of the theorem . In
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
, this is the type of the identity function and in combinatory logic, the identity function is obtained by applying S = λ''fgx''.''fx''(''gx'') twice to K = λ''xy''.''x''. That is, . As a description of a proof, this says that the following steps can be used to prove : * instantiate the second axiom scheme with the formulas , and to obtain a proof of , * instantiate the first axiom scheme once with and to obtain a proof of , * instantiate the first axiom scheme a second time with and to obtain a proof of , * apply modus ponens twice to obtain a proof of In general, the procedure is that whenever the program contains an application of the form (''P'' ''Q''), these steps should be followed: # First prove theorems corresponding to the types of ''P'' and ''Q''. # Since ''P'' is being applied to ''Q'', the type of ''P'' must have the form and the type of ''Q'' must have the form for some and . Therefore, it is possible to detach the conclusion, , via the modus ponens rule.


The composition combinator seen as a proof of (''β'' → ''α'') → (''γ'' → ''β'') → ''γ'' → ''α'' in Hilbert-style logic

As a more complicated example, let's look at the theorem that corresponds to the B function. The type of B is . B is equivalent to (S (K S) K). This is our roadmap for the proof of the theorem . The first step is to construct (K S). To make the antecedent of the K axiom look like the S axiom, set equal to , and equal to (to avoid variable collisions): : : Since the antecedent here is just S, the consequent can be detached using Modus Ponens: : This is the theorem that corresponds to the type of (K S). Now apply S to this expression. Taking S as follows :, put , , and , yielding : and then detach the consequent: : This is the formula for the type of (S (K S)). A special case of this theorem has : : This last formula must be applied to K. Specialize K again, this time by replacing with and with : : : This is the same as the antecedent of the prior formula so, detaching the consequent: : Switching the names of the variables and gives us : which was what remained to prove.


The normal proof of (''β'' → ''α'') → (''γ'' → ''β'') → ''γ'' → ''α'' in natural deduction seen as a λ-term

The diagram below gives proof of in natural deduction and shows how it can be interpreted as the λ-expression of type . a:β → α, b:γ → β, g:γ ⊢ b : γ → β a:β → α, b:γ → β, g:γ ⊢ g : γ ——————————————————————————————————— ———————————————————————————————————————————————————————————————————— a:β → α, b:γ → β, g:γ ⊢ a : β → α a:β → α, b:γ → β, g:γ ⊢ b g : β ———————————————————————————————————————————————————————————————————————— a:β → α, b:γ → β, g:γ ⊢ a (b g) : α ———————————————————————————————————— a:β → α, b:γ → β ⊢ λ g. a (b g) : γ → α ———————————————————————————————————————— a:β → α ⊢ λ b. λ g. a (b g) : (γ → β) -> γ → α ———————————————————————————————————— ⊢ λ a. λ b. λ g. a (b g) : (β → α) -> (γ → β) -> γ → α


Other applications

Recently, the isomorphism has been proposed as a way to define search space partition in genetic programming. The method indexes sets of genotypes (the program trees evolved by the GP system) by their Curry–Howard isomorphic proof (referred to as a species). As noted by INRIA research director Bernard Lang, the Curry-Howard correspondence constitutes an argument against the patentability of software: since algorithms are mathematical proofs, patentability of the former would imply patentability of the latter. A theorem could be private property; a mathematician would have to pay for using it, and to trust the company that sells it but keeps its proof secret and rejects responsibility for any errors.


Generalizations

The correspondences listed here go much farther and deeper. For example, cartesian closed categories are generalized by closed monoidal categories. The internal language of these categories is the
linear type system Substructural type systems are a family of type systems analogous to substructural logics where one or more of the structural rules are absent or only allowed under controlled circumstances. Such systems are useful for constraining access to sy ...
(corresponding to linear logic), which generalizes simply-typed lambda calculus as the internal language of cartesian closed categories. Moreover, these can be shown to correspond to cobordisms, which play a vital role in string theory. An extended set of equivalences is also explored in homotopy type theory, which became a very active area of research around 2013 and still is. Here,
type theory In mathematics, logic, and computer science, a type theory is the formal system, formal presentation of a specific type system, and in general type theory is the academic study of type systems. Some type theories serve as alternatives to set theor ...
is extended by the univalence axiom ("equivalence is equivalent to equality") which permits homotopy type theory to be used as a foundation for all of mathematics (including
set theory Set theory is the branch of mathematical logic that studies sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory, as a branch of mathematics, is mostly concer ...
and classical logic, providing new ways to discuss the
axiom of choice In mathematics, the axiom of choice, or AC, is an axiom of set theory equivalent to the statement that ''a Cartesian product of a collection of non-empty sets is non-empty''. Informally put, the axiom of choice says that given any collection ...
and many other things). That is, the Curry–Howard correspondence that proofs are elements of inhabited types is generalized to the notion of homotopic equivalence of proofs (as paths in space, the identity type or equality type of type theory being interpreted as a path).''Homotopy Type Theory: Univalent Foundations of Mathematics''
(2013) The Univalent Foundations Program.
Institute for Advanced Study The Institute for Advanced Study (IAS), located in Princeton, New Jersey, in the United States, is an independent center for theoretical research and intellectual inquiry. It has served as the academic home of internationally preeminent scholar ...
.


References


Seminal references

* * * De Bruijn, Nicolaas (1968), ''Automath, a language for mathematics'', Department of Mathematics, Eindhoven University of Technology, TH-report 68-WSK-05. Reprinted in revised form, with two pages commentary, in: ''Automation and Reasoning, vol 2, Classical papers on computational logic 1967–1970'', Springer Verlag, 1983, pp. 159–200. * .


Extensions of the correspondence

refs= * . * . * . * . (Full version of the paper presented at ''Logic Colloquium '90'', Helsinki. Abstract in ''JSL'' 56(3):1139–1140, 1991.) * . * . (Full version of a paper presented at ''Logic Colloquium '91'', Uppsala. Abstract in ''JSL'' 58(2):753–754, 1993.) * . * . * . (Full version of a paper presented at ''2nd WoLLIC'95'', Recife. Abstract in ''Journal of the Interest Group in Pure and Applied Logics'' 4(2):330–332, 1996.) * , concerns the adaptation of proofs-as-programs program synthesis to coarse-grain and imperative program development problems, via a method the authors call the Curry–Howard protocol. Includes a discussion of the Curry–Howard correspondence from a Computer Science perspective. * . (Full version of a paper presented at ''LSFA 2010'', Natal, Brazil.)


Philosophical interpretations

* . (Early version presented at ''Logic Colloquium '88'', Padova. Abstract in ''JSL'' 55:425, 1990.) * . (Early version presented at ''Fourteenth International Wittgenstein Symposium (Centenary Celebration)'' held in Kirchberg/Wechsel, August 13–20, 1989.) * .


Synthetic papers

* , the contribution of de Bruijn by himself. *, contains a synthetic introduction to the Curry–Howard correspondence. * , contains a synthetic introduction to the Curry–Howard correspondence. *


Books

*, reproduces the seminal papers of Curry-Feys and Howard, a paper by de Bruijn and a few other papers. * , notes on proof theory and type theory, that includes a presentation of the Curry–Howard correspondence, with a focus on the formulae-as-types correspondence *, notes on proof theory with a presentation of the Curry–Howard correspondence. *. *, concerns the adaptation of proofs-as-programs program synthesis to coarse-grain and imperative program development problems, via a method the authors call the Curry–Howard protocol. Includes a discussion of the Curry–Howard correspondence from a Computer Science perspective. * *. *


Further reading

* — gives a categorical view of "what happens" in the Curry–Howard correspondence.


External links


Howard on Curry-HowardThe Curry–Howard Correspondence in HaskellThe Monad Reader 6: Adventures in Classical-Land
Curry–Howard in Haskell, Pierce's law. {{DEFAULTSORT:Curry-Howard Correspondence 1934 in computing 1958 in computing 1969 in computing Dependently typed programming Proof theory Logic in computer science Type theory Philosophy of computer science