Homotopy Type Theory, IV
Posted by Mike Shulman
So far in this series we’ve described the correspondence between type theory and homotopy theory and defined some basic notions of homotopy theory in type theory, including equivalences in several ways. We’ve also mentioned a few axioms that we may want to add to intensional type theory, including “function extensionality”, a subobject classifier, and a truncation into (-1)-types.
However, nothing we’ve said so far excludes the possibility that all types are discrete (= 0-types = sets). Intensional type theory plus function extensionality has sound semantics in any locally cartesian closed 1-category; and if the category is regular, then exists; while if it is a topos, then of course it has a subobject classifier. But today I’ll introduce Voevodsky’s univalence axiom, which is not valid in any 1-categorical semantics—or, indeed, in -categorical semantics for any finite ! The univalence axiom is perhaps the easiest and most intuitive way to require that our homotopy type theory is honestly “homotopical”, and it also has other pleasant consquences (including, perhaps surprisingly, function extensionality).
In Voevodsky’s original phrasing, the univalence axiom is an augmentation of universes, which are a type-theoretic notion that I haven’t mentioned yet. (If you don’t like universes, that’s okay; carry on reading.) At an informal level, I think type-theoretic universes are not very different from the universes of the Grothendieck sort that you may be more familiar with, and are even more closely related to their categorial analogues. In terms of categorical semantics, a universe is a type , together with a display map (that is, a type dependent on ). We think of the elements of as “codes for types”, with coding for the type . And we require that the type-theoretic operations, such as dependent sums and products, are represented by operations on , so that types of the form are closed under such operations.
Type-theoretically, we usually identify types with their codes , so that the elements (terms) of are types. We generally assume every type is contained in some universe, so that we can replace judgments of the form “ is a type” with “” for some universe . In particular, any universe must be an element of some universe , which must be an element of some universe , and so on; we often postulate that every type belongs to one of a specific sequence of universes . Frequently a universe is written as “” or “”.
Thus a universe is a “type of types.” If we regard types as sets, then this is like a set of sets. But if we are category theorists, we know that it’s unnatural to have a set of sets; really we should have a category, or at least a groupoid, of sets. And we should have a 2-groupoid of groupoids, and an -groupoid of -groupoids, and so on. But the nice thing about is that , so that we can expect to have an -groupoid of -groupoids. Thus, arguably, it’s really in the homotopy context that the notion of universe is “most sensible”.
Now it’s all well and good to say we have an -groupoid of -groupoids, but what is that -groupoid? Its objects are of course -groupoids, but we also know what its morphisms should be, and its 2-morphisms, and so on: they should be the equivalences, homotopies, and so on between -groupoids. However, the basic type-theoretic notion of universe doesn’t tell us anything about what the path-types of the universe are like; this is what the univalence axiom fixes. (It’s analogous to how plain intensional type theory doesn’t tell us anything about when two functions should be considered equal; hence we need function extensionality.)
To make things more precise, let and be types in some universe ; we want to specify what should be. And we have a natural candidate, namely the type
of equivalences from to . (Remember that is a proposition, so it makes sense to think of points of as functions with the property of “being an equivalence.”) Moreover, we have a natural map
and the univalence axiom for simply states that this map is an equivalence for any and , i.e.
How do we define ? Remember from the first post that the “elimination rule” for path-types says:
- Given a type which may depend on two points and a path between them, if we have a way to produce an element of for any , then we can “transport” it along any path to produce a canonical element of (and in such a way that if we transport it along then it doesn’t change).
We’re going to apply this rule with , , and . We’ll take the type to be , which depends on and and (vacuously) a path between them. Now we do have a way to produce an element of , namely the identity function (which is an equivalence; I’ll leave proving that as an exercise). Therefore, we can transport the identity along any path to produce a canonical element of corresponding to . This defines the map .
Let’s think first about the semantics of univalence. First of all, in the form I stated it above, it is an axiom about a particular universe . A universe satisfying the univalence axiom is called a univalent universe. We generally assume that all of the specified universes are univalent.
In the “standard” model in -groupoids, we obtain a univalent universe from “the -groupoid of all -groupoids bounded in size by some inaccessible cardinal ”. Thus, if there are arbitrarily large inaccessibles, every type will belong to some univalent universe. (I’m not sure whether inaccessibles are necessary here or whether some weaker assumption would suffice.) I believe this is the only model with enough univalent universes that has been constructed in set theory with anything approaching rigor (by Voevodsky).
However, I think most people expect that in more general -categorical semantics, we ought to obtain a univalent universe from any object classifier with strong enough closure properties. In particular, in any (Grothendieck) -topos, there ought to be a univalent universe of all “-compact” types, for any inaccessible .
Moreover, any “full subuniverse” of a univalent universe will again be a univalent universe, as long as it is closed under the type-theoretic operations. In particular, if is any univalent universe, then its full subuniverse of -types is again univalent for any , and that subuniverse will itself be an -type. Thus a univalent universe need not itself be of infinite h-level: we can have a univalent groupoid (1-type) of small sets (0-types), a univalent 2-groupoid (2-type) of small groupoids, and so on. At the bottom, we can have a univalent set (0-type) of small truth values ((-1)-types).
In particular, a subobject classifier, if one exists, is also a univalent universe; so to get ourselves out of the world of sets we need at least two univalent universes. Similarly, we can have a sequence of univalent universes in which contains only (-1)-types and is itself a 0-type, contains only 0-types and is itself a 1-type, and so on. Such a stratification of universes by “categorical dimension” as well as by size does seem to match much of mathematical practice—but only outside of homotopy theory. For homotopy theory, we do really want to have -types that aren’t -types for any finite (such as, for instance, the 2-sphere ), and an infinite sequence of univalent universes doesn’t seem to be enough to guarantee this. I’ll come back to this later.
Vladimir explained the origin of the word “univalent” as follows:
- a universal fibration is one of which every other fibration is a pullback in a unique way (up to homotopy).
- a versal fibration is one of which every other fibration is a pullback in some way, not necessarily unique.
- a univalent fibration is one of which every other fibration is a pullback in at most one way (up to homotopy).
Thus the univalence axiom asserts that the structural fibration of the universe is univalent.
Now, the principal way we use the univalence axiom is as follows: given an equivalence , we apply the inverse of to get a path , then apply the above-mentioned “elimination rule” for elements of path-types. Putting this together, we get the following consequence of univalence, apparently first formulated by Peter Lumsdaine and Andrej Bauer.
- Given a type which may depend on two types and an equivalence between them, if we have a way to produce an element of for any type , then we can “transport” it along any equivalence to produce a canonical element of (and in such a way that if we transport it along then it doesn’t change).
The elimination rule for paths is sometimes called path induction, since it is an instance of the general induction principle for inductively defined types. By analogy, we refer to the above consequence of univalence as equivalence induction. Informally, it means that
- Given an equivalence , we can “identify” with along . Specifically, in any construction we can perform, or theorem we can prove, starting only from a type , we can obtain another valid construction or theorem by replacing some copies of with and any necessary occurrences of by . Behind the scenes, this replacement uses and its inverse to silently transfer data back and forth between and as necessary.
Such “identification” of course a very common thing to do in mathematics, often without even remarking on it! But usually, if it is justified at all, it is “by abuse of notation” or by trusting the reader to do the translation. The univalence axiom formalizes it, makes it happen “automatically” in the background, and makes it “natural/continuous.”
Moreover, equivalence induction actually implies the full univalence axiom. For if we apply equivalence induction to the type and the identity path , we obtain a way to make any equivalence into a path . The final condition that transporting along the identity equivalence leaves something unchanged (together with the same property for the identity path) then makes this construction into an inverse of . I’ve checked this in Coq. But it’s not really surprising, because equivalence induction gives the type the “same inductive/universal property” as . (But I don’t know how to state equivalence induction in a way that is evidently a proposition.)
Note that equivalence induction makes no reference to a particular universe containing and , except that the type is required to be defined “parametrically” for all in the universe. In particular, this implies that if is a univalent universe and is a “larger” universe, in the sense that every type in also belongs to , then is also an equivalence for any , whether or not itself is univalent. (It can apparently still be the case that a “smaller” non-univalent universe is contained in a “larger” univalent one, however.) So univalence is almost a property of types (or pairs of types) rather than a property of universes. Furthermore, we can make sense of equivalence induction even if there are no universes, if instead we have some sort of “polymorphism” allowing us to make sense of “defining a type parametrically over other types”. (Thanks to Peter Lumsdaine for correcting some errors in the original version of this paragraph; see his comment and ensuing discussion below.)
Univalence also implies other useful things, like function extensionality and (maybe, with some help) quotients, but let’s save those for another day.
Re: Homotopy Type Theory, IV
another great posting, Mike! I especially appreciate the new observation:
“… So contrary to its original appearance, univalence can be considered to be a property of types (or, perhaps, pairs of types) rather than a property of universes. Furthermore, we can make sense of equivalence induction even if there are no universes …”
As you say, understanding univalence in terms of the associated “equivalence induction principle” corresponds to the usual mathematical practice of “identifying” equivalent structures – and makes it rigorous rather than just careful sloppiness.
It’s (i) admissible by a property of type theory, namely being “homotopy invariant” in the sense that anything expressible/definable/provable is stable under a transformation along an equivalence (and this is *proved* by VV’s model in Kan complexes, which shows that adding UA is formally sound); and (ii) it expresses a commitment not to add any new constructions, terms, axioms, that would break that property (not that anyone would contemplate doing such a thing).
Already at the level of 1-types, it has a pleasant consonance with mathematical practice not shared by conventional foundations, since it allows us to treat isomorphic structures as “identical” – something that has seemed puzzling from the point of view of set-theoretic foundations, since the language of set-theory doesn’t have the invariance property (i).
BTW: you didn’t mention how to actually get a univalent universe from “the -groupoid of all -groupoids (bounded in size)”. Vladimir’s construction involves the theory of minimal fibrations, well-ordering of the fibers, and other technology. Andre Joyal suggested an alternate construction at Oberwolfach – perhaps Nicola Gambino would be willing to post it to the HoTT site?