Voevodsky’s univalence axiom in Homotopy Type Theory (HoTT)  is motivated by the fact that constructions on structured types should be invariant under isomorphism. From a programming point of view, such constructions can be seen as type-generic programs. For example, if and are isomorphic groups, then for any construction on groups, an instance can be transported to by lifting this isomorphism using a type-generic program corresponding to . As things stand, there is no single definition of the semantics of such generic programs; instead there are several variations on the theme of giving a computational interpretation to the new primitives of HoTT (univalence and higher inductive types) via different constructive models [9, 12, 6, 5], the pros and cons of which are still being explored.
As we show in this paper, that exploration benefits from being carried out in a type-theoretic language. This is different from developing the consequences of HoTT itself using a type-theoretic language, such as intensional Martin-Löf type theory with axioms for univalence and higher inductive types, as used in . There all types have higher-dimensional structure, or “are fibrant” as one says, via the structure of the iterated identification types associated with them. In contrast, when using type theory to describe models of HoTT, being fibrant is an explicit property or structure external to a type that can itself be represented as a type, so that users of the type theory can prove that a type is fibrant by inhabiting a certain other type. As an example, consider the cubical sets model of type theory introduced by Cohen, Coquand, Huber and Mörtberg (CCHM) . This model uses a presheaf topos on a particular category of cubes , generated by an interval object , maps out of which represent paths. This presheaf topos has an associated category with families (CwF)  that is a model of Extensional Martin-Löf Type Theory  in a standard way . While not all types in this presheaf topos have a fibration structure in the CCHM sense, working within constructive set theory, CCHM show how to make a new CwF of fibrant types out of this presheaf CwF, one which is a model of Intensional Martin-Löf Type Theory with univalent universes and (some) higher inductive types . Their model construction is rather subtle and complicated. Coquand noticed that the CCHM version of Kan fibration could be more simply described in terms of partial elements in the internal language of the topos. Some of us took up and expanded upon that suggestion in  and [10, Sect. 4]. Using Extensional Martin-Löf Type Theory with an impredicative universe of propositions (one candidate for the internal language of toposes), those works identify some relatively simple axioms for an interval and a collection of Kan-filling shapes (cofibrant propositions) that are sufficient to define a CwF of CCHM fibrations and prove most of its properties as a model of univalent foundations, for example, that , , path and other types are fibrant. These internal language constructions can be used as an intermediate point in constructing a concrete model in cubical sets: the type theory of HoTT  can be translated into the internal language of the topos, which has a semantics in the topos itself in a standard way. The advantages of this indirection are two-fold. First, the definition and properties of the notion of fibration (both the CCHM notion  and other related ones [5, 30]) are simpler when expressed in the internal language; and secondly, so long as the axioms are not too constraining, it opens up the possibility of finding new models of HoTT.
From another point of view, the internal language of the presheaf topos can itself be viewed as a two-level type theory [4, 35] with fibrant and non-fibrant types, where being fibrant is represented by a type, and the constructions are a library of fibrancy instances for all of the usual types of type theory. Directed type theory  has a very similar story: it adds a directed interval type and a logic of partial elements to homotopy type theory, and using them defines some new notions of higher-dimensional structure, including co- and contravariant fibrations.
However, the existing work describing models using an internal language [27, 10, 5] does not consider universes of fibrant types. The lack of universes is a glaring omission for making models of HoTT, due to both their importance and the difficulty of defining them correctly. Moreover, it is an impediment to using internal language presentations of cubical type theory as a two-level type theory. For example, most constructions on higher inductive types, like calculating their homotopy groups, require a fibrant universe of fibrant types; and adding universes to directed type theory would have analogous applications. Finally, packaging the fibrant types together into a universe restores much of the convenience of working in a language where all types are fibrant: instead of passing around separate fibrancy proofs, one knows that a type is fibrant by virtue of the universe to which it belongs.
In this paper, we address this issue by studying universes of fibrant types expressed in internal languages for models of cubical type theories. CCHM  define a universe concretely using a version of the Hofmann-Streicher universe construction in presheaf toposes . This gives a classifier for their notion of fibration—the universe is equipped with a CCHM fibration that gives rise to every fibration (with small fibres) by re-indexing along a function into the universe. In this way one gets a model of a Tarski-style universe closed under whatever type-forming operations are supported by CCHM fibrations. Thus, there is an appropriate semantic target for a universe of fibrant types, but neither , nor  give a version of such a universe expressed in the internal language. We show (Theorem 3.1) that this is for a good reason: there can be no internal universe of types equipped with a CCHM fibration that weakly111“Weakly” means the function yielding a given fibration under re-indexing is not uniquely determined. classifies fibrations. The essence of this first, albeit negative, contribution of the paper is that naïve axioms for a weak classifier for fibrations imply that a family of types, each member of which is fibrant, has to form a fibrant family; but this is not true for many notions of fibration, such as the CCHM one.
To fix this issue, in Sect. 4 we enrich the internal language to a modal type theory with two context zones [29, 13, 32], inspired in particular by the fact that cubical sets are a model of Shulman’s spatial type theory. In a judgement of this modal type theory, the context represents the usual local elements of types in the topos, while the new context represents global ones. The dual context structure is that of an S4 necessity modality in modal logic, because a global element determines a local one, but global elements cannot refer to local elements. We use Shulman’s term “crisp” for variables from , and call the type theory crisp type theory, because we do not in fact use any of the modal type operators of spatial type theory, but just -types whose domains are crisp. Using these crisp -types, we give axioms that specify a universe that classifies global fibrations—the modal structure forbids the internal substitutions that led to inconsistency.
One approach to validating these universe axioms would be to check them directly in a cubical set model; but we can in fact do more work inside the internal language and reduce the universe axioms to a structure that is simpler to check in models. Specifically, in Theorem 5.2, we construct such a universe from the assumption that the interval is tiny, which by definition means that its exponential functor has a right adjoint (a global one, not an internal one—this is another example where crisp type theory is needed to express this distinction). The ubiquity of right adjoints to exponential functors was first pointed out by Lawvere  in the context of synthetic differential geometry. Awodey pointed out their occurrence in interval-based models of type theory in his work on various cube categories . As far as we know, it was Sattler who first suggested their relevance to constructing universes in such models. It is indeed the case that the interval object in the topos of cubical sets is tiny. Some ingenuity is needed to use the right adjoint to to construct a universe with a fibration that gives rise to every other one up to equality, rather than just up to isomorphism; we employ a technique of Voevodsky  to do so.
Finally, we briefly describe some applications in Sect. 6. First, our universe construction based on a tiny interval is the missing piece that allows a completely internal development of a model of univalent foundations based upon the CCHM notion of fibration, albeit internal to crisp type theory rather than ordinary type theory. Secondly, we describe a preliminary result showing that our axioms for universes are suitable for building type theories with hierarchies of universes, each with a different notion of fibration.
The constructions and proofs in this paper have been formalized in Agda-flat , an appealingly simple extension of Agda  that implements crisp type theory; see http://www.cl.cam.ac.uk/~amp12/agda/internal-universes/. Agda-flat was provided to us by Vezzosi as a by-product of his work on modal type theory and parametricity .
2 Internal description of fibrations
We begin by recalling from [27, 10]
the internal description of fibrations in presheaf models, using CCHM
fibrations [12, Definition 13] as an example. Rather
than using Extensional Martin-Löf Type Theory with an impredicative
universe of propositions as in
[27, 10], here we use an intensional
and predicative version, therefore keeping within a type theory with
decidable judgements.222 Albeit at the expense of some
calculations with universe levels; Coq’s universe polymorphism would
probably deal with this aspect automatically.
Albeit at the expense of some calculations with universe levels; Coq’s universe polymorphism would probably deal with this aspect automatically.Our type theory of choice is the one implemented by Agda , whose assistance we have found invaluable for developing and checking the definitions. Adopting Agda-style syntax, dependent function types are written , or if the argument to the function is implicit; non-dependent function types are written , or just . There is a non-cumulative hierarchy of Russell-style  universe types Among Agda’s inductive types we need identification types , which form the inductively defined family of types with a single constructor ; and we need the empty inductive type , which has no constructors. Among Agda’s record types (inductive types with a single constructor for which -expansion holds definitionally) we need the unit type with constructor ; and dependent products (-types), that we write as and which are dependent record types with constructor and fields (projections) and .
This type theory can be interpreted in (the category with families of) any presheaf topos, such as the one defined below, so long as we assume that the ambient set theory has a countable hierarchy of Grothendieck universes. In particular, one could use a constructive ambient set theory such as IZF  with universes. The interpretation in presheaf toposes has many special properties, of which we use function extensionality and uniqueness of identity proofs:
Definition 2.1 (Presheaf topos of de Morgan cubical sets).
Let denote the small category with finite products which is the Lawvere theory of De Morgan algebra (see [8, Chap. XI] and [33, Sect. 2]). Concretely, consists of the free De Morgan algebras on generators, for each , and the homomorphisms between them. Thus contains an object that generates the others by taking finite products, namely the free De Morgan algebra on one generator. This object is the generic De Morgan algebra and in particular it has two distinct global elements, corresponding to the constants for the greatest and least elements. The topos of cubical sets , which we denote by , is the category of -valued functors on and natural transformations between them. The Yoneda embedding, written , sends with its two distinct global elements to a representable presheaf with two distinct global elements. This interval is used to model path types: a path in from to is a map that when composed with the distinct global elements gives and .
The toposes used in other cubical models [9, 6, 5] vary the choice of algebra from the De Morgan case used above; see . To describe all these cubical models using type theory as an internal language, we postulate the existence of an interval type with two distinct elements, which we write as and :
Apart from an interval, the other data needed to define a cubical sets model of homotopy type theory is a notion of cofibration, which specifies the shapes of filling problems that can be solved in a dependent type. For this, CCHM  use a particular subobject of (the subobject classifier in the topos ), called the face lattice; but other choices are possible . Here, we avoid the use of the impredicative universe of propositions and just assume the existence of a collection of “cofibrant” types in the first universe , including at least the empty type (in Sect. 6, we will introduce more cofibrations, needed to model various type constructs):
We call cofibrant if holds, that is, if we can supply a term of that type. To define the fibrations as a type in the internal language we use two pieces of notation. First, the path functor associated with the interval is
Secondly, we define the following extension relation
We will use this when denotes a partial element of of cofibrant extent, that is when we have a proof of ; in which case is the type of proofs that the partial element extends to the (total) element .
Definition 2.2 (fibrations).
The type of fibration structures for a family of types over some type consists of functions taking any path in the base type to a composition structure in :
Here is some given function (polymorphic in the universe level ) which parameterizes the notion of fibration. Then for each type , the type of fibrations over it with fibers in consists of families equipped with a fibration structure
and there are re-indexing functions, given by composition of dependent functions ()
A CCHM fibration is the above notion of fibration for the composition structure from :
Thus the type of CCHM composition structures for a path of types consists of functions taking any dependently-typed path of partial elements of cofibrant extent to a function mapping extensions of the path at one end , to extensions of it at the other end . When the cofibration is , this expands to the statement that for all paths , , so that this internal language type says that is equipped with a transport function along paths in . The use of cofibrant partial elements generalizes transport with a notion of path composition, which is used to show that path types are fibrant.
Other notions of fibration follow the above definitions but vary the definition of ; for example, generalized diagonal Kan composition . Co/contravariant fibrations in directed type theory  also have the form of for some , but with being directed paths. Definition 2.2 illustrates the advantages of internal-language presentations; in particular, uniformity  is automatic.
If denotes an object of the cubical sets topos , then denotes an object whose global sections correspond to the elements of the set of families over equipped with a composition structure as defined in [12, Definition 13]. Our goal now is to show that there can be no universe that weakly classifies these CCHM fibrations in an internal sense, and then move to a modal type theory where such a universe can be expressed.
3 A "no-go" theorem for internal universes
Consider a universe that weakly classifies CCHM fibrations in an internal sense. By this we mean the following data
where for simplicity we restrict attention to fibrations whose fibers are in . Here is the universe333Our predicative treatment of cofibrant types makes it necessary to place in rather than . and is a CCHM fibration over it which is a weak classifier in the sense that any fibration can be obtained from it (up to equality) by re-indexing along some function . We will show that the data in (11) implies that the interval must be trivial (), contradicting the assumption in (3). This is because (11) allows one to deduce that if a family of types has the property that each has a fibration structure when regarded as a family over the unit type , then there is a fibration structure for the whole family ; and yet there are families where this cannot be the case. For example, consider the family with . For each , the type has a fibration structure , because of uniqueness of identity proofs (2). But the family as a whole satisfies , because if we had a fibration structure , then we could apply it to
(where is the elimination function for the empty type) to get and hence . From this we deduce the following “no-go” 444We are stealing Shulman’s terminology [32, section 4.1]. theorem for internal universes of CCHM fibrations.
Proof.555See http://www.cl.cam.ac.uk/~amp12/agda/internal-universes/theorem-3-1.html for an Agda version of this proof.
Suppose we have an element of and hence functions as in (11). Then taking to be and using the family of fibration structures on each type mentioned above, we get:
Using and function extensionality (1), it follows that there is a proof , namely , where is the usual congruence property of equality. From that and we get an element of . But we saw above how to transform such an element into a proof of . So altogether we have a proof of . ∎
This counterexample generalizes to other notions of fibration; it is not usually the case that any type family for which is fibrant over for all , is fibrant over .
4 Crisp type theory
The proof of Theorem 3.1 depends upon the fact that in the internal language the function can be applied to elements with free variables. In this case it is the variable in ; by abstracting over it we get a function and re-indexing along this function gives the offending fibration (12). Nevertheless, the cubical sets presheaf topos does contain a (univalent) universe which is a CCHM fibration classifier, but only in an external sense. Thus there is an object in and a global section with the property that for any object and morphism , there is a morphism so that is equal to the composition ; see [12, Definition 18] for a concrete description of . The internalization of this property replaces the use of global elements of an object by local elements, that is, morphisms where ranges over a suitable collection of generating objects (for example, the representable objects in a presheaf topos); and we have seen that such an internalized version cannot exist.
Nevertheless, we would like to explain the construction of universes like using some kind of type-theoretic language that builds on Sect. 2. So we seek a way of manipulating global elements of an object , within the internal language. One cannot do so simply by quantifying over the type because of the isomorphism . Instead, we pass to a modal type theory that can speak about global elements, which we call crisp type theory. Its judgements, such as , have two context zones—where represents global elements and the usual, local ones. The context structure is that used for an S4 necessitation modality [29, 13, 32], because a global element from can be used locally, but global elements cannot depend on local variables from . Following , we say that the left-hand context contains crisp hypotheses about the types of variables, written .
The interpretation of crisp type theory in cubical sets makes use of the comonad that sends a presheaf to the constant presheaf on the set of global sections of ; thus for all (where is terminal). Then a judgement describes the situation where is a presheaf, is a family of presheaves over , is a family over and is an element of that family. The rules of crisp type theory are designed to be sound for this interpretation. Compared with ordinary type theory, the key constraint is that types in the crisp context and terms substituted for crisp variables depend only on crisp variables. The crisp variable and (admissible) substitution rules are:
The semantics of the variable rule, which says that global elements can be used locally, uses the counit of the comonad mentioned above. In the substitution rule, stands for the empty list, so and may only depend upon the crisp variables from . The other rules of crisp type theory (those for types, types, etc.) carry the crisp context along. For our application we do not need a type-former for , but instead make use of crisp types (see, e.g. [13, 25]), that is, types whose domain is crisp
with judgemental equalities. In these rules, because the argument variable is crisp, its type , and the term to which the function is applied, must also be crisp. (Crisp -types can be defined in Shulman’s spatial type theory  using the modality, as ; these will satisfy the rule only propositionally, but because our intended models have equality reflection, it will be judgemental in them.) We also use crisp induction for identification types —identification elimination with a family whose parameters are crisp variables.
Remark 4.1 (Presheaf models of crisp type theory).
Crisp type theory is motivated by the specific presheaf topos . However, it seems that very little is required of a category for the presheaf topos to soundly interpret it using the comonad , where takes the global sections of a presheaf and its left adjoint sends sets to constant presheaves. This preserves finite limits (because it is the composition of functors with left adjoints— is isomorphic to the functor given by precomposition with and hence has a left adjoint given by left Kan extension along ). Although the details remain to be worked out, it appears that to model crisp type theory with crisp types and crisp identification induction (and moreover a modality with crisp induction, which we do not use here), the only additional condition needed is that this comonad is idempotent (meaning that the comultiplication is an isomorphism). This idempotence holds iff is a connected topos, which is the case iff is a connected category—for example, when has a terminal object. If it does have a terminal object, then ( is a local topos [19, Sect. C3.6] and) has a right adjoint; in which case, conjecturally [32, Remark 7.5], one gets a model of the whole of Shulman’s spatial type theory, of which crisp type theory is a part. In fact does not just have a terminal object, it has all finite products (as does any Lawvere theory) and from this it follows that is not just local, but also cohesive .
Remark 4.2 (Agda-flat).
Vezzosi has created a fork of Agda, called Agda-flat , which allows us to explore crisp type theory. It adds the ability to use crisp variables666The Agda-flat concrete syntax for “” is “”. in places where ordinary variables may occur in Agda, and checks the modal restrictions in the above rules. For example, Agda-flat quite correctly rejects the following attempted application of a crisp- function to an ordinary argument
while the variant with succeeds. This is a simple example of keeping to the modal discipline that crisp type theory imposes; for more complicated cases, such as occur in the proof of Theorem 5.2 below, we have found Agda-flat indispensable for avoiding errors. However, Agda-flat implements a superset of crisp type theory and more work is needed to understand their precise relationship. For example, Agda’s ability to define inductive types leads to new types in Agda-flat, such as the
modality itself; and its pattern-matching facilities allow one to prove properties ofthat go beyond crisp type theory. Agda allows one to switch off pattern-matching in a module; to be safe we do that as far as possible in our development. Installation instructions for Agda-flat are at http://www.cl.cam.ac.uk/~amp12/agda/internal-universes.
In crisp type theory, to avoid the inconsistency in the “no-go” Theorem 3.1, we can weaken the definition of a universe in (11) by taking and to be crisp functions of fibrations (and implicitly, of the base type of the fibration). For if has type , then the proof fails when in (12) we try to apply to , which depends upon the local variable . Indeed we will show in the next section that it is possible to define a universe with such crisp coding functions, given an extra assumption about the interval type that holds for cubical sets.
5 Universes from tiny intervals
Recall from Definition 2.1 that in the cubical sets model of crisp type theory, the type denotes the representable presheaf on the object . Since has finite products, there is a functor . Pre-composition with this functor induces an endofunctor on presheaves which has left and right adjoints, given by left and right Kan extension [23, Chap. X] along . Hence by the Yoneda Lemma, for any and
naturally in both and . It follows that the exponential functor is naturally isomorphic to and hence not only has a left adjoint (corresponding to product with ) but also a right adjoint. The significance of objects in a category with finite products that are not only exponentiable (product with them has a right adjoint), but also whose exponential functor has a right adjoint was first pointed out by Lawvere in the context of synthetic differential geometry . He called such objects “atomic”, but we will follow later usage  and call them tiny.777Warning: the adjective “tiny” is sometimes used to describe an object of a -enriched co-complete category for which the hom -functor preserves colimits; see  for example. We prefer Kelly’s term small-projective object for this property. In the special case that is cartesian closed and has sufficient properties for there to be an adjoint functor theorem, then a small-projective object is in particular a tiny one in the sense we use here. Thus the interval in cubical sets is tiny and we have a right adjoint to the path functor that we denote by . So for each , the functor is representable by , that is, there are bijections , natural in .
Sattler has pointed out the relevance of tinyness for constructing universes of fibrations in ; see [31, Remark 8.3]. Given and in , from Definition 2.2 we have that fibration structures correspond to sections of and hence, transposing across the adjunction , to morphisms making the outer square commute in the right-hand diagram below:
We therefore have that fibration structures for correspond to sections of the pullback of along the unit of the adjunction at (which is the adjoint transpose of ). This suggests taking and to get a universe and family which is a classifier for fibrations. This argument does not depend on the particular definition of , so should apply to many notions of fibration. However, there are two problems that have to be solved in order to carry out this argument within type theory: First, for in (11) to be an equality (rather than just an isomorphism), one needs the choice of to be strictly functorial with respect to re-indexing along . Secondly, one cannot use ordinary type theory to formulate the construction, because the right adjoint to does not internalize:
There is no internal right adjoint to the path functor for cubical sets. In other words, there is no family of natural isomorphisms (for ).
It is an elementary fact about adjoint functors that such a family of natural isomorphisms is also natural in . Note that . So if we had such a family, then we would also have isomorphisms which are natural in . Therefore would be isomorphic to the identity functor and hence so would be its left adjoint . Hence and would be isomorphic functors , which implies (by the internal Yoneda Lemma) that is isomorphic to the terminal object , contradicting the fact that has two distinct global elements. ∎
We will solve the first of the two problems mentioned above in the same way that Voevodsky  solves a similar strictness problem: apply once and for all to the displayed universe and then re-index, rather than vice versa (as done above). The second problem is solved by using the crisp type theory of the previous section to make the right adjoint suitably global. The axioms we use are given in Fig. 1. The function gives the operation for transposing (global) morphisms across the adjunction , with inverse (the bijection being given by and ); and is the naturality of this operation. The other properties of an adjunction follow from these, in particular its functorial action . Note that Fig. 1 assumes that the right adjoint to preserves universe levels. The soundness of this for relies on the fact that this adjoint is given by right Kan extension [23, Chap. X] along and hence sends a presheaf valued in the th Grothendieck universe to another such.
Theorem 5.2 (Universe construction888We just construct a universe for fibrations with fibers in ; similar universes can be constructed for fibrations with fibers in , for each ; see the formalization of the proof of the theorem in Agda-flat, http://www.cl.cam.ac.uk/~amp12/agda/internal-universes/theorem-5-2.html.).
Consider the display function associated with the first universe:
We have and hence using the transpose operation from Fig. 1, . We define by taking a pullback:
Transposing this square across the adjunction gives . Considering the first and second components of , we have for some ; hence is an element of and so we can define
So it just remains to construct the functions in (13). Given and , we have . So the outer square in the left-hand diagram below commutes:
Transposing across the adjunction , this means that the outer square in the right-hand diagram also commutes and therefore induces a function to the pullback. So there are proofs of and . Transposing the latter back across the adjunction gives a proof of ; and since , this in turn gives a proof of . Combining this with the proof of , we get the desired element of . Finally, taking and in (17), the uniqueness property of the pullback implies that ; and similarly, for any we have that . Together these properties give us the desired element of . ∎
is the missing piece that allows a completely internal
development of a model of univalent foundations based upon the CCHM
notion of fibration, albeit internal to crisp type theory rather than
ordinary type theory. One can define a CwF in crisp type theory whose
objects are crisp types , whose morphisms are crisp
functions , whose families are crisp CCHM
fibrations and whose elements are
crisp dependent functions . To see that this
gives a model of
univalent foundations one needs to prove:
(a) The CwF is a model of intensional type theory with -types and inductive types (-types, identity types, booleans, -types, …).
(b) The type constructed in Theorem 5.2 is fibrant (as a family over the unit type).
(c) The classifying fibration satisfies the univalence axiom in this CwF.
Although we have yet to complete the formal development in Agda-flat, these should be provable from axioms (1)–(4) and Fig. 1, together with some further assumptions about the interval object and cofibrant types listed in Fig. 2. Part (a) was carried out in prior work, albeit in the setting with an impredicative universe of propositions . In the predicative version considered here, we replace the impredicative universe of propositions with axioms asserting that being cofibrant is a mere proposition (), that cofibrant types are mere propositions () and satisfy propositional extensionality (). These axioms are satisfied by provided we interpret as , using the subobject corresponding to the face lattice in  (see [27, Definition 8.6]). Axioms , , , , and correspond to the axioms – from ; in , is the usual internal statement of isomorphism. is the dominance axiom that guarantees that cofibrations compose. Note that axiom uses an operation sending mere propositions and to the mere proposition that is the propositional truncation of their disjoint union; the existence of this operation either has to be postulated, or better, one can add axioms for quotient types [16, Sect. 188.8.131.52] to crisp type theory, (of which propositional truncation is an instance), in which case function extensionality (1) is no longer needed as an axiom, since it is provable using quotient types [34, Sect. 6.3]. Since in this paper we have taken a CCHM fibration to just give a composition operation for cofibrant partial paths from to (and not vice versa), in Fig. 2 we have postulated a path-reversal operation ; this and the other axioms for in that figure suffice to give a “connection algebra” [27, axioms and ] structure on .
Part (b) can be proved using a version of the glueing operation from , which is definable within crisp type theory as in [27, Sect. 6] and [10, Sect. 4.3.2]. The strictness axiom in Fig. 2 is needed to define this; and the assumption that cofibrant types are closed under -indexed () is used to define the appropriate fibration for glueing.
Part (c) can be proved as in [28, Sect. 6] using a characterization of univalence somewhat simpler than the original definition of Voevodsky [34, Sect. 2.10]. The axiom gets used to turn isomorphisms into paths; and the axiom is used to “realign” fibration structures that agree on their underlying types (see [28, Lemma 6.2]).
Remark 6.1 (The interval is connected).
Fig. 2 does not include an axiom asserting that the interval is connected, because that is implied by its tinyness (Fig. 1). Connectedness was postulated as in  and used to prove that CCHM fibrations are closed under inductive type formers (and in particular that the natural number object is fibrant). The proof [27, Thm 8.2] that the interval in cubical sets is connected essentially uses the fact that is a cohesive topos (Remark 4.1). However it also follows directly from the tinyness property: connectedness holds iff , where is the type of Booleans; since we postulate that has a right adjoint, it preserves this coproduct and hence .
In this section we have focussed on axioms satisfied by and the CCHM notion of fibration in that presheaf topos. However, the universe construction in Theorem 5.2 also applies to the cartesian cubical set model , and we expect it is possible give proofs in crisp type theory of its fibrancy and univalence as well. Additionally, the path functor in the presheaf topos of simplicial sets has a right adjoint; assuming the Law of Excluded Middle at the meta-level, one should be able to obtain a description Sattler’s simplicial model  in crisp type theory.
Given that there are many notions of fibration that one may be interested in, it is natural to ask how relationships between them induce relationships between universes of fibrant types. As motivating examples of this, we might want a cubical type theory with a universe of fibrations with regularity, an extra strictness corresponding to the computation rule for identification types in intensional type theory; or a three-level directed type theory with non-fibrant, fibrant, and co/contravariant universes. Towards building such hierarchies, in the companion code999http://www.cl.cam.ac.uk/~amp12/agda/internal-universes/proposition-6-2.html we have shown in crisp type theory that universes are functorial in the notion of fibration they encapsulate—when one notion of fibrancy implies another, the first universe includes the second.
Let be two notions of composition, and the corresponding fibration structures, and and the corresponding classifying universes. A morphism of fibration structures is a function for all and , such that is stable under reindexing (given , and , ). Then a morphism of fibrations induces a function , and this preserves identity and composition.
Since the appearance of the CCHM  constructive model of univalence, there has been a lot of work aimed at analysing what makes this model tick, with a view to simplifying and generalizing it. Some of that work, for example by Gambino and Sattler [15, 31], uses category theory directly, and in particular techniques associated with the notion of Quillen model structure. Here we have continued to pursue the approach that uses a form of type theory as an internal language in which to describe the constructions associated with this model of univalent foundations [27, 10, 5]. For those familiar with the language of type theory, we believe this provides an appealingly simple and accessible description of the notion of fibration and its properties in the CCHM model and in related models. However, up to now there has been no internal description of the univalent universe itself. Here we have shown why this is necessarily the case. Then by extending ordinary type theory with a suitable modality we have given a universe construction that hinges upon the tinyness property enjoyed by the interval in cubical sets. We call this language crisp type theory and our work inside it has been carried out and checked using an experimental version of Agda provided by Vezzosi .
We benefited from discussions with Steve Awodey, Thierry Coquand, Mike Shulman and Christian Sattler. Andrea Vezzosi’s Agda-flat was invaluable for developing and checking some of the results in this paper. The authors would like to thank the Isaac Newton Institute for Mathematical Sciences, Cambridge, for support and hospitality during the Big Proof programme (supported by EPSRC grant no. EP/K032208/1) where work on this paper was undertaken. Licata was supported by the United States Air Force Research Laboratory under agreement numbers FA-95501210370 and FA-95501510053.101010 The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the United States Air Force Research Laboratory, the U.S. Government or Carnegie Mellon University. Orton was supported by a PhD studentship from the UK EPSRC. Pitts thanks Aarhus University Department of Computer Science for hosting him while some of the work was carried out. Spitters was supported by the Guarded Homotopy Type Theory project, funded by the Villum Foundation, project number 12386.
- Aczel  P. Aczel. On relating type theories and set theories. In Proc. TYPES 1998, volume 1657 of Lecture Notes in Computer Science, pages 1–18, 1999.
-  Agda-flat. https://github.com/agda/agda/tree/flat.
-  Agda Project. wiki.portal.chalmers.se/agda.
- Altenkirch et al.  T. Altenkirch, P. Capriotti, and N. Kraus. Extending homotopy type theory with strict equality. arXiv:1604.03799, 2016.
- Angiuli et al. [2017a] C. Angiuli, G. Brunerie, T. Coquand, K.-B. Hou (Favonia), R. Harper, and D. R. Licata. Cartesian cubical type theory. https://github.com/dlicata335/cart-cube/blob/master/cart-cube.pdf, December 2017a.
- Angiuli et al. [2017b] C. Angiuli, K.-B. Hou (Favonia), and R. Harper. Computational higher type theory III: univalent universes and exact equality. arXiv:1712.01800, 2017b.
- Awodey  S. Awodey. Notes on cubical models of type theory. https://github.com/awodey/math/blob/master/Cubical/cubical.pdf, June 2016.
- Balbes and Dwinger  R. Balbes and P. Dwinger. Distributive Lattices. University of Missouri Press, 1975.
- Bezem et al.  M. Bezem, T. Coquand, and S. Huber. A model of type theory in cubical sets. In 19th International Conference on Types for Proofs and Programs (TYPES 2013), volume 26 of Leibniz International Proceedings in Informatics (LIPIcs), pages 107–128, 2014.
Birkedal et al. 
L. Birkedal, A. Bizjak, R. Clouston, H. B. Grathwohl, B. Spitters, and
Guarded cubical type theory.
Journal of Automated Reasoning, 2018.
- Buchholtz and Morehouse  U. Buchholtz and E. Morehouse. Varieties of cubical sets. In Relational and Algebraic Methods in Computer Science: 16th International Conference (RAMiCS 2017), Proceedings, 2017.
- Cohen et al.  C. Cohen, T. Coquand, S. Huber, and A. Mörtberg. Cubical type theory: a constructive interpretation of the univalence axiom. post-proceedings of the 21st International Conference on Types for Proofs and Programs, TYPES 2015, December 2015.
- de Paiva and Ritter  V. de Paiva and E. Ritter. Fibrational modal type theory. Electronic Notes in Theoretical Computer Science, 323:143–161, 2016. Proceedings of the Tenth Workshop on Logical and Semantic Frameworks, with Applications (LSFA 2015).
- Dybjer  P. Dybjer. Internal type theory. In S. Berardi and M. Coppo, editors, Types for Proofs and Programs, volume 1158 of Lecture Notes in Computer Science, pages 120–134. Springer Berlin Heidelberg, 1996. ISBN 978-3-540-61780-8.
- Gambino and Sattler  N. Gambino and C. Sattler. The Frobenius condition, right properness, and uniform fibrations. Journal of Pure and Applied Algebra, 221:3027–3068, 2017.
- Hofmann  M. Hofmann. Extensional Concepts in Intensional Type Theory. PhD thesis, University of Edinburgh, 1995.
- Hofmann  M. Hofmann. Syntax and semantics of dependent types. In A. M. Pitts and P. Dybjer, editors, Semantics and Logics of Computation, Publications of the Newton Institute, pages 79–130. Cambridge University Press, 1997.
- Hofmann and Streicher  M. Hofmann and T. Streicher. Lifting Grothendieck universes. Unpublished note, 1999.
- Johnstone  P. T. Johnstone. Sketches of an Elephant, A Topos Theory Compendium, Volumes 1 and 2. Number 43–44 in Oxford Logic Guides. Oxford University Press, 2002.
- Lawvere  F. W. Lawvere. Toward the description in a smooth topos of the dynamically possible motions and deformations of a continuous body. Cahiers de Topologie et Géométrie Différentielle Catégoriques, 21(4):377–392, 1980.
- Lawvere  F. W. Lawvere. Axiomatic cohesion. Theory and Applications of Categories, 19(3):41–49, 2007.
- Luo  Z. Luo. Notes on universes in type theory. Lecture notes for a talk at the Institute for Advanced Study, Princeton, 2012.
- MacLane  S. MacLane. Categories for the Working Mathematician. Graduate Texts in Mathematics 5. Springer, 1971.
- Martin-Löf  P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis, Napoli, 1984.
- Nanevski et al.  A. Nanevski, F. Pfenning, and B. Pientka. Contextual modal type theory. ACM Trans. Comput. Logic, 9(3):23:1–23:49, 2008.
- Nuyts et al.  A. Nuyts, A. Vezzosi, and D. Devriese. Parametric quantifiers for dependent type theory. Proc. ACM Program. Lang., 1(ICFP):32:1–32:29, August 2017.
- Orton and Pitts [2017a] I. Orton and A. M. Pitts. Axioms for modelling cubical type theory in a topos. arXiv:1712.04864. Revised and expanded version of an article in Proc. CSL 2016, vol. 62 of LIPIcs, pp 24:1–24:19, December 2017a.
- Orton and Pitts [2017b] I. Orton and A. M. Pitts. Decomposing the univalence axiom. arXiv:1712.04890, December 2017b.
- Pfenning and Davies  F. Pfenning and R. Davies. A judgmental reconstruction of modal logic. Mathematical Structures in Computer Science, 11:511–540, 2001.
- Riehl and Shulman  E. Riehl and M. Shulman. A type theory for synthetic -categories. arXiv:1705.07442, 2017.
- Sattler  C. Sattler. The equivalence extension property and model structures. arXiv:1704.06911, August 2017.
- Shulman  M . Shulman. Brouwer’s fixed-point theorem in real-cohesive homotopy type theory. Mathematical Structures in Computer Science, pages 1–86, 2017.
- Spitters  B. Spitters. Cubical sets and the topological topos. arXiv:1610.05270, 2016.
- Univalent Foundations Program  The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations for Mathematics. http://homotopytypetheory.org/book, Institute for Advanced Study, 2013.
- Voevodsky  V. Voevodsky. A simple type system with two identity types. https://www.math.ias.edu/vladimir/sites/math.ias.edu.vladimir/files/HTS.pdf, February 2013.
- Voevodsky  V. Voevodsky. C-systems defined by universe categories: Presheaves. arXiv:1706.03620, June 2017.
- Yetter  D. Yetter. On right adjoints to exponentible functors. Journal of Pure and Applied Algebra, 45:287–304, 1987. Corrections in volume 58:103–105, 1989.