Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Curry–Howard correspondence

From Wikipedia, the free encyclopedia
Relationship between programs and proofs
A proof written as a functional program
plus_comm=funnm:nat=>nat_ind(funn0:nat=>n0+m=m+n0)(plus_n_0m)(fun(y:nat)(H:y+m=m+y)=>eq_ind(S(m+y))(funn0:nat=>S(y+m)=n0)(f_equalSH)(m+Sy)(plus_n_Smmy))n:forallnm:nat,n+m=m+n
A proof of commutativity of addition on natural numbers in the proof assistantRocq (previously known asCoq).nat_ind stands formathematical induction,eq_ind for substitution of equals, andf_equal for taking the same function on both sides of the equality. Earlier theorems are referenced showingm=m+0{\displaystyle m=m+0} andS(m+y)=m+Sy{\displaystyle S(m+y)=m+Sy}.

Inprogramming language theory andproof theory, theCurry–Howard correspondence is the direct relationship betweencomputer programs andmathematical proofs. It is also known as theCurry–Howard isomorphism orequivalence, or theproofs-as-programs andpropositions- orformulae-as-types interpretation.

It is a generalization of a syntacticanalogy between systems of formal logic and computational calculi that was first discovered by the AmericanmathematicianHaskell Curry and thelogicianWilliam 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 ofintuitionistic logic given in various formulations byL. E. J. Brouwer,Arend Heyting andAndrey Kolmogorov (seeBrouwer–Heyting–Kolmogorov interpretation)[2] andStephen Kleene (seeRealizability). The relationship has been extended to includecategory theory as the three-wayCurry–Howard–Lambek correspondence.[3][4][5]

Origin, scope, and consequences

[edit]

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

  1. In 1934Curry observes that thetypes of the combinators could be seen asaxiom-schemes forintuitionistic implicational logic.[6]
  2. In 1958 he observes that a certain kind ofproof system, referred to asHilbert-style deduction systems, coincides on some fragment with the typed fragment of a standardmodel of computation known ascombinatory logic.[7]
  3. In 1969Howard observes that another, more "high-level"proof system, referred to asnatural deduction, can be directly interpreted in itsintuitionistic version as a typed variant of themodel of computation known aslambda calculus.[8]

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 ananalogy that states that thereturn 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 oflogic programming on a rigorous foundation:proofs can be represented as programs, and especially as lambda terms, orproofs can berun.

The correspondence has been the starting point of a large range of new research after its discovery, leading to a new class offormal systems designed to act both as aproof system and as a typedprogramming language based onfunctional programming. This includesMartin-Löf'sintuitionistic type theory andCoquand'scalculus of constructions (CoC), 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 moderntype theory.

Suchtyped lambda calculi derived from the Curry–Howard paradigm led to software like Rocq in which proofs seen as programs can be formalized, checked, and run.

A converse direction is touse a program to extract a proof, given itscorrectness—an area of research closely related toproof-carrying code. This is only feasible if theprogramming 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 thecontinuation of programs and the symmetry ofsequent calculus to express the duality between the twoevaluation strategies known as call-by-name and call-by-value.

Because of the possibility of writing non-terminating programs,Turing-complete models of computation (such as languages with arbitraryrecursive 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 usingmonads to segregate provably terminating from potentially non-terminating code (an approach that also generalizes to much richer models of computation,[9] and is itself related to modal logic by a natural extension of the Curry–Howard isomorphism[10]). A more radical approach, advocated bytotal functional programming, is to eliminate unrestricted recursion (and forgoTuring completeness, although still retaining high computational complexity), using more controlledcorecursion wherever non-terminating behavior is actually desired.

General formulation

[edit]

In its more general formulation, the Curry–Howard correspondence is a correspondence between formalproof calculi andtype systems formodels of computation. In particular, it splits into two correspondences. One at the level offormulas andtypes that is independent of which particular proof system or model of computation is considered, and one at the level ofproofs andprograms 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 a unit type (whose sole member is the null object). Quantifiers correspond todependent function space or products (as appropriate). This is summarized in the following table:

Logic sideProgramming side
formulatype
proofterm
formula is truetype has an element
formula is falsetype does not have an element
logical constant ⊤ (truth)unit type
logical constant ⊥ (falsehood)empty type
implicationfunction type
conjunctionproduct type
disjunctionsum type
universal quantificationdependent product type
existential quantificationdependent sum type

At the level of proof systems and models of computations, the correspondence mainly shows the identity of structure, first, between some particular formulations of systems known asHilbert-style deduction system andcombinatory logic, and, secondly, between some particular formulations of systems known asnatural deduction andlambda calculus.

Logic sideProgramming side
Hilbert-style deduction systemtype system forcombinatory logic
natural deductiontype system forlambda calculus

Between the natural deduction system and the lambda calculus there are the following correspondences:

Logic sideProgramming side
hypothesesfree variables
implication elimination (modus ponens)application
implication introductionabstraction

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 ofcombinatory logic surprisingly corresponded to the respectiveaxiom schemesα → (βα) and (α → (βγ)) → ((αβ) → (αγ)) used inHilbert-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 givenbelow.

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 δ isderivable 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 ofmodus ponens)

