Curry–Howard correspondence

Proofs are programs, types are propositions

Image: Raphael, Public domain, via Wikimedia Commons

Curry–Howard correspondence

Proofs are programs, types are propositions

The Curry-Howard correspondence establishes a direct relationship between computer programs and mathematical proofs. This means that writing a computer program is akin to constructing a mathematical proof, and conversely, proving a theorem is like writing a computer program. This correspondence provides a framework for understanding how logical deductions and computational processes are fundamentally connected.

Example

Consider a simple function in Haskell, such as `id :: a -> a`, which returns its input. This function can be seen as a proof of the proposition that for any type `a`, applying `id` to `a` yields `a`. In this case, the Haskell function `id` serves as the "program" that corresponds to the "proof" of the proposition.

Understanding the Curry-Howard correspondence is crucial for fields like programming language theory and proof theory, as it bridges the gap between logical reasoning and computational execution.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews