| ID | 3b6d9b94-1151-452e-996f-10be77172a22 |
|---|---|
| DeertopiaVisibility | public |
Induction principle (type theory)
In dependent type theory, the induction principle of a type defines the behaviour of its dependent pattern-matching and recursion analogously to the usual meaning of "induction principle" in mathematics.[cite:@hottbook]
Idea
Consider the typical induction principle of the natural numbers:
To show that a predicate holds for all natural numbers, one must
prove , and
prove implies for all .
The latter proof defines a "domino effect" on the natural numbers and the former knocks down the first domino: we proved , which implies , which implies , ... and so on.
In type theory, this induction principle is expressed as a dependent functionIf we were to instead define as a non-dependent function we would be left with the less powerful recursion principle.
defined by the equations
The induction principle of the naturals is just one instance of a larger idea; in type theory, every inductively-defined type has an induction principle.