Contents

# Contents

## Idea

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 (ShulmanLumsdaine16). A more syntactic description of a class of HITs may be found in (Brunerie16). A solution to this problem should determine how to define the concept of an elementary (∞,1)-topos.

## Examples

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

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.

### The interval

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

### The 2-sphere

Similarly the homotopy type of the 2-dimensional sphere

Inductive sphere2 : Type :=
| base2 : sphere2
| surf2 : idpath base2 == idpath base2.

### Suspension

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$.

### Mapping cylinders

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.

### Truncation

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.

### Quotients of types

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.

### Disjunctions

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

### Existential quantifiers

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

### Quotients of sets

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.

### Quotient inductive types

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:

### FinSet

Since FinSet is the initial 2-rig, one should be able to construct it as a higher inductive type with a 1-truncation constructor.

### Integers

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

## Semantics

See (Lumsdaine-Shulman17).

## References

Expositions include

Details of the semantics are in

with precursors in

Discussion of a subset of the HITs is in:

Implementation in Agda/Coq is discussed in

• Guillaume Brunerie, Implementation of higher inductive types in HoTT-Agda, 2016, github

• Bruno Barras, Native implementation of Higher Inductive Types (HITs) in Coq PDF

Last revised on June 9, 2022 at 01:54:29. See the history of this page for a list of all contributions to it.