Advertisement

Quotient Inductive-Inductive Types

  • Thorsten Altenkirch
  • Paolo Capriotti
  • Gabe Dijkstra
  • Nicolai Kraus
  • Fredrik Nordvall Forsberg
Open Access
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10803)

Abstract

Higher inductive types (HITs) in Homotopy Type Theory allow the definition of datatypes which have constructors for equalities over the defined type. HITs generalise quotient types, and allow to define types with non-trivial higher equality types, such as spheres, suspensions and the torus. However, there are also interesting uses of HITs to define types satisfying uniqueness of equality proofs, such as the Cauchy reals, the partiality monad, and the well-typed syntax of type theory. In each of these examples we define several types that depend on each other mutually, i.e. they are inductive-inductive definitions. We call those HITs quotient inductive-inductive types (QIITs). Although there has been recent progress on a general theory of HITs, there is not yet a theoretical foundation for the combination of equality constructors and induction-induction, despite many interesting applications. In the present paper we present a first step towards a semantic definition of QIITs. In particular, we give an initial-algebra semantics. We further derive a section induction principle, stating that every algebra morphism into the algebra in question has a section, which is close to the intuitively expected elimination rules.

1 Introduction

This paper is about type theory in the sense of Martin-Löf [29], a theory which proof assistants such as Coq [7] and Lean [14] as well as programming languages such as Agda [31] and Idris [8] are based on. Recently, Homotopy type theory (HoTT) [34] has been introduced inspired by homotopy theoretic interpretations of type theory by Awodey and Warren [5] and Voevodsky [25, 36].

A central concept in type theory is the concept of inductive definitions, which allows us to define inductive datatypes like the natural numbers, lists and trees just by presenting constructors with strictly positive occurrences of the inductive type being defined. Using the propositions as types explanation, we can use the same mechanism to inductively define predicates and relations, like an order on the natural numbers, or the derivability predicate for a logic defined by rules. Conceptually, HoTT changes what we mean by an inductive definition, because we view a type not only as given by its elements (points) but also by its equality proofs (paths). Hence an inductive definition may not only feature constructors for elements but also for equalities. This concept of higher inductive types (HITs) has been used to represent the homotopical structure of geometric objects, like circles, spheres and tori, and gives rise to synthetic homotopy theory in HoTT [32].

However, as already noted in the HoTT Book [34], HITs have also more quotidian applications, such as a definition of the Cauchy reals for which the use of the axiom of choice can be avoided when proving e.g. Cauchy completeness. Instead of defining the real numbers as a quotient of sequences of rationals, a HIT is used to define them as the Cauchy completion of the rational numbers, with the quotienting happening simultaneously with the completion definition. Similarly, a definition of the partiality monad, which represents potentially diverging operations over a given type, was given using a HIT [2, 13, 35], again avoiding the axiom of choice when showing e.g. that the construction is a monad [12].

As we see from these examples, the idea of generating points and equalities of a type inductively is interesting, even if we do not care about the higher equality structure of types, or if we do not want it. For example: consider trees branching over an arbitrary type A, quotiented by arbitrary permutations of subtrees. We first define the type \(T_0(A)\) of A-branching trees, given by the constructors
$$\begin{aligned}&\mathsf {leaf}_0 : T_0(A) \\&\mathsf {node}_0 : (A \rightarrow T_0(A)) \rightarrow T_0(A). \end{aligned}$$
We then form the binary relation R on \(T_0(A)\) that we want to quotient by as follows: R is the smallest relation such that for any auto-equivalence on A (i.e. any \(e : A \rightarrow A\) which has an inverse) and \(f : A \rightarrow T_0(A)\), we have a proof \(p_{f,e} : R(\mathsf {node}_0(f), \mathsf {node}_0(f \circ e))\), and, secondly, for \(g,h : A \rightarrow T_0(A)\) such that \((n : A) \rightarrow R(g(n), h(n))\), we have a proof \(c_{f,g} : R(\mathsf {node}_0(g),\mathsf {node}_0(h))\). We can then form the quotient type \(T_0(A) / R\), which is the type of unlabelled trees where each node has an A-indexed family of subtrees, and two trees which agree modulo the “order” of its subtrees are equal. For \(A \equiv \mathbf {2}\), these are binary trees where the order of the two subtrees of each node does not matter.

Now, morally, from a family \(A \rightarrow (T_0(A) / R)\), we should be able to construct an element of the quotient \(T_0(A) / R\). This is indeed possible if A is \(\mathbf {2}\) or another finite type, by applying the induction principle of the quotient type A times. However, it seems that, for a general type A, this would require the axiom of choice [34], which unfortunately is not a constructive principle [15]. But using a higher inductive type, we can give an alternative definition for the type of A-branching trees modulo permutation of subtrees.

Example 1

Given a type A, we define \(T(A) : \mathsf {hSet}\) by
$$\begin{aligned}&\mathsf {leaf}: \;\; T(A) \\&\mathsf {node}: \, (A \rightarrow T(A)) \rightarrow T(A) \\&\mathsf {mix}:\;\;\; (f : A \rightarrow T) \rightarrow (e : A \cong A) \rightarrow \mathsf {node}(f) = \mathsf {node}(f \circ e). \end{aligned}$$

Note that the fact that T(A) is a homotopy set (see preliminaries below) is implicitly included in the statement \(T(A) : \mathsf {hSet}\). The construction we were looking for is now directly given by the constructor \(\mathsf {node}\). This demonstration of the usefulness of higher inductive constructions to increase the strength of quotients was first discussed in Altenkirch and Kaposi [1], where such set-truncated HITs are called quotient inductive types (QITs).

Another example of the use of higher inductive types is type theory in type theory [1], where the well-typed syntax of type theory is implemented as a higher inductive-inductive [30] type in type theory itself. A significantly simplified version of this will serve as a running example for us:

Example 2

We define the syntax of a (very basic) type theory by constructing types representing contexts and types as follows. A set \(\mathsf {Con}: \mathsf {hSet}\) and a type family \(\mathsf {Ty}: \mathsf {Con}\rightarrow \mathsf {hSet}\) are simultaneously defined by giving the constructorsFor simplicity, we do not consider terms. Contexts are either empty \(\varepsilon \), or an extended context \(\mathsf {ext}\,\varGamma \,A\) representing the context \(\varGamma \) extended by a fresh variable of type A. Types are either the base type \(\iota \) (well-typed in any context), or \(\varSigma \)-types represented by \(\sigma \,\varGamma \,A\,B\) (well-typed in context \(\varGamma \) if A is well-typed in context \(\varGamma \), and B is well-typed in the extended context \(\mathsf {ext}\,\varGamma \,A\)). Type theory in type theory as in [1] has plenty of equality constructors, which play a role as soon as terms are introduced. To keep the example simple we instead use another equality, stating that extending a context by A followed by B is equal to extending it by \(\sigma \,\varGamma \,A\,B\). This equality is given by \(\sigma _{\mathrm {eq}}\). Note that it is not possible to list the constructors of \(\mathsf {Con}\) and \(\mathsf {Ty}\) separately: due to the mutual dependency, the \(\mathsf {Ty}\)-constructor \(\sigma \) has to be given in between of the two \(\mathsf {Con}\)-constructors \(\mathsf {ext}\) and \(\sigma _{\mathrm {eq}}\).

