fbpx
Wikipedia

Curry–Howard correspondence

In programming language theory 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 programs and mathematical proofs.

It is a generalization of a syntactic analogy between systems of formal logic and computational calculi that was first discovered by the American mathematician Haskell Curry and the logician William Alvin Howard.[1] 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 given in various formulations by L. E. J. Brouwer, Arend Heyting and Andrey Kolmogorov (see Brouwer–Heyting–Kolmogorov interpretation)[2] and Stephen Kleene (see Realizability). The relationship has been extended to include category theory as the three-way Curry–Howard–Lambek correspondence.[citation needed]

Origin, scope, and consequences Edit

The beginnings of the Curry–Howard correspondence lie in several observations:

  1. In 1934 Curry observes that the types of the combinators could be seen as axiom-schemes for intuitionistic implicational logic.[3]
  2. 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 known as combinatory logic.[4]
  3. In 1969 Howard observes that another, more "high-level" proof system, referred to as natural deduction, can be directly interpreted in its intuitionistic version as a typed variant of the model of computation known as lambda calculus.[5]

The Curry–Howard correspondence is the observation that there is an isomorphism between the proof systems, and the models of computation. It is the statement that these two families of formalisms can be considered as identical.

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 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 systems designed to act both as a proof system and as a typed functional programming language. 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.

Such typed lambda calculi 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. This is only feasible if the programming language 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 of programs and the symmetry of sequent calculus 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, proof nets, calculus of structures, 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 are not the only models of computation, either. Girard's linear logic was developed from the fine analysis of the use of resources in some models of lambda calculus; is there a typed version of Turing's machine that would behave as a proof system? Typed assembly languages are such an instance of "low-level" models of computation that carry types.

Because of the possibility of writing non-terminating programs, Turing-complete 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,[6] and is itself related to modal logic by a natural extension of the Curry–Howard isomorphism[ext 1]). A more radical approach, advocated by total functional programming, is to eliminate unrestricted recursion (and forgo Turing completeness, although still retaining high computational complexity), using more controlled corecursion wherever non-terminating behavior is actually desired.

General formulation Edit

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 unit 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:

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 are the following correspondences:

Logic side Programming side
hypotheses free variables
implication elimination (modus ponens) application
implication introduction abstraction

Corresponding systems Edit

Intuitionistic Hilbert-style deduction systems and typed combinatory logic Edit

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.

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, 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:α → (βα) [where α 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 means that some classical tautologies, such as Peirce's law ((αβ) → α) → α, are excluded from the correspondence.

Hilbert-style intuitionistic implicational logic Typed combinatory logic
   
   
   
   

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.

Logic side Programming side
assumption variable
axiom schemes combinators
modus ponens application
deduction theorem abstraction elimination

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 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 of X, is an adequate replacement to the combination of the axiom schemes

α → (βα) and
(α → (βγ)) → ((αβ) → (αγ)).

Intuitionistic Natural deduction and typed lambda calculus Edit

After Curry emphasized the syntactic correspondence between intuitionistic Hilbert-style deduction and typed combinatory logic, Howard made explicit in 1969 a syntactic analogy between the programs of simply typed lambda calculus and the proofs of natural deduction. Below, the left-hand side formalizes intuitionistic implicational natural deduction as a calculus of sequents (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. 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.

Intuitionistic implicational natural deduction Lambda calculus type assignment rules
   
   
   

To paraphrase the correspondence, proving Γ ⊢ α means having a program that, given values with the types listed in Γ, manufactures an object of type α. An axiom/hypothesis corresponds to the introduction of a new variable with a new, unconstrained type, the → I rule corresponds to function abstraction and the → E 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 λxy.x and λxy.y of type ααα would not be distinguished in the correspondence. Examples are given below.

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 matches Prawitz's notion of normal deduction in natural deduction, from which it follows that the algorithms for the type inhabitation problem can be turned into algorithms for deciding intuitionistic provability.

Logic side Programming side
axiom/hypothesis variable
introduction rule constructor
elimination rule destructor
normal deduction normal form
normalisation of deductions weak normalisation
provability type inhabitation problem
intuitionistic tautology universally inhabited type

Howard's correspondence naturally extends to other extensions of natural deduction and simply typed lambda calculus. 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 and Girard's System Fω
  • inductive types as algebraic data type
  • necessity   in modal logic and staged computation[ext 2]
  • possibility   in modal logic and monadic types for effects[ext 1]
  • The λI calculus (where abstraction is restricted to λx.E where x has at least one free occurrence in E) and CLI calculus correspond to relevant logic.[7]
  • The local truth (∇) modality in Grothendieck topology or the equivalent "lax" modality (◯) of Benton, Bierman, and de Paiva (1998) correspond to CL-logic describing "computation types".[8]

Classical logic and control operators Edit

At the time of Curry, and also at the time of Howard, the proofs-as-programs correspondence concerned only intuitionistic logic, i.e. a logic in which, in particular, Peirce's law 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 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'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, 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 Edit

A proofs-as-programs correspondence can be settled for the formalism known as Gentzen's sequent calculus 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 machines. The informal correspondence is as follows:

Logic side Programming side
cut elimination reduction in a form of abstract machine
right introduction rules constructors of code
left introduction rules constructors of evaluation stacks
priority to right-hand side in cut-elimination call-by-name reduction
priority to left-hand side in cut-elimination call-by-value reduction

Related proofs-as-programs correspondences Edit

The role of de Bruijn Edit

N. G. de Bruijn 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 [1998] 2006, pp 98–99). Some researchers tend to use the term Curry–Howard–de Bruijn correspondence in place of Curry–Howard correspondence.

BHK interpretation Edit

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 Edit

Kleene's recursive realizability 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 Edit

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, the theory of cartesian closed categories. The expression Curry–Howard–Lambek correspondence is now used by some people[by whom?] to refer to the relationships between intuitionistic logic, typed lambda calculus and cartesian closed categories, with objects being interpreted as types or propositions and morphisms as terms or proofs. Lambek's correspondence is a correspondence of equational theories, abstracting away from dynamics of computation such as beta reduction and term normalization, 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. For example, it is not possible to state or prove that a morphism is normalizing, establish a Church-Rosser type theorem, or speak of a "strongly normalizing" cartesian closed category. To clarify this distinction, the underlying syntactic structure of cartesian closed categories is rephrased below.

Objects (types) are defined by

  •   is an object
  • if α and β are objects then   and   are objects.

Morphisms (terms) are defined by

  •  ,  ,  ,   and   are morphisms
  • if t is a morphism, λt is a morphism
  • if t and u are morphisms,   and   are morphisms.

Well-defined morphisms (typed terms) are defined by the following typing rules (in which the usual categorical morphism notation   is replaced with sequent calculus notation  ).

Identity:

 

Composition:

 

Unit type (terminal object):

 

Cartesian product:

 

Left and right projection:

 

Currying:

 

Application:

 

Finally, the equations of the category are

  •  
  •  
  •  
  •   (if well-typed)
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

These equations imply the following  -laws:

  •  
  •  

Now, there exists t such that   iff   is provable in implicational intuitionistic logic.

Examples Edit

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 Edit

As an example, consider a proof of the theorem αα. In lambda calculus, this is the type of the identity function I = λx.x and in combinatory logic, the identity function is obtained by applying S = λfgx.fx(gx) twice to K = λxy.x. That is, I = ((S K) K). 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:

  1. First prove theorems corresponding to the types of P and Q.
  2. 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 Edit

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):

