A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Curry-Howard Correspondence

Research Depth 93 in the knowledge graph ☐ I know this ☆ Set as goal
7topics build on this
512prerequisites beneath it
See this on the map →
Introduction to Propositional LogicType Systems Overview+1 more→→Dependent Type TheoryInteractive Theorem Proving+1 more
propositions-as-types proofs-as-programs isomorphism constructive-logic

Core Idea

The Curry-Howard correspondence is a deep isomorphism between logic and computation: propositions correspond to types, proofs correspond to programs, and proof normalization corresponds to program evaluation. An implication A -> B is a function type; a proof of A -> B is a function that takes a proof of A and produces a proof of B. A conjunction A AND B is a product type (pair); a disjunction A OR B is a sum type (tagged union). Under this correspondence, type-checking IS proof-checking — a well-typed program is simultaneously a valid proof. This insight unifies logic, type theory, and programming language theory into a single framework.

Explainer

The Curry-Howard correspondence, discovered independently by Haskell Curry (1930s-1950s) and William Howard (1969), reveals that two seemingly different intellectual traditions — mathematical logic and the theory of computation — are actually the same thing viewed from different perspectives. The correspondence is not a loose analogy but a precise, structural isomorphism: every concept in one domain has an exact counterpart in the other.

The basic dictionary is this: propositions are types, proofs are programs, and proof simplification is computation. The logical connective "A implies B" corresponds to the function type A -> B. A proof of "A implies B" is a function that takes a proof of A and returns a proof of B. The connective "A and B" corresponds to the product type (A, B) — a pair. A proof of a conjunction is a pair of proofs, one for each conjunct. "A or B" corresponds to the sum type A + B (a tagged union). A proof of a disjunction provides one of the two proofs, tagged with which disjunct it proves. "False" corresponds to the empty type (no inhabitants). "True" corresponds to the unit type (one trivial inhabitant).

This correspondence is constructive: it aligns with intuitionistic (constructive) logic, not classical logic. In constructive logic, proving "A or B" requires actually producing a proof of A or a proof of B — you cannot just argue by contradiction. Under Curry-Howard, this makes sense: constructing a value of type A + B requires producing either a Left(a) or a Right(b). The classical law of excluded middle (A or not A) would require a program that, for any type A, either produces a value of A or a function A -> Void — which is not computable in general. Classical reasoning can be added to the correspondence (it corresponds to control operators like call/cc), but the natural alignment is with constructive logic.

The correspondence extends to quantifiers via dependent types. The universal quantifier "for all x : A, B(x)" corresponds to a dependent function type (x : A) -> B(x): a function that takes an x of type A and produces a value of type B(x), where the output type depends on the input value. The existential quantifier "there exists x : A such that B(x)" corresponds to a dependent pair type (x : A, B(x)): a pair of a witness x and a proof that B(x) holds. This extension takes Curry-Howard from propositional logic to full predicate logic and is the foundation of dependent type theory and proof assistants like Coq, Lean, and Agda.

The practical import is profound. Proof assistants implement the correspondence directly: you prove theorems by writing programs in a dependently-typed language, and type-checking IS proof-checking. When Coq accepts a term of a given type, it has mechanically verified that the corresponding proposition is true. The correspondence also explains why termination matters: a non-terminating program of type A would "prove" A regardless of whether A is actually true, collapsing the logic into inconsistency. This is why proof assistants restrict to total (terminating) functions, ensuring that every type inhabitant is a genuine proof.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Context-Free Grammar Properties and Ambiguity → Parse Trees, Derivations, and Ambiguity in CFGs → Context-Free Grammars in Compiler Design → Abstract Syntax Trees (ASTs) → Symbol Tables and Scope Resolution → Semantic Analysis Phase → Type Systems Overview → Curry-Howard Correspondence

Longest path: 94 steps · 512 total prerequisite topics

Prerequisites (3)

Leads To (3)