Despite a lot of work making use of concrete HITs [4, 9, 10, 11, 23, 26, 27], and despite the fact that it is usually — on some intuitive level — clear for the expert how the elimination principle for such a HIT can be derived, giving a general specification and a theoretical foundation for HITs has turned out to be a major difficulty. Several approaches have been proposed [6, 18, 28, 33], and they do indeed give a satisfactory specification of HITs in the sense that they cover all HITs which have been used so far (see related work below). However, to the best of our knowledge, no approach covers higher inductive-inductive definitions such as Example 2. The purpose of the current paper is to remedy this. We restrict ourselves to sets, i.e. to quotient inductive-inductive types (QIITs). This is of course a serious restriction, since it means that we cannot capture many ordinary HITs such as e.g. the circle \(\mathbb {S}^1\). At the same time, all higher inductive-inductive types that we know of are indeed sets — the Cauchy reals, the surreal numbers, the partiality monad, type theory in type theory, permutable trees — and will be instances of our framework, which allows arbitrarily complicated dependency structures. In particular, we allow intermixing of constructors as in Example 2.

Contributions. We give a formal specification of quotient inductive-inductive types with arbitrary dependency structure. This can be viewed as the generalisation of the usual semantics of inductive types as initial algebras of a functor to quotient inductive-inductive types. A QIIT is specified by (i) its sorts, which encode the types and type families that it consists of (Sect. 2), and (ii) by a sequence of constructors, that in turn are specified by argument and target functors (Sect. 3). This is a very general framework, covering in particular point (Sect. 3.2) and path constructors (Sect. 3.4). Each constructor specification gives rise to a category of algebras, and we establish conditions on the target functors that allow us to conclude that these categories of algebras are complete (Sect. 3.5). This is important, because it allows us to prove the equivalence of initiality and a principle that we call section induction (Sect. 4), stating that every algebra morphism into the algebra in question has a section; this principle is close to the intuitively expected elimination rules.

A full version of the paper, including all proofs, is available on the arXiv [3].

Related Work. Sojakova [33] shows the correspondence between initiality and induction (a variant of our Theorem 31) for \(\mathsf {W}\)-suspensions, a restricted class of HITs. Basold, Geuvers and van der Weide [6] introduce a syntactic schema for HITs without higher path constructors, and derive their elimination rules. Dybjer and Moeneclaey [18] give a syntactic schema for finitary HITs with at most paths between paths, and give an interpretation in Hofmann and Streicher’s groupoid model [22]. Finally, Lumsdaine and Shulman’s work on the semantics of HITs in model categories [28] is similar to an external version of our approach.

Preliminaries. We work in a standard Martin-Löf style type theory and assume function extensionality. We do not assume univalence, but also do not contradict it; in particular, everything we do works in the type theory from the HoTT Book [34]. We write \(\mathcal {U}\) for “the” universe of types, omitting universe indices in the typical ambiguity style [21]. A type is a set if all its equality proofs are equal, and \(\mathsf {hSet}\) is defined as \(\varSigma (A : \mathcal {U}). \mathsf {is}\text{- }\mathsf {set}(A)\); we implicitly treat elements of \(\mathsf {hSet}\) as their first projections — this allows us to view \(\mathsf {hSet}\) as a universe. By a category, we mean a precategory [34, Definition 9.1.1] in the sense of the HoTT Book (all our categories become univalent categories if univalence is assumed). We write \(\mathcal {C}\Rightarrow \mathcal {D}\) for functors and \(X \rightarrow Y\) for functions between types. We denote the obvious category of sets and functions by \(\mathsf {hSet}\) as well; consequently, \(F : A \rightarrow \mathsf {hSet}\) denotes a type family, while \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\) denotes a functor. For such a functor \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\), we write Open image in new window for the category of elements of F, whose objects are pairs (Xx) of an object X in \(\mathcal {C}\) and an element x : FX. For a function \(f : X \rightarrow Y\) and zw : X, we write \(\mathsf {ap}\;f\; : z = w \rightarrow f(z) = f(w)\) for the usual “action of a function to paths”, \({}^{-1} : x = y \rightarrow y = x\) for “path reversal”, and Open image in new window for “path concatenation” [34, Lemmas 2.2.1, 2.1.1, 2.1.2].

2 Sorts

Single inductive (and quotient inductive) sets are simply elements of \(\mathsf {hSet}\). Inductive families [17] indexed over some fixed type A are families \(A \rightarrow \mathsf {hSet}\). For the inductive-inductive definitions we are considering, the situation is more complicated, since we allow very general dependency structures. Our only requirement is that there is no looping dependency, since this is easily seen to lead to contradictions, e.g. we do not allow the definition of a family \(A : B \rightarrow \mathsf {hSet}\) mutually with a family \(B : A \rightarrow \mathsf {hSet}\) (whatever this would mean). Concretely, we will ensure that the collection of type formation rules (the type signatures) is given in a valid order, and we refer to the types used as family indices as the sorts of the definition. Hence our first step towards a specification of general QIITs is to explain what a valid specification of the sorts is.

Sorts do not only determine the formation rules of the inductive definitions, but also the types of the eliminators. To capture this, it is not enough to specify a type of sorts — in order to take the shape of the elimination rules into account, we need to specify a category.

Definition 3

(Sort specifications). A specification of the sorts of a quotient inductive-inductive definition of n types is given by a list
$$\begin{aligned} H_0, H_1, \ldots , H_{n-1}, \end{aligned}$$
where each \(H_i\) is a functor \(H_i : \mathcal {C}_i \Rightarrow \mathsf {hSet}\). Here, Open image in new window is the terminal category, and \(\mathcal {C}_{i+1}\) is defined as follows:
  • objects are pairs (XP), where X is an object in \(\mathcal {C}_i\), and \(P : H_i(X) \rightarrow \mathsf {hSet}\) is a family of sets;

  • a morphism \((f, g) : (X,P) \rightarrow (Y,Q)\) consists of a morphism \({f : X \rightarrow Y}\) in \(\mathcal {C}_i\), and a dependent function \(g : (x : H_i(X)) \rightarrow P(x) \rightarrow Q(H_i(f)\, x)\) (in \(\mathsf {hSet}\)).

We say that \(\mathcal {C}_n\) is the base category for the sort signature \(H_0, \ldots , H_{n-1}\).

The following examples will hopefully make clear the connection between the specification in Definition 3 and common classes of data types.

Example 4

(Permutable trees). For a single inductive type such as the type of trees T(A) in Example 1, the sorts are specified by a single functor \(H_0 : \mathcal {C}_0 \Rightarrow \mathsf {hSet}\) which maps the single object \(\star \) of \(\mathcal {C}_0\) to the unit type \(\mathbf {1}\). Objects in the base category \(\mathcal {C}_1\) are thus pairs \((\star , W)\), where \(W : \mathbf {1}\rightarrow \mathsf {hSet}\), and morphisms are given by \(f : \star \rightarrow \star \) in \(\mathbbm {1}\) (necessarily the identity morphism), together with a dependent function \(g : (x : \mathbf {1}) \rightarrow W(x) \rightarrow V(x)\). It is easy to see that this category \(\mathcal {C}_1\) is equivalent to the category \(\mathsf {hSet}\).

Example 5

(The finite types). Consider the inductive family \(\mathsf {Fin} : \mathbb {N}\rightarrow \mathsf {hSet}\) of finite types. Again, this is a single type family, i.e. we are in the case \(n \equiv 1\). We have Open image in new window , and the base category \(\mathcal {C}_1\) is equivalent to the category of \(\mathbb {N}\)-indexed families, where objects are families \(X : \mathbb {N}\rightarrow \mathsf {hSet}\) and morphisms \(\mathcal {C}_1(X,Y)\) are dependent functions \(f : (n : \mathbb {N}) \rightarrow X(n) \rightarrow Y(n)\).

Example 6

(Contexts and types). Let us consider the QIIT \((\mathsf {Con}, \mathsf {Ty})\) from Example 2. Here, we need two functors \(H_0\), \(H_1\), the first corresponding to \(\mathsf {Con}\) and the second to \(\mathsf {Ty}\). The first is given by Open image in new window as in Example 4, since \(\mathsf {Con}\) is a type on its own. Next, we need \(H_1 : \mathcal {C}_1 \Rightarrow \mathsf {hSet}\). Applying the equivalence between \(\mathcal {C}_1\) and \(\mathsf {hSet}\) established in Example 4, we define \(H_1\) to be the identity functor Open image in new window , since then \(\mathsf {Ty}: H_1(\mathsf {Con}) \rightarrow \mathsf {hSet}\). The base category \(\mathcal {C}_2\) is equivalent to the category \(\mathsf {Fam}(\mathsf {hSet})\), whose objects are pairs (AB) where \(A : \mathsf {hSet}\) and \(B : A \rightarrow \mathsf {hSet}\), and whose morphisms (AB) to \((A', B')\) consist of functions \(f : A \rightarrow A'\) together with dependent functions \(g : (x:A) \rightarrow B(x) \rightarrow B'(f \, x)\).

Example 7

(the Cauchy reals). Recall that the Cauchy reals in the HoTT book [34] are constructed by simultaneously defining \(\mathbb {R}: \mathsf {hSet}\) and \(\sim : \mathbb {R}\times \mathbb {R}\rightarrow \mathsf {hSet}\) (we ignore the fact that [34] uses \(\mathcal {U}\) instead of \(\mathsf {hSet}\)). This time the sorts \(H_0, H_1\) are given by Open image in new window and Open image in new window , corresponding to the fact that \(\sim \) is a binary relation on \(\mathbb {R}\). The base category has (up to equivalence) pairs (XY) with \(Y : X \times X \rightarrow \mathsf {hSet}\) as objects, and morphisms are defined accordingly.

Example 8

(The full syntax of type theory). Altenkirch and Kaposi [1] give the complete syntax of a basic type theory as a (at that point unspecified) QIIT. Although this construction is far too involved to be treated as an example in the rest of this paper (where we prefer to work with the simplified version of Example 2), we can give the sort signature \(H_0, H_1, H_2, H_3\) of this QIIT. Apart from contexts \(\mathsf {Con}\) and types \(\mathsf {Ty}\), this definition also involves context morphisms \(\mathsf {Tms}\) and terms \(\mathsf {Tm}\):
$$\begin{aligned}&\mathsf {Con}: \, \mathsf {hSet}\qquad \qquad \qquad \quad \mathsf {Tms}: \mathsf {Con}\times \mathsf {Con}\rightarrow \mathsf {hSet}\\&\mathsf {Ty}:\;\; \mathsf {Con}\rightarrow \mathsf {hSet}\qquad \qquad \mathsf {Tm}: \,\,\, \big (\varSigma (\varGamma : \mathsf {Con}).\mathsf {Ty}(\varGamma )\big ) \rightarrow \mathsf {hSet}. \end{aligned}$$
We have:

Remark 9

Although we work in type theory also in the meta-theory, we give the presentation informally in natural language. Formally, the specification of sorts and base categories of Definition 3 can be defined as an inductive-recursive definition [19] of the list \(H_0, \ldots , H_n\) simultaneously with a function that turns such a list into a category. Details can be found in Dijkstra’s thesis [16, Sect. 4.3].

The main result of this section states that base categories of sort signatures are complete, i.e. have all small limits. By a small limit, we mean a limit of a diagram \(D : \mathcal {I}\rightarrow \mathcal {C}\), where the shape category \(\mathcal {I}\) has a set of objects, and the collection of morphisms between any two objects is a set. This result will be needed later to show that categories of QIIT algebras are complete. Recall that \(\mathsf {hSet}\) has all small limits by a standard construction.

Theorem 10

(Base categories are complete). For any sort signature \(H_0,\) \(\ldots ,\) \(H_{n-1}\), the corresponding base category \(\mathcal {C}_n\) has all small limits.

Proof

All proofs can be found in the arXiv version of the paper [3].    \(\square \)

3 Algebras

Once the sorts of an inductive definition have been established, the next step is to specify the constructors. In this section, we will give a very general definition of constructor specifications, although we will mainly focus on two specific kinds: point constructors, which can be thought of as the operations of an algebraic signature, and path constructors, which correspond to the axioms.

Similarly to how sorts are specified inductively in Sect. 2, we construct suitable categories of algebras by starting with a finitely complete category \(\mathcal {C}\) such as the one obtained from a sort signature, specify a constructor on \(\mathcal {C}\), and then extend \(\mathcal {C}\) using this constructor specification to get a new finitely complete category \(\mathcal {C}'\). This process is repeated until all constructors have been added, and we obtain the sought-after inductive type as the underlying set of an initial object of the category at the last stage, provided this initial object exists. In the case of the inductive definition of natural numbers, this process will turn out as follows:
  • we start with \(\mathsf {hSet}\) as our base category (only one trivial sort, as in Example 4);

  • we add a point constructor for the constant corresponding to 0; the category of algebras at this stage is the category of pointed sets;

  • we add a second point constructor for the operation corresponding to \(\mathsf {suc}\); the category of algebras at this stage is the category of sets equipped with a point and a unary operation;

  • the set of natural numbers, together with its usual structure, can now be regarded as an initial object in the category of algebras just constructed.

3.1 Relative Continuity and Constructor Specifications

Roughly speaking, constructors at each stage are given by pairs of \(\mathsf {hSet}\)-valued functors F and G on \(\mathcal {C}\), where G is continuous (i.e. preserves all small limits). The intuition is that F specifies the arguments of the constructor, while G determines its target. For instance, in the example of the natural numbers when specifying the constructor \(\mathsf {suc} : \mathbb {N}\rightarrow \mathbb {N}\), \(\mathcal {C}\) is the category of pointed sets, and both F and G are the forgetful functor to \(\mathsf {hSet}\). The continuity condition on G is needed for the corresponding category of algebras to be complete. Intuitively, this expresses that a constructor should only “construct” elements of one of the sorts, or equalities thereof.1 In particular, a constant functor is usually not a valid choice for G.

Unfortunately, this simple description falls short of capturing many of the examples of QIITs mentioned in Sect. 1. The problem is that we want G to be able to depend on the elements of F. However, since F is assumed to be an arbitrary functor, its category of elements is not necessarily complete, and so we need to refine the notion of G being continuous to this case.

Definition 11

(Relative continuity). Let \(\mathcal {C}\) be a category, \(\mathcal {C}_0\) a complete category, and \(U : \mathcal {C}\Rightarrow \mathcal {C}_0\) a functor. If I is a small category, and \(X : I \rightarrow \mathcal {C}\) is a diagram, we say that a cone \(A \rightarrow X\) in \(\mathcal {C}\) is a U-limit cone, or limit cone relative to U, if the induced cone \(UA \rightarrow UX\) is a limit cone in \(\mathcal {C}_0\). A functor \(\mathcal {C}\Rightarrow \mathsf {hSet}\) is continuous relative to U if it maps U-limit cones to limit cones in \(\mathsf {hSet}\).

In the special case \(\mathcal {C}_0 \equiv \mathsf {hSet}\), the functor U in Definition 11 is continuous relative to itself. Also note that if \(\mathcal {C}\) is complete and U creates limits, then relative continuity with respect to U reduces to ordinary continuity. If \(\mathcal {C}\) is a complete category, and \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\) is an arbitrary functor, the category Open image in new window of elements of F is equipped with a forgetful functor into \(\mathcal {C}\). We will implicitly consider relative limit cones and relative continuity with respect to this forgetful functor, unless specified otherwise. Note that if \(\mathcal {C}\) is complete and F is continuous, then Open image in new window is also complete, and relative continuity of functors on Open image in new window is the same as continuity, as observed above.

We can now give a precise definition of what is needed to specify a constructor:

Definition 12

(Constructor specifications). A constructor specification on a complete category \(\mathcal {C}\) is given by:
  • a functor \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\), called the argument functor of the specification;

  • a relatively continuous functor Open image in new window , called the target functor.

Given a constructor specification, we can define the corresponding category of algebras. In Theorem 25, we will see that the assumptions of Definition 12 guarantee that this category is complete.

Definition 13

(Category of algebras). Let (FG) be a constructor specification on a complete category \(\mathcal {C}\). The category of algebras of (FG) is denoted \(\mathcal {C}.(F,G)\), and is defined as follows:
  • objects are pairs \((X, \theta )\), where X is an object of \(\mathcal {C}\), and \(\theta : (x : F X) \rightarrow G(X, x)\) is a dependent function (in \(\mathsf {hSet}\));

  • morphisms \((X, \theta ) \rightarrow (Y, \psi )\) are given by morphisms \(f : X \rightarrow Y\) in \(\mathcal {C}\), with the property that for all x : FX,
    $$\begin{aligned} \psi (F(f)\,x) = G(\overline{f}) (\theta \,x), \end{aligned}$$
    where \(\overline{f} : (X, x) \rightarrow (Y, F(f)\,x)\) is the morphism in Open image in new window determined by f.

We think of \(\mathcal {C}.(F,G)\) as a category of “dependent dialgebras” [20]. Note that there is an obvious forgetful functor \(\mathcal {C}.(F,G) \rightarrow \mathcal {C}\).

Similarly to how we defined sort specifications (Definition 3), we now have all the necessary notions in place to be able to give the full definition of a QIIT.

Definition 14

(QIIT descriptions). A QIIT description is given by
  • a sort specification \(H_0, \ldots , H_{n-1}\);

  • a list of constructor specifications \((F_0, G_0), \ldots , (F_{n-1}, G_{n-1})\) on \(\mathcal {B}_0, \ldots , \mathcal {B}_{n-1}\) respectively, where \(\mathcal {B}_0\) is the base category of the given sort specification, and \(\mathcal {B}_{i+1}\) is the category of algebras of \((F_i, G_i)\).

For Definition 14 to make sense, the categories \(\mathcal {B}_i\) need to be complete, since constructor specifications are only defined on complete categories. This will follow from Theorem 25.

Example 15

(Permutable trees). The constructor \(\mathsf {leaf}: T(A)\) from Example 1 can be specified by functors \(F_0 : \mathsf {hSet}\Rightarrow \mathsf {hSet}\) and Open image in new window , where Open image in new window and Open image in new window . Note how \(F_0\) specifies the (trivial) arguments of \(\mathsf {leaf}\), and \(G_0\) the target. Next the constructor \(\mathsf {node}: (A \rightarrow T(A)) \rightarrow T(A)\) can be specified by functors \(F_1 : \mathsf {hSet}_{\bullet } \Rightarrow \mathsf {hSet}\) and Open image in new window , where \(\mathsf {hSet}_{\bullet }\) is the category of pointed sets (we think of the point as the previous constructor \(\mathsf {leaf}\)): \(F_1\) and \(G_1\) are defined as Open image in new window and Open image in new window , so that
$$\begin{aligned} \mathsf {node}: (f : F_1(T(A),\mathsf {leaf})) \rightarrow G_1(T(A), \mathsf {leaf}, f). \end{aligned}$$
Theorem 18 will show that \(G_0\) and \(G_1\) are relatively continuous.