This can be formalized usinginference 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 tointuitionistic logic means that someclassicaltautologies, such asPeirce's law ((αβ) →α) →α, are excluded from the correspondence.

Hilbert-style intuitionistic implicational logicTyped combinatory logic
αΓΓαAssum{\displaystyle {\frac {\alpha \in \Gamma }{\Gamma \vdash \alpha }}\qquad \qquad {\text{Assum}}}x:αΓΓx:α{\displaystyle {\frac {x:\alpha \in \Gamma }{\Gamma \vdash x:\alpha }}}
Γα(βα)AxK{\displaystyle {\frac {}{\Gamma \vdash \alpha \rightarrow (\beta \rightarrow \alpha )}}\qquad {\text{Ax}}_{K}}ΓK:α(βα){\displaystyle {\frac {}{\Gamma \vdash K:\alpha \rightarrow (\beta \rightarrow \alpha )}}}
Γ(α(βγ))((αβ)(αγ))AxS{\displaystyle {\frac {}{\Gamma \vdash (\alpha \!\rightarrow \!(\beta \!\rightarrow \!\gamma ))\!\rightarrow \!((\alpha \!\rightarrow \!\beta )\!\rightarrow \!(\alpha \!\rightarrow \!\gamma ))}}\;{\text{Ax}}_{S}}ΓS:(α(βγ))((αβ)(αγ)){\displaystyle {\frac {}{\Gamma \vdash S:(\alpha \!\rightarrow \!(\beta \!\rightarrow \!\gamma ))\!\rightarrow \!((\alpha \!\rightarrow \!\beta )\!\rightarrow \!(\alpha \!\rightarrow \!\gamma ))}}}
ΓαβΓαΓβModus Ponens{\displaystyle {\frac {\Gamma \vdash \alpha \rightarrow \beta \qquad \Gamma \vdash \alpha }{\Gamma \vdash \beta }}\quad {\text{Modus Ponens}}}ΓE1:αβΓE2:αΓE1E2:β{\displaystyle {\frac {\Gamma \vdash E_{1}:\alpha \rightarrow \beta \qquad \Gamma \vdash E_{2}:\alpha }{\Gamma \vdash E_{1}\;E_{2}:\beta }}}

Seen at a more abstract level, the correspondence can be restated as shown in the following table. Especially, thededuction theorem specific to Hilbert-style logic matches the process ofabstraction elimination of combinatory logic.

Logic sideProgramming side
assumptionvariable
axiom schemescombinators
modus ponensapplication
deduction theoremabstraction elimination

Thanks to the correspondence, results from combinatory logic can be transferred to Hilbert-style logic and vice versa. For instance, the notion ofreduction 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 ofPeirce'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 combinatorX constitutes aone-point basis of (extensional) combinatory logic implies that the single axiom scheme

(((α → (βγ)) → ((αβ) → (αγ))) → ((δ → (εδ)) →ζ)) →ζ,

which is theprincipal type ofX, is an adequate replacement to the combination of the axiom schemes

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

Intuitionistic natural deduction and typed lambda calculus

[edit]

AfterCurry emphasized the syntactic correspondence between intuitionisticHilbert-style deduction and typedcombinatory logic,Howard made explicit in 1969 a syntactic analogy between the programs ofsimply typed lambda calculus and the proofs ofnatural deduction. Below, the left-hand side formalizes intuitionistic implicational natural deduction as a calculus ofsequents (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 oflambda 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 deductionLambda calculus type assignment rules
Γ1,α,Γ2αAx{\displaystyle {\frac {}{\Gamma _{1},\alpha ,\Gamma _{2}\vdash \alpha }}{\text{Ax}}}Γ1,x:α,Γ2x:α{\displaystyle {\frac {}{\Gamma _{1},x:\alpha ,\Gamma _{2}\vdash x:\alpha }}}
Γ,αβΓαβI{\displaystyle {\frac {\Gamma ,\alpha \vdash \beta }{\Gamma \vdash \alpha \rightarrow \beta }}\rightarrow I}Γ,x:αt:βΓ(λx:α. t):αβ{\displaystyle {\frac {\Gamma ,x:\alpha \vdash t:\beta }{\Gamma \vdash (\lambda x\!:\!\alpha .~t):\alpha \rightarrow \beta }}}
ΓαβΓαΓβE{\displaystyle {\frac {\Gamma \vdash \alpha \rightarrow \beta \qquad \Gamma \vdash \alpha }{\Gamma \vdash \beta }}\rightarrow E}Γt:αβΓu:αΓtu:β{\displaystyle {\frac {\Gamma \vdash t:\alpha \rightarrow \beta \qquad \Gamma \vdash u:\alpha }{\Gamma \vdash t\;u:\beta }}}

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 tofunction 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 givenbelow.

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 inlambda calculus matchesPrawitz's notion of normal deduction innatural deduction, from which it follows that the algorithms for thetype inhabitation problem can be turned into algorithms for decidingintuitionistic provability.

Logic sideProgramming side
axiom/hypothesisvariable
introduction ruleconstructor
elimination ruledestructor
normal deductionnormal form
normalisation of deductionsweak normalisation
provabilitytype inhabitation problem
intuitionistic tautologyuniversally inhabited type

Howard's correspondence naturally extends to other extensions ofnatural deduction andsimply typed lambda calculus. Here is a non-exhaustive list:

Classical logic and control operators

[edit]

At the time of Curry, and also at the time of Howard, the proofs-as-programs correspondence concerned onlyintuitionistic logic, i.e. a logic in which, in particular,Peirce's law wasnot deducible. The extension of the correspondence to Peirce's law and hence toclassical 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 thedouble-negation translation used to map classical proofs to intuitionistic logic and thecontinuation-passing-style translation used to map lambda terms involving control to pure lambda terms. More particularly, call-by-name continuation-passing-style translations relates toKolmogorov's double negation translation and call-by-value continuation-passing-style translations relates to a kind of double-negation translation due to Kuroda.

Logic sideProgramming side
Peirce's law: ((αβ) →α) →αcall-with-current-continuation
double-negation translationcontinuation-passing-style translation

A finer Curry–Howard correspondence exists for classical logic if one defines classical logic not by adding an axiom such asPeirce'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 asGentzen'ssequent 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 someabstract machines. The informal correspondence is as follows:

Logic sideProgramming side
cut eliminationreduction in a form of abstract machine
right introduction rulesconstructors of code
left introduction rulesconstructors of evaluation stacks
priority to right-hand side in cut-eliminationcall-by-name reduction
priority to left-hand side in cut-eliminationcall-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 checkerAutomath, 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.[14] Some researchers tend to use the term Curry–Howard–de Bruijn correspondence in place of Curry–Howard correspondence.

BHK interpretation

[edit]

TheBHK 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 theBHK interpretation tells the same as Howard's correspondence between natural deduction and lambda calculus.

Realizability

[edit]

Kleene's recursiverealizability splits proofs of intuitionistic arithmetic into the pair of a recursive function and ofa 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 thesimply 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'sdialectica 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 typedcombinatory logic share a common equational theory, the theory ofcartesian 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. Under this correspondence, objects of a cartesian-closed category can be interpreted as propositions (types), and morphisms as deductions mapping a set of assumptions (typing context) to a valid consequent (well-typed term).[15]

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 (propositions/types) include

Morphisms (deductions/terms) include

Equivalently to the annotations above, well-defined morphisms (typed terms) in any cartesian-closed category can be constructed according to the followingtyping rules. The usual categorical morphism notationf:αβ{\displaystyle f:\alpha \to \beta } is replaced withtyping context notationαf:β{\displaystyle \alpha \vdash f:\beta }.

Identity:

αid:α{\displaystyle {\frac {}{\alpha \vdash {\text{id}}:\alpha }}}

Composition:

αt:ββu:γαut:γ{\displaystyle {\frac {\alpha \vdash t:\beta \qquad \beta \vdash u:\gamma }{\alpha \vdash u\circ t:\gamma }}}

Unit type (terminal object):

α:{\displaystyle {\frac {}{\alpha \vdash \star :\top }}}

Cartesian product:

αt:βαu:γα(t,u):β×γ{\displaystyle {\frac {\alpha \vdash t:\beta \qquad \alpha \vdash u:\gamma }{\alpha \vdash (t,u):\beta \times \gamma }}}

Left and right projection:

α×β  π1:αα×β  π2:β{\displaystyle {\frac {}{\alpha \times \beta ~\vdash ~\pi _{1}:\alpha }}\qquad {\frac {}{\alpha \times \beta ~\vdash ~\pi _{2}:\beta }}}

Currying:

α×β  t:γαλt:βγ{\displaystyle {\frac {\alpha \times \beta ~\vdash ~t:\gamma }{\alpha \vdash \lambda t:\beta \to \gamma }}}

Application:

(αβ)×αeval:β{\displaystyle {\frac {}{(\alpha \rightarrow \beta )\times \alpha \vdash {\text{eval}}:\beta }}}

Finally, the equations of the category are

These equations imply the followingη{\displaystyle \eta }-laws:

Now, there existst such thatα1××αnt:β{\displaystyle \alpha _{1}\times \ldots \times \alpha _{n}\vdash t:\beta } iffα1,,αnβ{\displaystyle \alpha _{1},\ldots ,\alpha _{n}\vdash \beta } 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αα. Inlambda calculus, this is the type of the identity functionI =λx.x and in combinatory logic, the identity function is obtained by applyingS =λfgx.fx(gx) twice toK =λxy.x. That is,I = ((SK)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 (PQ), these steps should be followed:

  1. First prove theorems corresponding to the types ofP andQ.
  2. SinceP is being applied toQ, the type ofP must have the formαβ and the type ofQ 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 theB function. The type ofB is(βα) → (γβ) →γα.B is equivalent to (S (KS)K). This is our roadmap for the proof of the theorem(βα) → (γβ) →γα.

The first step is to construct (KS). To make the antecedent of theK axiom look like theS axiom, setα equal to(αβγ) → (αβ) →αγ, andβ equal toδ (to avoid variable collisions):

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

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

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

This is the theorem that corresponds to the type of (KS). Now applyS to this expression. TakingS as follows

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

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

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

and then detach the consequent:

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

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

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

This last formula must be applied toK. SpecializeK 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 (bg)) 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 ingenetic programming.[16] 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 byINRIA research director Bernard Lang,[17] 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 byclosed monoidal categories. Theinternal language of these categories is thelinear type system (corresponding tolinear logic), which generalizes simply-typed lambda calculus as the internal language of cartesian closed categories. Moreover, these can be shown to correspond tocobordisms,[18] which play a vital role instring theory.

An extended set of equivalences is also explored inhomotopy type theory. Here,type theory is extended by theunivalence axiom ("equivalence is equivalent to equality") which permits homotopy type theory to be used as a foundation for all of mathematics (includingset theory and classical logic, providing new ways to discuss theaxiom of choice and many other things). That is, the Curry–Howard correspondence that proofs are elements of inhabited types is generalized to the notion ofhomotopic equivalence of proofs (as paths in space, theidentity type orequality type of type theory being interpreted as a path).[19]

References

[edit]
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(April 2010) (Learn how and when to remove this message)
  1. ^The correspondence was first made explicit inHoward 1980. See, for example section 4.6, p.53Gert Smolka and Jan Schwinghammer (2007-8), Lecture Notes in Semantics
  2. ^The Brouwer–Heyting–Kolmogorov interpretation is also called the 'proof interpretation':Kennedy & Kossak 2011, p. 161
  3. ^Casadio & Scott 2021, p. 184.
  4. ^Coecke & Kissinger 2017, p. 82.
  5. ^"Computational trilogy".nLab. RetrievedOctober 29, 2023.
  6. ^Curry 1934.
  7. ^Curry & Feys 1958.
  8. ^Howard 1980.
  9. ^Moggi 1991.
  10. ^abPfenning & Davies 2001.
  11. ^Davies & Pfenning 2001.
  12. ^Sørensen & Urzyczyn 2006.
  13. ^Goldblatt 2006. The "lax" modality referred to is fromBenton, Bierman & de Paiva 1998
  14. ^Sørensen & Urzyczyn 2006, pp. 98–99.
  15. ^Lambek & Scott 1989.
  16. ^Binard & Felty 2008.
  17. ^"Article".bat8.inria.fr. Archived fromthe original on 2013-11-17. Retrieved2020-01-31.
  18. ^Baez & Stay 2011.
  19. ^Homotopy Type Theory: Univalent Foundations of Mathematics. (2013) The Univalent Foundations Program.Institute for Advanced Study.

Seminal references

[edit]

Extensions of the correspondence

[edit]

Philosophical interpretations

[edit]

Synthetic papers

[edit]

Books

[edit]

Further reading

[edit]

External links

[edit]
The WikibookHaskell has a page on the topic of:The Curry–Howard isomorphism
Namesakes:mathematics,
computer programming
Programming languages
National
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Curry–Howard_correspondence&oldid=1309962004"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp