Idea

A quotient inductive-inductive type (QIIT) is a simultaneous inductive definition of multiple sorts, where later sorts may be indexed by earlier ones, and the definition may include path constructors imposing specified equalities between terms of any sort. QIITs combine inductive-inductive types and quotient inductive types.

The motivating examples are the well-typed syntax of Martin-Löf Type Theory — where contexts and types over contexts are defined simultaneously with equations governing substitution — and the Cauchy Real Numbers, where the Cauchy sequence type and its truncation are defined together.

Signature

A QIIT signature extends an IIT signature with path constructors. It consists of:

  • sort symbols for , with index types each depending only on previously defined sorts, so that the intended sort is
  • for each point constructor : a target sort , a strictly positive telescope , and a target index
  • for each path constructor : a target sort , a telescope , a target index , and two endpoint terms

This generates point constructors and path constructors

Outside a UIP setting, a set-level QIIT usually also includes truncation constructors for each sort .

Algebras

An algebra for a QIIT signature consists of:

  • for each sort , a type family
  • for each point constructor , an operation
  • for each path constructor , a proof

A morphism of -algebras from to consists of a family of maps commuting with all point and path constructors.

The section induction principle — the elimination rule for QIITs — states that for any displayed algebra over the QIIT , there exists a section. This is equivalent to initiality of the QIIT in the category of -algebras. The equivalence between initiality and the section induction principle was established in Altenkirch et al. 2016.

Examples

Well-typed syntax of type theory

The canonical example is the intrinsic syntax of Martin-Löf Type Theory. The two sorts are Point constructors include the empty context, context extension, and type formers: Substitution is added as a further family of operations, with path constructors enforcing equations such as that hold between terms of the second sort .

Cauchy reals

The Cauchy Real Numbers can be presented as a QIIT with two sorts: the type of Cauchy reals and a proof-relevant apartness or equality relation. Path constructors express Cauchy completeness and the quotient condition identifying equivalent sequences.

Relationship to QITs and IITs

QIITs strictly generalise both QITs and IITs:

  • Restricting to a single sort (, no sort indexing) recovers a QIT.
  • Removing all path constructors recovers an IIT.

The combination of the two features is non-trivial: the path constructors may now target any sort at any index, so equations can relate terms of different sorts or terms in fibres over identified base elements.

Constructability

The initial-algebra semantics for finitary QIITs was developed in Altenkirch et al. 2016 using dialgebras, extending earlier work on IITs. A general type-theoretic construction of finitary QIITs from a theory of signatures — a universe of codes for QIIT signatures together with an interpretation — was given in Kaposi et al. 2019.

Large and infinitary QIITs, where constructor arities may range over large types or infinite families, were treated in Kovács and Kaposi 2020.

Agda provides partial native support for inductive-inductive definitions. General QIITs are currently encoded via the theory of signatures rather than supported as a primitive.

References

altenkirch2016-qiit kaposi2019-constructing-qiit kovacs2020-infinitary-qiit dijkstra2017-thesis-qiit kaposi2017-qiit-codes altenkirch2021-container-model altenkirch2011-inductive-inductive-semantics