The corresponding category of algebras for this constructor specification \((F_1, G_1)\) for \(\mathsf {node}\) is equivalent to the category whose objects are triples (Xln) where \(X : \mathsf {hSet}\), l : A, and \(n : (A \rightarrow X) \rightarrow X\). After specifying also the \(\mathsf {mix}\)-constructor, the new category of algebras further contains a dependent function \(p : (f : A \rightarrow X) \rightarrow (e : X \cong X) \rightarrow n(f) = n(f \circ e)\).

Example 16

(Contexts and types). The constructor \(\sigma _{\mathrm {eq}}\) of type
$$\begin{aligned} (\varGamma : \mathsf {Con})(A : \mathsf {Ty}(\varGamma ))(B : \mathsf {Ty}(\mathsf {ext}\, \varGamma \, A)) \rightarrow \mathsf {ext}\, (\mathsf {ext}\, \varGamma \, A) \, B =_{\mathsf {Con}} \mathsf {ext}\, \varGamma \, (\sigma \, \varGamma \, A \, B) \end{aligned}$$
from Example 2 is specified in the context of the previous constructors \(\varepsilon \), \(\mathsf {ext}\) and \(\sigma \) by functors \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\) and Open image in new window , where \(\mathcal {C}\) is the category of algebras of the previous constructors, withandTheorem 23 will show that G is relatively continuous. The corresponding category of algebras for this constructor specification has objects tuples \((C, T, e, c, b, s, s_{\mathrm {eq}})\) where (CTecbs) is an algebra for the previous constructors, and
$$\begin{aligned} s_{\mathrm {eq}} : (\varGamma : C) \rightarrow (A : T(\varGamma )) \rightarrow (B : T(c \, \varGamma \, A)) \rightarrow c \, (c \, \varGamma \, A) \, B =_{C} c \, \varGamma \, (s \, \varGamma \, A \, B). \end{aligned}$$

3.2 Point Constructors

If \(\mathcal {C}\) is the base category for a sort signature as in Definition 3, we can define specific target functors \(\mathcal {C}\Rightarrow \mathsf {hSet}\) which are guaranteed to be relatively continuous. Constructors having those as targets are referred to as point constructors. Intuitively, a point constructor is an operation that returns an element (point) of one of the sorts. The corresponding target functor is the forgetful functor that projects out the chosen sort. However, sorts can be dependent, so such a projection needs to be defined on a category of elements.

Specifically, let \(\mathcal {C}\) be a finitely complete category, \(H : \mathcal {C}\Rightarrow \mathsf {hSet}\) a functor, and \(\mathcal {C}'\) the extended base category with one more sort indexed over H. Recall from Definition 13 that the objects of \(\mathcal {C}'\) are pairs (XP), where X is an object of \(\mathcal {C}\), and P is a family of sets indexed over HX. Let \(V_H : \mathcal {C}' \Rightarrow \mathcal {C}\) be the forgetful functor. We define the base target functor corresponding to H to be the functor Open image in new window given by
$$\begin{aligned} U_H (X, P, x) = P(x). \end{aligned}$$
In other words, given an object X of \(\mathcal {C}\), a family P over HX, and a point x in the base, the functor \(U_H\) returns the fibre of the family P over x. The action of \(U_H\) on morphisms is the obvious one.

Example 17

(Permutable trees). In Example 15, the functor Open image in new window specifying the target of \(\mathsf {leaf}\) is the composition of the forgetful Open image in new window with the base target functor for the only sort, in this case the identity \(\mathsf {id}: \mathsf {hSet}\Rightarrow \mathsf {hSet}\).

Note that \(U_H = \mathsf {id}\) in Example 17 is relatively continuous, as required by Definition 12. In the rest of this section, we will show that this is true in general. Given a category \(\mathcal {C}\) and a functor \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\), it is well known that the slice category over F of the functor category \(\mathcal {C}\Rightarrow \mathsf {hSet}\) is equivalent to the functor category Open image in new window (see for example [24, Proposition 1.1.7]). Given a functor \(G : \mathcal {C}\Rightarrow \mathsf {hSet}\) and a natural transformation \(\alpha : G \rightarrow F\), we will refer to the functor Open image in new window corresponding to \(\alpha \) as the functor of fibres of \(\alpha \). Concretely, \(\overline{G}\) maps an object (Xx), where x : FX, to the fibre of \(\alpha _X\) over x. The following theorem is proved by noting that \(U_H\) is a functor of fibres.

Theorem 18

