Curry–Howard correspondence
Statement
Let be a propositional formula built from atoms, , and , and let be the simple type obtained by translating atoms to base types, to product , and to function type . Then is provable in intuitionistic propositional logic if and only if is inhabited: there is a closed term with .
Why is it true?
This is the precise statement behind "a proof assistant is just a type-checker": Coq, Agda, and Lean accept a machine-checked proof of a theorem exactly when they accept a term of the corresponding type, and type-checking (unlike theorem-proving in general) is a small, fast, mechanical, and highly trustworthy algorithm.
Proof sketch
(Proofs become programs.) By induction on a natural-deduction derivation of . If the last rule is -introduction, deriving from a subproof of under hypothesis : by the induction hypothesis that subproof translates to a term with (the hypothesis becomes a free variable ); then is closed and has type . If the last rule is -elimination (modus ponens) from and : by the induction hypothesis we have terms and ; then . The -introduction and -elimination rules translate symmetrically to pairing and the two projections. Every rule of the proof system has a matching term-building rule, so induction on the derivation produces a well-typed closed term of type .
(Programs become proofs.) Conversely, by induction on a typing derivation . Each typing rule — variable, abstraction, application, pairing, projection — has exactly the same tree shape as a natural-deduction rule — hypothesis, -introduction, -elimination, -introduction, -elimination. So take the same derivation tree, erase all the terms, and read each type as the formula it translates from: this is precisely a valid intuitionistic proof of (where ).
Since the two translations (proof term, and term proof) are structural inverses of each other on derivation trees — each one undoes exactly what the other does, rule by rule — is provable exactly when is inhabited.
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- The Univalent Foundations Program (2013). Homotopy Type Theory: Univalent Foundations of Mathematics
- Wikipedia contributors (2024). Curry–Howard correspondence
- Wikipedia contributors (2024). Intuitionistic type theory