K : αβα
K[α = (αβγ) → (αβ) → αγ, β = δ] : ((αβγ) → (αβ) → αγ) → δ → (αβγ) → (αβ) → αγ

Since the antecedent here is just S, the consequent can be detached using Modus Ponens:

K S : δ → (αβγ) → (αβ) → αγ

This is the theorem that corresponds to the type of (K S). Now apply S to this expression. Taking S as follows

S : (αβγ) → (αβ) → αγ,

put α = δ, β = αβγ, and γ = (αβ) → αγ, yielding

S[α = δ, β = αβγ, γ = (αβ) → αγ] : (δ → (αβγ) → (αβ) → αγ) → (δ → (αβγ)) → δ → (αβ) → αγ

and then detach the consequent:

S (K S) : (δαβγ) → δ → (αβ) → αγ

This is the formula for the type of (S (K S)). A special case of this theorem has δ = (βγ):

S (K S)[δ = βγ] : ((βγ) → αβγ) → (βγ) → (αβ) → αγ

This last formula must be applied to K. Specialize K again, this time by replacing α with (βγ) and β with α:

K : αβα
K[α = βγ, β = α] : (βγ) → α → (βγ)

This is the same as the antecedent of the prior formula so, detaching the consequent:

S (K S) K : (βγ) → (αβ) → αγ

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 Edit

The diagram below gives proof of (βα) → (γβ) → γα in natural deduction and shows how it can be interpreted as the λ-expression λabg.(a (b g)) 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 Edit

Recently, the isomorphism has been proposed as a way to define search space partition in genetic programming.[9] 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,[10] 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 Edit

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 (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,[11] 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 as of 2018 still is.[12] Here, type theory 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 and classical logic, providing new ways to discuss the axiom of choice 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).[13]

References Edit

  1. ^ The correspondence was first made explicit in Howard 1980. See, for example section 4.6, p.53 Gert Smolka and Jan Schwinghammer (2007-8), Lecture Notes in Semantics
  2. ^ The Brouwer–Heyting–Kolmogorov interpretation is also called the 'proof interpretation': p. 161 of Juliette Kennedy, Roman Kossak, eds. 2011. Set Theory, Arithmetic, and Foundations of Mathematics: Theorems, Philosophies ISBN 978-1-107-00804-5
  3. ^ Curry 1934.
  4. ^ Curry & Feys 1958.
  5. ^ Howard 1980.
  6. ^ Moggi, Eugenio (1991), "Notions of Computation and Monads" (PDF), Information and Computation, 93 (1): 55–92, doi:10.1016/0890-5401(91)90052-4
  7. ^ Sørenson, Morten; Urzyczyn, Paweł (1998), Lectures on the Curry-Howard Isomorphism, CiteSeerX 10.1.1.17.7385
  8. ^ Goldblatt, "7.6 Grothendieck Topology as Intuitionistic Modality" (PDF), Mathematical Modal Logic: A Model of its Evolution, pp. 76–81. The "lax" modality referred to is from Benton; Bierman; de Paiva (1998), "Computational types from a logical perspective", Journal of Functional Programming, 8 (2): 177–193, CiteSeerX 10.1.1.258.6004, doi:10.1017/s0956796898002998, S2CID 6149614
  9. ^ F. Binard and A. Felty, "Genetic programming with polymorphic types and higher-order functions." In Proceedings of the 10th annual conference on Genetic and evolutionary computation, pages 1187 1194, 2008.[1]
  10. ^ . bat8.inria.fr. Archived from the original on 2013-11-17. Retrieved 2020-01-31.
  11. ^ John c. Baez and Mike Stay, "Physics, Topology, Logic and Computation: A Rosetta Stone", (2009) ArXiv 0903.0340 in New Structures for Physics, ed. Bob Coecke, Lecture Notes in Physics vol. 813, Springer, Berlin, 2011, pp. 95–174.
  12. ^ "homotopy type theory - Google Trends". trends.google.com. Retrieved 2018-01-26.
  13. ^ Homotopy Type Theory: Univalent Foundations of Mathematics. (2013) The Univalent Foundations Program. Institute for Advanced Study.

Seminal references Edit

  • Curry, H B (1934-09-20). "Functionality in Combinatory Logic". Proceedings of the National Academy of Sciences of the United States of America. 20 (11): 584–90. Bibcode:1934PNAS...20..584C. doi:10.1073/pnas.20.11.584. ISSN 0027-8424. PMC 1076489. PMID 16577644.
  • Curry, Haskell B; Feys, Robert (1958). Craig, William (ed.). Combinatory Logic. Studies in Logic and the Foundations of Mathematics. Vol. 1. North-Holland Publishing Company. LCCN a59001593; with two sections by Craig, William; see paragraph 9E{{cite book}}: CS1 maint: postscript (link)
  • 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.
  • Howard, William A. (September 1980) [original paper manuscript from 1969], "The formulae-as-types notion of construction" (PDF), in Seldin, Jonathan P.; Hindley, J. Roger (eds.), To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, Academic Press, pp. 479–490, ISBN 978-0-12-349050-6.