(Base target functors are relatively continuous). Let \(\mathcal {C}\) be a complete category, \(H : \mathcal {C}\Rightarrow \mathsf {hSet}\) any functor, and \(\mathcal {C}'\) the extended base category corresponding to H. Then the base target functor \(U_H\) is relatively continuous.    \(\square \)

3.3 Reindexing Target Functors

In many cases, we can obtain suitable target functors by composing the desired base target functor with the forgetful functor to the appropriate stage of the base category. When building constructors one at a time, it will follow from Theorems 25 and 10 applied to the previous steps that this forgetful functor is continuous, and the relative continuity of the target functor will follow. In more complicated examples, composing with a forgetful functor is not quite enough. We often want to “substitute into” or reindex a target functor to target a specific element. For example, in the context of Example 2, consider a hypothetical modified \(\sigma \) constructor of the form
$$\begin{aligned} \sigma ': \big (\varSigma (\varGamma : \mathsf {Con}). \varSigma (A : \mathsf {Ty}(\varGamma )).\mathsf {Ty}(\mathsf {ext}\,\varGamma \,A)\big ) \rightarrow \mathsf {Ty}(\mathsf {ext}\,\varGamma \,A). \end{aligned}$$
We want the target functor to return the set \(\mathsf {Ty}(\mathsf {ext}\,\varGamma \,A)\), and not just \(\mathsf {Ty}(x)\) for a new argument x, which is the result of the base target functor. We can obtain the desired target functor as a compositionwhere \(\mathcal {C}\) is the category with objects tuples \((C,T,\varepsilon , \mathsf {ext})\), \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\) is the functor giving the arguments of the constructor \(\sigma '\), \(U_H\) is the base target functor corresponding to the second sort, and S is the functor defined by Open image in new window .
Since the functors S that we compose with in order to “substitute” are of a special form, the resulting functor will still be relatively continuous when starting with a relatively continuous functor. This is made precise by the following result:

Lemma 19

(Preservation of relative limit cones). Suppose given is a commutative diagram of categories and functors as shown on the right, where \(\mathcal {C}_0\) and \(\mathcal {D}_0\) are complete, and G maps U-limit cones to V-limit cones. Then F maps \((U \circ U')\)-limit cones to \((V \circ V')\)-limit cones. In particular, if \(\mathcal {C}\) and \(\mathcal {D}\) are complete and G is continuous, then F preserves relative limit cones.    \(\square \)

Example 20

Starting from the situation in (1) we can form the diagram shown on the left, where \(V : \mathcal {C}\Rightarrow \mathsf {Fam}(\mathsf {hSet})\) is the forgetful functor and hence continuous. It follows from the second statement of Lemma 19 that S preserves relative limit cones, hence \(G = U_H \circ S\) is relatively continuous by Theorem 18.

3.4 Path Constructors

Path constructors are constructors where the target functor G returns an equality type. They can e.g. be used to express laws when constructing an initial algebra of an algebraic theory as a QIT. We saw an example of this in Example 1, where we had a path constructor of the form
$$\begin{aligned} \mathsf {mix}: (f : A \rightarrow T) \rightarrow (e : A \cong A) \rightarrow \mathsf {node}(f) = \mathsf {node}(f \circ e). \end{aligned}$$
The argument functor for \(\mathsf {mix}\) is entirely unproblematic. However, it is perhaps not so clear that the target functor, which sends (Xlnfe) to the equality type \(n(f) =_{X} n(f \circ e)\), is relatively continuous. The aim of the current section is to show this for any functor of this form. We first observe that the prototypical such equality functor is relatively continuous, and then show that any other target functor for a path constructor can be obtained by substitution using Lemma 19.

Definition 21

Let Open image in new window be the functor defined on objects by Open image in new window and on morphisms by Open image in new window .

It is not hard to see that \(\mathsf {Eq}\) is a functor. Furthermore, \(\mathsf {Eq}\) is the functor of fibres of the obvious diagonal natural transformation \(\varDelta : \mathsf {id}\rightarrow \mathsf {id}\times \mathsf {id}\).

Lemma 22

The standard equality functor \(\mathsf {Eq}\) is relatively continuous.    \(\square \)

The lemma we have just given is central to the observation that a large class of equality functors are suitable targets for constructors:

Theorem 23

(Equality functors are relatively continuous). Let \(\mathcal {C}\) be a complete category, \(F : \mathcal {C}\Rightarrow \mathsf {hSet}\) any functor, and Open image in new window a relatively continuous functor. Suppose given two global elements lr of G, i.e. natural transformations \(l , r : \mathbf {1}\rightarrow G\). The mapwith \(\mathsf {Eq}_G(l, r)(Y) = (l_{Y} =_{G(Y)} r_{Y})\) extends to a relatively continuous functor.    \(\square \)

Example 24

(Permutable trees). The target of the \(\mathsf {mix}\) constructor from Example 1 can be obtained as an equality functor in this sense. We take G to be the underlying sort, which is relatively continuous by the results of the previous section. The global elements l and r are defined by Open image in new window and Open image in new window . Their naturality can easily be verified directly.

Iterating equality functors, one can also express higher path constructors, but in our limited setting of inductively defined sets, there is little reason to go beyond one level of path constructors — higher ones will have no effect on the resulting inductive type. However, we believe that the ease with which Theorem 23 can be applied iteratively will be an important feature when generalising our technique to general higher inductive types. We discuss this further in Sect. 5.

3.5 Categories of Algebras are Complete

Recall from Definition 13 that the category of algebras \(\mathcal {C}.(F,G)\) for a constructor specification (FG) on a complete category \(\mathcal {C}\) has “dependent (FG)-dialgebras” as objects, and maps that commute with the dialgebra structure as morphisms. In this section, we will show that \(\mathcal {C}.(F,G)\) is complete, and that its forgetful functor is continuous. The significance of this result is twofold: First of all, it enables the use of limits when reasoning about algebras; in particular, we will show in Sect. 4 how, using products and equalisers, one can extend the classical equivalence between initiality and induction for ordinary inductive types to our setting. Secondly, it goes a long way towards establishing existence of initial algebras; since a category of algebras over \(n + 1\) constructors is complete, and the forgetful functor to the category of algebras over the first n preserves limits, the adjoint functor theorem says that this functor has a left adjoint if and only if it satisfies the solution set condition. Applying this argument at every stage, we get a left adjoint for the forgetful functor down to \(\mathsf {hSet}\), and in particular an initial object. There is no reason to expect the solution set condition to hold at this generality, but we expect it to follow from appropriate “accessibility” conditions on the argument functors. This is discussed further in Sect. 5.

Theorem 25

(Categories of algebras are complete). Let (FG) be a constructor specification on a complete category \(\mathcal {C}\). Then \(\mathcal {C}.(F,G)\) is complete.    \(\square \)

4 Elimination Principles

So far, we have given rules for specifying a QIIT by giving a sort signature and a list of constructors. As type-theoretical rules, these correspond to the formation and introduction rules for the QIIT. In this section, we introduce the corresponding elimination rules, stating that a QIIT is the smallest type closed under its constructors. We show that a categorical formulation of the elimination rules is equivalent to the universal property of initiality.

4.1 The Section Induction Principle

The elimination principle for an algebra \(X\) states that every fibred algebra over \(X\) has a section, where a fibred algebra over \(X\) is an algebra family “\(Q : X \rightarrow \mathsf {hSet}\)”, and a section of it a dependent algebra morphism “\((x : X) \rightarrow Q(x)\)”.2 The usual correspondence between type families and fibrations extends to algebras, and so we formulate the elimination rule for \(X\) as \(X\) being section inductive in the category of algebras in the following sense:

Definition 26

(Section inductive). An object X of a category \(\mathcal {C}\) is section inductive if for every object Y of \(\mathcal {C}\) and morphism \(p : Y \rightarrow X\), there exists \(s : X \rightarrow Y\) such that \(p \circ s = \mathsf {id}_X\).

For an algebra \(X\), the existence of the underlying function(s) \(X \rightarrow Y\) corresponds to the elimination rules, while the fact that they are algebra morphisms corresponds to the computation rules.

Example 27

(Permutable trees). Consider permutable-tree algebras, e.g. tuples (Xlnp) as in Example 15. A fibred permutable-tree algebra over (Xlnp) consists of \(Q : X \rightarrow \mathsf {hSet}\) together with \(m_l : Q(l)\) andHere the type \(x =[p]~y\) is the types of equalities between elements x : A and y : B in different types, themselves related by an equality proof \(p : A = B\). This data can be arranged into an ordinary algebra \(\varSigma (x : X).Q(x)\), together with an algebra morphism \(\pi _1 : \big (\varSigma (x : X). Q(x)\big ) \rightarrow X\). A section of \(\pi _1\) is a dependent function \(h : (x : X) \rightarrow Q(x)\). Since h comes from an algebra morphism, we further know e.g. \(h(l) = m_l\) and \(h(n\,f) = m_n\, f\,(h \circ f)\). Conversely, every algebra morphism \(g : (X', l', n', p') \rightarrow (X, l, n, p)\) gives rise to a fibred algebra \((Q, m_l, m_n, m_p)\) by considering the fibres \(Q(x) = \varSigma (y : A').g(y) = x\) of p. The points \(m_l\), \(m_n\) and the path \(m_p\) arise from the proof that g preserves \(l'\), \(n'\) and \(p'\).

Example 28

(Contexts and types). For context-and-types algebras from Example 16, a fibred algebra over \((C, T, e, c, b, s, s_{\mathrm {eq}})\) consists of \(Q : C \rightarrow \mathsf {hSet}\) and \(R : (x : C) \rightarrow T(x) \rightarrow Q(x) \rightarrow \mathsf {hSet}\), together with \(m_e : Q(e)\) andAgain, this data can be arranged into an ordinary algebra with base \(C' : \mathsf {hSet}\), \(T' : C' \rightarrow \mathsf {hSet}\), where \(C' = \varSigma (x : C).Q(x)\) and \(T'(x, q) = \varSigma (y : T(x)).R(x,y,q)\), together with an algebra morphism \((\pi _1, \pi _1) : (C', T') \rightarrow (C, T)\). A section of this morphism gives functions \(f : (x : C) \rightarrow Q(x)\) and \(g : (x : C) \rightarrow (y : T(x)) \rightarrow R(x, y, f\,x)\) that preserve the algebra structure.

A general account of the equivalence between the usual formulation of the elimination rules and the section induction principle is in Dijkstra [16, Sect. 5.4].

4.2 Initiality, and its Relation to the Section Induction Principle

The section induction principle for an algebra \(X\) matches our intuitive understanding of the elimination rules for \(X\) quite well, but it is perhaps a priori not so clear that e.g. satisfying it defines an algebra uniquely up to equivalence. In this section, we show that this is the case by proving that the section induction principle is equivalent to the categorical property of initiality. Recall that a type is contractible if it is equivalent to the unit type [34, Definition 3.11.1].

Definition 29

(Initiality). An object X of a category \(\mathcal {C}\) is (homotopy) initial if for every object Y of \(\mathcal {C}\), the set of morphisms \(X \rightarrow Y\) is contractible.

It is easy to see that initiality implies section induction, while the converse requires additional structure on \(\mathcal {C}\):

Lemma 30

If an object X in a category \(\mathcal {C}\) is initial, then it is section inductive. If \(\mathcal {C}\) has finite limits and X is section inductive, then X is initial.    \(\square \)

From here, we can show the main theorem of the current section. The proof uses the fact that both statements involved are mere propositions, i.e. they have at most one proof.

Theorem 31

(Initiality \(\cong \) section induction). An object X in a in a category of algebras \(\mathcal {C}.(F,G)\) being initial is equivalent to it being section inductive.    \(\square \)

As an application, we can now reason about QIITs using their categories of algebras. For instance, we get a short proof of the following fact:

Corollary 32

The interval is equivalent to the unit type.

Proof

By Theorem 31, the interval is the initial object in the category with objects \(\varSigma (X : \mathsf {hSet}).\varSigma (x : X).\varSigma (y : X).x =_{X} y\), while the unit type is the initial object in the category with objects \(\varSigma (X : \mathsf {hSet}).X\). By contractibility of singleton types [34, Lemma 3.11.8], the former is equivalent to the latter, and since initiality is a universal property, the two initial objects coincide up to equivalence.    \(\square \)

5 Conclusions and Further Work

We have developed a semantic framework for QIITs: A QIIT description gives rise to a category of algebras, and the initial object of this category represent the types and constructors of the QIIT. This generalises the usual functorial semantics of inductive types to a more general setting. So far we have verified the appropriateness of this setting by means of examples. In future work, we would like to explicitly relate the syntax of QIITs to the corresponding semantics.

Our categories of algebras are complete. This is helpful for the metatheory of QIITs, as demonstrated by the proof of initiality being equivalent to section induction (Theorem 31), justifying elimination principles. Of course, completeness is not by itself sufficient to derive the existence of initial algebras, but it suggests that it should be possible to restrict the argument functors to guarantee this, possibly by reducing QIITs to a basic type former playing an analogous role to that of W-types for inductive types. We believe that completeness of the categories of algebras allows an existence proof using the adjoint functor theorem.

We have restricted our attention to QIITs, but we believe that our construction is applicable to general HITs (and even HIITs). While at first glance such an extension of our framework seems to require an internal theory of \((\infty ,1)\)-categories, we believe that it is enough to keep track of only a very limited number of coherence conditions, making this extension possible even without solving the well-known problem of specifying an infinite tower of coherences in HoTT.

Other possible future directions include the combination of QIITs and induction-recursion, and the possibility of generalising coinductive types along similar lines. These generalisations should be driven by examples, similar to how the examples discussed in the current paper have motivated the need for a theory of QIITs.

Footnotes

  1. 1.

    More concretely, elements of a sort correspond to representable functors for algebras over a single generator for that sort, while equalities correspond to algebras with no generators and the given equality as the only relation. Clearly, representable functors are continuous, and the converse holds for reasonable functors (e.g. accessible ones). However, we do not attempt to make this construction precise here, and the following results do not depend on it.

  2. 2.

    See Dijkstra’s thesis [16, Sect. 5.4] for the general definition of fibred algebras and their morphisms — here we restrict ourselves to examples only for space reasons.

Notes

Acknowledgements

We thank Ambrus Kaposi and Jakob von Raumer for many interesting discussions, and the anonymous referees for their valuable comments. This research was supported by EPSRC grants EP/M016994/1 and EP/K023837/1, as well as AFOSR award FA9550-16-1-0029.

References

  1. 1.
    Altenkirch, T., Kaposi, A.: Type theory in type theory using quotient inductive types. In: Principles of Programming Languages, pp. 18–29. ACM (2016)Google Scholar
  2. 2.
    Altenkirch, T., Danielsson, N.A., Kraus, N.: Partiality, revisited. In: Esparza, J., Murawski, A.S. (eds.) FoSSaCS 2017. LNCS, vol. 10203, pp. 534–549. Springer, Heidelberg (2017).  https://doi.org/10.1007/978-3-662-54458-7_31CrossRefGoogle Scholar
  3. 3.
    Altenkirch, T., Capriotti, P., Dijkstra, G., Kraus, N., Nordvall Forsberg, F.: Quotient inductive-inductive types (2018). arXiv:1612.02346
  4. 4.
    Angiuli, C., Morehouse, E., Licata, D.R., Harper, R.: Homotopical patch theory. In: International Conference on Functional Programming, pp. 243–256 (2014)Google Scholar
  5. 5.
    Awodey, S., Warren, M.A.: Homotopy theoretic models of identity types. Math. Proc. Camb. Philos. Soc. 146(1), 45–55 (2009)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Basold, H., Geuvers, H., van der Weide, N.: Higher inductive types in programming. J. Univ. Comput. Sci. 23(1), 63–88 (2016)MathSciNetGoogle Scholar
  7. 7.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-662-07964-5
  8. 8.
    Brady, E.: Idris, a general-purpose dependently typed programming language: design and implementation. J. Funct. Program. 23(9), pp. 552–593 (2013)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Brunerie, G.: On the homotopy groups of spheres in homotopy type theory. Ph.D. thesis, Université de Nice (2016)Google Scholar
  10. 10.
    Buchholtz, U., Rijke, E.: The real projective spaces in homotopy type theory. In: Logic in Computer Science, pp. 1–8 (2017)Google Scholar
  11. 11.
    Cavallo, E.: Synthetic cohomology in Homotopy Type Theory. Master’s thesis, Carnegie-Mellon University (2015)Google Scholar
  12. 12.
    Chapman, J., Uustalu, T., Veltri, N.: Quotienting the delay monad by weak bisimilarity. In: Leucker, M., Rueda, C., Valencia, F.D. (eds.) ICTAC 2015. LNCS, vol. 9399, pp. 110–125. Springer, Cham (2015).  https://doi.org/10.1007/978-3-319-25150-9_8CrossRefGoogle Scholar
  13. 13.
    Chapman, J., Uustalu, T., Veltri, N.: Quotienting the delay monad by weak bisimilarity. Math. Struct. Comput. Sci. 1–26 (2017)Google Scholar
  14. 14.
    de Moura, L., Kong, S., Avigad, J., van Doorn, F., von Raumer, J.: The Lean theorem prover. In: Conference on Automated Deduction (2015)Google Scholar
  15. 15.
    Diaconescu, R.: Axiom of choice and complementation. Proc. Am. Math. Soc. 51(1), 176–178 (1975)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Dijkstra, G.: Quotient inductive-inductive types. Ph.D. thesis, University of Nottingham (2017)Google Scholar
  17. 17.
    Dybjer, P.: Inductive families. Formal Aspects Comput. 6(4), 440–465 (1994)CrossRefGoogle Scholar
  18. 18.
    Dybjer, P., Moeneclaey, H.: Finitary higher inductive types in the groupoid model. In: Silva, A. (ed.) Mathematical Foundations of Programming Semantics (2017)Google Scholar
  19. 19.
    Dybjer, P., Setzer, A.: A finite axiomatization of inductive-recursive definitions. In: Girard, J.-Y. (ed.) TLCA 1999. LNCS, vol. 1581, pp. 129–146. Springer, Heidelberg (1999).  https://doi.org/10.1007/3-540-48959-2_11CrossRefGoogle Scholar
  20. 20.
    Hagino, T.: A categorical programming language. Ph.D. thesis, University of Edinburgh (1987)Google Scholar
  21. 21.
    Harper, R., Pollack, R.: Type checking with universes. Theor. Comput. Sci. 89(1), 107–136 (1991)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Hofmann, M., Streicher, T.: The groupoid interpretation of type theory. In: Twenty-Five Years of Constructive Type Theory of Oxford Logic Guides, vol. 36. Oxford University Press, New York, pp. 83–111 (1998)Google Scholar
  23. 23.
    Hou (Favonia), K.B., Finster, E., Licata, D.R., Lumsdaine, P.L.: A mechanization of the Blakers-Massey connectivity theorem in homotopy type theory. In: Logic in Computer Science (2016)Google Scholar
  24. 24.
    Johnstone, P.: Sketches of an Elephant: A Topos Theory Compendium. Oxford University Press, New York (2002)zbMATHGoogle Scholar
  25. 25.
    Kapulkin, C., Lumsdaine, P.L.: The simplicial model of univalent foundations (after Voevodsky) (2016). arXiv:1211.2851
  26. 26.
    Licata, D.R., Finster, E.: Eilenberg-Maclane spaces in homotopy type theory. In: Logic in Computer Science, pp. 66:1–66:9 (2014)Google Scholar
  27. 27.
    Licata, D.R., Shulman, M.: Calculating the fundamental group of the circle in homotopy type theory. In: Logic in Computer Science, pp. 223–232 (2013)Google Scholar
  28. 28.
    Lumsdaine, P.L., Shulman, M.: Semantics of higher inductive types (2017). arXiv:1705.07088
  29. 29.
    Martin-Löf, P.: An intuitionistic theory of types. Published in Twenty-Five Years of Constructive Type Theory (1972)Google Scholar
  30. 30.
    Nordvall Forsberg, F.: Inductive-inductive definitions. Ph.D. thesis, Swansea University (2013)Google Scholar
  31. 31.
    Norell, U.: Towards a practical programming language based on dependent type theory. Ph.D. thesis, Chalmers University of Technology (2007)Google Scholar
  32. 32.
    Shulman, M.: Homotopy type theory: the logic of space. In: New Spaces for Mathematics and Physics (2017, to appear). arXiv:1703.03007
  33. 33.
    Sojakova, K.: Higher inductive types as homotopy-initial algebras. In: Principles of Programming Languages, pp. 31–42. ACM (2015)Google Scholar
  34. 34.
    The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics, Institute for Advanced Study (2013). https://homotopytypetheory.org/book
  35. 35.
    Veltri, N.: A type-theoretical study of nontermination. Ph.D. thesis, Tallinn University of Technology (2017)Google Scholar
  36. 36.
    Voevodsky, V.: The equivalence axiom and univalent models of type theory (talk at CMU on February 4, 2010). arXiv:1402.5556

Copyright information

© The Author(s) 2018

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Authors and Affiliations

  1. 1.University of NottinghamNottinghamUK
  2. 2.University of StrathclydeGlasgowScotland
  3. 3.LondonUK

Personalised recommendations