natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
homotopy theory, (∞,1)-category theory, homotopy type theory
flavors: stable, equivariant, rational, p-adic, proper, geometric, cohesive, directed…
models: topological, simplicial, localic, …
see also algebraic topology
Introductions
Definitions
Paths and cylinders
Homotopy groups
Basic facts
Theorems
Higher inductive types (HITs) are a generalization of inductive types which allow the constructors to produce, not just points of the type being defined, but also elements of its iterated identity types.
While HITs are already useful in extensional type theory, they are most useful and powerful in homotopy type theory, where they allow the construction of cell complexes, homotopy colimits, truncations, localizations, and many other objects from classical homotopy theory.
Defining what a HIT is “in general” is an open research problem. One mostly precise proposal may be found in [Shulman & Lumsdaine (2016)]. A more syntactic description of a class of HITs may be found in [Brunerie (2016), Vezzosi, Mörtberg & Abel (2019)]. A solution to this problem should determine how to define the concept of an elementary (∞,1)-topos.
All higher inductive types described below are given together with some pseudo-Coq code, which would implement that HIT if Coq supported HITs natively.
The circle type is:
Inductive circle : Type :=
| base : circle
| loop : base == base.
Using the univalence axiom, one can prove that the loop space base == base
of the circle type is equivalent to the integers.
(Licata & Shulman 13, Bezem, Buchholtz, Grayson & Shulman 19).
The homotopy type of the interval can be encoded as
Inductive interval : Type :=
| zero : interval
| one : interval
| segment : zero == one.
See interval type. The interval can be proven to be contractible. On the other hand, if the constructors zero
and one
satisfy their elimination rules definitionally, then the existence of an interval type implies function extensionality; see this blog post. The interval can be defined as the -1-truncation of the booleans; see here:
Inductive interval : Type :=
| inj : boolean -> interval
| contr0 : forall (p q : interval) p == q
Or more directly:
Inductive interval : Type :=
| zero : interval
| one : interval
| contr0 : forall (p q : interval) p == q
Similarly the homotopy type of the 2-dimensional sphere
Inductive sphere2 : Type :=
| base2 : sphere2
| surf2 : idpath base2 == idpath base2.
Inductive susp (X : Type) : Type :=
| north : susp X
| south : susp X
| merid : X -> north == south.
This is the unpointed suspension. It is also possible to define the pointed suspension. Using either one, we can define the $n$-sphere by induction on $n$, since $S^{n+1}$ is the suspension of $S^n$.
The construction of mapping cylinders is given by
Inductive cyl {X Y : Type} (f : X -> Y) : Y -> Type :=
| cyl_base : forall y:Y, cyl f y
| cyl_top : forall x:X, cyl f (f x)
| cyl_seg : forall x:X, cyl_top x == cyl_base (f x).
Using this construction, one can define a (cofibration, trivial fibration) weak factorization system for types.
Inductive is_inhab (A : Type) : Type :=
| inhab : A -> is_inhab A
| inhab_path : forall (x y: is_inhab A), x == y.
This is the (-1)-truncation into h-propositions. One can prove that is_inhab A
is always a proposition (i.e. $(-1)$-truncated) and that it is the reflection of $A$ into propositions. More generally, one can construct the (effective epi, mono) factorization system by applying is_inhab
fiberwise to a fibration.
Similarly, we have the 0-truncation into h-sets:
Inductive pi0 (X:Type) : Type :=
| cpnt : X -> pi0 X
| pi0_axiomK : forall (l : Circle -> pi0 X), refl (l base) == map l loop.
We can similarly define $n$-truncation for any $n$, and we should be able to define it inductively for all $n$ at once as well.
See at n-truncation modality.
The quotient of a pure or Type-valued equivalence relation:
Inductive quotient (A : Type) (R : A -> A -> Type) : Type :=
| proj : A -> quotient A R
| relate : forall (x y : A), R x y -> proj x == proj y
This definition is translated into Coq from the Cubical Agda library.
The disjunction of two types $A$ and $B$, yielding an hProp:
Inductive disjunction (A B:Type) : Type :=
| inl : A -> disjunction A B
| inr : B -> disjunction A B.
| contr0 : forall (p q : disjunction A B) p == q
The existential quantifier of a type $A$ and a type family $B:A \to Type$, yielding an hProp:
Inductive existquant (A:Type) (B:A->Type) : Type :=
| exist : forall (x:A), B x -> existquant A B
| contr0 : forall (p q : existquant A B) p == q
The quotient of an hProp-value equivalence relation, yielding an hSet (a 0-truncated type):
Inductive quotient (A : Type) (R : A -> A -> hProp) : Type :=
| proj : A -> quotient A R
| relate : forall (x y : A), R x y -> proj x == proj y
| contr1 : forall (x y : quotient A R) (p q : x == y), p == q.
This is already interesting in extensional type theory, where quotient types are not always included. For more general homotopical quotients of “internal groupoids” as in the (∞,1)-Giraud theorem, we first need a good definition of what such an internal groupoid is.
A quotient inductive type is a higher inductive type that includes a “0-truncation” constructor such as contr1
for a set-quotient. Many of these are useful in set-based mathematics; in addition to colimits in Set, they can be used to construct free algebras and colimits of algebras of various sorts. Quotient inductive-inductive types are used to construct sets with propositional relations and various countable completions of structures. Examples can be found at quotient inductive type, including:
Since FinSet is the initial 2-rig, one should be able to construct it as a higher inductive type with a 1-truncation constructor.
A definition of the set of integers as a higher inductive type.
Inductive int : Type :=
| zero : int
| succ : int -> int
| pred1 : int -> int
| pred2 : int -> int
| sec : forall (x : int) pred1 succ x == x
| ret : forall (x : int) succ pred2 x == x
See (Lumsdaine-Shulman17).
higher inductive type, initial algebra of a presentable ∞-monad
Textbook account:
Expositions:
Mike Shulman, Homotopy type theory IV (blog entry)
Peter LeFanu Lumsdaine, Higher inductive types, a tour of the menagerie (2011) [blog post]
Peter LeFanu Lumsdaine, Higher Inductive Types: The circle and friends, axiomatically (2011) [pdf, pdf]
Kajetan Söhnen, Higher Inductive Types in Homotopy Type Theory, Munich (2018) [pdf, pdf]
Details on the categorical semantics of HITs:
with precursors in
Mike Shulman, Peter LeFanu Lumsdaine, Semantics of higher inductive types (2012) [pdf]
Mike Shulman, Peter LeFanu Lumsdaine, Semantics and syntax of higher inductive types (2016) [slides]
Discussion of HITs which arise as homotopy-initial algebras of an endofunctor:
Kristina Sojakova, Higher Inductive Types as Homotopy-Initial Algebras, ACM SIGPLAN Notices 50 1 (2015) 31–42 [arXiv:1402.0761, doi:10.1145/2775051.2676983]
Steve Awodey, Nicola Gambino, Kristina Sojakova, Homotopy-initial algebras in type theory, Journal of the ACM 63 6 (2017) 1–45 [arXiv:1504.05531, doi:10.1145/3006383]
Further developments:
Henning Basold, Herman Geuvers, Niels van der Weide, Higher Inductive Types in Programming, Journal of Universal Computer Science 23 1 (2017) 63-88 [pdf, slides pdf]
Floris van Doorn, §3 in: On the Formalization of Higher Inductive Types and Synthetic Homotopy Theory (2018) [arXiv:1808.10690]
(formalization in Lean)
Niccolò Veltri, Niels van der Weide, Constructing Higher Inductive Types as Groupoid Quotients, Logical Methods in Computer Science 17 2 (2021) [arXiv:2002.08150, doi:10.23638/LMCS-17(2:8)2021]
Implementation of HITs in proof assistants:
in Agda:
Guillaume Brunerie, Implementation of higher inductive types in HoTT-Agda (2016) [github]
(deprecated)
in Cubical Agda:
Andrea Vezzosi, Anders Mörtberg, Andreas Abel, §4 in: Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types, Proceedings of the ACM on Programming Languages 3 ICFP 87 (2019) 1–29 [doi:10.1145/3341691, pdf]
in Coq:
in Lean: van Doorn (2018)
Discussion of coinduction via HITs:
Discussion of impredicative encodings of higher inductive types:
Last revised on February 10, 2024 at 22:34:20. See the history of this page for a list of all contributions to it.