Keyboard Navigation
W
A
S
D
or arrow keys · M for map · Q to exit
← Back to exhibits
Architecture & DesignAxiomAXM-009

Formal Logic & Type Theory — Proofs as Programs, Types as Theorems

The Curry-Howard correspondence says every type annotation is a mathematical proof. Every type error is a theorem violation.

Timeless · Mathematics · 15 min read

In 1934, Haskell Curry noticed something strange: the types of combinators in combinatory logic corresponded exactly to axioms in propositional logic. In 1969, William Alvin Howard proved this was not a coincidence — it was an isomorphism. Programs and proofs are the same thing. Types and propositions are the same thing. A well-typed program is a constructive proof that the proposition (expressed by its type) is true. A type error is a failed proof — a theorem that the program claims but cannot demonstrate.

This is the Curry-Howard correspondence, and it is the deepest result in the philosophy of programming. It means that the TypeScript compiler is a theorem prover. It means that Rust's borrow checker is a linear logic engine. It means that every time you write function add(a: number, b: number): number, you are stating a theorem: "there exists a computation that, given two numbers, produces a number." The compiler verifies your proof. If it fails, your theorem is wrong.

The flaw this axiom exposes: most software is written in languages that cannot state theorems, or that allow programmers to lie about their theorems, or that have escape hatches (any, void*, Object) that make every theorem trivially true — and therefore meaningless. The history of programming language design is the history of slowly, painfully rediscovering that Curry and Howard were right: more precise types mean more correct programs, because more precise types are stronger theorems.

Archaeologist's Note

This pattern has been found in applications built by talented developers at respected organizations across every decade of software history. Its presence in a codebase is not a reflection of the developer who wrote it — it is a reflection of what that developer was taught, what tools they had, and the path that was easiest given what they were taught. The goal is not to find fault. The goal is to find the pattern — before it finds you.

Katie's Law: The developers were not wrong. The shortcut was not wrong. The context changed and the shortcut didn't.

The AbstractionsFormal Logic & Type Theory5 / 5
Previous ExhibitMuseum Map