Extensions of the correspondence Edit

  1. ^ a b Pfenning, Frank; Davies, Rowan (2001), "A Judgmental Reconstruction of Modal Logic" (PDF), Mathematical Structures in Computer Science, 11 (4): 511–540, CiteSeerX 10.1.1.43.1611, doi:10.1017/S0960129501003322, S2CID 16467268
  2. ^ Davies, Rowan; Pfenning, Frank (2001), "A Modal Analysis of Staged Computation" (PDF), Journal of the ACM, 48 (3): 555–604, CiteSeerX 10.1.1.3.5442, doi:10.1145/382780.382785, S2CID 52148006
  • Griffin, Timothy G. (1990), "The Formulae-as-Types Notion of Control", Conf. Record 17th Annual ACM Symp. on Principles of Programming Languages, POPL '90, San Francisco, CA, USA, 17–19 Jan 1990, pp. 47–57, doi:10.1145/96709.96714, ISBN 978-0-89791-343-0, S2CID 3005134.
  • Parigot, Michel (1992), "Lambda-mu-calculus: An algorithmic interpretation of classical natural deduction", International Conference on Logic Programming and Automated Reasoning: LPAR '92 Proceedings, St. Petersburg, Russia, Lecture Notes in Computer Science, vol. 624, Springer-Verlag, pp. 190–201, ISBN 978-3-540-55727-2.
  • Herbelin, Hugo (1995), "A Lambda-Calculus Structure Isomorphic to Gentzen-Style Sequent Calculus Structure", in Pacholski, Leszek; Tiuryn, Jerzy (eds.), Computer Science Logic, 8th International Workshop, CSL '94, Kazimierz, Poland, September 25–30, 1994, Selected Papers, Lecture Notes in Computer Science, vol. 933, Springer-Verlag, pp. 61–75, ISBN 978-3-540-60017-6.
  • Gabbay, Dov; de Queiroz, Ruy (1992). "Extending the Curry–Howard interpretation to linear, relevant and other resource logics". Journal of Symbolic Logic. Vol. 57. pp. 1319–1365. doi:10.2307/2275370. JSTOR 2275370. S2CID 7159005.. (Full version of the paper presented at Logic Colloquium '90, Helsinki. Abstract in JSL 56(3):1139–1140, 1991.)
  • de Queiroz, Ruy; Gabbay, Dov (1994), "Equality in Labelled Deductive Systems and the Functional Interpretation of Propositional Equality", in Dekker, Paul; Stokhof, Martin (eds.), Proceedings of the Ninth Amsterdam Colloquium, ILLC/Department of Philosophy, University of Amsterdam, pp. 547–565, ISBN 978-90-74795-07-4.
  • de Queiroz, Ruy; Gabbay, Dov (1995), "The Functional Interpretation of the Existential Quantifier", Bulletin of the Interest Group in Pure and Applied Logics, vol. 3, pp. 243–290. (Full version of a paper presented at Logic Colloquium '91, Uppsala. Abstract in JSL 58(2):753–754, 1993.)
  • de Queiroz, Ruy; Gabbay, Dov (1997), "The Functional Interpretation of Modal Necessity", in de Rijke, Maarten (ed.), Advances in Intensional Logic, Applied Logic Series, vol. 7, Springer-Verlag, pp. 61–91, ISBN 978-0-7923-4711-8.
  • de Queiroz, Ruy; Gabbay, Dov (1999), "Labelled Natural Deduction", in Ohlbach, Hans-Juergen; Reyle, Uwe (eds.), Logic, Language and Reasoning. Essays in Honor of Dov Gabbay, Trends in Logic, vol. 7, Kluwer, pp. 173–250, ISBN 978-0-7923-5687-5.
  • de Oliveira, Anjolina; de Queiroz, Ruy (1999), "A Normalization Procedure for the Equational Fragment of Labelled Natural Deduction", Logic Journal of the Interest Group in Pure and Applied Logics, vol. 7, Oxford University Press, pp. 173–215. (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.)
  • Poernomo, Iman; Crossley, John; Wirsing; Martin (2005), Adapting Proofs-as-Programs: The Curry–Howard Protocol, Monographs in Computer Science, Springer, ISBN 978-0-387-23759-6, 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.
  • de Queiroz, Ruy J.G.B.; de Oliveira, Anjolina (2011), "The Functional Interpretation of Direct Computations", Electronic Notes in Theoretical Computer Science, Elsevier, 269: 19–40, doi:10.1016/j.entcs.2011.03.003. (Full version of a paper presented at LSFA 2010, Natal, Brazil.)

Philosophical interpretations Edit

  • de Queiroz, Ruy J.G.B. (1994), "Normalisation and language-games", Dialectica, vol. 48, pp. 83–123[permanent dead link]. (Early version presented at Logic Colloquium '88, Padova. Abstract in JSL 55:425, 1990.)
  • de Queiroz, Ruy J.G.B. (2001), "Meaning, function, purpose, usefulness, consequences – interconnected concepts", Logic Journal of the Interest Group in Pure and Applied Logics, vol. 9, pp. 693–734. (Early version presented at Fourteenth International Wittgenstein Symposium (Centenary Celebration) held in Kirchberg/Wechsel, August 13–20, 1989.)
  • de Queiroz, Ruy J.G.B. (2008), "On Reduction Rules, Meaning-as-use, and Proof-theoretic Semantics", Studia Logica, 90 (2): 211–247, doi:10.1007/s11225-008-9150-5, S2CID 11321602.

Synthetic papers Edit

  • De Bruijn, Nicolaas Govert (1995), "On the roles of types in mathematics" (PDF), in Groote, Philippe de (ed.), De Groote 1995, pp. 27–54, the contribution of de Bruijn by himself.
  • Geuvers, Herman (1995), "The Calculus of Constructions and Higher Order Logic", De Groote 1995, pp. 139–191, contains a synthetic introduction to the Curry–Howard correspondence.
  • Gallier, Jean H. (1995), "On the Correspondence between Proofs and Lambda-Terms" (PDF), De Groote 1995, pp. 55–138, contains a synthetic introduction to the Curry–Howard correspondence.
  • Wadler, Philip (2014), "Propositions as Types" (PDF), Communications of the ACM, 58 (12): 75–84, doi:10.1145/2699407, S2CID 11957500

Books Edit

  • De Groote, Philippe, ed. (1995), The Curry–Howard Isomorphism, Cahiers du Centre de Logique (Université catholique de Louvain), vol. 8, Academia-Bruylant, ISBN 978-2-87209-363-2, reproduces the seminal papers of Curry-Feys and Howard, a paper by de Bruijn and a few other papers.
  • Sørensen, Morten Heine; Urzyczyn, Paweł (2006) [1998], Lectures on the Curry–Howard isomorphism, Studies in Logic and the Foundations of Mathematics, vol. 149, Elsevier Science, CiteSeerX 10.1.1.17.7385, ISBN 978-0-444-52077-7, 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
  • Girard, Jean-Yves (1987–1990), , Cambridge Tracts in Theoretical Computer Science, vol. 7, Translated by and with appendices by Lafont, Yves and Taylor, Paul, Cambridge University Press, ISBN 0-521-37181-3, archived from the original on 2008-04-18, notes on proof theory with a presentation of the Curry–Howard correspondence.
  • Thompson, Simon (1991), Type Theory and Functional Programming, Addison–Wesley, ISBN 0-201-41667-0.
  • Poernomo, Iman; Crossley, John; Wirsing; Martin (2005), Adapting Proofs-as-Programs: The Curry–Howard Protocol, Monographs in Computer Science, Springer, ISBN 978-0-387-23759-6, 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.
  • Binard, F.; Felty, A. (2008), "Genetic programming with polymorphic types and higher-order functions" (PDF), Proceedings of the 10th annual conference on Genetic and evolutionary computation, Association for Computing Machinery, pp. 1187–94, doi:10.1145/1389095.1389330, ISBN 9781605581309, S2CID 3669630
  • de Queiroz, Ruy J.G.B.; de Oliveira, Anjolina G.; Gabbay, Dov M. (2011), The Functional Interpretation of Logical Deduction, Advances in Logic, vol. 5, Imperial College Press/World Scientific, ISBN 978-981-4360-95-1.

Further reading Edit

  • Johnstone, P.T. (2002), "D4.2 λ-Calculus and cartesian closed categories", Sketches of an Elephant, A Topos Theory Compendium, vol. 2, Clarendon Press, pp. 951–962, ISBN 978-0-19-851598-2 — gives a categorical view of "what happens" in the Curry–Howard correspondence.

External links Edit

  • Howard on Curry-Howard
  • The Monad Reader 6: Adventures in Classical-Land: Curry–Howard in Haskell, Pierce's law.

curry, howard, correspondence, programming, language, theory, proof, theory, also, known, curry, howard, isomorphism, equivalence, proofs, programs, propositions, formulae, types, interpretation, direct, relationship, between, computer, programs, mathematical,. In programming language theory 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 programs and mathematical proofs It is a generalization of a syntactic analogy between systems of formal logic and computational calculi that was first discovered by the American mathematician Haskell Curry and the logician William Alvin Howard 1 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 given in various formulations by L E J Brouwer Arend Heyting and Andrey Kolmogorov see Brouwer Heyting Kolmogorov interpretation 2 and Stephen Kleene see Realizability The relationship has been extended to include category theory as the three way Curry Howard Lambek correspondence citation needed Contents 1 Origin scope and consequences 2 General formulation 3 Corresponding systems 3 1 Intuitionistic Hilbert style deduction systems and typed combinatory logic 3 2 Intuitionistic Natural deduction and typed lambda calculus 3 3 Classical logic and control operators 3 4 Sequent calculus 4 Related proofs as programs correspondences 4 1 The role of de Bruijn 4 2 BHK interpretation 4 3 Realizability 4 4 Curry Howard Lambek correspondence 5 Examples 5 1 The identity combinator seen as a proof of a a in Hilbert style logic 5 2 The composition combinator seen as a proof of b a g b g a in Hilbert style logic 5 3 The normal proof of b a g b g a in natural deduction seen as a l term 6 Other applications 7 Generalizations 8 References 8 1 Seminal references 8 2 Extensions of the correspondence 8 3 Philosophical interpretations 8 4 Synthetic papers 8 5 Books 9 Further reading 10 External linksOrigin scope and consequences EditThe beginnings of the Curry Howard correspondence lie in several observations In 1934 Curry observes that the types of the combinators could be seen as axiom schemes for intuitionistic implicational logic 3 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 known as combinatory logic 4 In 1969 Howard observes that another more high level proof system referred to as natural deduction can be directly interpreted in its intuitionistic version as a typed variant of the model of computation known as lambda calculus 5 The Curry Howard correspondence is the observation that there is an isomorphism between the proof systems and the models of computation It is the statement that these two families of formalisms can be considered as identical 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 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 systems designed to act both as a proof system and as a typed functional programming language This includes Martin Lof 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 Such typed lambda calculi 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 This is only feasible if the programming language 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 of programs and the symmetry of sequent calculus 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 proof nets calculus of structures 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 are not the only models of computation either Girard s linear logic was developed from the fine analysis of the use of resources in some models of lambda calculus is there a typed version of Turing s machine that would behave as a proof system Typed assembly languages are such an instance of low level models of computation that carry types Because of the possibility of writing non terminating programs Turing complete 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 6 and is itself related to modal logic by a natural extension of the Curry Howard isomorphism ext 1 A more radical approach advocated by total functional programming is to eliminate unrestricted recursion and forgo Turing completeness although still retaining high computational complexity using more controlled corecursion wherever non terminating behavior is actually desired General formulation EditIn 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 unit 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 sideuniversal quantification generalised product type P type existential quantification generalised sum type S type implication function typeconjunction product typedisjunction sum typetrue formula unit type or top typefalse formula empty type or bottom typeAt 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 sideHilbert style deduction system type system for combinatory logicnatural deduction type system for lambda calculusBetween the natural deduction system and the lambda calculus there are the following correspondences Logic side Programming sidehypotheses free variablesimplication elimination modus ponens applicationimplication introduction abstractionCorresponding systems EditIntuitionistic Hilbert style deduction systems and typed combinatory logic Edit 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 a b a and a b g a b a g 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 If one restricts to the implicational intuitionistic fragment a simple way to formalize logic in Hilbert s style is as follows Let G be a finite collection of formulas considered as hypotheses Then d is derivable from G denoted G d in the following cases d is an hypothesis i e it is a formula of G d is an instance of an axiom scheme i e under the most common axiom system d has the form a b a or d has the form a b g a b a g d follows by deduction i e for some a both a d and a are already derivable from G this is the rule of modus ponens This can be formalized using inference rules as in the left column of the following table Typed combinatory logic can be formulated using a similar syntax let G be a finite collection of variables annotated with their types A term T also annotated with its type will depend on these variables G T d when T is one of the variables in G T is a basic combinator i e under the most common combinator basis T is K a b a where a and b denote the types of its arguments or T is S a b g a b a g T is the composition of two subterms which depend on the variables in G 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 means that some classical tautologies such as Peirce s law a b a a are excluded from the correspondence Hilbert style intuitionistic implicational logic Typed combinatory logica G G a Assum displaystyle frac alpha in Gamma Gamma vdash alpha qquad qquad text Assum nbsp x a G G x a displaystyle frac x alpha in Gamma Gamma vdash x alpha nbsp G a b a Ax K displaystyle frac Gamma vdash alpha rightarrow beta rightarrow alpha qquad text Ax K nbsp G K a b a displaystyle frac Gamma vdash K alpha rightarrow beta rightarrow alpha nbsp G a b g a b a g Ax S displaystyle frac Gamma vdash alpha rightarrow beta rightarrow gamma rightarrow alpha rightarrow beta rightarrow alpha rightarrow gamma text Ax S nbsp G S a b g a b a g displaystyle frac Gamma vdash S alpha rightarrow beta rightarrow gamma rightarrow alpha rightarrow beta rightarrow alpha rightarrow gamma nbsp G a b G a G b Modus Ponens displaystyle frac Gamma vdash alpha rightarrow beta qquad Gamma vdash alpha Gamma vdash beta quad text Modus Ponens nbsp G E 1 a b G E 2 a G E 1 E 2 b displaystyle frac Gamma vdash E 1 alpha rightarrow beta qquad Gamma vdash E 2 alpha Gamma vdash E 1 E 2 beta nbsp 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 Logic side Programming sideassumption variableaxiom schemes combinatorsmodus ponens applicationdeduction theorem abstraction eliminationThanks 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 can be transferred back to combinatory logic there is no typed term of combinatory logic that is typable with type a b a a 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 a b g a b a g d e d z z which is the principal type of X is an adequate replacement to the combination of the axiom schemes a b a and a b g a b a g Intuitionistic Natural deduction and typed lambda calculus Edit After Curry emphasized the syntactic correspondence between intuitionistic Hilbert style deduction and typed combinatory logic Howard made explicit in 1969 a syntactic analogy between the programs of simply typed lambda calculus and the proofs of natural deduction Below the left hand side formalizes intuitionistic implicational natural deduction as a calculus of sequents 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 In the left hand side G G1 and G2 denote ordered sequences of formulas while in the right hand side they denote sequences of named i e typed formulas with all names different Intuitionistic implicational natural deduction Lambda calculus type assignment rulesG 1 a G 2 a Ax displaystyle frac Gamma 1 alpha Gamma 2 vdash alpha text Ax nbsp G 1 x a G 2 x a displaystyle frac Gamma 1 x alpha Gamma 2 vdash x alpha nbsp G a b G a b I displaystyle frac Gamma alpha vdash beta Gamma vdash alpha rightarrow beta rightarrow I nbsp G x a t b G l x a t a b displaystyle frac Gamma x alpha vdash t beta Gamma vdash lambda x alpha t alpha rightarrow beta nbsp G a b G a G b E displaystyle frac Gamma vdash alpha rightarrow beta qquad Gamma vdash alpha Gamma vdash beta rightarrow E nbsp G t a b G u a G t u b displaystyle frac Gamma vdash t alpha rightarrow beta qquad Gamma vdash u alpha Gamma vdash t u beta nbsp To paraphrase the correspondence proving G a means having a program that given values with the types listed in G manufactures an object of type a An axiom hypothesis corresponds to the introduction of a new variable with a new unconstrained type the I rule corresponds to function abstraction and the E rule corresponds to function application Observe that the correspondence is not exact if the context G is taken to be a set of formulas as e g the l terms lx ly x and lx ly y of type a a a would not be distinguished in the correspondence Examples are given below 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 matches Prawitz s notion of normal deduction in natural deduction from which it follows that the algorithms for the type inhabitation problem can be turned into algorithms for deciding intuitionistic provability Logic side Programming sideaxiom hypothesis variableintroduction rule constructorelimination rule destructornormal deduction normal formnormalisation of deductions weak normalisationprovability type inhabitation problemintuitionistic tautology universally inhabited typeHoward s correspondence naturally extends to other extensions of natural deduction and simply typed lambda calculus 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 and Girard s System Fw inductive types as algebraic data type necessity displaystyle Box nbsp in modal logic and staged computation ext 2 possibility displaystyle Diamond nbsp in modal logic and monadic types for effects ext 1 The lI calculus where abstraction is restricted to lx E where x has at least one free occurrence in E and CLI calculus correspond to relevant logic 7 The local truth modality in Grothendieck topology or the equivalent lax modality of Benton Bierman and de Paiva 1998 correspond to CL logic describing computation types 8 Classical logic and control operators Edit At the time of Curry and also at the time of Howard the proofs as programs correspondence concerned only intuitionistic logic i e a logic in which in particular Peirce s law 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 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 s double negation translation and call by value continuation passing style translations relates to a kind of double negation translation due to Kuroda Logic side Programming sidePeirce s law a b a a call with current continuationdouble negation translation continuation passing style translationA finer Curry Howard correspondence exists for classical logic if one defines classical logic not by adding an axiom such as Peirce s law 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 lm calculus Sequent calculus Edit A proofs as programs correspondence can be settled for the formalism known as Gentzen s sequent calculus 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 machines The informal correspondence is as follows Logic side Programming sidecut elimination reduction in a form of abstract machineright introduction rules constructors of codeleft introduction rules constructors of evaluation stackspriority to right hand side in cut elimination call by name reductionpriority to left hand side in cut elimination call by value reductionRelated proofs as programs correspondences EditThe role of de Bruijn Edit N G de Bruijn 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 Sorensen amp Urzyczyn 1998 2006 pp 98 99 Some researchers tend to use the term Curry Howard de Bruijn correspondence in place of Curry Howard correspondence BHK interpretation Edit 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 Edit Kleene s recursive realizability 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 Godel 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 Edit 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 the theory of cartesian closed categories The expression Curry Howard Lambek correspondence is now used by some people by whom to refer to the relationships between intuitionistic logic typed lambda calculus and cartesian closed categories with objects being interpreted as types or propositions and morphisms as terms or proofs Lambek s correspondence is a correspondence of equational theories abstracting away from dynamics of computation such as beta reduction and term normalization 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 For example it is not possible to state or prove that a morphism is normalizing establish a Church Rosser type theorem or speak of a strongly normalizing cartesian closed category To clarify this distinction the underlying syntactic structure of cartesian closed categories is rephrased below Objects types are defined by displaystyle top nbsp is an object if a and b are objects then a b displaystyle alpha times beta nbsp and a b displaystyle alpha rightarrow beta nbsp are objects Morphisms terms are defined by i d displaystyle id nbsp displaystyle star nbsp eval displaystyle operatorname eval nbsp p 1 displaystyle pi 1 nbsp and p 2 displaystyle pi 2 nbsp are morphisms if t is a morphism lt is a morphism if t and u are morphisms t u displaystyle t u nbsp and u t displaystyle u circ t nbsp are morphisms Well defined morphisms typed terms are defined by the following typing rules in which the usual categorical morphism notation f a b displaystyle f alpha to beta nbsp is replaced with sequent calculus notation f a b displaystyle f alpha vdash beta nbsp Identity i d a a displaystyle frac id alpha vdash alpha nbsp Composition t a b u b g u t a g displaystyle frac t alpha vdash beta qquad u beta vdash gamma u circ t alpha vdash gamma nbsp Unit type terminal object a displaystyle frac star alpha vdash top nbsp Cartesian product t a b u a g t u a b g displaystyle frac t alpha vdash beta qquad u alpha vdash gamma t u alpha vdash beta times gamma nbsp Left and right projection p 1 a b a p 2 a b b displaystyle frac pi 1 alpha times beta vdash alpha qquad frac pi 2 alpha times beta vdash beta nbsp Currying t a b g l t a b g displaystyle frac t alpha times beta vdash gamma lambda t alpha vdash beta rightarrow gamma nbsp Application e v a l a b a b displaystyle frac eval alpha rightarrow beta times alpha vdash beta nbsp Finally the equations of the category are i d t t displaystyle id circ t t nbsp t i d t displaystyle t circ id t nbsp v u t v u t displaystyle v circ u circ t v circ u circ t nbsp i d displaystyle star id nbsp if well typed u displaystyle star circ u star nbsp p 1 t u t displaystyle pi 1 circ t u t nbsp p 2 t u u displaystyle pi 2 circ t u u nbsp p 1 p 2 i d displaystyle pi 1 pi 2 id nbsp t 1 t 2 u t 1 u t 2 u displaystyle t 1 t 2 circ u t 1 circ u t 2 circ u nbsp e v a l l t p 1 p 2 t displaystyle eval circ lambda t circ pi 1 pi 2 t nbsp l e v a l i d displaystyle lambda eval id nbsp l t u l t u p 1 p 2 displaystyle lambda t circ u lambda t circ u circ pi 1 pi 2 nbsp These equations imply the following h displaystyle eta nbsp laws p 1 t p 2 t t displaystyle pi 1 circ t pi 2 circ t t nbsp l e v a l t p 1 p 2 t displaystyle lambda eval circ t circ pi 1 pi 2 t nbsp Now there exists t such that t a 1 a n b displaystyle t alpha 1 times ldots times alpha n vdash beta nbsp iff a 1 a n b displaystyle alpha 1 ldots alpha n vdash beta nbsp is provable in implicational intuitionistic logic Examples EditThanks 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 a a in Hilbert style logic Edit As an example consider a proof of the theorem a a In lambda calculus this is the type of the identity function I lx x and in combinatory logic the identity function is obtained by applying S lfgx fx gx twice to K lxy x That is I S K K As a description of a proof this says that the following steps can be used to prove a a instantiate the second axiom scheme with the formulas a b a and a to obtain a proof of a b a a a b a a a instantiate the first axiom scheme once with a and b a to obtain a proof of a b a a instantiate the first axiom scheme a second time with a and b to obtain a proof of a b a apply modus ponens twice to obtain a proof of a aIn 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 a b and the type of Q must have the form a for some a and b Therefore it is possible to detach the conclusion b via the modus ponens rule The composition combinator seen as a proof of b a g b g a in Hilbert style logic Edit As a more complicated example let s look at the theorem that corresponds to the B function The type of B is b a g b g a B is equivalent to S K S K This is our roadmap for the proof of the theorem b a g b g a The first step is to construct K S To make the antecedent of the K axiom look like the S axiom set a equal to a b g a b a g and b equal to d to avoid variable collisions K a b a K a a b g a b a g b d a b g a b a g d a b g a b a gSince the antecedent here is just S the consequent can be detached using Modus Ponens K S d a b g a b a gThis is the theorem that corresponds to the type of K S Now apply S to this expression Taking S as follows S a b g a b a g put a d b a b g and g a b a g yielding S a d b a b g g a b a g d a b g a b a g d a b g d a b a gand then detach the consequent S K S d a b g d a b a gThis is the formula for the type of S K S A special case of this theorem has d b g S K S d b g b g a b g b g a b a gThis last formula must be applied to K Specialize K again this time by replacing a with b g and b with a K a b a K a b g b a b g a b g This is the same as the antecedent of the prior formula so detaching the consequent S K S K b g a b a gSwitching the names of the variables a and g gives us b a g b g awhich was what remained to prove The normal proof of b a g b g a in natural deduction seen as a l term Edit The diagram below gives proof of b a g b g a in natural deduction and shows how it can be interpreted as the l expression la lb lg a b g of type b a g b g a a b a b g b g g b g b a b a b g b g g g g a b a b g b g g a b a a b a b g b g g b g b a b a b g b g g a b g a a b a b g b l g a b g g a a b a l b l g a b g g b g a l a l b l g a b g b a g b g aOther applications EditRecently the isomorphism has been proposed as a way to define search space partition in genetic programming 9 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 10 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 EditThe 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 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 11 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 as of 2018 update still is 12 Here type theory 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 and classical logic providing new ways to discuss the axiom of choice 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 13 References EditThis article includes a list of general references but it lacks sufficient corresponding inline citations Please help to improve this article by introducing more precise citations April 2010 Learn how and when to remove this template message The correspondence was first made explicit in Howard 1980 See for example section 4 6 p 53 Gert Smolka and Jan Schwinghammer 2007 8 Lecture Notes in Semantics The Brouwer Heyting Kolmogorov interpretation is also called the proof interpretation p 161 of Juliette Kennedy Roman Kossak eds 2011 Set Theory Arithmetic and Foundations of Mathematics Theorems Philosophies ISBN 978 1 107 00804 5 Curry 1934 Curry amp Feys 1958 Howard 1980 Moggi Eugenio 1991 Notions of Computation and Monads PDF Information and Computation 93 1 55 92 doi 10 1016 0890 5401 91 90052 4 Sorenson Morten Urzyczyn Pawel 1998 Lectures on the Curry Howard Isomorphism CiteSeerX 10 1 1 17 7385 Goldblatt 7 6 Grothendieck Topology as Intuitionistic Modality PDF Mathematical Modal Logic A Model of its Evolution pp 76 81 The lax modality referred to is from Benton Bierman de Paiva 1998 Computational types from a logical perspective Journal of Functional Programming 8 2 177 193 CiteSeerX 10 1 1 258 6004 doi 10 1017 s0956796898002998 S2CID 6149614 F Binard and A Felty Genetic programming with polymorphic types and higher order functions In Proceedings of the 10th annual conference on Genetic and evolutionary computation pages 1187 1194 2008 1 Article bat8 inria fr Archived from the original on 2013 11 17 Retrieved 2020 01 31 John c Baez and Mike Stay Physics Topology Logic and Computation A Rosetta Stone 2009 ArXiv 0903 0340 in New Structures for Physics ed Bob Coecke Lecture Notes in Physics vol 813 Springer Berlin 2011 pp 95 174 homotopy type theory Google Trends trends google com Retrieved 2018 01 26 Homotopy Type Theory Univalent Foundations of Mathematics 2013 The Univalent Foundations Program Institute for Advanced Study Seminal references Edit Curry H B 1934 09 20 Functionality in Combinatory Logic Proceedings of the National Academy of Sciences of the United States of America 20 11 584 90 Bibcode 1934PNAS 20 584C doi 10 1073 pnas 20 11 584 ISSN 0027 8424 PMC 1076489 PMID 16577644 Curry Haskell B Feys Robert 1958 Craig William ed Combinatory Logic Studies in Logic and the Foundations of Mathematics Vol 1 North Holland Publishing Company LCCN a59001593 with two sections by Craig William see paragraph 9E a href Template Cite book html title Template Cite book cite book a CS1 maint postscript link 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 Howard William A September 1980 original paper manuscript from 1969 The formulae as types notion of construction PDF in Seldin Jonathan P Hindley J Roger eds To H B Curry Essays on Combinatory Logic Lambda Calculus and Formalism Academic Press pp 479 490 ISBN 978 0 12 349050 6 Extensions of the correspondence Edit a b Pfenning Frank Davies Rowan 2001 A Judgmental Reconstruction of Modal Logic PDF Mathematical Structures in Computer Science 11 4 511 540 CiteSeerX 10 1 1 43 1611 doi 10 1017 S0960129501003322 S2CID 16467268 Davies Rowan Pfenning Frank 2001 A Modal Analysis of Staged Computation PDF Journal of the ACM 48 3 555 604 CiteSeerX 10 1 1 3 5442 doi 10 1145 382780 382785 S2CID 52148006 Griffin Timothy G 1990 The Formulae as Types Notion of Control Conf Record 17th Annual ACM Symp on Principles of Programming Languages POPL 90 San Francisco CA USA 17 19 Jan 1990 pp 47 57 doi 10 1145 96709 96714 ISBN 978 0 89791 343 0 S2CID 3005134 Parigot Michel 1992 Lambda mu calculus An algorithmic interpretation of classical natural deduction International Conference on Logic Programming and Automated Reasoning LPAR 92 Proceedings St Petersburg Russia Lecture Notes in Computer Science vol 624 Springer Verlag pp 190 201 ISBN 978 3 540 55727 2 Herbelin Hugo 1995 A Lambda Calculus Structure Isomorphic to Gentzen Style Sequent Calculus Structure in Pacholski Leszek Tiuryn Jerzy eds Computer Science Logic 8th International Workshop CSL 94 Kazimierz Poland September 25 30 1994 Selected Papers Lecture Notes in Computer Science vol 933 Springer Verlag pp 61 75 ISBN 978 3 540 60017 6 Gabbay Dov de Queiroz Ruy 1992 Extending the Curry Howard interpretation to linear relevant and other resource logics Journal of Symbolic Logic Vol 57 pp 1319 1365 doi 10 2307 2275370 JSTOR 2275370 S2CID 7159005 Full version of the paper presented at Logic Colloquium 90 Helsinki Abstract in JSL 56 3 1139 1140 1991 de Queiroz Ruy Gabbay Dov 1994 Equality in Labelled Deductive Systems and the Functional Interpretation of Propositional Equality in Dekker Paul Stokhof Martin eds Proceedings of the Ninth Amsterdam Colloquium ILLC Department of Philosophy University of Amsterdam pp 547 565 ISBN 978 90 74795 07 4 de Queiroz Ruy Gabbay Dov 1995 The Functional Interpretation of the Existential Quantifier Bulletin of the Interest Group in Pure and Applied Logics vol 3 pp 243 290 Full version of a paper presented at Logic Colloquium 91 Uppsala Abstract in JSL 58 2 753 754 1993 de Queiroz Ruy Gabbay Dov 1997 The Functional Interpretation of Modal Necessity in de Rijke Maarten ed Advances in Intensional Logic Applied Logic Series vol 7 Springer Verlag pp 61 91 ISBN 978 0 7923 4711 8 de Queiroz Ruy Gabbay Dov 1999 Labelled Natural Deduction in Ohlbach Hans Juergen Reyle Uwe eds Logic Language and Reasoning Essays in Honor of Dov Gabbay Trends in Logic vol 7 Kluwer pp 173 250 ISBN 978 0 7923 5687 5 de Oliveira Anjolina de Queiroz Ruy 1999 A Normalization Procedure for the Equational Fragment of Labelled Natural Deduction Logic Journal of the Interest Group in Pure and Applied Logics vol 7 Oxford University Press pp 173 215 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 Poernomo Iman Crossley John Wirsing Martin 2005 Adapting Proofs as Programs The Curry Howard Protocol Monographs in Computer Science Springer ISBN 978 0 387 23759 6 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 de Queiroz Ruy J G B de Oliveira Anjolina 2011 The Functional Interpretation of Direct Computations Electronic Notes in Theoretical Computer Science Elsevier 269 19 40 doi 10 1016 j entcs 2011 03 003 Full version of a paper presented at LSFA 2010 Natal Brazil Philosophical interpretations Edit de Queiroz Ruy J G B 1994 Normalisation and language games Dialectica vol 48 pp 83 123 permanent dead link Early version presented at Logic Colloquium 88 Padova Abstract in JSL 55 425 1990 de Queiroz Ruy J G B 2001 Meaning function purpose usefulness consequences interconnected concepts Logic Journal of the Interest Group in Pure and Applied Logics vol 9 pp 693 734 Early version presented at Fourteenth International Wittgenstein Symposium Centenary Celebration held in Kirchberg Wechsel August 13 20 1989 de Queiroz Ruy J G B 2008 On Reduction Rules Meaning as use and Proof theoretic Semantics Studia Logica 90 2 211 247 doi 10 1007 s11225 008 9150 5 S2CID 11321602 Synthetic papers Edit De Bruijn Nicolaas Govert 1995 On the roles of types in mathematics PDF in Groote Philippe de ed De Groote 1995 pp 27 54 the contribution of de Bruijn by himself Geuvers Herman 1995 The Calculus of Constructions and Higher Order Logic De Groote 1995 pp 139 191 contains a synthetic introduction to the Curry Howard correspondence Gallier Jean H 1995 On the Correspondence between Proofs and Lambda Terms PDF De Groote 1995 pp 55 138 contains a synthetic introduction to the Curry Howard correspondence Wadler Philip 2014 Propositions as Types PDF Communications of the ACM 58 12 75 84 doi 10 1145 2699407 S2CID 11957500Books Edit De Groote Philippe ed 1995 The Curry Howard Isomorphism Cahiers du Centre de Logique Universite catholique de Louvain vol 8 Academia Bruylant ISBN 978 2 87209 363 2 reproduces the seminal papers of Curry Feys and Howard a paper by de Bruijn and a few other papers Sorensen Morten Heine Urzyczyn Pawel 2006 1998 Lectures on the Curry Howard isomorphism Studies in Logic and the Foundations of Mathematics vol 149 Elsevier Science CiteSeerX 10 1 1 17 7385 ISBN 978 0 444 52077 7 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 Girard Jean Yves 1987 1990 Proof and Types Cambridge Tracts in Theoretical Computer Science vol 7 Translated by and with appendices by Lafont Yves and Taylor Paul Cambridge University Press ISBN 0 521 37181 3 archived from the original on 2008 04 18 notes on proof theory with a presentation of the Curry Howard correspondence Thompson Simon 1991 Type Theory and Functional Programming Addison Wesley ISBN 0 201 41667 0 Poernomo Iman Crossley John Wirsing Martin 2005 Adapting Proofs as Programs The Curry Howard Protocol Monographs in Computer Science Springer ISBN 978 0 387 23759 6 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 Binard F Felty A 2008 Genetic programming with polymorphic types and higher order functions PDF Proceedings of the 10th annual conference on Genetic and evolutionary computation Association for Computing Machinery pp 1187 94 doi 10 1145 1389095 1389330 ISBN 9781605581309 S2CID 3669630 de Queiroz Ruy J G B de Oliveira Anjolina G Gabbay Dov M 2011 The Functional Interpretation of Logical Deduction Advances in Logic vol 5 Imperial College Press World Scientific ISBN 978 981 4360 95 1 Further reading EditJohnstone P T 2002 D4 2 l Calculus and cartesian closed categories Sketches of an Elephant A Topos Theory Compendium vol 2 Clarendon Press pp 951 962 ISBN 978 0 19 851598 2 gives a categorical view of what happens in the Curry Howard correspondence External links Edit nbsp The Wikibook Haskell has a page on the topic of The Curry Howard isomorphism Howard on Curry Howard The Curry Howard Correspondence in Haskell The Monad Reader 6 Adventures in Classical Land Curry Howard in Haskell Pierce s law Retrieved from https en wikipedia org w index php title Curry Howard correspondence amp oldid 1180747217, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.