aa r X i v : . [ m a t h . C T ] F e b The Univalence Principle
Benedikt AhrensPaige Randall NorthMichael ShulmanDimitris Tsementzis
School of Computer Science, University of Birmingham, Edgbas-ton, United Kingdom
Email address : [email protected] Department of Mathematics and Department of Electrical andSystems Engineering, University of Pennsylvania, Philadelphia, Penn-sylvania, USA
Email address : [email protected] Department of Mathematics, University of San Diego, San Diego,California, USA
Email address : [email protected] Princeton University and Rutgers University, New Jersey, USA
Email address : [email protected] Mathematics Subject Classification.
Primary 18N99, 03B38; Secondary03G30, 55U35
Key words and phrases. univalence axiom, inverse category, higher structures,n-categories, homotopy type theory, univalent foundations, structure identityprinciple, categories, equivalence principle
Abstract.
The Univalence Principle is the statement that equivalent math-ematical structures are indistinguishable. We prove a general version of thisprinciple that applies to all set-based, categorical, and higher-categorical struc-tures defined in a non-algebraic and space-based style, as well as models ofhigher-order theories such as topological spaces. In particular, we formulatea general definition of indiscernibility for objects of any such structure, and acorresponding univalence condition that generalizes Rezk’s completeness con-dition for Segal spaces and ensures that all equivalences of structures are lev-elwise equivalences.Our work builds on Makkai’s First-Order Logic with Dependent Sorts,but is expressed in Voevodsky’s Univalent Foundations (UF), extending pre-vious work on the Structure Identity Principle and univalent categories in UF.This enables indistinguishability to be expressed simply as identification, andyields a formal theory that is interpretable in classical homotopy theory, butalso in other higher topos models. It follows that Univalent Foundations is afully equivalence-invariant foundation for higher-categorical mathematics, asintended by Voevodsky. n Memory of Vladimir Voevodsky ontents
Chapter 1. Introduction 1Chapter 2. Introduction to two-level homotopy type theory and univalentfoundations 11
Part 1. Theory of diagram structures
Part 2. Examples of diagram structures
Part 3. Theory of functorial structures vi CONTENTS
Bibliography 153HAPTER 1
Introduction
What is the univalence principle? Succinctly, it is the statement that
Equivalent mathematical structures are indistinguishable.
The meaning of “equivalence” varies with the mathematical structure in question.For classical set-based structures such as groups, rings, fields, topological spaces,and so on, the relevant notion of equivalence is isomorphism . Every beginning ab-stract algebra student, for instance, learns that isomorphic groups are indistinguish-able from the perspective of group theory: they have all the same “group-theoreticproperties”. A general statement of this sort can be made using category theory:two isomorphic objects of any category are indistinguishable from the perspectiveof that category. Philosophically, this categorical point of view has been advocatedas an approach to mathematical structuralism [ Ben65, Awo96, Awo04 ].However, one of the novel aspects of category theory is that the relevant notionof equivalence for categories themselves is not isomorphism, but rather equivalenceof categories . The student of category theory likewise learns that equivalent cate-gories are indistinguishable from the perspective of category theory, having all thesame “category-theoretic properties”. One can generalize this to a statement aboutobjects of 2-categories, and so on.Indeed, nowadays an increasing number of mathematicians work with objectssuch as ∞ -categories, for which the appropriate notion of equivalence is even weaker.Moreover, the need to transfer properties across such equivalences is even greater,since ∞ -categories have many very different-looking presentations that are usedfor different purposes. A popular aim in ∞ -category theory is to work “model-independently”; that is, to only use properties and constructions on ∞ -categoriesthat are independent of the presentation chosen. This essentially relies on theunivalence principle: equivalent presentations of ∞ -categories should be indistin-guishable to ∞ -category-theoretic operations and properties.In trying to give precise mathematical expression to these ideas, however, var-ious problems arise. For instance, can we really make sense of a statement like“equivalent categories have all the same category-theoretic properties” as a theoremto prove, rather than merely a definition of what we mean by “category-theoreticproperty”? Certainly there are some properties that equivalent categories, or evenisomorphic groups, can fail to share; for instance, G = { } and H = { } areisomorphic groups (with their unique group structures) but ∈ G while / ∈ H .In the case of groups, one answer is that a property is group-theoretic if it isexpressible in the formal first-order language of group theory. This works for otherset-based structures, but fails for categories: there is an ordinary first-order theoryof categories, but it can distinguish categories up to isomorphism, not just up to equivalence. This problem was solved by Blanc [ Bla78 ] and Freyd [
Fre76 ], whodevised a syntax for category-theoretic properties, and showed that such propertiesare invariant under equivalence of categories. Informally, a property is category-theoretic if it is expressible in a form of first-order logic that never refers to equalityof objects. This makes isomorphic objects of a category indistinguishable, andtherefore makes equivalent categories indistinguishable as well.Blanc and Freyd’s syntax relies on dependently typed logic to entirely eliminateequality of objects from the theory of categories. (The point is that two arrows canonly be composed when the domain of one equals the target of the other; but bystating composition instead as a family of maps C ( y, z ) × C ( x, y ) → C ( x, z ) we canavoid referring to equality of objects.) Makkai [ Mak95 ] generalized this to highercategories, introducing a language for higher-categorical properties called First Or-der Logic with Dependent Sorts (FOLDS), and proving that FOLDS-properties areinvariant under FOLDS-equivalence.Importantly, Makkai’s FOLDS is not specific to n -categories (for any value of n , including ∞ ), but involves general notions of signature and equivalence for allkinds of higher-categorical structures. Indeed, while categories and n -categories areundoubtedly important, they are really just the most prominent examples of a zooof categorical and higher-categorical structures that play a growing role in mathe-matics and its applications. This zoo includes various kinds of monoidal categories,multicategories, polycategories, fibred categories, enriched categories, enhanced cat-egories, † -categories, and many more that are continually being discovered. But inprinciple, any such structure, known or yet unknown, can be encoded into Makkai’sframework, leading to a notion of equivalence between structures and a notion ofcategorical property that is invariant under equivalence. Makkai’s framework is powerful, but it has limitations. One is that it enforcesa particular style of definition for higher categorical structures, which may be called non-algebraic and set-based . An algebraic categorical structure is one whose opera-tions (composition, identities, and so on) are specified by functions, as in the stan-dard definitions of category and bicategory. By contrast, a non-algebraic structureis one whose operations are determined by witnesses that stand in a relation to theirinputs and outputs. The best-known definition of ∞ -category, the quasi-categoriesdefined by Joyal [ Joy02 ] and used extensively by Lurie [
Lur09, Lur17 ], is non-algebraic in that composites of 1-simplices are witnessed by 2-simplices—althoughthe identities in a quasi-category are given algebraically by the simplicial degener-acy maps, so a quasi-category is still too algebraic to fit in Makkai’s framework.A quasi-category is also set-based, in the sense that a quasicategory is a col-lection of sets equipped with structure. The alternative to this is a space-based structure, exemplified by Rezk’s complete Segal spaces [
Rez01 ] (CSS) as a modelfor ∞ -categories: a CSS is a collection of spaces (in the sense of ∞ -groupoids,represented by Kan complexes or CW-complexes) equipped with structure.Of course, in the standard set-theoretic foundations for mathematics, a spaceis also defined in terms of sets, so a space-based definition can be expanded out toa set-based one. However, space-based definitions have many advantages, foremostamong which is a simpler definition of equivalence: an equivalence of CSS is sim-ply a functor that is a levelwise equivalence on each underlying space. This often .3. UNIVALENT FOUNDATIONS 3 leads to better-behaved Quillen model categories (e.g., [ Rez10 ]), and makes it eas-ier to “internalize” by replacing spaces with objects of any sufficiently structured ∞ -category (e.g., [ Lur17 ]). But most importantly for us, it means that the univa-lence principle for space-based structures can be reduced directly to the univalenceprinciple for spaces: when the constituent spaces of two CSS are indistinguishable,so are the CSS themselves.However, the space-based approach requires some care to formulate correctly:we can’t just copy a set-based definition and make all the sets into spaces, sincethen there would be superfluous data. We need to ensure that the “internal” homo-topical structure of each constituent space coincides with the “naturally defined”homotopical structure on its set of points induced by the higher morphisms presentin the structure being defined. In [
Rez01, Rez10 ] this condition is called com-pleteness , and in other contexts it can be viewed as a stack condition. We will callit univalence , because it is a “local” version of the univalence principle for the ob-jects of our space-based structure: if two isomorphic objects of a category are trulyindistinguishable, then they should be related by a path in the space of objects.Part of what we achieve in this book is to formulate a version of Makkai’stheory for space-based structures. This requires, firstly, giving a general definitionof a univalence property for such structures, which requires a general notion ofwhen two objects of such a structure are equivalent. The latter is a nontrivialtask because of the generality of the “structures” in question: they may have manykinds of “morphism” with different shapes and behavior, and it is not always obviouswhich of these should figure into a notion of equivalence, and how.Our solution is to take the local univalence principle as a definition: we de-fine two objects to be indiscernible if they cannot be distinguished by any of thehigher “morphisms” of the structure in question (see Section 1.4 for more discus-sion). In familiar cases this reduces, by a Yoneda-like argument, to familiar notionsof isomorphism and equivalence; but it also gives a correct answer in more unusualsituations. Then we will define a structure to be univalent if the path-space betweenany two objects is equivalent to the space of indiscernibilities between them, andprove that these univalent structures have the good behavior of CSS: the equiva-lences between them are the levelwise equivalences of underlying spaces. Finally,we use this to deduce a univalence principle for univalent structures from the univa-lence principle for spaces: two equivalent univalent structures are indistinguishableby any property expressible in a certain dependently typed language.
Another limitation of Makkai’s framework is that his univalence principle per-tains only to properties ; i.e., statements about a single structure that could be eithertrue or false. By contrast, mathematics is concerned not just with properties of asingle structure, but with constructions on objects and relations between objects.With this in mind, and inspired by Makkai (see [
Voe15 , p. 1279]), Voevodskyconceived Univalent Foundations (UF) with a more ambitious goal: a foundationallanguage for mathematics, all of whose constructions are invariant under equiva-lences of structures. Since in UF proofs are particular constructions, this implies asimilar invariance of properties.For a foundational language for mathematics to satisfy such a “global” univa-lence principle, we must exclude any properties such as ∈ G mentioned above.
1. INTRODUCTION
Like the structure-specific languages of Blanc, Freyd, and Makkai, UF achieves thisusing dependent types. In fact UF is a form of homotopy type theory (HoTT); wegive a brief review in Chapter 2.More than this is true, however. The univalence principle is a generalization ofthe indiscernibility of identicals —the statement that equal objects have the sameproperties—in which equality is replaced by a suitable notion of equivalence. How-ever, in a foundational language for mathematics, the converse identity of indis-cernibles generally also holds automatically, because of the presence of haecceities .Namely, if x and y have all the same properties, then this applies also to the prop-erty of “being equal to x ”; hence, since x is equal to x , also y is equal to x .This means that in any foundational language satisfying the global univa-lence principle, equivalent structures must be equal . This may seem impossible,but HoTT/UF achieves it by expanding the notion of “equality”, enabling it tocarry information and coincide with equivalence. The basic objects of HoTT/UFare types , which behave not like discrete sets but like spaces in homotopy theory,and the foundational notion of “equality” behaves like paths in such a space. (Wegenerally refer to this notion of equality as “identification”, to avoid the conceptualbaggage that comes along with words like “equality” and “path”.)The defining feature of HoTT/UF is Voevodsky’s univalence axiom (1.1) univalence : ∀ ( X, Y : U ) , ( X = Y ) ≃ ( X ≃ Y ) , which says that for any two types (e.g., sets) X and Y , the identification type X = Y is equivalent to the equivalence type X ≃ Y . By the indiscernibility of identicals,this then implies that equivalent types are indistinguishable by all properties, andalso all constructions. In other words, in HoTT/UF, the univalence principle forsingle types (the most trivial sort of “mathematical structure”) holds essentially bydefinition.It was observed by Coquand and proven in [ CD13 ] and in [
Uni13 , Section 9.8] that this single postulate implies that the same kind of strong univalence principlealso holds for a wide range of set-based mathematical structures such as groups andrings: the identification type of such structures is equivalent to their isomorphism type, and therefore isomorphic structures are indistinguishable by all properties andconstructions. This result has become known as the Structure Identity Principle , aterm coined by Aczel [
Acz11 ]. As pointed out in [
Awo14 ], philosophically this canbe viewed as the ultimate formulation of mathematical structuralism. Similarly, in[
AKS15 , Theorem 6.17] the univalence principle was proven for categories: identi-fications of univalent categories (those satisfying the “local” univalence principle forobjects, as in space-based structures such as CSS) are equivalent to equivalences ofcategories.In this book, we generalize these results to other higher-categorical structures.Using a general notion of structure inspired by Makkai’s, and the notions of indis-cernibility of objects and local univalence described earlier, we show in HoTT/UFthat identifications of univalent structures are equivalent to equivalences of struc-tures. Thus, equivalent univalent structures are indistinguishable in HoTT/UF: The formalization of [
CD13 ] compares the two independent results. Although our results are much more general than those of [
CD13 ] and [
Uni13 , Section 9.8]in that they also include higher-categorical and higher-order examples, for set-level structurestheir results are somewhat more general, applying to additional structure added to objects of any1-category, rather than only to structures described entirely by a notion of signature. .4. INDISCERNIBILITY 5 not only logical properties, but also all mathematical constructions, are invariantunder such equivalence. This goes a long way towards showing that HoTT/UFreally does realize Voevodsky’s goal of a fully equivalence-invariant foundation.The connection between this result and the one discussed in Section 1.2 isgiven by the model of HoTT/UF constructed by Voevodsky [
KL19 ] in the modelcategory of simplicial sets. In this model, the types of HoTT/UF are interpretedby Kan complexes, i.e., spaces of homotopy theory, and therefore any structuredefined inside HoTT/UF immediately yields a space-based structure in set-theoreticmathematics. Hence, proving the internal univalence principle for structures inHoTT/UF immediately entails an analogous theorem for space-based structures insimplicial sets.Even if we were not interested in HoTT/UF for its own sake, the type-theoreticapproach also has other advantages over working more explicitly with space-basedstructures in homotopy theory. For instance, the native presence of homotopytheory makes it easy to incorporate higher homotopy types in the definition of ourstructures, in particular allowing group actions and higher group actions to appeareven in our non-algebraic context. Type-theoretic universes provide an extremelyconvenient language for working with classifying spaces, allowing us to view theirpoints as literally being the objects they classify. And type-theoretic argumentscan much more easily be verified for correctness using a computer proof assistant.The inductive nature of type-theoretic arguments also suggests useful new ab-stractions. For instance, by isolating those properties of Makkai’s signatures thatare essential for our arguments, we are led ineluctably to a more general notionof signature. These “functorial signatures” turn out to be general enough to en-compass higher -order logic, including structures such as topological and uniformspaces and suplattices within our theory. Moreover, unlike ordinary higher-orderlogic, functorial signatures carry enough data to determine a non-invertible notionof morphism of structures, which specializes to the correct notions in examples suchas continuous or sup-preserving maps.A final, very significant, advantage of HoTT/UF is that simplicial sets arenot its only model. Although the type-theoretic language sounds and feels as ifwe were talking about ordinary spaces, working with concrete points and pathsbetween them, there is nevertheless a machine that “compiles” this language toyield definitions and theorems that make sense in any ∞ -topos. (For a long time,some of the pieces of this machine were missing from the literature; indeed, resolvingone of these was the last project Voevodsky was working on. However, with theappearance of [ Shu19, BdBLM20 ] (though still unpublished), all the pieces ofrelevance to the current book seem to be resolved.)Thus, the advantage of space-based structures mentioned in Section 1.2 thatthey can be more easily internalized in other ∞ -categories is achieved automatically if such structures are defined internally in HoTT/UF. For instance, in this way theunivalent categories of [ AKS15 ] can be interpreted as stacks of 1-categories overany site, and similarly for other higher-categorical structures.
We now say a few more words about the notion of indiscernibility for objectsof a structure that underlies all of our work. The name comes from the fact thatit is a relativization of the identity of indiscernibles to a particular structure. We
1. INTRODUCTION mentioned above that because of haecceities, identity of indiscernibles (two objectswith all the same properties are identical) is automatic in a foundational theory. Butif we restrict the “properties” in question to those expressible in terms of a particularstructure, we obtain a nontrivial notion that turns out to specialize to a correctdefinition of isomorphism/equivalence for objects of any categorical structure.We can already see this in operation for set-level structures. Consider the ex-ample of a preordered set: a set P together with a binary relation ≤ that is reflexiveand transitive. The univalence principle of [ Uni13 , Section 9.8] for preordered setssays that the type of isomorphisms between two preordered sets (i.e., isomorphismsof underlying sets respecting the relation) is equivalent to the type of identifications.However, the univalence principle for preordered sets we arrive at in this bookis somewhat different, based on the above notion of indiscernibility. In the case of apreordered set P , two elements x, y of P are indiscernible if they behave in exactlythe same way: that is, x ≤ z iff y ≤ z for all z , and z ≤ x iff z ≤ y for all z in P .But this is equivalent to saying that x ≤ y and y ≤ x .Since our general notion of equivalence involves indiscernibilities, we then findthat two preordered sets are equivalent if there are functions between the underlyingsets f : P ⇆ Q : g , respecting the relations, such that gf ( x ) is not necessarily equalto, but indiscernible from, x and likewise f g ( y ) is indiscernible from y . For theunivalence principle to hold for this notion of equivalence, it must be that suchequivalences coincide with isomorphisms, which means that indiscernibilities mustcoincide with equalities. But this says precisely that P is antisymmetric, i.e., apartial order.Of course, this is nothing but a specialization of the notions of isomorphismof objects and equivalence of categories, when preorders are regarded as categorieswith at most one morphism between any two objects. For a more novel example,consider topological spaces: sets X together with a subset O of their powerset P ( X ) satisfying suitable axioms. It turns out that two points x, y of a topologicalspace X are indiscernible when x ∈ U iff y ∈ U for every open set U in O . Then a univalent topological space is exactly a T space, and we find that for two univalenttopological spaces, their identification type is equivalent to the type of equivalencesup to indiscernibility.Our notion of indiscernibility is inspired by Makkai’s “internal identity” forobjects of a FOLDS-structure; see, e.g., [ Mak21 ]. Other notions related to our in-discernibility have appeared elsewhere in the literature. For instance, Levy [
Lev17 ]studies isomorphism of types in simply-typed lambda calculi with effects, defining anotion of “contextual isomorphism” that is similar in spirit to our indiscernibilities;see Chapter 13 for a few more details.We will argue that indiscernibility gives a correct notion of equivalence betweenobjects of all categorical and higher-categorical structures, when properly formu-lated; and that the resulting univalent structures (where indiscernibility coincideswith equality) are usually the correct notion of such structures to work with inHoTT/UF, and likewise when interpreted into homotopy theory yield the correctspace-based definitions of such structures. To that end, in Part 2 and Chapter 18we will survey a large number of categorical structures and their notions of in-discernibility and univalence. More broadly, we view this book as laying out thefoundations of a general approach to categorical and higher-categorical structuresin HoTT/UF. .6. STRUCTURE OF THIS WORK 7
In Chapter 19 we will discuss a number of open problems for future work, but toavoid disappointing the reader, we want to mention at the outset a few importantways in which our current theory is incomplete. The first is that at present weconsider only structures of finite categorical dimension, e.g., n -categories for finite n but not ∞ -categories, ( ∞ , n ) -categories, or ( ∞ , ∞ ) -categories. We fully expectthat our definitions and results should have infinite-dimensional analogues, but since ∞ introduces unique complications (e.g., there is more than one candidate notion of ( ∞ , ∞ ) -category, depending on whether the equivalences are defined “inductively”or “coinductively”) we have chosen to begin with the simpler finite-dimensional case.The second is that our framework is still, like Makkai’s, entirely non-algebraic.The ambient structure of HoTT/UF certainly allows, and even encourages, us todefine operations and algebraic structures. However, at present our notion of in-discernibility is only defined for purely “relational” or non-algebraic structures. Itis always possible to encode operations non-algebraically, as we show in many ex-amples, but it would be preferable not to have to go through this encoding stepmanually.Finally, the notion of equivalence of structures that appears in our univa-lence principle is what may be called a strong equivalence, which in the case of1-categories specializes to a pair of functors in both directions together with nat-ural isomorphisms relating their composites to identities. However, the univalenceprinciple for 1-categories of [ AKS15 ] also applies to weak equivalences—single func-tors that are fully faithful and essentially surjective—which implies, in particular,that any weak equivalence between univalent 1-categories is a strong equivalence.(Indeed, this is one of the reasons that univalent categories are the “good” notion ofcategory when working in HoTT/UF.) We can define a notion of weak equivalenceof arbitrary structures, but we have been unable to extend our univalence principleto such equivalences (though we have no counterexample either).
This work is structured in three parts, preceded by an introduction to univalentfoundations and two-level type theory in Chapter 2.
In this work, we introduce two notions of theory and model of a theory . Given a theory T and two models M and N of T , there arethree notions of “sameness” for them:(1) Identification M = N ;(2) Levelwise equivalence M ≅ N ;(3) Equivalence M ≃ N .We first show that Voevodsky’s univalence axiom entails that identifications co-incide with levelwise equivalence for any models M and N . We then prove thatfor univalent structures M and N , levelwise equivalence also coincides with equiv-alence. The composition of these results yields our Univalence Principle : forunivalent models, ( M = N ) ≃ ( M ≃ N ) . In Part 1, we introduce diagram theories and their models , and state our maindefinitions and results for such diagram theories.
1. INTRODUCTION
In Part 2, we study many examples of diagram theories and compare the in-discernibilities and equivalences in these examples to the usual notions of samenessand equivalence.In Part 3, we introduce functorial theories —generalizing diagram theories—and their models . We give all definitions in detail and state and prove our resultsfor such functorial theories. We also give a translation from diagram theories tofunctorial theories.
Part 1 is dedicated to diagram theories and their models . Before defining these notions in general, we start out, in Chapter 3, byconsidering an example diagram theory in detail: the theory of categories. Wecompare there our notion of model of the theory of categories with a more traditionaldefinition of categories, our notion of indiscernibility of objects in a model withcategorical isomorphism, and equivalence of models with categorical equivalence.In Chapter 4, we introduce diagram theories and their models . In Chapter 5, wesketch our definitions of indiscernibility and univalence of models of a diagramtheory. In Chapter 6, we state our Univalence Principle, for the special case ofdiagram theories. Throughout this part, most proofs, and even some definitions,are deferred to Part 3, where we study a more general notion of signature (functorialsignatures, Definition 14.15) and their models.In Part 2, we present diagram theories for many mathematical structures. Weusually spell out the signatures explicitly, but describe the axioms only informally.However, most axioms could be formally stated in the language of FOLDS describedin Section 3.1, and thus obtained via the translation sketched in Remark 4.31.Specifically, we start in Chapter 7 by considering theories whose underlyingsignatures are of height less or equal to ; univalent models are then sets equippedwith some structure.In Chapter 8 we consider theories for categories with extra structure, such ascertain limits, functors, natural transformations, multicategories, categorical struc-tures for the interpretation of type theories, and many others.In Chapter 9 we study theories for higher-categorical structures, such as bicat-egories and double categories.The structures considered until here are weak in the higher-categorical sense. InChapter 10 we show how to encode strict categorical structures; importantly, theyare obtained by adding, to the weak theories, additional structure and properties.In Chapter 11 we study theories with signatures of height 3 that are not cate-gorical, i.e., of theories of objects and arrows but without composition or identities,such as directed multigraphs and Petri nets.In Chapter 12 we present theories of “enhanced” (higher) categories, that is,categories with additional structure that is not categorical—such as a † -structure.We show that, in such structures, our notion of indiscernibility coincides with awell-known notion of “good” isomorphism.In Chapter 13 we study theories involving, in particular, object-only functorsand unnatural transformations. Such structures frequently arise in the study of se-mantics of programming languages. Again, our notion of indiscernibility coincides,for these examples, with well-known notions of “good” isomorphisms for these ex-amples. .8. ACKNOWLEDGMENTS 9 In this part, we often omit the adjective “diagram”; by “signatures” and “theo-ries”, we always mean diagram signatures and diagram theories, as opposed to thefunctorial signatures and diagrams of Part 3.In Part 3, we start out, in Chapter 14, with an in-depth study of diagramsignatures—specifically, of derivation of such signatures. The results of this studysuggest a more general, (co)inductive definition of signatures: our functorial sig-natures of Definition 14.15. These signatures, and their corresponding structures,are easier to reason about in the abstract, and we prove most of the statementsof Part 1 only for structures of functorial signatures. At the same time, the studyimmediately yields a translation of diagram signatures into functorial signatures,made explicit in Theorem 14.16. We conclude this chapter with the definition of functorial theories and their models , in complete analogy to diagram theories andtheir models.Chapter 15 is dedicated to the study of levelwise equivalence of functorial struc-tures. We prove here that identifications coincide with levelwise equivalences.In Chapter 16, we define notions of indiscernibility and univalence for structuresof functorial signatures, and for models of functorial theories. We then prove tworesults about the homotopy levels of structures and models.Chapter 17 is dedicated to the proof of the main result of our work. Models offunctorial theories again admit three notions of sameness; the main result of thiswork, Theorem 17.10, shows that for univalent models, all three coincide.We conclude this work, in Chapter 18, with some examples of functorial theoriesthat are not, to our understanding, expressable as diagram theories.
An extended abstract for this book was published in the conference proceedingsof LICS 2020 [
ANST20 ]. There, diagram signatures and functorial signatureswere called FOLDS-signatures and abstract signatures, respectively. We have alsochanged the title and all other instances of the phrase ‘Higher Structure IdentityPrinciple’ to ‘Univalence Principle’ in this book.Compared to the extended abstract, this book contains some new results: • a comparison of L -structures with Reedy-fibrant diagrams, see Theo-rem 14.23, and • a variant of the univalence principle for essentially split-surjective equiv-alences, see Theorem 17.10.We also benefit from the additional space provided here to make our expositionmore pedagogical; specifically, we give • an overview of our results in the special case of diagram signatures (seePart 1) and a translation from diagram signatures to functorial signaturesin Chapter 14, and • many more examples of diagram signatures (in Part 2) and functorialsignatures (in Chapter 18). Nicolai Kraus provided helpful advice on 2LTT. Paul Blain Levy pointed out apossible connection to his work on contextual isomorphisms, and provided helpfulcomments on an earlier version. We are very grateful to both of them for their input. We furthermore thank the anonymous referees of the LICS version for theirconstructive criticism.Ahrens and North acknowledge the support of the Centre for Advanced Study(CAS) in Oslo, Norway, which funded and hosted the research project during the2018/19 academic year.This work was partially funded by EPSRC under agreement EP/T000252/1.This material is based on research sponsored by The United States Air Force Re-search Laboratory under agreement number FA9550-15-1-0053, FA9550-16-1-0212,and FA9550-17-1-0363. The U.S. Government is authorized to reproduce and dis-tribute reprints for Governmental purposes notwithstanding any copyright notationthereon. The views and conclusions contained herein are those of the authors andshould not be interpreted as necessarily representing the official policies or en-dorsements, either expressed or implied, of the United States Air Force ResearchLaboratory, the U.S. Government, or Carnegie Mellon University.This material is based upon work supported by the National Science Founda-tion under Grant No. DMS-1554092. Any opinions, findings, and conclusions orrecommendations expressed in this material are those of the authors and do notnecessarily reflect the views of the National Science Foundation.HAPTER 2
Introduction to two-level homotopy type theoryand univalent foundations
In this chapter we give a brief introduction to the formal language of HomotopyType Theory and Univalent Foundations (HoTT/UF), including Two-Level TypeTheory (2LTT). Semantically, HoTT/UF can be viewed as a convenient syntax forworking with a Quillen-model-category-like structure, namely a category equippedwith a class of morphisms called “fibrations” (the cofibrations and weak equivalencesof a model category are not represented explicitly in the syntax, although they playa role in constructing concrete interpretations). For intuition, the reader is freeto think of this as the category of topological spaces. The formal system usedin [
Uni13 ] assumes that all objects are fibrant (e.g., the category of fibrant objectsof a model category); we will instead use a form of two-level type theory [
ACKS19 ]that doesn’t make this assumption.The formal language of HoTT/UF is based on Martin-Löf Type Theory (MLTT),which has, as primitive objects, types and elements (a.k.a. terms ). Each elementis an element of a specific type. We write t : T to say that t is an element of the type T , e.g., we write N to say that is an element of the type of natural numbers.We write s, t : T to abbreviate “ s : T and t : T ”.Generally speaking, types and their elements are used in the same way that setsand their elements are used in a ZFC-based foundation for mathematics. At anygiven point in a mathematical construction or proof, we are working in a context containing a number of variables , each declared to belong to a particular type(which we also write x : T ). The types and elements we then construct can dependon the values of these variables, for which particular elements of the appropriatetypes can later be substituted.Semantically, types that don’t depend on any variables represent objects of thecategory, and terms that don’t depend on any variables represent global elements(morphisms out of the terminal object). More generally, a term of type T dependingon variables x : A and y : B , say, represents a morphism A × B → T . Likewise, atype depending on x : A and y : B represents an object of the slice category over A × B , and a term of such a type represents a section of that object.Two-level type theory [ ACKS19 ] enhances this picture by distinguishing be-tween fibrant types , which represent fibrations over the context (including fibrantobjects, in the empty context), and non-fibrant types , which don’t. Importantly,when regarding HoTT/UF as a foundational language for mathematics, only thefibrant types are “true” mathematical objects; the non-fibrant types should be re-garded as a sort of “internalized metatheory” making it easier to reason genericallyabout the fibrant ones. In line with this philosophy, we adopt a suggestion of UlrikBuchholtz and refer to non-fibrant types as exotypes , reserving the unadorned
112 2. INTRODUCTION TO HOTT/UF word type to refer to the fibrant ones (though we sometimes retain the adjective“fibrant” for emphasis). All types are exotypes, but not all exotypes are types.A reader already familiar with 2LTT can skip most of this section; the upshotis that we work in 2LTT with axioms M2 (Russell universes), T1–T3 (strictnessof conversion), and A5 (exo-equality reflection) from [
ACKS19 , Section 2.4]. Wewill briefly mention the semantics of these axioms in Section 2.6, but our mainpurpose in assuming them is expositional clarity; e.g., to avoid grappling with three notions of equality rather than two. None of our results depend essentially on theaxioms, and in particular should be just as valid if exo-equality only satisfies theUIP axiom. Notationally, when an operation has both a fibrant version and anexo-version, we decorate the exo-version with a superscript “e” (for “exo-”), ratherthan decorating the fibrant version as in [
ACKS19 ]. Finally, our notion of sharpexotype in Section 2.8 appears to be new.
Firstly there are a few basic types: an empty type , a singleton type withunique element ⋆ : , and a natural number type N , with suitable term constructors.Moreover, given exotypes A and B , we can form the function exotype A → B offunctions from A to B and the product exotype A × B of pairs of elements from A and B , each of which is a type (i.e., fibrant) if A and B are.The situation for disjoint sums is somewhat different, corresponding to the factthat fibrations are not in general closed under such sums: two exotypes A and B have a disjoint sum exotype A + e B , but it is not generally a type even if A and B are; instead for two types A and B we have a distinct disjoint sum type A + B .Similarly, there is an empty exotype e and a natural numbers exotype N e that maynot coincide with and N (since the initial object and natural numbers object maynot be fibrant). What distinguishes these type/exotype pairs is that the fibrantversions can only be mapped out of into other fibrant types; e.g., there is a uniquemap → A for any type A , but if A is only an exotype we can only get a uniquemap e → A . Similarly, we can define functions into any exotype by recursion on N e , but to define a function by recursion on N we must know that the target isfibrant.There is also a “type of types”, called a universe, and denoted by U . Its elementsare types, e.g., N : U . This allows us to specify a type family , parametrized byelements of a type, say, A , as a function, say, B : A → U , from the parametrizingtype A into the universe. We also have an exo-universe U e , an exotype whoseelements are exotypes.Semantically, U is a classifying space of fibrations, so that B : A → U canalso be regarded as a fibration with codomain A , whose fibers are the types B ( x ) .Similarly, U e is a classifying space of arbitrary maps (not necessarily fibrations).To avoid paradoxes à la Russell, there is a hierarchy of such universes, but wesweep this detail under the rug with the conventional typical ambiguity [ Uni13 ,Section 1.3], using U and U e to denote unspecified universes.The type constructions → and × generalize to (exo)type families. Specifically,given A : U e and B : A → U e , • We can form the exotype Q ( a : A ) B ( a ) of dependent functions. An element f : Q ( a : A ) B ( a ) is a function that returns, on an input a : A , an elementof the type B ( a ) . If b ( x ) is a term containing a variable x : A , then we can .2. NOTIONS OF IDENTITY 13 build the function λx.b ( x ) : Q ( a : A ) B ( a ) . Function application is written f ( a ) as usual. • We can form the exotype P ( a : A ) B ( a ) of dependent pairs. An element s : P ( a : A ) B ( a ) consists of two components, where the first component π ( s ) : A and the second component π ( s ) : B ( π ( s )) . Given a : A and b : B ( a ) , we write ( a, b ) : P ( a : A ) B ( a ) . When B is regarded as a fibrationor map into A , then P ( a : A ) B ( a ) is the domain of this map.Both Q ( a : A ) B ( a ) and P ( a : A ) B ( a ) are fibrant types if A and B are, i.e., if A : U and B : A → U .A function of two variables can be expressed as usual as f : A × B → C , butit is more usual to write it in “curried” form f : A → ( B → C ) , the type of whichwe abbreviate as A → B → C . Similarly, a function of two dependent variablescan be expressed either as (cid:0) P ( x : A ) B ( x ) (cid:1) → C or as Q ( x : A ) (cid:0) B ( x ) → C (cid:1) , and wewrite the latter curried form as Q ( x : A ) B ( x ) → C . Of course, C could also dependon x : A and y : B ( x ) . Given two elements a, b : A of the same (exo)type, we can ask whether theyare equal. In fact, there are two different ways to ask this question.The first, called strict equality or exo-equality , and written a ≡ b , corre-sponds semantically to “point-set level” equality, i.e., actual equality of objects ormorphisms in a model category. This equality is a congruence for all constructionsin type theory. In particular, it is convertible , meaning that if we have a ≡ b and an(exo)type family P : A → U e , then any element u : P ( a ) is itself also an elementof P ( b ) , i.e., u : P ( b ) .Among the “interesting” generators of exo-equality we have π ( a, b ) ≡ a and π ( a, b ) ≡ b , and ( λx.b ( x ))( a ) ≡ b [ a/x ] . (Here, b [ a/x ] is the term obtained bysubstituting a for x in b .) Dually, for any s : P ( a : A ) B ( a ) we have s ≡ ( π ( s ) , π ( s )) ,and for any f : Q ( a : A ) B ( a ) we have f ≡ λx.f ( x ) ; and more simply, for any u : we have u ≡ ⋆ . In particular, the universal properties of Σ -types, Π -types, functiontypes, and product types hold up to exo-equality. In addition, any definition givesan exo-equality: when defining a new symbol t to equal an expression b , we write t : ≡ b , and ever after we have an exo-equality t ≡ b .Exo-equality is internalized, in the sense that for any exotype A and elements a, b : A there is an exotype a ≡ b such that to give an element of a ≡ b means toshow that a and b are exo-equal, and there can be only one such element, which wecall an exo-equality . Semantically, the exotype x ≡ y depending on the variables x, y : A is the diagonal A → A × A . Importantly, even if A is fibrant, this diagonalis not usually a fibration; hence even if A is a type, the exo-equality is only anexotype.The other notion of equality is called the (Martin-Löf ) identity type or the identification type . Semantically, this represents a fibrant replacement of the diago-nal, a.k.a. a path type . Internally, this means for any (fibrant!) type A and elements a, b : A there is a fibrant type written a = A b , or simply a = b . In particular, forany a : A , we have refl a : a = a . But unlike the exo-equality type, there can bemore than one element of a = b : if A represents a space-like object, then distinct This is the type-theoretic way to write the function x b ( x ) . elements of a = b represent distinct paths or homotopies from a to b . We refer toelements of a = b as identifications of a with b .The identification type is not convertible; instead it is transportable . That is,given p : a = b and a type family P : A → U , any u : P ( a ) induces a different,but corresponding, element of P ( b ) , written transport P ( p, b ) or p ∗ ( b ) . More gen-erally, given a type family P : Q ( a,b : A ) ( a = b ) → U , to construct a function f oftype Q ( a,b : A ) Q ( p : a = b ) P ( a, b, p ) it suffices to specify, for any a : A , an element of P ( a, a, refl a ) . We refer to this principle as “ [=] -induction”.Note that by convertibility for exo-equality, for any fibrant type A and a, b : A , we have a map ( a ≡ b ) → ( a = b ) . We sometimes use this implicitly to“coerce” an exo-equality to an identification. Indeed, recalling the pairs of typeand exotype formers such as N e and N , and e and , we could also write a ≡ b as a = e b . In general, the exotype versions of these pairs of operations satisfytheir universal property up to exo-equality, while the fibrant versions satisfy theiruniversal property up to identifications: e.g., for any exotype A the map e → A isunique up to exo-equality, while for any fibrant type A the map → A is uniqueup to identification.We say that a function f : A → B between exotypes is an isomorphism (or exo-isomorphism for emphasis) if there is g : B → A such that g ◦ f ≡ A and f ◦ g ≡ B . For instance, axiom (T3) of [ ACKS19 ] asserts that any exotypeisomorphic to a fibrant one is fibrant. The exotype of isomorphisms from A to B is defined as A ∼ = B : ≡ X ( f : A → B ) X ( g : B → A ) ( f ◦ g ≡ B ) × ( g ◦ f ≡ A ) . Similarly, we say that a function f : A → B between (fibrant!) types is an equiva-lence if there is g : B → A such that g ◦ f = 1 A and f ◦ g = 1 B . In particular, giventwo (fibrant) types A and B , if a function f : A → B is an exo-isomorphism, thenit is also an equivalence (since exo-equalities give rise to identifications). The type A ≃ B of equivalences from A to B requires some care to define; see Section 2.3. Remark 2.1.
It is very important that the “mathematical” notion of equality isthe identification type, not the exo-equality. In other words, when making a pieceof mathematics formal in 2LTT, equality should be expressed using identifications,and mathematical structures such as groups or number systems should be builtfrom (fibrant) types, not from exotypes. For instance, categories are defined suit-ably in 2LTT by as the categories of Definition 3.2, not by the exo-categories ofDefinition 4.1.Exo-equality should regarded as a sort of “metatheoretic” or “syntactic” equality,used for convenience but somewhat accidental in its behavior. For instance, we canof course prove by induction that for m, n : N we have m + n = n + m , but thecorresponding exo-equality m + n ≡ n + m cannot be proven. Indeed we cannoteven prove n ≡ n for all n , although we do have n + 0 ≡ n ; this sort of thing iswhat we mean by “accidental”.As we will see in later sections, our signatures will involve exo-equality, andthus we will have only an exotype of signatures. This is reasonable because thestudy of general signatures and theories is properly a meta-mathematical activity.But for a fixed signature, the types of structures, of maps between structures, ofindiscernibilities within a structure, and so on, will all be fibrant, which is as we .3. STRATIFICATION OF TYPES BY THEIR “HOMOTOPY LEVEL” 15 would hope because these all belong to mathematics proper. In other words, weonly need 2LTT (as opposed to the type theory of [ Uni13 ] without proper exotypes)because we want to treat all signatures, of all (finite) dimensions, uniformly.
The type of identifications a = A b is itself a type, so has its own type ofidentifications; given p, q : a = A b , we can form the type p = a = b q , and so on. Theresulting tower of identification types extracts the higher homotopical informationin the type A , and in general it need never trivialize. (By contrast, the similar towerof exo-equality exotypes trivializes after one step: if p, q : a ≡ b then necessarily p ≡ q . This corresponds to the fact that a model category is itself a 1-category, butrepresents an ∞ -category through its notions of homotopy.)Voevodsky devised a stratification of types according to the “complexity” oftheir identity types as follows. • Say that A is a ( − -type (or contractible ) when there is an element of P ( a : A ) Q ( x : A ) x = a . Intuitively, this means that A has a unique element. • Inductively, say that A is an ( n + 1) -type if all of its identity types a = a ′ are n -types, i.e., there is an element of Q ( a : A ) Q ( a ′ : A ) is - n - type ( a = a ′ ) .In particular, a ( − -type is also called a proposition , and a -type is also called a set . Equivalently, A is a proposition if one can construct a function Q ( a,a ′ : A ) a = a ′ ;intuitively, a proposition contains at most one element (up to identification).It can be proven that a function f : A → B between types is an equivalence ifand only if its fibers are contractible, i.e., if there is an element of isEquiv ( f ) : ≡ Y b : B is - ( − - type (cid:16)P ( a : A ) f ( a ) = b (cid:17) . Unlike the more naïve P ( g : B → A ) ( g ◦ f = 1 A ) × ( f ◦ g = 1 B ) , the above typeturns out to be a proposition. Thus we define the type of equivalences to be ( A ≃ B ) : ≡ P ( f : A → B ) isEquiv ( f ) ; this ensures that for equivalences f and g , thetype f = g is independent (up to equivalence) of whether we regard f and g aselements of A → B or A ≃ B . (There are also many other ways to achieve this;see [ Uni13 , Chapter 4]).)The type is contractible, is a proposition, and N is a set. In addition, theidentification types of “composite” types can be characterized from their constituentpieces, e.g. • For a, a ′ : A and b, b ′ : B , we have (cid:0) ( a, b ) = ( a ′ , b ′ ) (cid:1) ≃ ( a = a ′ ) × ( b = b ′ ) . • For a, a ′ : A , b : B ( a ) , and b ′ : B ( a ′ ) , we have (cid:0) ( a, b ) = ( a ′ , b ′ ) (cid:1) ≃ P ( p : a = a ′ ) p ∗ ( b ) = b ′ . • For f, g : Q ( a : A ) B ( a ) , we have ( f = g ) ≃ Q ( a : A ) f ( a ) = g ( a ) . More specifically, in each case we have a particular equivalence that sends thereflexivity element on the left to an element built from reflexivities on the right;by the specification of = above, this specifies the map from left to right uniquely.Corresponding facts (expressed with ∼ = instead of ≃ ) are also true for exotypeconstructors and exo-equality. Technically this is an additional axiom, called function extensionality . Voevodsky showedthat it follows from his univalence axiom (2.1).
Similarly, given
A, B : U , we have an equivalence(2.1) ( A = B ) ≃ ( A ≃ B ) mapping refl A to the identity equivalence on A . That this map is an equivalence isVoevodsky’s univalence axiom . It entails in particular that U is not a set, sincethe type N : U has non-trivial automorphisms and thus, by the univalence axiom,non-trivial self-identifications.There is no analogue of the univalence axiom for U e : it is not assumed to befibrant, so we cannot even form a type “ A = U e B ”, while there is little intelligiblewe can say about A ≡ B for exotypes A, B : U e . This is another sense in whichexo-equality is “accidental”. While in ZF(C), logic is wrapped around set theory, in HoTT/UF it is theother way round: types contain logic. Specifically, the logical propositions arethose types that are called propositions (i.e., ( − -types; cf. Section 2.3). A proofof a proposition A is given by an element of A . By definition, such a proof is unique(up to identifications) if it exists. For instance, if A and B are propositions, thenso are A → B and A × B ; they represent the logical propositions “if A then B ” and“ A and B ” respectively. This integrated approach to logic is sometimes referred toas the “Curry–Howard correspondence”.A predicate on a type A is, accordingly, a function P : A → U that is aproposition pointwise. Given such a predicate, we can form the types Q ( a : A ) P ( a ) and P ( a : A ) P ( a ) . The former is a proposition and corresponds to ∀ ( x : A ) .P x . Thelatter is not a proposition; different elements in A satisfying P give rise to differentelements in P ( a : A ) P ( a ) . Hence P ( a : A ) P ( a ) is not a proposition in general; itbehaves like the set { a : A | P ( a ) } of elements satisfying P .To represent ∃ , we use use another type construction A → k A k of HoTT/UFthat maps any type A universally into a proposition k A k , called the propositionaltruncation of A . Then ∃ ( x : A ) .P x corresponds to k P ( a : A ) P ( a ) k . Similarly, forpropositions A and B the disjoint sum A + B is not generally a proposition; itspropositional truncation k A + B k represents the logical proposition “ A or B ”.We write Prop U : ≡ P ( A : U ) is - ( − - type ( A ) for the type of propositions; thisplays the role of the “set of truth values” or “subobject classifier”; thus a predicatecan equivalently be defined as a map P : A → Prop U . We will also refer to suchpredicates as subsets ; i.e., we identify subsets with their characteristic functions.The Law of Excluded Middle is the assertion that
Prop U is equivalent to + , so that the above logic is classical. This is an additional axiom which itis consistent to assume (and many readers may prefer to do so); but omitting itpermits more general models (see Section 2.6), and we will have no need for it. For any natural number n : N , there is a corresponding finite type , written N HS98, AW09 ], Voevodsky devised a model of MLTTin simplicial sets [ KL19 ] that satisfies the univalence axiom (2.1). Each type A isinterpreted as a Kan complex (a concrete model for an ∞ -groupoid), with elements a : A representing 0-cells, identifications p : a = a ′ representing 1-cells, and so on.The universe U is interpreted by the base of a universal Kan fibration: a fibrationof which every fibration (with fibers belonging to some universe) is a pullback.Thus, a type family B : A → U induces by pullback a fibration B ։ A . Thetype constructors such as × , → , + , Σ , Π are interpreted by standard categoricalconstructions (see the references). Of particular note is the identity type ( · = · ) : A → A → U , which is interpreted by a path object A ∆ . This model was extendedto two-level type theory in [ ACKS19 , §2.5], including axioms T1–T3 and A5.Subsequent work (e.g., [ LW15, LS19, Shu19 ]) has shown that HoTT/UF canbe interpreted in a much wider class of Quillen model categories, which are generalenough to present all Grothendieck–Lurie ∞ -toposes [ Lur09 ]. The basic ideas ofthe interpretation are the same; the main difference is that unlike simplicial sets,these models fail to satisfy nonconstructive principles such as the Law of ExcludedMiddle or the Axiom of Choice (providing a motivation even for a purely classicalmathematician to avoid nonconstructive principles). Thus, any mathematics writ-ten in HoTT/UF without using these principles can be automatically interpreted“internally” to any higher topos. See, e.g., [ Shu20 ] for further discussion. Thesemore general models have not been formally extended to two-level type theory, butthe same techniques should apply, although axiom T1 should not be expected tohold, as the notion of “fibration” used in defining the universe is structure ratherthan a mere property.Other interpretations are also possible, e.g., in cubical sets [ BCH14 ] (see also[ ACKS19 , §2.5.2]). These have the advantage of good computational and con-structive behavior.Finally, 2LTT can be interpreted in presheaves over any model of MLTT. Thisis used in [ ACKS19 , Proposition 2.18] to show that 2LTT with axioms T1, T2,and A5 (but not T3) is conservative over the type theory of [ Uni13 ]. Following [ ACKS19 , Definition 3.7], we say that a function f : A → B betweenexotypes is a fibration if each of its exo-fibers is fibrant, i.e., if Y ( b : B ) X ( F : U ) (cid:16) F ≡ (cid:0)P ( a : A ) f ( a ) ≡ b (cid:1)(cid:17) . This is equivalent to the existence of a type family F : B → U and an exo-isomorphism A ∼ = P ( b : B ) F ( b ) over B ; in other words, U is a “classifier of fibrations”.Semantically, this coincides with the model-categorical notion of fibration.As per [ ACKS19 , Corollary 3.19(i)], we call an exotype B cofibrant if forany family of fibrant types Y : B → U , the exotype Q ( b : B ) Y ( b ) is fibrant, andmoreover if each Y ( b ) is contractible then so is Q ( b : B ) Y ( b ) . Although this notionof cofibrancy is similar to the model-categorical one , it does not coincide with it. Inparticular, in the simplicial-set-based models mentioned in Section 2.6, all objectsare cofibrant; but not all types can be shown to be cofibrant in 2LTT. What canbe shown is the following (see [ ACKS19 , Lemma 3.24]): • All fibrant types are cofibrant. • e is cofibrant, and if A and B are cofibrant so are A + e B and A × B . • If A is cofibrant and B : A → U e is such that each B ( a ) is cofibrant, then P ( a : A ) B ( a ) is cofibrant.It does not seem to be possible to prove that N e is cofibrant, but this is a reasonableaxiom to add since it holds in higher topos models. We will not need it in this book,but we expect it may prove useful when extending our results to signatures of infiniteheight. (In [ ACKS19 ] this axiom is called A3, while A2 is a stronger but stillsemantically reasonable version of it; both hold in the models of [ KL19, Shu19 ].) In a model category, every object has a fibrant replacement: a weak equivalenceto a fibrant object. This cannot be internalized in 2LTT because it is not stableunder pullback; see [ ACKS19 , §2.7]. But there are some exotypes that do admit afibrant replacement, and this yields a useful notion intermediate between cofibrancyand fibrancy. (Unlike the rest of this chapter, the material in this section is new.) Definition 2.2. An exotype B is sharp if it is cofibrant and it has a “fibrantreplacement”, meaning that there is a fibrant type RB and a map r : B → RB suchthat for any family of fibrant types Y : RB → U , the precomposition map(2.2) ( − ◦ r ) : (cid:16) Y c : RB Y ( c ) (cid:17) → (cid:16) Y b : B Y ( rb ) (cid:17) is an equivalence of types. (Note that the codomain of (2.2) is fibrant because B is assumed cofibrant.)In model category theory, a morphism is called sharp [ Rez98 ] if pullbackalong it preserves weak equivalences; but in a right proper model category, this isequivalent to its having a pullback-stable fibrant replacement. This motivates ouruse of the word. Lemma 2.3. (1) All fibrant types are sharp. [ ACKS19 ] also defines a notion of when a function is a cofibration , but we will have noneed for that. Specifically, to the pullback-corner axiom relating cofibrations and fibrations in a monoidalor enriched model category. Other terms used for sharp maps include “right proper maps”, “weak fibrations”, “h-fibrations”, “W-fibrations”, and “fibrillations”. .8. SHARPNESS 19 (2) e is sharp, and if A and B are sharp so are A + e B and A × B .(3) If A is sharp and B : A → U e is such that each B ( a ) is sharp, then P ( a : A ) B ( a ) is sharp.(4) Each N e Since B is sharp and ( b = y ) → U is fibrant, there is a e Y : Y z : RB ( rb = z ) → U and an equivalence e y,p : Y ( y, p ) ≃ e Y ( ry, p ) for all y : B and p : b = y . Thus, by [=] -induction for the identification type of RB , we have an f : Q ( z : RB ) Q ( p : rb = z ) e Y ( z, p ) such that f ( rb, refl rb ) ≡ e b, refl rb ( d ) . Let j ( y, p ) : ≡ e − y,p ( f ( ry, p )) ; then j ( b, refl b ) ≡ e − b, refl b ( e b, refl b ( d )) = d as desired. (cid:3) More information on UF may be found, e.g., in [ Gra18 ]. An introduction toHoTT/UF with an emphasis on synthetic mathematics is given in [ Shu20 ]. Thebook [ Uni13 ] constitutes a comprehensive reference on HoTT. And, of course,[ ACKS19 ] is the main reference for 2LTT. art 1 Theory of diagram structures HAPTER 3 Categories: an extended example In Chapter 4 we will study diagram theories and their models in general, butfirst we present, in this chapter, our prototypical example: the theory of categories.This discussion will help to motivate the general definitions.In Section 3.1 we introduce diagram signatures and axioms informally, withreference to the diagram signature L cat+E for categories. (Formal definitions willfollow in Section 4.2.)In Section 3.2 we review the “reference definition” of categories in HoTT/UF,first given in [ AKS15 ] and [ Uni13 , Chapter 9]. This definition is “algebraic” inthat identities and composition are given by operations rather than by relations.In Section 3.3 we identify suitable axioms of L cat+E -structures to carve outthe (pre)categories amongst the L cat+E -structures; this yields the theory T cat for(pre)categories. We construct an equivalence of types between the type of categoriesand the type of L cat+E -structures satisfying these properties.The axioms of this theory can be partitioned into “categorical” and “homotopi-cal” axioms. In Section 3.4 we show that the homotopical axioms are equivalentto a univalence condition on the models of that theory. This univalence con-dition entails a univalence principle for these models. Its definition does not relyon the categorical axioms, and can be generalized to structures of other diagramsignatures. Intuitively, a diagram signature specifies the sorts, and the dependencies be-tween sorts, in a kind of mathematical structure. It consists of a particular kind ofcategory, whose objects specify the sorts, and whose morphisms A → B specify adependency of sort A on sort B .For instance, a graph consists of objects and, for any two objects, arrows be-tween them. Since the arrows are parametrized by pairs of objects, the structureof graphs is specified by the following diagram signature: AO To first approximation, a structure for a diagram signature should be a diagram ofthat shape in the category of types. Thus, a structure for the diagram signatureof graphs would consist of two types M A and M O and two functions M A ⇒ M O .However, the intent is that M A should be, not one type, but a family of typesindexed by pairs of objects, ( M A ( x, y )) x,y : MO . In 2LTT we can express this bysaying that the induced function M A → M O × M O is a fibration. We will make 234 3. CATEGORIES: AN EXTENDED EXAMPLE this precise for an arbitrary diagram signature in Section 4.2; for now we observethat such a reinterpretation of diagrams is only possible for a very restricted classof categories, namely the inverse ones. A similar restriction on categories for thispurpose was used by Makkai [ Mak95 ], who called them simple .When we say that a diagram signature is “for” a given class of structures, wegenerally mean that its structures include that class and that we are primarilyinterested in them. For instance, the signature for pointed sets looks as follows: PX A structure M for this signature is given by a type M X together with a type family ( M P ( x )) x : MX , where p : M P ( x ) signifies that x : M X is the chosen point. Forthis to truly represent a pointed set we require that such a p exists for exactly one x : M X (and that M X is a set and each M P ( x ) is a proposition).To cut down the class of structures to those of interest, Makkai [ Mak95 ] in-troduced a formal logic over diagram signatures, called First-Order Logic withDependent Sorts (FOLDS). Its formulas are built from ⊤ (“true”) and ⊥ (“false”) asatomic predicates, and with universal and existential quantification over sorts, aswell as logical connectives ∧ and ∨ , for recursively constructing more complicatedformulas. Any formula in this logic can be interpretated as a predicate on structuresin HoTT/UF via the usual interpretation of logic; note that the interpretation of ∃ and ∨ involves propositional truncation. A theory is a pair of a signature and acollection of formulas called axioms over it, and a model of a theory is a structurefor the signature that satisfies all of the axioms.For instance, the “existence” requirement for a structure as above to be apointed set can be expressed by the axiom ∃ ( x : X ) . ∃ ( p : P ( x )) . ⊤ , which we will also abbreviate as ∃ ( x : X ) .P ( x ) . Similarly, the “uniqueness” requirement can be expressed by the axiom ∀ ( x, y : X ) . ∀ (cid:0) p : P ( x ) ∧ P ( y ) (cid:1) . ( x = y )) (which uses the abbreviation introduced above, and which in turn we abbreviate as ∀ ( x, y : X ) . (cid:0) P ( x ) ∧ P ( y ) → ( x = y ) (cid:1) ) , but this requires an “equality” proposition. As in ordinary first-order logic, equalitycan be considered a basic part of the language, but such a “logic with equality” canalways be represented inside “logic without equality” by making equality into anatomic relation symbol. In our situation, this means modifying the above signatureto(3.1) P EX .1. DIAGRAM THEORIES BY EXAMPLE 25 with a new sort E interpreted by a type family ( M E ( x, y )) x,y : MX . Now uniquenesscan be expressed as ∀ ( x, y : X ) . ( P ( x ) ∧ P ( y ) → E ( x, y )) . When adding equality in this way, we always include axioms making it an equiva-lence relation, and moreover a congruence for all the other predicates. In the caseof pointed sets this means, again using the two abbreviations introduced above, ∀ ( x : X ) .E ( x, x ) (3.2) ∀ ( x, y : X ) . ( E ( x, y ) → E ( y, x )) (3.3) ∀ ( x, y, z : X ) . ( E ( x, y ) ∧ E ( y, z ) → E ( x, z )) (3.4) ∀ ( x, y : X ) . ( E ( x, y ) ∧ P ( x ) → P ( y )) . (3.5)Of course, in an arbitrary structure for the extended signature, the relation E may not actually be interpreted by equality; if it is, one calls the structure standard . We will see later on that standardness, along with “homotopy level” requirementssuch as that M X is a set and each M P ( x ) is a proposition, will follow automaticallyfrom our notion of univalence for structures. More generally, we can represent any predicate by a sort, with axioms ensuringthat its corresponding types are propositions, and we can represent any function bythe predicate of its graph. For instance, the diagram signature L cat of categoriesis shown in Figure 1, along with the related diagram signature L cat+E of categorieswith equality (see below). Here the sort I is a predicate for “being an identityarrow”, while the sort T is a predicate for “ h is the composite of f and g ” ( T standsfor “triangle”). On the left we have written numbers indicating the rank of eachsort. The height of a signature is one more than the maximal rank of any sort;thus L cat and L cat+E have height 3, while the signatures for graphs and pointedsets have height 2.Note that there are some relations on the composite arrows in L cat , as shown(e.g., the two composites I → A ⇒ O are equal). When an L cat -diagram is reinter-preted using families of types, the types corresponding to any given sort A dependon as many copies of each other sort B as there are morphisms A → B in thesignature. For instance, since there is one arrow I → A and one arrow I → O , thetype family corresponding to I is ( M I x ( f )) x : MO,f : MA ( x,x ) . Similarly, since thereare three arrows T → A , whose composites with d, c are equal in pairs yieldingthree arrows T → O , the type family of T is ( M T x,y,z ( f, g, h )) x,y,z : MO,f : MA ( x,y ) ,g : MA ( y,z ) ,h : MA ( x,z ) . With reference to “identity of indiscernibles” from Section 1.3, standard equality amountsto adding haecceities into the structure explicitly. Makkai, working in a set-theoretic framework, equipped each signature with a collection oftop-level sorts regarded as “relations”, and required that in any model the corresponding sets werepropositions. It is not unreasonable to directly include functions in addition to dependent sorts in asignature, obtaining something like Cartmell’s [ Car86 ] Generalized Algebraic Theories. Indeed,a diagram signature can be regarded as an especially simple sort of GAT; see also [ Mak95 ,pp. 1–6]. It is an interesting question whether the results of this book can be extended to moregeneral GATs; for now we restrict ourselves to the simple case. The relationship of our functorialsignatures (Part 3) to GATs is unclear to us. T I T I E A A O O t t t i t t t i e e d c d c ci = di, ct = dt , dt = dt , ct = ct , de = de , ce = ce Figure 1. The diagram signatures L cat , for categories (left), and L cat+E , for categories with equality predicate on arrows (right).The morphisms are subject to the indicated equalities.Of course, we need to impose axioms to restrict to the structures that repre-sent categories. For instance, we require that any two composable arrows have acomposite:(3.6) ∀ ( x, y, z : O ) . ∀ ( f : A ( x, y )) . ∀ ( g : A ( y, z )) . ∃ ( h : A ( x, z )) .T x,y,z ( f, g, h ) . Other axioms involve equality, e.g., the uniqueness of composites(3.7) ∀ ( x, y, z : O ) . ∀ ( f : A ( x, y )) . ∀ ( g : A ( y, z )) . ∀ ( h, h ′ : A ( x, z )) .T x,y,z ( f, g, h ) ∧ T x,y,z ( f, g, h ′ ) → ( h = h ′ ) . As in the case of pointed sets, we can represent this inside “logic without equality” byadding an equality sort (and suitable congruence axioms for it). Since there are noaxioms involving equality of objects (this is one of the virtues of a dependently typedformulation of categories), it suffices to add a single sort E representing equality ofarrows, as shown in L cat+E on the right of Fig. 1. As usual, we add axioms making E an equivalence relation, and a congruence for the other top-level sorts T and I (where all free variables should be considered to be universally quantified): E x,y ( f, f ) (3.8) E x,y ( f, g ) → E x,y ( g, f ) (3.9) E x,y ( f, g ) ∧ E x,y ( g, h ) → E x,y ( f, h ) (3.10) E x,x ( f, g ) ∧ I x ( f ) → I x ( g ) (3.11) E x,y ( f, f ′ ) ∧ E y,z ( g, g ′ ) ∧ E x,z ( h, h ′ ) ∧ T x,y,z ( f, g, h ) → T x,y,z ( f ′ , g ′ , h ′ ) . (3.12)We will not make any formal use of the logic of FOLDS in this book; we mentionit mainly to help motivate the inclusion of equality sorts in a signature. (We willsee later that there are also other good reasons for doing this; see Remark 6.8.) Itis straightforward to add an equality on any sort, like A , that is one rank below thetop; as we will see, this restriction also makes sense semantically since in HoTT/UFit is only these sorts that can be expected to consist of sets. In Chapter 10 we willdiscuss a way to add equalities to other sorts as well. Remark 3.1. In fact, in the particular case of categories it may be possible to dowithout an equality sort entirely, replacing all uses of E x,y ( f, g ) by something like ∃ ( i : A ( x, x )) .I x ( i ) ∧ T x,x,y ( i, f, g ) . However, in other examples this is not possible .2. CATEGORIES IN HOTT 27 (e.g., the preordered sets in Example 7.4), so for consistency — and clarity — wewill always use dedicated equality sorts.With the general concept of diagram signature and structure in hand (thoughwith formal definitions deferred to Chapter 4), in the rest of this chapter we inves-tigate the L cat+E -structures in more detail. In particular, we want to know whatfurther requirements must be imposed on such structures to make them “behavelike categories”, both syntactically (internal to HoTT/UF) and semantically (in thehigher-topos models thereof). In this section we review the definition of category given in [ AKS15 ] and [ Uni13 ,Chapter 9]. Both start by defining a precategory C as follows. Definition 3.2 (Precategory) . A precategory C consists of the following:(1) A type C of objects.(2) For each a, b : C , a type C ( a, b ) of morphisms.(3) For each a : C , a morphism a : C ( a, a ) .(4) For each a, b, c : C , a function ( ◦ ) : C ( b, c ) → C ( a, b ) → C ( a, c ) . (5) For each a, b : C and f : C ( a, b ) , we have f = 1 b ◦ f and f = f ◦ a .(6) For each a, b, c, d : C and f : C ( a, b ) , g : C ( b, c ) , h : C ( c, d ) , we have h ◦ ( g ◦ f ) = ( h ◦ g ) ◦ f .(7) For any a, b : C , the type C ( a, b ) is a set.The definitions of functors, natural transformations, and other categorical no-tions are straightforward; see [ AKS15 ] and [ Uni13 , Chapter 9].Note that C may not be a set, and for “large” precategories it almost neveris. For instance, Set is the type of sets, which by univalence is a proper 1-type.However, allowing arbitrary types of objects is problematic too. For instance, whilethe statement “a fully faithful and essentially surjective functor is an equivalence”in ZF is equivalent to the axiom of choice, for precategories in HoTT/UF it isgenerally false, even if the axiom of choice is assumed.Precategories are also “wrong” semantically. For instance, when interpretedin Voevodsky’s simplicial set model [ KL19 ], precategories do not correspond totraditional categories defined in set-theoretic foundations. Roughly speaking, theinterpretation in this model of a precategory consists of a category C (of the usualset-based sort), a Kan complex (i.e., a homotopy type or ∞ -groupoid) K , and anessentially surjective functor Π ( K ) → C , where Π ( K ) denotes the fundamentalgroupoid. In [ AF18 ] this is called a flagged category .In terms of classical homotopy theory, the meaning of a precategory can beexplained by defining its nerve to consist of the types C : ≡ X a,b : C C ( a, b ) C : ≡ X ( a,b,c : C ) X ( f : C ( a,b )) X ( g : C ( b,c )) X ( h : C ( a,c )) h = g ◦ f and so on, with C n the type of “ n -simplices” in C consisting of n + 1 objects as thevertices, (cid:0) n +12 (cid:1) arrows as the 1-simplices, and identifications and higher identifica-tions filling in the higher-dimensional faces. This yields a semisimplicial simplicialset that satisfies the Segal condition and has degeneracies up to homotopy, andsuch that the map C → C × C has fibers that are equivalent to discrete sets.Thus, after a suitable rectification of the degeneracies, we can say that precate-gories correspond to Segal spaces in the sense of [ Rez01 ] such that C → C × C has homotopy-discrete fibers, which by the results of [ AF18 ] are equivalent to theabove description of flagged categories.There are two ways to restrict Segal spaces to obtain a correct definition of ( ∞ , -categories (each of which therefore includes an equivalent copy of the col-lection of 1-categories). The first, called a Segal category [ DKS89 ], requires thesimplicial set of 0-simplices (the K above) to be discrete. This corresponds to thefollowing requirement on a precategory. Definition 3.3 (Strict category) . A strict category is a precategory C such thatthe type C is a set.By contrast, a complete Segal space [ Rez01 ] requires the path-spaces in thesimplicial set of 0-simplices to be equivalent, in a canonical way, to the spaces ofequivalences obtained from the category structure. That is, we require that K isa homotopy 1-type, hence determined by its fundamental groupoid, and that thefunctor Π ( K ) → C is an equivalence onto the maximal subgroupoid of C . InsideHoTT/UF, this corresponds to a “local univalence” condition on a precategory,ensuring that equality in the type of objects coincides with the relevant notion of“sameness” for objects of a category in category theory, namely isomorphism. Wenow recall this condition precisely, starting with the usual definition of isomorphism: Definition 3.4. Let C be a precategory. For any morphism f : C ( a, b ) in C , wedefine the type isiso ( f ) : ≡ X g : C ( b,a ) ( f ◦ g = 1 b ) × ( g ◦ f = 1 a ) The type of isomorphisms from a to b is then the type of pairs of a morphism f : C ( a, b ) together with a witness of the fact that f is an isomorphism: ( a ∼ = b ) : ≡ X f : C ( a,b ) isiso ( f ) . We define the family of functions idtoiso : Y a,b : C ( a = b ) → ( a ∼ = b ) by [=] -induction, sending refl a to the identity isomorphism on a .As expected, one can show that, for a morphism f : C ( a, b ) , the type isiso ( f ) isa proposition; in particular, the inverse of f is unique if it exists. This entails thatthe type a ∼ = b of isomorphisms is a set. .3. STRUCTURES OF OUR SIGNATURE FOR CATEGORIES 29 Definition 3.5 (Univalent category) . A univalent category is a precategory C such that for any a, b : C , the function idtoiso a,b : ( a = b ) → ( a ∼ = b ) is an equivalence.In particular, in a univalent category, “isomorphic objects are equal”. Note alsothat in a univalent category C , the type C of objects is a 1-type, since its identitytypes are all sets (0-types).The homotopy theories of Segal categories and of complete Segal spaces areequivalent [ Ber09 ]. Similarly, when strict categories and univalent categories areinterpreted in the simplicial set model, they both yield a notion that is equivalentto ordinary 1-categories as defined in set theory. However, although the notions ofSegal category and strict category are arguably more obvious, there are numerousadvantages to complete Segal spaces and univalent categories, such as:(1) For strict categories, the statement “a fully faithful and essentially surjec-tive functor is an equivalence” is again equivalent to the axiom of choice.While this is an improvement over the situation for precategories, for uni-valent categories this statement is simply true .(2) Internal to HoTT/UF, the vast majority of “naturally occurring” largecategories, such as sets, groups, rings, fields, topological spaces, etc., areunivalent, while practically none of them are strict.(3) Every precategory is weakly equivalent to a univalent category (its “Rezkcompletion” or “univalent completion”), while it is impossible to prove inHoTT/UF that every precategory, or even every univalent category, isweakly equivalent to a strict one.(4) When HoTT/UF is interpreted in the ( ∞ , -topos of stacks of ∞ -groupoidson some site using the models of [ Shu19 ], univalent categories correspondto stacks of 1-categories on the same site, while strict categories correspondto internal categories in the 1-topos of sheaves of sets on that site. Theformer are, generally speaking, much more important.(5) A map of complete Segal spaces is a category-theoretic equivalence justwhen it is a levelwise equivalence of bisimplicial sets. In HoTT/UF thishas the following even more pleasing manifestation: Theorem AKS15 , Theorem 6.17]) . For univalent categories C and D ,let C ≃ D be the type of categorical equivalences between C and D ; then ( C = D ) = ( C ≃ D ) . Our goal, therefore, is to formulate a general notion of “univalence” for othercategorical structures, for which we can prove an analogue of Theorem 3.6. In this section, we give an equivalent definition of the precategories of theprevious section, carving them out of the structures for the signature L cat+E . Due to the many advantages mentioned below, in HoTT/UF univalent categories are oftencalled simply “categories”, although in some references that unadorned word refers instead toprecategories. Anticipating the explicit calculation from Examples 4.12 and 4.24, a structure M for the diagram signature L cat from Figure 1 consists of M O : U M A : M O × M O → U M I : Q ( x : MO ) M A ( x, x ) → U M T : Q ( x,y,z : MO ) M A ( x, y ) → M A ( y, z ) → M A ( x, z ) → U while a structure for L cat+E additionally contains a family M E : Q ( x,y : MO ) M A ( x, y ) → M A ( x, y ) → U This forms the underlying data of a (pre)category: a type of objects, types ofmorphisms, and properties of “being an identity” and “being a composite”.To carve out from the type of L cat+E -structures the precategories of Defini-tion 3.2, we consider the following “categorical” L cat+E -axioms:(1) E is a congruence with respect to T , I , and E itself (an equivalencerelation).(2) Composition of any two composable arrows should exist: ∀ ( x, y, z : O ) . ∀ ( f : A ( x, y )) . ∀ ( g : A ( y, z )) . ∃ ( h : A ( x, z )) .T x,y,z ( f, g, h ) . (3) Composites are unique: ∀ ( x, y, z : O ) . ∀ ( f : A ( x, y )) . ∀ ( g : A ( y, z )) . ∀ ( h, h ′ : A ( x, z )) .T x,y,z ( f, g, h ) ∧ T x,y,z ( f, g, h ′ ) → E x,z ( h, h ′ ) . (4) Identities are unique: ∀ ( x : O ) . ∀ ( f, g : A ( x, x )) .I x ( f ) → I x ( g ) → E x,x ( f, g ) . (5) Composition is right-unital: ∀ ( x, y : O ) . ∀ ( f : A ( x, y ) . ∀ ( g : A ( y, y )) .I y ( g ) → T x,y,y ( f, g, f ) . (6) Composition is left-unital: ∀ ( x, y : O ) . ∀ ( f : A ( x, x ) . ∀ ( g : A ( x, y )) .I x ( f ) → T x,x,y ( f, g, g ) . (7) Composition is associative: ∀ ( w, x, y, z ) . ∀ ( f : A ( w, x )) . ∀ ( g : A ( x, y ) . ∀ ( h : A ( y, z )) . ∀ ( k : A ( w, y )) . ∀ ( l : A ( x, z )) . ∀ ( m, n : A ( w, z ) .T w,x,y ( f, g, k ) → T x,y,z ( g, h, l ) → T w,y,z ( k, h, m ) → T w,x,z ( f, l, n ) → E w,z ( m, n ) . In addition to the categorical axioms, we ask the structures to satisfy the following“homotopical” L cat+E -axioms:(8) M T , M I , M E consist pointwise of propositions;(9) M A consists pointwise of sets;(10) M E is standard : ∀ ( x, y : O ) . ∀ ( f, g : A ( x, y )) .E x,y ( f, g ) ↔ f = g. Definition 3.7 ( T cat -precategory) . We define T cat to be the theory with signature L cat+E , and with axioms given by Items 1 to 10 above. A T cat -precategory is a T cat -model, i.e., an L cat+E -structure satisfying the T cat -axioms.We now can state and prove the following result: .4. UNIVALENCE AT O Lemma 3.8. The type of precategories of Definition 3.2 is equivalent to the typeof T cat -precategories. Proof. The underlying data of M O and M A are the same. In one direction,let M I x ( f ) : ≡ ( f = 1 x ) and M T x,y,z ( f, g, h ) : ≡ ( h = g ◦ f ) . In the other, let x bethe unique f : M A ( x, x ) with M I x ( f ) , and g ◦ f the unique h with M T x,y,z ( f, g, h ) .(Here we use the principle of unique choice, which holds in univalent foundations;see [ Uni13 , §3.9].) (cid:3) Remark 3.9 (E-categories) . An E-category (see, e.g., [ Pal18 ]) consists of a typeof objects, and, for each pair ( a, b ) of objects, a setoid hom( a, b ) of morphisms from a to b , together with operations of identity and composition satisfying the usualcategorical axioms up to the setoid relation. Models of the theory given by thesignature L cat+E and the categorical axioms of Items 1 to 7 are closely related toE-categories. One difference is that E-categories are “algebraic”, in the sense thatidentities and composition are given as functions instead of (functional) relations. O We now consider how to express the univalence condition of Definition 3.5, and,specifically, the notion of isomorphism, in T cat -precategories. Of course, a trivialsolution would be to rely on the equivalence of Lemma 3.8 to reuse the traditionaldefinition of isomorphism. Our goal, however, is to define a notion of isomorphismthat (1) only depends on the diagram structure underlying a T cat -precategory, noton the axioms imposed on it; and(2) is applicable to other signatures.We will refer to the resulting notion of isomorphism as an indiscernibility .Recall that by the Yoneda lemma, an isomorphism φ : a ∼ = b in a category C isequivalently a natural family of isomorphisms of sets φ x • : C ( x, a ) ∼ = C ( x, b ) , wherenaturality in x means that φ y • ( g ) ◦ f = φ x • ( g ◦ f ) . In the language of L cat+E -structures, the operation ◦ is replaced by the relation T , with a new variable h forthe composite g ◦ f : • For each x : O , an isomorphism φ x • : A ( x, a ) ∼ = A ( x, b ) ; and • For each x, y : O , f : A ( x, y ) , g : A ( y, a ) , and h : A ( x, a ) , we have T x,y,a ( f, g, h ) ↔ T x,y,b ( f, φ y • ( g ) , φ x • ( h )) .This looks promising, but it privileges one of the variables of A over the other, andthe relation T over I (and E ). To arrive at a mechanical definition of indiscernibilitypurely from the underlying diagram signature, we need to avoid such arbitrarychoices.It is more natural, therefore, to give equivalences between hom-sets with a and b substituted into all possible “collections of holes”:For any x : O , an isomorphism φ x • : A ( x, a ) ∼ = A ( x, b ) ;(3.13) For any z : O , an isomorphism φ • z : A ( a, z ) ∼ = A ( b, z ) ;(3.14) An isomorphism φ •• : A ( a, a ) ∼ = A ( b, b ) .(3.15)and similar logical equivalences between all possible “relations with holes”: T x,y,a ( f, g, h ) ↔ T x,y,b ( f, φ y • ( g ) , φ x • ( h )) (3.16) T x,a,z ( f, g, h ) ↔ T x,b,z ( φ x • ( f ) , φ • z ( g ) , h ) (3.17) T a,z,w ( f, g, h ) ↔ T b,z,w ( φ • z ( f ) , g, φ • w ( h )) (3.18) T x,a,a ( f, g, h ) ↔ T x,b,b ( φ x • ( f ) , φ •• ( g ) , φ x • ( h )) (3.19) T a,x,a ( f, g, h ) ↔ T b,x,b ( φ • x ( f ) , φ x • ( g ) , φ •• ( h )) (3.20) T a,a,x ( f, g, h ) ↔ T b,b,x ( φ •• ( f ) , φ • x ( g ) , φ • x ( h )) (3.21) T a,a,a ( f, g, h ) ↔ T b,b,b ( φ •• ( f ) , φ •• ( g ) , φ •• ( h )) (3.22) I a,a ( f ) ↔ I b,b ( φ •• ( f )) (3.23) E x,a ( f, g ) ↔ E x,b ( φ x • ( f ) , φ x • ( g )) (3.24) E a,x ( f, g ) ↔ E b,x ( φ • x ( f ) , φ • x ( g )) (3.25) E a,a ( f, g ) ↔ E b,b ( φ •• ( f ) , φ •• ( g )) (3.26)for all x, y, z, w : O and f, g, h of appropriate types. Fortunately, the additional datahere are redundant. Since φ x • , φ • z , and φ •• preserve identities and E is equivalentto identity by hypothesis, we obtain (3.24) to (3.26). Just as (3.16) means the φ x • form a natural isomorphism, (3.18) means the φ • z form a natural isomorphism,and (3.17) means these natural isomorphisms arise from the same φ : a ∼ = b . Giventhis, any one of Eqs. (3.19) to (3.21) ensures that φ •• is conjugation by φ , and thenthe other two follow automatically, as do Eqs. (3.22) and (3.23). This suggests thefollowing definition. Definition 3.10. For a, b objects of an L cat+E -structure, an indiscernibility from a to b consists of data as in Eqs. (3.13) to (3.15) satisfying Eqs. (3.16) to (3.26).We write a ≍ b for the type of such indiscernibilities. Theorem . In any T cat -precategory, the type of indiscernibilities from a to b is equivalent to the type of isomorphisms a ∼ = b . (cid:3) Definition 3.12. A univalent T cat -category is a T cat -precategory such that forall a, b : M O , the canonical map ( a = b ) → ( a ≍ b ) is an equivalence.We can conclude: Theorem . A T cat -precategory is univalent iff its corresponding precategoryis a univalent category. (cid:3) The point of our definition of indiscernibility is that it can be derived algorith-mically from the diagram signature for categories, by an algorithm which appliesequally well to (1) any sort in L cat+E and (2) any diagram signature. We will givethis mechanism explicitly in Chapters 5 and 16. Then, for any a, b : M K in somestructure M , there will be a canonical map ( a = K b ) → ( a ≍ b ) , and we call M univalent at K if these are equivalences.This leads to an obvious question: what does univalence mean at the othersorts of L cat+E ? Let M be an L cat+E -structure, and let t, t ′ : M T x,y,z ( f, g, h ) . Following thesame recipe as for O in the previous section, the type t ≍ t ′ of indiscernibilitiesshould consist of consistent equivalences between all types dependent on t and t ′ . But there are no such types in the signature, so t ≍ t ′ is contractible. Thesame reasoning applies to I and E . Thus, the univalence condition for these sorts .6. UNIVALENCE AT A will assert simply that all of their path-types are contractible, i.e., that they arepropositions. Note that this is just Item 8 of Definition 3.7. Definition 3.14. An L cat+E -structure M is univalent at T , I , and E if andonly if the canonical maps ( t = t ′ ) → ( t ≍ t ′ )( i = i ′ ) → ( i ≍ i ′ )( e = e ′ ) → ( e ≍ e ′ ) are equivalences for all inhabitants of the types M T , M I , and M E , respectively. (cid:3) Theorem . An L cat+E -structure M is univalent at T , I , and E if and onlyif Item 8 of Definition 3.7 is satisfied. (cid:3) A Finally, we define indiscernibilities for arrows of an L cat+E -structure M . Weassume that M is univalent at T , I , and E , that is, that M T , M I , and M E arepropositions pointwise. Furthermore, we assume that M E is a congruence for M T , M I , and M E . Let a, b : O and f, g : A ( a, b ) .An indiscernibility between f, g : A ( a, b ) in M should consist of logical equiva-lences between instances of T , I , and E with f replaced by g in “all possible ways”,clearly beginning with T x,a,b ( u, f, v ) ↔ T x,a,b ( u, g, v ) (3.27) T a,x,b ( u, v, f ) ↔ T a,x,b ( u, v, g ) (3.28) T a,b,x ( f, u, v ) ↔ T x,a,b ( g, u, v ) (3.29)for all x : O and u, v of appropriate types. But how do we put f in two or three ofthe places in T in the most general way? In Chapters 5 and 16 we will see that theanswer is to assume an equality between objects and transport f along it. Definition 3.16. For f, g : A ( a, b ) in an L cat+E -structure M univalent at T , I ,and E , an indiscernibility from f to g consists of the logical equivalences shownin Eqs. (3.27) to (3.37), for all p : a = a , q : b = a , and r : b = b . T a,a,b ( q ∗ ( f ) , f, u ) ↔ T a,a,b ( q ∗ ( g ) , g, u ) (3.30) T a,b,b ( p ∗ ( f ) , u, f ) ↔ T a,b,b ( p ∗ ( g ) , u, g ) (3.31) T a,a,b ( u, r ∗ ( f ) , f ) ↔ T a,a,b ( u, r ∗ ( g ) , g ) (3.32) T a,a,b (( p, q ) ∗ ( f ) , r ∗ ( f ) , f ) ↔ T a,a,b (( p, q ) ∗ ( g ) , r ∗ ( g ) , g ) (3.33) I a ( q ∗ ( f )) ↔ I a ( q ∗ ( g )) (3.34) E a,b ( f, u ) ↔ E a,b ( g, u ) (3.35) E a,b ( u, f ) ↔ E a,b ( u, g ) (3.36) E a,b (( p, r ) ∗ ( f ) , f ) ↔ E a,b (( p, r ) ∗ ( g ) , g ) (3.37)Since T , I , and E are propositions, so is the type f ≍ g of indiscernibilities.And f ≍ f , so by [=] -induction we have ( f = g ) → ( f ≍ g ) . Theorem . Let M be univalent at T , I , and E , and E be a congruencefor T , I , and E . Then the following are equivalent: (1) the map ( f = g ) → ( f ≍ g ) is an equivalence for all f, g ;(2) M is standard and M A is a set pointwise. Proof. Since f ≍ g is a proposition, the former condition implies that each A ( a, b ) is a set. Thus, for 1 ⇒ 2, it suffices to show E a,b ( f, g ) ⇒ ( f ≍ g ) , whichholds since E is a congruence for T and I .For 2 ⇒ 1, we must show ( f ≍ g ) ⇒ ( f = g ) in a standard structure. (Themaps back and forth are then automatically equivalences, since by assumption bothsides are propositions.) But since E a,b ( f, f ) always, f ≍ g implies E a,b ( f, g ) , hence f = g by standardness. (cid:3) Thus, by extending the “univalence” condition of a category from the sort O to the sort A , we encompass automatically the assumption that the hom-types ina precategory are sets and that the equality is standard. These are the remaininghomotopical axioms (Items 9 and 10) from Definition 3.7. Remark 3.18 (On equality predicates in a signature) . More generally, suppose L is a signature containing a sort S at rank one below top-level and an equalitypredicate E S ⇒ S . If M is an L -structure satisfying axioms saying that E S is acongruence for all the sorts that depend on S , then univalence of M means thatthe type (family) M S is pointwise a set with identifications given by M E S .In Example 7.4 we describe in detail the effect of adding an equality sort tothe signature of a type with a binary relation on it. In Chapter 10 we study howto add equality predicates to sorts at lower rank, e.g., to the sort of objects of acategory.In sum, all the ad-hoc-looking homotopical conditions on a T cat -precategoryare equivalent to univalence conditions on the various sorts of L cat+E . A categoryis hence equivalently an L cat+E -structure that (1) satisfies the categorical axioms;and (2) is univalent at all of its sorts. Our goal in the rest of Part 1, therefore, is todefine notions of indiscernibility and univalence for any signature L , generalizingthe theory of univalent categories to arbitrary higher-categorical structures. In Section 3.4, we described a notion of isomorphism or indiscernibility that(1) only depends on the diagram structure underlying a T cat -precategory, noton the axioms imposed on it; and(2) is applicable to other signatures.In this section, we develop a notion of equivalence that is not only equivalent tothe usual notion of equivalence between univalent categories, but that also satisfiesItems 1 and 2 above.Consider a fully faithful and essentially surjective functor [ AKS15 , Def. 6.7]between univalent T cat -categories M and N . Putting this in terms of T cat -structures,a functor e : M → N consists of the following functions. e O : M O → N Oe A : Q ( x,y : MO ) M A ( x, y ) → N A ( ex, ey ) e I : Q ( x : MO,i : MA ( x,x )) M I x ( i ) → N I ex ( ei ) e T : Q ( x,y,z : MO,f : MA ( x,y ) ,g : MA ( y,z ) ,h : MA ( x,z )) M T x,y,z ( f, g, h ) → N T ex,ey,ez ( ef, eg, eh ) .7. EQUIVALENCE OF CATEGORIES 35 e E : Q ( x,y : MO,f : MA ( x,y ) ,g : MA ( x,y )) M E x,y ( f, g ) → N E ex,ey ( ef, eg ) The functor e is essentially surjective just when e O is pointwise surjective (this isbecause N is univalent), and e is fully faithful just when e A is a pointwise equiva-lence.This second condition, that each e A ( x, y ) is an equivalence, is equivalent tothe condition that e A ( x, y ) is surjective and an embedding [ Uni13 , Cor. 4.6.4]. If e A ( x, y ) is an embedding, then (by definition) the function ( f = g ) → ( ef = eg ) for f, g : e A ( x, y ) is an equivalence. Since our categories are univalent, f = g isequivalent to the type of indiscernibilities f ≍ g , which is equivalent to M E x,y ( f, g ) by Theorem 3.17; and similarly, ef = eg is equivalent to N E ex,ey ( ef, eg ) . Thus, e A ( x, y ) is an embedding if and only if for all f, g : e A ( x, y ) the function e E : M E x,y ( f, g ) → N E ex,ey ( ef, eg ) is an equivalence — or, equivalently, a surjection,since M E x,y ( f, g ) and N E ex,ey ( ef, eg ) are propositions. Thus, the condition that e A is a pointwise equivalence is itself equivalent to the condition that e A and e E are pointwise surjections.Note also that the morphisms e I and e T are also pointwise surjections whenever e is fully faithful. To see that e I is a surjection at each x : M O and f : M A ( x, x ) ,for each j : N I e ( x ) ( ef ) , we need to find terms i : M I x ( f ) and p : e I i = j . Notethat the axioms for a category imply that any two identity morphisms are the same(that is, if α, β : A ( a, a ) and I a ( α ) , I a ( β ) are inhabited, then α = β is). Considerthen the identity x . It is sent to an identity on ex , so we find that e (1 x ) = ef .But since e A ( x, x ) is an embedding, we find that x = f . Thus there is some term i : M I x ( f ) and p : e I i = j is satisfied since its ambient type, N I e ( x ) ( ef ) , is aproposition. A similar argument shows that e T is a pointwise surjection.Thus, we can say that an equivalence between two univalent T cat -structures M and N consists of functions e O , e A , e I , e T , e E as above which are all pointwisesurjections. We have the following. Theorem . An equivalence between two univalent T cat -categories, in theabove sense, is exactly an equivalence of univalent categories in the usual sense. This notion of equivalence (a levelwise, pointwise surjection) motivates our gen-eral notion of equivalence between structures. It should be noted that we actuallyconsider split surjections (Definition 17.1) in the general case; although non-splitsurjections suffice for categories, we do not know if they suffice for all theories.Moreover, we introduce many different shades of equivalence to accomplish ourgoals (e.g., levelwise equivalence (Definition 4.25, Definition 15.1), relative equiv-alence (Definition 17.7)), but when the structures in question are univalent, theseare all equivalent, as we will show.HAPTER 4 Diagram signatures in Two-Level Type Theory To state and prove general theorems about higher-categorical structures, weneed a general definition of what is meant by a “higher-categorical structure”. Thereare many approaches to this; we will take the “geometric” or “non-algebraic” one,in which a structure is specified by a diagram of sets or spaces with properties.Specifically, we will use Reedy fibrant diagrams of spaces (i.e., types) on certain in-verse (exo-)categories , which are “maximally non-algebraic”: the functorial actionscan all be encapsulated by type dependency.This latter point was already realized by Makkai [ Mak95 ], who used diagramsof sets on inverse categories to give a similar general context for higher-categoricalstructures, along with a language called First-Order Logic with Dependent Sorts(FOLDS). In contrast to HoTT/UF, FOLDS is not a foundational system for math-ematics, but a kind of first-order logic designed for higher categorical structures.We will not use the logical syntax of FOLDS, but we adopt and generalize its no-tions of signature and structure. We will refer to the particular inverse categorieswe use as as diagram signatures (Makkai called them “vocabularies”). Before we can give our first definition of signature in Section 4.2, we review, inthis section, the definition of exo-categories in 2LTT (see also [ ACKS19 , Defini-tion 3.1]). Definition 4.1 (Exo-category) . An exo-category C is given by the following data:(1) An exotype C of objects (also often denoted C );(2) For each x, y : C an exotype C ( x, y ) of arrows ;(3) For each x : C an arrow x : C ( x, x ) ; and(4) A composition map ( ◦ ) : C ( y, z ) → C ( x, y ) → C ( x, z ) that is associativeand for which is a left and right unit, both up to exo-equality. Remark 4.2 (Precategories vs. exo-categories) . For emphasis, we list here the dif-ferences between precategories (Definition 3.2) and exo-categories (Definition 4.1):(1) In precategories, the exotypes of objects and morphisms are required tobe fibrant.(2) In precategories, the axioms are formulated with respect to identifications,while in exo-categories they are formulated with respect to exo-equalities.(3) In precategories, Item 7 of Definition 3.2 ensures that equality of arrows isa property; in particular, that the associativity and unitality witnesses areunique. Such a condition would not make sense for general exo-categories;but even if the hom-exotypes of an exo-category are fibrant, they may notbe sets. 378 4. DIAGRAM SIGNATURES IN TWO-LEVEL TYPE THEORY Example 4.3. Any exouniverse U e gives rise to an exo-category, also denoted U e ,with objects A : U e and morphisms U e ( A, B ) : ≡ A → B . The corresponding fibrantuniverse U is a full sub-exo-category of U e . Definition 4.4 (Exo-functor, exo-natural transformation) . An exo-functor F : C → D consists of a function F : C → D and functions F x,y : C ( x, y ) →D ( F x, F y ) preserving identity and composition up to exo-equality. We denoteboth F and F x,y by just F . An exo-natural transformation α : F ⇒ G : C → D consists of a family of morphisms ( α x : D ( F x, Gx )) x : C satisfying the naturality ax-iom by an exo-equality. After the introduction of diagram signatures by example in Chapter 3, wenow move on to a formal definition of diagram signatures in 2LTT. Our diagramsignatures are indexed by their height; diagram signatures of height n and theirmorphisms form an exo-category. Moreover, each diagram signature is itself an“inverse exo-category”, with exotypes of objects and morphisms: this turns out togive a very useful midway point between the entirely internal (with types of objectsand morphisms) and the entirely external (an inverse category in the metatheory,with sets of objects and morphisms). Definition 4.5 ([ ACKS19 , §4.2]) . An inverse exo-category is an exo-category L together with a functor rk : L → ( N e ) op (where N e is regarded as an exo-categorywith N e ( m, n ) : ≡ ( m ≤ n ) ) that reflects identities. Thus each object is assigneda natural number, called its rank , such that every nonidentity morphism strictlydecreases rank. An inverse exo-category has height p if all of its objects have rank < p . (In particular, only the empty exo-category has height 0.)In particular, therefore, an inverse exo-category has an exotype of objects L equipped with a function rk : L → N e . It is often convenient to regard this insteadas a family of exotypes indexed by N e . That is, if we write L ( n ) for the exotype ofobjects of rank n : L ( n ) : ≡ X L : L ( rk ( L ) ≡ n ) , then we have L ∼ = P ( n : N e ) L ( n ) . More precisely, the slice exo-category U e / N e isequivalent to the functor exo-category N e → U e (where N e is here regarded as adiscrete exo-category). Thus, if we define an indexed inverse exo-category tobe a type family L : N e → U e together with the structure of an inverse exo-categoryon its image L in U e / N e , we obtain an equivalent notion of inverse exo-category.(Once we define morphisms of diagram signatures in Section 14.1, we can say thatthe exo-categories of inverse exo-categories and of indexed inverse exo-categories areequivalent.) We will generally pass back and forth between these two viewpointssilently, trusting the context to disambiguate.Note that neither L ( n ) nor the hom-types hom L ( K, L ) need be fibrant. How-ever, in a diagram signature we will require sharpness of the types L ( n ) and cofi-brancy of the following fanout exotype, which gathers all the dependencies of asort. .3. REEDY FIBRANT DIAGRAMS 39 Definition 4.6. Given an inverse exo-category L , the fanout exotype of K : L ( n ) at m < n is Fanout m ( K ) : ≡ X L : L ( m ) hom L ( K, L ) . Definition 4.7. A diagram signature of height p is an inverse exo-category L of height p for which(1) each L ( n ) is sharp; and(2) each exotype Fanout m ( K ) is cofibrant.The exotype of diagram signatures of height p is denoted by DSig ( p ) .There are several reasons for these restrictions. One is that, as we will seein Section 4.4, they ensure that the type of structures for a diagram signature isfibrant. They are also necessary for the definition of indiscernibility in Chapter 5. Remark 4.8. Many, if not most, naturally-occurring diagram signatures are finite. For instance, the diagram signatures L cat and L cat+E shown in Figure 1 have fourand five objects respectively, and their homsets are also finite. When interpretingsuch pictures as exo-categories in 2LTT, we interpret these finite sets as exofiniteexotypes N e ACKS19 , Definition4.4 and Lemma 4.5]; we give a third in terms of our fanout types. Definition 4.9 ([ ACKS19 , §4.3]) . The matching object of an exo-functor M : L → U e at K : L ( n ) , denoted M K M , is the sub-exotype of Y ( m ACKS19 ],which in turn are rephrasings of the standard homotopy-theoretic definition. Example 4.10. If K has rank 0, then there are no m < , hence M K M ∼ = .Thus, Reedy fibrancy at rank-0 sorts simply means that M K is fibrant. Example 4.11. For an exo-diagram M on the signature A ⇒ O for graphs, wehave M A M ∼ = M O × M O . Thus, M is Reedy fibrant if M O is fibrant and the map M A → M O × M O is a fibration, which is to say that M is determined by a type M O : U and a type family M A : M O → M O → U . Example 4.12. For an exo-diagram M on the signature L cat for categories, wehave M A M ∼ = M O × M O as for graphs. The matching object M I M is the pullbackof M A along the diagonal M O → M O × M O , or equivalently P ( x : MO ) M A ( x, x ) .Similarly, M T M is the triple fiber product of three pullbacks of M A to M O × M O × M O , or equivalently P ( x,y,z : MO ) M A ( x, y ) × M A ( y, z ) × M A ( x, z ) . Thus,a Reedy fibrant diagram on L cat is determined by a type M O : U , a type family M A : M O → M O → U , and two further type families M I : (cid:16) X x : MO M A ( x, x ) (cid:17) → U M T : (cid:16) X x,y,z : MO M A ( x, y ) × M A ( y, z ) × M A ( x, z ) (cid:17) → U or equivalently M I : Y x : MO M A ( x, x ) → U M T : Y x,y,z : MO M A ( x, y ) → M A ( y, z ) → M A ( x, z ) → U . A Reedy fibrant diagram on L cat+E adds to this a further type family M E : Y x,y : MO M A ( x, y ) → M A ( x, y ) → U . The meaning of “determined by” in these examples is somewhat subtle. Forinstance, in Example 4.11 it does not mean that the exotype of Reedy fibrantdiagrams is isomorphic to the fibrant type P ( MO : U ) M O → M O → U . Nor does itmean that they are equivalent as types ; indeed that doesn’t even make sense, sincethe former may not be fibrant. What is true is that the exo-category [ L , U e ] Rfib is equivalent as an exo-category to one whose (exo)type of objects is P ( MO : U ) M O → M O → U .This situation is generic: the exo-category of Reedy fibrant diagrams on anydiagram signature is equivalent, as an exo-category, to an exo-category with afibrant type of objects. This is essentially proven in [ ACKS19 , §4.5]; we will givea different proof in Section 4.4. It is the elements of this fibrant type that we willrefer to as L -structures . For this result it would suffice to assume that each L ( n ) is cofibrant, as is each fanoutexotype. Our stronger assumption of sharpness of L ( n ) will not be needed until Chapter 16. .4. DERIVATIVES OF SIGNATURES AND DIAGRAM STRUCTURES 41 In Section 4.3 we gave a version of the usual definition of Reedy fibrant di-agrams for a diagram signature. This definition is well-suited to arguments thatare “inductive at the top”: that is, where in the inductive step we assume thatsomething has been done at all sorts of rank < n and proceed to extend it to rank n . However, our arguments will be “inductive at the bottom”: we assume thatsomething has been done at all sorts of rank > and proceed to extend it to rank . For this purpose we need a different characterization of Reedy fibrant structures.The crucial observation is that if we fix the value of a structure on the rank-0 sorts,then the rest of that structure can be represented as a diagram on the following derived signature. Definition 4.13. Let L be an inverse exo-category of height p > , and let M : L (0) → U e . The derivative of L with respect to M is the inverse exo-category L ′ M of height p − with objects and morphisms defined as follows: L ′ M ( n ) : ≡ X ( K : L ( n +1)) Y ( F : Fanout ( K )) M ( π F )hom L ′ M (( K , α ) , ( K , α )) : ≡ X ( f :hom( K ,K )) Y ( F : Fanout ( K )) α ( F ◦ f ) ≡ α ( F ) where π : Fanout ( K ) → L (0) is the projection and F ◦ f denotes the function Fanout ( K ) → Fanout ( K ) given by precomposition. Example 4.14. If p ≡ then L > is empty. Thus, no matter what M : L (0) → U we choose, L ′ M is the empty signature. Example 4.15. If L has height , then it consists of two exo-types L (0) and L (1) and a family of hom-exotypes hom L : L (1) → L (0) → U e . Then for any M : L (0) → U e , the derivative L ′ M has height , consisting of just a single exotypeof sorts of rank . Each such sort is, by definition, a sort K : L (1) in L of rank together with a function Fanout ( K ) → M L .As a particular example, for the diagram signature A ⇒ O of graphs, wehave L (0) ∼ = L (1) ∼ = and hom L ( A, O ) ≡ e . Thus Fanout ( A ) ∼ = × e , whichis isomorphic to e . Hence for M : → U e , which is determined up to exo-equality by a single type M O : U , the derivative L ′ M has rank-0 sorts indexed by × (( × e ) → M O ) , which is isomorphic to M O × M O . In the future we willgenerally elide isomorphisms of this sort. Example 4.16. We have L cat (0) ∼ = (the single sort O ), so a type family M : L cat (0) → U is determined by a single type M O . The derivative ( L cat ) ′ MO thenhas rank-0 sorts A ( x, y ) indexed by (a type isomorphic to) M O × M O , one familyof rank-1 sorts I ( x ) indexed by (a type isomorphic to) M O , and a second familyof rank-1 sorts T ( x, y, z ) indexed by (a type isomorphic to) M O × M O × M O . Tobe precise, this means the exotype of rank-1 sorts is isomorphic to M O + e ( M O × M O × M O ) ; note that this is neither exofinite nor fibrant, but it is sharp. There isan arrow from I ( x ) to A ( x, x ) , and arrows from T ( x, y, z ) to A ( x, y ) , A ( y, z ) , and A ( x, z ) .The derivative ( L cat+E ) ′ M is similar, but with a third family of rank-1 sorts E ( x, y ) indexed by M O × M O , with two arrows from E ( x, y ) to A ( x, y ) . If we take the “second derivative” of L cat at some M A : M O × M O → U ,we obtain a height-1 signature (( L cat ) ′ MO ) ′ MA whose exotype of rank-0 sorts is(isomorphic to) (cid:16) X x : MO M A ( x, x ) (cid:17) + e (cid:16) X x,y,z : MO M A ( x, y ) × M A ( y, z ) × M A ( x, z ) (cid:17) . The second derivative (( L cat+E ) ′ MO ) ′ MA is similar, with an extra exo-summand P ( x,y : MO ) M A ( x, y ) × M A ( x, y ) .Intuitively, in L ′ M we take the “indexing” of all sorts by O and move it “outside”the signature, incorporating it into the types of sorts. Note that this would beimpossible if our inverse categories were metatheoretic in the ordinary sense, e.g.,syntactic and externally finite. 2LTT is just right.Definition 4.13 applies to any inverse exo-category, but it preserves diagramsignatures: Proposition 4.17. Let L be a diagram signature of height p > and M : L (0) →U . Then the inverse exo-category L ′ M is a diagram signature. Proof. Since each Fanout ( K ) is cofibrant and each M ( π F ) is fibrant, wehave that Q ( F : Fanout ( K )) M ( L ) is fibrant. Since L ( n + 1) is sharp, so is X ( K : L ( n +1)) Y ( F : Fanout ( K )) M ( π F ) . Now consider n : N e
Definition 4.18. Let L be a diagram signature; we define the type Str ( L ) of L -structures inductively on its height. If L : Sig (0) , we define Str ( L ) : ≡ . If L : Sig ( n + 1) , we define define Str ( L ) : ≡ X M ⊥ : L (0) →U Str ( L ′ M ⊥ ) . We write the two components of M : Str ( L ) as ( M ⊥ , M ′ ) . Remark 4.19. Technically, this is a definition by recursion of a function Str ( − ) : Y n : N e ( DSig ( n ) → U ) . The closure properties of U , and the cofibrancy of L (0) , ensure that this functionis well-defined. Thus, in particular, each Str ( L ) is a fibrant type . In the future wewill make more definitions of this sort. Remark 4.20. Recall that the rank functor is part of the data of a diagramsignature. It is not obvious from the definitions that the L -structures of a diagramsignature L are independent of the rank functor of L . This independence will beshown in Corollary 15.9; the comparison goes via the Reedy fibrant diagrams ofSection 4.3. Notation 4.21. Given a signature L , an L -structure M , and K : L (0) , we oftenwrite M K instead of M ⊥ K . Similarly, for L : L (1) , we write M L instead of ( M ′ ) ⊥ L and so on. Theorem . For any diagram signature L , the exo-category [ L , U e ] Rfib hasfibrant hom-types, and is equivalent to an exo-category whose (exo)type of objectsis Str ( L ) . We will prove this theorem later as Theorem 14.23. Example 4.23. For the signature A ⇒ O of graphs, the type Str ( L ) is, to becompletely precise, X MO : →U Str ( L ′ MO ) ≡ X ( MO : →U ) X ( MA : × (( × e ) → MO ) →U ) Str (( L ′ MO ) ′ MA ) ≡ X ( MO : →U ) X ( MA : × (( × e ) → MO ) →U ) (see Example 4.15). However, this is isomorphic to X MO : U ( M O × M O → U ) and we will generally elide isomorphisms of this sort. Example 4.24. For the signature L cat for categories (see Example 4.16), the type Str ( L cat ) is (isomorphic to) X ( MO : U ) X ( MA : MO × MO →U ) (cid:16)(cid:0)P ( x : MO ) M A ( x, x ) (cid:1) → U (cid:17) × (cid:16)(cid:0)P ( x,y,z : MO ) M A ( x, y ) × M A ( y, z ) × M A ( x, z ) (cid:1) → U (cid:17) . Similarly, Str ( L cat+E ) is (isomorphic to) X ( MO : U ) X ( MA : MO × MO →U ) (cid:16)(cid:0)P ( x : MO ) M A ( x, x ) (cid:1) → U (cid:17) × (cid:16)(cid:0)P ( x,y,z : MO ) M A ( x, y ) × M A ( y, z ) × M A ( x, z ) (cid:1) → U (cid:17) × (cid:16)(cid:0)P ( x,y : MO ) M A ( x, y ) × M A ( x, y ) (cid:1) → U (cid:17) . These are exactly as we claimed in Example 4.12.Essentially by definition, [ L , U e ] Rfib is a “weak classifier” for Reedy fibrant dia-grams, in that every Reedy fibrant diagram on L is a pullback of a generic one over [ L , U e ] Rfib . However, this pullback is not in general unique. By contrast, Str ( L ) is a strong classifier of Reedy fibrant diagrams, in the same way that the fibrantuniverse U is a strong classifier of types. This is a consequence of the followingresult, which we will prove in Chapter 15. Definition 4.25. A morphism f : M → N of Reedy fibrant diagrams is a level-wise equivalence if each commutative square M K N K M K M M K N is a homotopy pullback, i.e., each induced map of (fibrant) fibers is an equivalence.Let M ≅ N denote the (fibrant) type of levelwise equivalences. Proposition 4.26. For any diagram signature L and M, N : Str ( L ) , the canonicalmap idtolvle : ( M = N ) → ( M ≅ N ) is an equivalence. We will prove Proposition 4.26 later as Proposition 15.8. The proof relies on theunivalence axiom; conversely, the univalence axiom can be recovered as an instanceof Proposition 4.26, for the signature consisting of just one sort. Example 4.27. Consider the theory of pointed sets of Equation (3.1), with theunderlying signature P EX. A levelwise equivalence f : M → N of models of that theory is precisely an isomor-phism of pointed sets, i.e., an isomorphism of sets preserving the chosen point. Example 4.28. Levelwise equivalences between T cat -precategories correspond pre-cisely to isomorphisms of precategories from [ AKS15 , Def. 6.9] and [ Uni13 , Def.9.4.8]: functors that induce equivalences on hom-types and also equivalences ontypes of objects (relative to homotopical identifications of objects, not isomor-phisms in the category structure).Example 4.27 shows that levelwise equivalence of structures is an adequatenotion of sameness for set-level structures. Example 4.28, however, shows that itdoes not yield the correct notion of sameness for higher-categorical structures. .5. AXIOMS AND THEORIES 45 Before defining a general analogue of equivalences of precategories, we have todefine indiscernibility for elements of an L -structure. We will do this in Chapters 5and 6, following the ideas we described in Chapter 3 for the case of L cat+E . But firstwe conclude this chapter with a definition of axioms and theories over a diagramsignature. Unlike Makkai’s notion of axiom defined using FOLDS, our axioms are not syntactically defined through an inductive set of sentences. Instead, we use thenotion of proposition of our ambient HoTT/UF to obtain a semantic notion ofaxiom. Definition 4.29. Let L be a diagram signature. An L -axiom is a function Str ( L ) → Prop U . Example 4.30. Consider the diagram signature P → X for pointed sets fromSection 3.1. Recall that the axiom ∃ ( x : X ) .P ( x ) is a shorthand for ∃ ( x : X ) . ∃ ( p : P ( x )) . ⊤ . The latter formula straightforwardly translates to the axiom Str ( L ) → Prop U M 7→ ∃ ( x : M X ) . ∃ ( p : M P ( x )) . . Here, we use the notational convention of Notation 4.21. Remark 4.31 (Axioms from FOLDS) . More generally, any FOLDS-axiom givesrise, in a mechanical way, to an axiom in the sense of Definition 4.29: for this, wemap • ⊤ and ⊥ to and , respectively (both of which are propositions), and • ∀ , ∃ , ∧ , and ∨ to their logical counterparts in HoTT/UF (where thetranslation of ∃ and ∨ uses propositional truncation). Example 4.32. The axioms given in Equations (3.6) to (3.12) in Section 3.1straightforwardly give rise to axioms for the signature L cat+E via the translationsketched in Remark 4.31. Definition 4.33 (Theories and Models) . A diagram theory is a pair ( L , T ) of adiagram signature L and a family T of L -axioms indexed by a cofibrant exotype.A model of a theory ( L , T ) then consists of an L -structure M together with aproof of t ( M ) for each axiom t of T . A morphism of models is a morphism ofthe underlying structures.For instance, a list of five L -axioms can be specified by a family indexed bythe exofinite exotype e . The cofibrancy condition on the indexing exotype ensuresthat the exotype of models of a theory is fibrant. The exotypes of morphisms, ofisomorphisms, and of equivalences of models are fibrant as well.In Part 2, we will discuss a wide range of particular theories and their univalentmodels.HAPTER 5 Indiscernibility and univalence for diagramstructures In this chapter and the next we state our definitions and results about indis-cernibility and univalence for diagram signatures. We postpone many proofs untilPart 3, where we will give them in the context of a more general notion of signaturethat we define in Chapter 14. However, since most of our examples are diagramsignatures, we can discuss them first in Part 2.We start in this chapter with most of the definitions of indiscernibility of ob-jects within an L -structure. We then define a structure to be univalent whenindiscernibility coincides with identification of objects.Let M be an L -structure, K : L (0) , and a, b : M K . (To deal with sorts ofrank > , we simply derive L and M enough times to bring the sort down to rank0.) To define indiscernibilities from a to b , we consider a new L -structure obtainedby adding to M one element at sort K : a “joker” element. We can substitutethis new element by a or by b ; below, we call the obtained structures ∂ a M and ∂ b M , respectively. An indiscernibility from a to b will be defined below to be alevelwise equivalence of structures from ∂ a M to ∂ b M that is the identity on allthe sorts not depending on the joker element. Intuitively, this means that a and b are indiscernible when one cannot discern one from the other using the rest of thestructure M .To make this more precise, let [ K ] : ≡ λL. ( K = L ) : L (0) → U , which makes sense since L (0) is sharp. We define ˆ a : Q ( L : L (0)) ([ K ]( L ) → M L ) byapplying Lemma 2.4 to a : M K . Let M ⊥ + [ K ] denote the pointwise disjoint unionin L (0) → U , and h M , ˆ a i : Q ( L : L (0)) ( M ⊥ + [ K ])( L ) → M L the pointwise copairing.There is an induced morphism of diagram signatures L ′h M ⊥ , ˆ a i : L ′ M ⊥ +[ K ] → L ′ M ⊥ ,along which we can pull back M ′ , and define ∂ a M : ≡ ( L ′h M ⊥ , ˆ a i ) ∗ M ′ : Str ( L ′ M ⊥ +[ K ] ) . This is not a complete definition since we have not defined morphisms of diagramsignatures and the functoriality of derivatives and structures. We will give thesedefinitions in Chapter 14, but this partial definition will suffice to state our theoremsand allow the reader to understand the examples.There is also an induced morphism ι M ⊥ : L ′ M ⊥ → L ′ M ⊥ +[ K ] , and the pullbackof ∂ a M along ι M ⊥ is M ′ . Our notion of indiscernibility is inspired by Makkai’s notion of “internal identity”, which hasso far only been discussed in talks, but not appeared in print. See, for instance, [ Mak21 ]. Here and below, we make use of the convention of Notation 4.21, writing MK for M ⊥ K . 478 5. INDISCERNIBILITY AND UNIVALENCE FOR DIAGRAM STRUCTURES Definition 5.1. For L : DSig ( n + 1) , K : L (0) , M : Str ( L ) , and a, b : M K , wedefine an indiscernibility from a to b to be a levelwise equivalence ∂ a M ≅ ∂ b M that restricts along ι M ⊥ to the identity of M ′ . We write a ≍ b for the (fibrant) typeof indiscernibilities.See Definition 16.3 for the full definition. There is a canonical identity indis-cernibility a ≍ a , which induces a map ( a = b ) → ( a ≍ b ) . Definition 5.2. For K : L (0) , a structure M : Str ( L ) is univalent at K if themap ( a = b ) → ( a ≍ b ) is an equivalence for all a, b : M K . We say M is univalent if it and all its derivatives are univalent at all rank-0 sorts of their signatures. Definition 5.3 (Univalent model) . Given a theory T ≡ ( L , T ) , a T -model is univalent if its underlying L -structure is univalent. Example 5.4. Suppose L has height 1, hence is just a type L (0) . Consider an L -structure M : L (0) → U and a, b : M ( K ) . Then ∂ a M and ∂ b M are structuresfor the trivial signature of height 0, hence uniquely identified; thus ( a ≍ b ) = . Soany structure of a signature L of height 1 is univalent just when it consists entirelyof propositions. Example 5.5. Suppose L is the signature of pointed sets of Diagram (3.1). In thiscase, we have L (0) : ≡ (whose single element we denote by X ), and M ⊥ : ≡ M X : U , while M ′ consists of the sorts M P ( x ) and M E ( x, y ) . By Example 5.4, M ′ isunivalent exactly when all these types are propositions.We have that L ′ M ⊥ (0) ∼ = M X + M X × M X , and L ′ M ⊥ +[ X ] (0) ∼ = M X + + ( M X + ) × ( M X + ) ∼ = M X + + ( M X × M X ) + M X + M X + . Then, for a : M X , the structure ( ∂ a M )(0) : L ′ M ⊥ +[ X ] (0) → U is given, on thosesorts, by λ ( x : M X ) .M P ( x ) , λ ( x : ) .M P ( a ) , λ ( x, y : M X × M X ) .M E ( x, y ) , λ ( x : M X ) .M E ( x, a ) , λ ( y : M X ) .M E ( a, y ) , and λ ( x : ) .M E ( a, a ) , respectively—and analogously for b : M X . An indiscernibility a ≍ b , a.k.a. a levelwise equivalence ∂ a M ≅ ∂ b M , thus consists of equivalences of types M P ( x ) ≃ M P ( x ) (5.1) M P ( a ) ≃ M P ( b ) (5.2) M E ( x, y ) ≃ M E ( x, y ) (5.3) M E ( x, a ) ≃ M E ( x, b ) (5.4) M E ( a, y ) ≃ M E ( b, y ) (5.5) M E ( a, a ) ≃ M E ( b, b ) (5.6)for all x, y : M X . The condition on restriction along ι says that the equivalencesof Equations (5.1) and (5.3) are the identity.In a univalent structure M , the types M P ( x ) and M E ( x, y ) , and hence thetype a ≍ b , are propositions. If we assume the axioms of Equations (3.2) to (3.5)stating that E is a congruence, then we can show that the type a ≍ b is equivalentto M E ( a, b ) , and hence the univalence condition for X says that M is standard.If we omit the sort E from the signature, then an indiscernibility a ≍ b isexactly an equivalence M P ( a ) ≃ M P ( b ) . . INDISCERNIBILITY AND UNIVALENCE FOR DIAGRAM STRUCTURES 49 To illustrate the impact of an equality predicate on univalence, we consider, inthe next example, partially ordered types. Example 5.6. Now suppose L is the following diagram signature: [ ≤ ] X and let M be an L -structure. As in Example 5.5, we have L (0) : ≡ (whose singleelement we denote by X ), and M ⊥ : ≡ M X : U ; here, M ′ consists of the sorts M [ ≤ ]( x, y ) , which we write shorter as x ≤ y . By Example 5.4, M ′ is univalentexactly when all these types are propositions.We have that L ′ M ⊥ (0) ∼ = M X × M X , and L ′ M ⊥ +[ X ] (0) ∼ = ( M X + ) × ( M X + ) ∼ = ( M X × M X ) + M X + M X + . Then, for a : M X , the structure ( ∂ a M )(0) : L ′ M ⊥ +[ X ] (0) → U is given, on thosesorts, by λ ( x, y : M X × M X ) . ( x ≤ y ) , λ ( x : M X ) . ( x ≤ a ) , λ ( y : M X ) . ( a ≤ y ) , and λ ( x : ) . ( a ≤ a ) , respectively—and analogously for b : M X . An indiscernibility a ≍ b , a.k.a. a levelwise equivalence ∂ a M ≅ ∂ b M , thus consists of equivalences oftypes ( x ≤ y ) ≃ ( x ≤ y ) (5.7) ( x ≤ a ) ≃ ( x ≤ b ) (5.8) ( a ≤ y ) ≃ ( b ≤ y ) (5.9) ( a ≤ a ) ≃ ( b ≤ b ) (5.10)for all x, y : M X . The condition on restriction along ι says that the equivalencesof Equation (5.7) are the identity.In a univalent structure M , the types ( x ≤ y ) , and hence the type a ≍ b ,are propositions. If we assume the axioms of reflexivity x ≤ x and antisymmetry x ≤ y → y ≤ x , then we can show that the type a ≍ b reduces to ( a ≤ b ) ∧ ( b ≤ a ) ,as mentioned in Section 1.4. The univalence condition then reads as ( a = b ) ≃ ( a ≍ b ) ≃ (cid:0) ( a ≤ b ) ∧ ( b ≤ a ) (cid:1) ; that is, it asserts antisymmetry.Variants of this theory including an equality predicate are given and comparedin Example 7.4. Example 5.7. Recall from Examples 4.16 and 4.24 that for L ≡ L cat+E , we have L (0) : ≡ ( L ′ MO )(0) : ≡ M O × M OM ⊥ : ≡ M O : U ( M ′ ) ⊥ : ≡ M A : M O × M O → U , while M ′′ consists of the sorts M T x,y,z ( f, g, h ) , M I x ( f ) , and M E x,y ( f, g ) . ByExample 5.4, M ′′ is univalent just when all these types are propositions. Now forany a, b : M O , we have ( M A + [ A ( a, b )])( x, y ) ≡ M A ( x, y ) + (( a = x ) × ( b = y )) . Thus, the height-1 signature ( L ′ MO ) ′ MA +[ A ( a,b )] is (cid:0)P ( x,y,z : MO ) ( M A ( x, y ) + (( a = x ) × ( b = y ))) × ( M A ( y, z ) + (( a = y ) × ( b = z ))) × ( M A ( x, z ) + (( a = x ) × ( b = z ))) (cid:1) + (cid:0)P ( x : MO ) ( M A ( x, x ) + (( a = x ) × ( b = x ))) (cid:1) + (cid:0)P ( x,y : MO ) ( M A ( x, y ) + (( a = x ) × ( b = y ))) × ( M A ( x, y ) + (( a = x ) × ( b = y ))) (cid:1) . By distributing P and × over + and contracting some singletons, this is equivalentto (cid:0)P ( x,y,z : MO ) M A ( x, y ) × M A ( y, z ) × M A ( x, z ) (cid:1) (5.11) + (cid:0)P ( z : MO ) M A ( b, z ) × M A ( a, z ) (cid:1) (5.12) + (cid:0)P ( x : MO ) M A ( x, a ) × M A ( x, b ) (cid:1) (5.13) + (cid:0)P ( y : MO ) M A ( a, y ) × M A ( y, b ) (cid:1) (5.14) + (cid:0) ( a = b ) × M A ( a, b ) (cid:1) (5.15) + (cid:0) M A ( a, a ) × ( b = b ) (cid:1) (5.16) + (cid:0) ( a = a ) × M A ( b, b ) (cid:1) (5.17) + (cid:0) ( a = b ) × ( a = a ) × ( b = b ) (cid:1) (5.18) + (cid:0)P ( x : MO ) M A ( x, x ) (cid:1) (5.19) + (cid:0) ( a = b ) (cid:1) (5.20) + (cid:0)P ( x,y : MO ) M A ( x, y ) × M A ( x, y ) (cid:1) (5.21) + (cid:0) M A ( a, b ) (cid:1) (5.22) + (cid:0) M A ( a, b ) (cid:1) (5.23) + (cid:0) ( a = a ) × ( b = b ) (cid:1) . (5.24)Thus for f, g : M A ( a, b ) , an identification ∂ f M = ∂ g M consists of equivalencesbetween instances of the predicates M T, M I, M E indexed over the types (5.11)–(5.24). The condition on restriction along ι says that the equivalences corre-sponding to (5.11), (5.19), and (5.21) are the identity, while those correspond-ing to (5.12)–(5.14), (5.15)–(5.18), (5.20), and (5.22)–(5.24) yield respectively theequivalences (3.27)–(3.29), (3.30)–(3.33), (3.34), and (3.35)–(3.37) from Section 3.6.Hence, indiscernibilities f ≍ g in the sense of Definitions 5.1 and 16.3 coincide withthe indiscernibilities from Definition 3.16.Now moving back down to the bottom rank, an ( L ′ MO ) -structure consists of M A : M O × M O → U together with appropriately typed families M T , M I , and M E . Since ( M O + [ O ]) = M O + , for a : M O the th rank of ∂ a M is ( ∂ a M ) A : ( M O + ) × ( M O + ) → U or equivalently ( ∂ a M ) A : ( M O × M O ) + M O + M O + → U consisting of the types ( M A ( x, y )) x,y : MO , ( M A ( a, y )) y : MO , ( M A ( x, a )) x : MO , and M A ( a, a ) . The st rank consists of M T , M I , and M E pulled back appropriately to . INDISCERNIBILITY AND UNIVALENCE FOR DIAGRAM STRUCTURES 51 these families. Thus, a levelwise equivalence ∂ a M ≅ ∂ b M consists of equivalences M A ( x, y ) ≃ M A ( x, y ) (5.25) M A ( x, a ) ≃ M A ( x, b ) (5.26) M A ( a, y ) ≃ M A ( b, y ) (5.27) M A ( a, a ) ≃ M A ( b, b ) (5.28)for all x, y : M O that respect the predicates M T , M I , M E . The condition onrestriction along ι says that the equivalences (5.25) are the identity, while theremaining (5.26)–(5.28) correspond respectively to the equivalences φ x • , φ • y , and φ •• (Equations (3.13) to (3.15)) from Section 3.4. Finally, respect for M T , M I , M E specializes to Eqs. (3.16) to (3.26). Thus, indiscernibilities a ≍ b in the senseof Definitions 5.1 and 16.3 coincide with the indiscernibilities from Definition 3.10.We will prove the following two results later as Theorems 16.10 and 16.11. Proposition 5.8. If L has height n + 1 , M : Str ( L ) is univalent, and K : L (0) ,then M K is an ( n − -type. Proposition 5.9. If L has height n , then the type of univalent L -structures is an ( n − -type. Example 5.10. For the signature L cat+E of height , Proposition 5.8 states thatthe type of objects of a univalent L cat+E -structure, and hence also of a univalent T cat -category, is a -type. Proposition 5.9 states that the type of univalent L cat+E -structures, and hence also the type of univalent T cat -categories (as a subtype of theformer), is a -type.Finally, and perhaps surprisingly, we note that in general, morphisms of struc-tures need not preserve indiscernibility. The following toy example makes the point;we will see in Example 13.4 that this can also fail in “real-world” categorical struc-tures. Example 5.11. Let L be the height-2 signature such that an L -structure consistsof a type M A and a binary relation M R : M A → M A → U . Univalence at R means that each M R ( x, y ) is a proposition; while a ≍ b , for a, b : M A , means that M R ( x, a ) ↔ M ( x, b ) for all x , M R ( a, x ) ↔ M ( b, x ) for all x , and M R ( a, a ) ↔ M R ( b, b ) .Let M be the L -structure with M A = { a, b } and M R ( x, y ) always false, and N the L -structure with N A = { a, b, c } with N R always false except that N R ( a, c ) is true. Let f ⊥ : M A → N A be the inclusion, so that M ′ = ( L ′ f ⊥ ) ∗ N ′ . Then a ≍ b in M , but f ⊥ a f ⊥ b in N .Functors between categories, and most other categorical examples to be dis-cussed in Part 2 do generally preserve indiscernibilities, but only because the indis-cernibilities in such cases admit an equivalent “diagrammatic” characterization by asuitable “Yoneda lemma” (as described for categories in Chapter 3). Note that thisdepends on the theory (i.e., the axioms) as well as the signature. We do not knowa general condition on a theory ensuring that morphisms between its structurespreserve indiscernibilities.HAPTER 6 The univalence principle for diagram structures Our goal is to prove a univalence principle for a notion of equivalence of uni-valent structures that is a priori weaker than levelwise equivalence. In the case of(pre)categories M, N , there are two natural candidates for such a notion: • A weak equivalence is a functor f : M → N that is fully faithful (eachfunction M A ( x, y ) → N A ( f x, f y ) is an isomorphism of sets) and essen-tially surjective ( Q ( y : NO ) k P ( x : MO ) ( f x ∼ = y ) k ). • A (strong) equivalence is a functor f : M → N for which there is afunctor g : N → M and natural isomorphisms f g ∼ = 1 N and gf ∼ = 1 M .By [ AKS15 , Lemma 6.6], this is equivalent to being fully faithful and split essentially surjective ( Q ( y : NO ) P ( x : MO ) ( f x ∼ = y ) ).In addition, there are two important related auxiliary notions: • A surjective weak equivalence is a functor f : M → N that is fully faithful(each function M A ( x, y ) → N A ( f x, f y ) is an isomorphism of sets) andsurjective on objects ( Q ( y : NO ) k P ( x : MO ) ( f x = y ) k ). • A split-surjective equivalence is a functor f : M → N that is fully faithful(each function M A ( x, y ) → N A ( f x, f y ) is an isomorphism of sets) andsplit-surjective on objects ( Q ( y : NO ) P ( x : MO ) ( f x = y ) ).Note that the latter two do not require knowing what an isomorphism betweenobjects is. Furthermore, fully-faithfulness can be split into fullness (each function M A ( x, y ) → N A ( f x, f y ) is surjective ) and faithfulness (each function M A ( x, y ) → N A ( f x, f y ) is injective), while faithfulness is equivalent to surjectivity on equalities :each function M E x,y ( p, q ) → N E fx,fy ( f p, f q ) is surjective (which implies a similarproperty for T and I ) .This suggests the following generalizations that apply to all diagram structures.In HoTT/UF, we say that a function f : A → B is surjective if Q ( b : B ) k P ( a : A ) f a = b k , and split-surjective if Q ( b : B ) P ( a : A ) f a = b . Definition 6.1. A morphism f : M → N of Reedy fibrant diagrams over a di-agram signature L is a surjective weak equivalence (resp. a split-surjectiveequivalence ) if for all sorts K , the induced maps on fibers by the commutativesquare(6.1) M K N K M K M M K N f K M K f are surjective (resp. split-surjective). Or split-surjective; in the presence of faithfulness the two are equivalent. 534 6. THE UNIVALENCE PRINCIPLE FOR DIAGRAM STRUCTURES Makkai defined surjective weak equivalences under the name very surjectivemorphisms ; other names for them include Reedy surjections and trivial fibrations .Unfortunately, we are currently unable to prove our desired general result withsurjective weak equivalences, so for the present we restrict to the split-surjectiveequivalences. We write SSEquiv ( f ) for the type “ f is a split-surjective equivalence”.Our first main result (Theorem 17.6) is: Theorem . For any diagram signature L and M, N : Str ( L ) such that M is univalent, the canonical map idtosse : ( M = N ) → ( M ։ N ) is an equivalence. Makkai was unable to define a general notion of non-surjective equivalencedirectly, instead considering spans of surjective equivalences. However, with ournotion of indiscernibility we can avoid this detour. If z : M K M , we denote themap on fibers induced by the square (6.1) by f K,z : M K z → N K M K f ( z ) . Definition 6.3. A morphism f : M → N of Reedy fibrant diagrams over a dia-gram signature L is an equivalence if for all sorts K and all z : M K M we have Q ( y : NK M Kf ( z ) ) P ( x : MK z ) f K,z ( x ) ≍ y . Similarly, it is a weak equivalence if for all K and z we have Q ( y : NK M Kf ( z ) ) k P ( x : MK z ) f K,z ( x ) ≍ y k .We write M ≃ N for the type of equivalences. Our second main result (Theo-rem 17.10) is: Theorem . For any diagram signature L and M, N : Str ( L ) that are bothunivalent, the canonical map idtoeqv : ( M = N ) → ( M ≃ N ) is an equivalence. Example 6.5. An equivalence between univalent T cat -categories is the same as afully faithful and split essentially surjective functor, which by [ AKS15 , Lemma 6.6]is the same as an equivalence of categories. Thus, Theorem 6.4 specializes to [ AKS15 ,Theorem 6.17]. See Section 3.7 for a few more details.One of Makkai’s goals was to define, for a given (diagram) signature L , a lan-guage for properties that are invariant under L -equivalence. He calls such invariancethe “Principle of Isomorphism” [ Mak98 ]:The basic character of the Principle of Isomorphism is that of aconstraint on the language of Abstract Mathematics; a welcomeone, since it provides for the separation of sense from nonsense.Working in 2LTT, we do not need to devise a language for invariant propertiesourselves; instead, we can rely on the homotopical fragment of 2LTT to sufficientlyconstrain our language. Recall our notion of “axiom” from Definition 4.29. Corollary 6.6 (of Theorem 6.4) . Any L -axiom t is invariant under equivalenceof univalent L -structures: given univalent L -structures M , N and an equivalence M ≃ N , then t ( M ) ↔ t ( N ) . Remark 6.7 (Axioms invariant under weak equivalences) . We anticipate that onecan construct a “univalent completion” operation that associates, to any structure M of a signature L , its free univalent completion ˆ M , together with a weak equiv-alence M → ˆ M . In light of this completion, it would make sense to restrict our Also, although spans of surjective equivalences give the correct relation of equivalence,they do not give the correct homotopy type of equivalences, unless the apices of the spans areconstrained to be univalent so that Theorem 6.2 applies. . THE UNIVALENCE PRINCIPLE FOR DIAGRAM STRUCTURES 55 notion of L -axiom to those maps Str ( L ) → Prop U that are invariant under weakequivalence. We have not checked that all the axioms presented in the examplesof Part 2 are indeed invariant under weak equivalence. Most of our axioms canbe expressed in Makkai’s language FOLDS [ Mak95 ], which was designed to beinvariant under equivalence; we expect it to serve this function in our context aswell, though we have not verified it for our notion of “weak equivalence”. Remark 6.8. We can now finally give a more comprehensive explanation of theinclusion of equality sorts (and their associated axioms) in our theories. In Sec-tion 3.1 we introduced these sorts in order to state axioms involving equality in thestyle of Makkai’s FOLDS. However, our notion of “axiom” in Definition 4.29 is sogeneral that it allows us to formulate such axioms without equality sorts; we cansimply refer directly to the identification types of the other sorts. Why then do weinclude equality sorts in ou signatures?One answer is that, as noted in Remark 6.7, we hope that there is a morerestrictive notion of axiom that would be invariant under weak equivalence, and weexpect that equality sorts would be needed to express axioms involving equality insuch a way. But in addition, the inclusion or exclusion of equality sorts in a signa-ture has a direct effect on the resulting notions of indiscernibility and univalencefor its structures. We have seen that when a sort B at one below top rank has anequality sort E B above it, then univalence at B says simply that B is a family ofsets with standard equality E B (and in Chapter 10 we will discuss a way to extendthis to sorts at lower ranks as well). But depending on the signature, omitting E B could lead to different notions of indiscernibility and univalence at B —see, forinstance, the theory of partially ordered types in Example 5.6. Thus, including orexcluding equality sorts is one way to “fine-tune” the resulting notion of univalentstructure.In Part 3 we will prove all of the results stated above, in fact obtaining them asspecial cases of analogous results for a higher-order notion of signature. However,before delving into that, in Part 2 we will survey a large number of examples thatfit into the first-order framework of diagram signatures. art 2 Examples of diagram structures HAPTER 7 Structured sets The goal of Part 2 is to explore a large number of examples of mathematicalstructures (particularly categorical and higher-categorical ones), to get a feel for howwidely applicable our notions of indiscernibility and univalence are. In particular,we show that our notions of indiscernibility and equivalence specialize to “correct”notions for the relevant structures, even in cases where the latter notions appear atfirst to be ad hoc .We begin with some fairly trivial examples, building up gradually to morecomplicated ones. Example 7.1 (Propositions) . The theory of propositions has the following under-lying signature: P and no axioms. A univalent model of this theory is exactly a proposition. Example 7.2 (Sets) . The theory of sets has the following underlying signature: EX We assume axioms turning E into an equivalence relation. In a univalent model M , M E ( a, b ) is a proposition for any a, b : M X . For any a, b : M X , the type a ≍ b of indiscernibilities is then also a proposition, and furthermore a ≍ b ↔ M E ( a, b ) .Thus, univalence at X signifies that M X is a set with equality given by M E . Remark 7.3. In Example 7.2, we can view the signature of sets to be obtainedfrom that of propositions by adding an equality predicate on top, thus “bumpingup” the homotopy level. It is natural to ask whether one can similarly obtain atheory for 1-types, or n -types more generally. A naïve attempt to define a theoryof 1-types might start out with the following signature: E E X However, it is not clear to us if there are suitable axioms on a structure for thissignature ensuring that X is a 1-type with identifications given by E . One solutionis to add sorts and axioms to the signature to obtain the theory of groupoids (which 590 7. STRUCTURED SETS is just the theory of categories with an extra invertibility axiom); a univalent modelthen is exactly a 1-type. We are not aware of a simpler theory of 1-types. Similarly,the simplest theory of n -types that we know of is obtained by adding invertibilityaxioms to a theory of n -categories (see Chapter 12). Example 7.4 (Preordered and partially ordered sets, continuing Example 5.6) . Inthis example, we consider three very similar theories:(1) Partially ordered sets: Consider the theory of partially ordered sets, withunderlying signature [ ≤ ] EX where we write the relation [ ≤ ]( x, y ) infix as x ≤ y . We assume that E isa congruence for [ ≤ ] , and we furthermore assume axioms for reflexivity,transitivity and antisymmetry: ( x ≤ y ) → ( y ≤ x ) → E ( x, y ) . Given a, b : M X in a model M , we have that a ≍ b ↔ E ( a, b ) . If M is univalent,then both these types are propositions (by univalence at [ ≤ ] and E ) andcoincide with a = b (by univalence at X ). A univalent model of this theorythus consists of a set M X with equality given by M E , equipped with apartial order.(2) Preordered sets: Consider the theory of preordered sets, with underlyingsignature as above, where E is assumed to be a congruence for [ ≤ ] , andwe furthermore assume reflexivity, and transitivity, but not antisymmetry.Given a, b : M X in a model M , we have that a ≍ b ↔ E ( a, b ) . If M isunivalent, then both these types are propositions and coincide with a = b .A univalent model of this theory thus consists of a set M X with equalitygiven by M E , equipped with a preorder.(3) Partially ordered types: The theory of partially ordered types was alreadystudied in Example 5.6. We summarize it here for easy comparison to thetheories above. Consider the theory with underlying signature [ ≤ ] X with axioms of reflexivity and transitivity, but not including the axiom ofantisymmetry (note that there is no relation E with respect to which thisaxiom could be stated). Given a model M , univalence at [ ≤ ] ensures that M [ ≤ ] is pointwise a proposition. Given a, b : M X , the type a ≍ b thenis a proposition and equivalent to ( a ≤ b ) ∧ ( b ≤ a ) (using reflexivity andtransitivity). Univalence at X therefore entails antisymmetry, stated withrespect to identifications. Of course, it also entails that M X is a set. Aunivalent model of this theory thus consists of a set M X equipped witha partial order.In conclusion, the univalent models of the theory of partially ordered types of Item 3are antisymmetric without this being explicitly postulated as an axiom; they arethus the same as the univalent models of the theory of partially ordered sets of . STRUCTURED SETS 61 Item 1. To obtain a theory of preordered sets where elements can be distinguishedbeyond the distinction induced by the order, it suffices to add, to the theory ofpartially ordered types, a dedicated equality relation, as in Item 2. Example 7.5 (First-order logic) . Consider an arbitrary many-sorted first-ordertheory T with only relation symbols. We can make this a diagram signature withone rank-0 sort for each sort of T and one rank-1 sort for each relation symbol of T , plus equality sorts (assumed to be congruences): E R E R E R A A A . . . As always, since E i and R i have nothing dependent on them, univalence at thosesorts simply makes them proposition-valued. And since E i is a congruence, by asimilar argument as in Theorem 3.17, univalence at A i makes it a set whose equalityis E i . Thus, we recover first-order logic with equality. Our logic has only relationsand no functions, but as noted before we can always encode a function as a relationusing its graph. Any instance of this example, with sorts ( A i ) i : I , is also an instanceof the SIP [ Uni13 , Section 9.9] over Set I , including, for instance, posets, monoids,groups, and fields. In particular, any essentially algebraic theory is a first-ordertheory, hence can be represented via a signature of this form.In this way, finitary first-order theories of structured sets more or less coincidewith theories formulated on exofinite diagram signatures of height 2. Similarly,when interpreted semantically they yield the usual models of such first-order theo-ries in the category of sets, or in more general 1-toposes.However, our notion of diagram signature is more general than this, becausethe exotypes L ( n ) of sorts of rank n are not required to be sets. This allows thedirect incorporation of group actions (or higher group actions) in structures, suchas the following. Example 7.6 (Combinatorial Species) . A combinatorial species [ Joy81 ] is a presheafof sets on the groupoid of finite sets. We can represent these as models of a theorywith a height-2 signature in which L (0) = L (1) = FinSet , the 1-type of finite setsdefined by FinSet : ≡ P ( X : U ) ∃ ( n : N ) . ( X ≃ [ n ]) ≡ P ( X : U ) (cid:13)(cid:13)P ( n : N ) ( X ≃ [ n ]) (cid:13)(cid:13) . We denote the elements of L (0) and L (1) corresponding to X : FinSet by A X and E X respectively, stipulate there are two morphisms E X ⇒ A X , and assert axiomsmaking this an equivalence relation. The fact that L (0) and L (1) are not sets makesit hard to draw this signature non-misleadingly, but we can give it a try, denotingthe identifications in these types by loops: E [0] E [1] E [2] E [3] . . .A [0] A [1] A [2] A [3] . . . S S Here [ n ] denotes the standard n -element finite set { , , , . . . , n − } , while S n denotes its automorphism group, the symmetric group on n elements. These loop“arrows” here are not morphisms in the inverse exo-category that constitutes thesignature for combinatorial species. Rather, they represent identifications — forexample, the permutation (12) : S : ≡ ( A [3] = A [3] ) . These act (by transport)on the types M A [ n ] in any structure, and there is a sense in which both kinds ofarrows can be regarded as morphisms in the same “category” (see, e.g., [ Shu17 ]).We have not notated loops at the types E [ n ] , but they are there too.As in Example 7.5, univalence at E [ n ] makes it consist of propositions, whileunivalence at A [ n ] makes it a set with equality E [ n ] . Thus, a univalent structure forthis theory is simply a function A : FinSet → Set , which is the natural formalizationof a combinatorial species in HoTT/UF (see, e.g., [ Yor14 ]). And in the simplicialset model, Set and FinSet are respectively interpreted by homotopy 1-types thatare equivalent to the nerves of the usual groupoids of sets and finite sets; thus afunction FinSet → Set is equivalent to a functor between these groupoids, which isthe classical notion of combinatorial species.A morphism f : M → N of models of this theory consists of functions f [ n ] : M A [ n ] → N A [ n ] that commute with the actions on M A [ n ] and N A [ n ] inducedby S n . A morphism of models is an equivalence precisely when all the f [ n ] arebijections.In summary, the action on arrows of combinatorial species, and the naturalitycondition on morphisms of species, are encoded in the homotopical structure of thetype FinSet that serves as an indexing type in our theory of combinatorial species. In terms of the corresponding functorial signature L (see Chapter 14), whose underlying L ⊥ is given by the type FinSet , a structure includes, in particular, a map M ⊥ ≡ MA : FinSet → U .Any isomorphism [ n ] ∼ = [ n ] of finite sets corresponds to an identification by the univalence axiom,and thus is mapped, by M ⊥ , to an identification, and hence an equivalence of types, MA [ n ] ≃ MA [ n ] . In terms of the corresponding functorial theory (see Chapter 14), a morphism of models f : M → N consists, in particular, of a morphism of type families M ⊥ → N ⊥ , which automaticallycommutes with the equivalences induced the identifications S n . HAPTER 8 Structured 1-categories Structures on 1-categories generally speaking involve height-3 signatures. Ofcourse, the example of 1-categories themselves was discussed at length in Chapter 3. Example 8.1 (Categories with binary products) . Binary products could be as-serted to exist in a category purely in terms of axioms, on top of the signature L cat of categories of Chapter 3. However, the resulting morphisms of models would notsay anything about products.Instead, we can integrate some data from the products into the signature asfollows, T I E PAO where we assert suitable equalities of arrows, such that P x,y,z ( f, g ) denotes a di-agram x f ←− y g −→ z . Such a diagram is asserted to be a product diagram via asuitable axiom. We also assert that for any product diagram x f ←− y g −→ z there is a w : P x,y,z ( f, g ) .Univalence at P then means that P is pointwise a proposition. Since theequality E is asserted to be a congruence for P as well as for the other top-sorts,univalence at A still means that A is pointwise a set with equality E . An indis-cernibility a ≍ b is an isomorphism φ : a ∼ = b that is compatible with P in the sensethat, e.g., P x,a,z ( f, g ) ↔ P x,b,z ( f ◦ φ − , g ◦ φ − ) . But the compatibility with P isautomatic, and hence an indiscernibility a ≍ b is simply an isomorphism a ∼ = b .A morphism of structures is a functor between the underlying categories thatpreserves product diagrams. An equivalence of univalent structures is an equiva-lence of categories (which of course preserves product diagrams).As variants of this theory we consider, in Example 8.8, the theory of cartesianmonoidal categories, and, in Example 8.11, the theory of categories with functoriallyspecified binary products. Example 8.2 (Categories with pullbacks) . Pullbacks can be added to the theoryof categories analogously to binary products Example 8.1. This gives rise to the 634 8. STRUCTURED 1-CATEGORIES following signature, T I E PAO where we assert suitable equalities of arrows, such that P w,x,y,z ( f, g, h, k ) signifiesa diagram z xy w h k fg that is furthermore asserted to commute and be a pullback square via a suitableaxiom. As for binary products, we assert that for any such pullback diagram, thereis a w : P w,x,y,z ( f, g, h, k ) .The discussion of univalent models of this theory is then analogous to that ofExample 8.1; in particular, an indiscernibility a ≍ b of objects a, b : O is simply anisomorphism a ∼ = b .We can give a similar treatment to categories with other limits and/or colimits. Example 8.3 (Presheaves) . The theory of a category with a presheaf on it has thefollowing underlying signature, T I E P A E P A P O O dcacd o with the equations da ≡ od and ca ≡ oc . Given a structure M of this signature, M P A ( f, a, b ) signifies that the function P ( f ) maps b to a . For this to be a well-defined function, the axioms we impose to carve out the presheaves among thestructures must include P A ( f, a, b ) → P A ( f, a ′ , b ) → E P ( a, a ′ ) ∀ ( f : A ( x, y )) . ∀ ( b : P O ( y )) . ∃ ( a : P O ( x )) .P A ( f, a, b ) . as well as functoriality axioms. We also assume that E and E P are congruences forall the top-rank sorts, in addition to the usual category axioms for ( O, A, T, I, E ) .Given a model M , univalence at P A means that M P A is a proposition pointwise,indicating that M P ( f )( b ) = a . Univalence at P O means that M P O ( x ) is a set withequality M E P , as expected for a presheaf. Similarly, univalence at A means that M A ( x, y ) is a set with equality M E , as in a category: the additional dependency P A doesn’t disrupt this since E is a congruence for it as well.Finally, an indiscernibility between x, y : M O consists of an indiscernibility x ≍ y (hence just an isomorphism g : x ∼ = y ) in the underlying category, togetherwith a coherent bijection on values of the presheaf M P O ( x ) ∼ = M P O ( y ) . Since this“coherence” includes in particular respect for P A , it follows by an argument similar . STRUCTURED 1-CATEGORIES 65 to that of Chapter 3 that it must be simply the functorial action of g . Thus, aunivalent model of this theory is precisely a univalent category together with apresheaf on it.A map f : hom( M, N ) of structures consists of a functor f between the under-lying categories (given by the components O , A , T , I , E ) of the signature, togetherwith a natural transformation between the presheaves specified by M and N (givenby the components P O , P A , and E P ). Here, the component of f on P A encodesnaturality. If f is an equivalence of structures, then its underlying functor is anequivalence; moreover essential surjectivity on the component P A implies injectivityof the underlying natural transformation, whereas on P O it implies that the naturaltransformation is pointwise surjective—thus it is a natural isomorphism. Example 8.4 ((Ana)functors; [ Mak95 , Section 6]) . Just as we can represent func-tions between sets by relations, we can describe two categories and a functor be-tween them by adding “relations” between their objects and morphisms: T D I D E D F A T C I C E C A D F O A C O D O C with the obvious equations on arrows. Here, O D is the sort of objects of thedomain category (with D in O D standing for “domain”), O C the sort of objects inthe codomain, and F O ( x, y ) the sort of “witnesses that F ( x ) = y ”. For instance,if F is a cartesian product functor, then an element of F O (( x , x ) , y ) would be aproduct diagram x ← y → x . Note that F O does not generally consist of merepropositions: an object y : O C can “be the image” of x : O D in more than one way.(For instance, a single object can be a cartesian product of two objects x , x inmore than one way.) We impose an axiom stating that F does have a value on eachpossible input object, i.e., ∀ ( x : O D ) . ∃ ( y : O C ) .F O ( x, y ) .Given two such witnesses w : F O ( x , y ) and w : F O ( x , y ) and morphisms g : A D ( x , x ) and h : A C ( y , y ) , an element of F A ( w , w , g, h ) represents theassertion that F ( g ) = h according to the witnesses w and w . We impose anaxiom saying that given w , w , g there exists a unique h such that F A ( w , w , g, h ) ;we often denote this unique h by F w ,w ( g ) . We also assert that E D and E C arecongruences for the relation F A , and that composition and identities are preserved.In the case of composition, this means F w ,w ( g ◦ f ) = F w ,w ( g ) ◦ F w ,w ( f ) ; whilein the case of identities it means F w,w (1 x ) = 1 y for any w : F O ( x, y ) .The result is what Makkai [ Mak96 ] calls an anafunctor , whose “values” canbe specified only up to isomorphism. If dependencies are forgotten, it can bethought of as a span of functors between (pre)categories in which the first leg isa surjective equivalence ( F O is the type of objects of the middle category and F A its type of arrows). Note that for any w : F O ( x, y ) and w : F O ( x, y ) we have F w ,w (1 x ) : A C ( y , y ) , which is an isomorphism with inverse F w ,w (1 x ) ; thus “anytwo values of F are canonically isomorphic”. In addition, we impose the “existentialsaturation” axiom that for any w : F O ( x, y ) and isomorphism g : y ∼ = z in thecodomain, there exists a w ′ : F O ( x, z ) such that F w,w ′ (1 x ) = g : that is, any object z isomorphic to a value y of F ( x ) is also a possible value of F ( x ) , in such a waythat the induced isomorphism y ∼ = z is the specified one.As in Example 8.3, univalence at A D and A C just means they are sets whoseequalities are the congruences E D and E C (this requires the assumption that theseare congruences for F A as well). Univalence at F O is more subtle, since F O doesn’tcome with a specified congruence. For w , w : F O ( x, y ) , the type of indiscernibili-ties w ≍ w is the proposition asserting that w and w induce the same action onall arrows whose domain or codomain (or both) is x . That is, for any g : A D ( x, x ′ ) and w ′ : F O ( x ′ , y ′ ) we have F w ,w ′ ( g ) = F w ,w ′ ( g ) , and likewise when g : A D ( x ′ , x ) or g : A D ( x, x ) . In particular, taking w ′ = w and g = 1 x this implies that F w ,w (1 x ) = F w ,w (1 x ) = 1 y . But conversely, if we have w , w : F O ( x, y ) suchthat F w ,w (1 x ) = 1 y , then for any g : A D ( x, x ′ ) and w ′ : F O ( x ′ , y ′ ) we have F w ,w ′ ( g ) = F w ,w ′ ( g ◦ x ) = F w ,w ′ ( g ) ◦ F w ,w (1 x ) = F w ,w ′ ( g ) ◦ y = F w ,w ′ ( g ) by functoriality, and similarly in the other cases.Thus, w ≍ w is equivalent to F w ,w (1 x ) = 1 y ; hence in a univalent modelthis latter equality implies w = w . This implies that for any w : F O ( x, y ) and g : y ∼ = z the w ′ in the existential saturation axiom is unique; for if F w,w ′ (1 x ) = F w,w ′′ (1 x ) = g , then by functoriality F w ′ ,w ′′ (1 x ) = g ◦ g − = 1 z and hence w ′ = w ′′ .Thus, a univalent model for our theory is a saturated anafunctor in Makkai’s sense,whose values are determined exactly up to unique isomorphism.Saturation, in turn, ensures that univalence at O D and O C reduces to ordinaryunivalence of the underlying domain and codomain categories. For instance, a priori an indiscernibility y ≍ y in O C is an isomorphism φ : y ∼ = y in the codomaincategory (arising from the specified equivalences on the sorts A C , T C , I C , and E C )equipped with a transport function for F O that respects F A . Explicitly, this meanswe have bijections φ x • : F O ( x, y ) ∼ = F O ( x, y ) that commute with F A , in the sensethat F w,w ′ ( g ) = F φ x • ( w ) ,w ′ ( g ) ◦ φ for all w ′ , and similarly in the other variable and in both variables together. Butby the uniqueness aspect of saturation, F φ x • ( w ) ,w ′ ( g ) = F w,w ′ ( g ) ◦ φ − uniquelydetermines φ x • ( w ) if it exists. Specifically, setting w ′ : ≡ w and g : ≡ x in theequation above yields the condition F φ x • ( w ) ,w (1 x ) = φ ; by the uniqueness part ofsaturation, applied to w and φ , this condition determines φ x • ( w ) .On the other hand, for any w a φ x • ( w ) with this property does exist, by ex-istential saturation combined with functoriality. Specifically, given w : F O ( x, y ) ,we set φ x • ( w ) to be the unique φ ∗ ( w ) such that F w,φ ∗ ( w ) (1 x ) = φ using satura-tion. For g : D A ( x, x ′ ) and w ′ : F O ( x ′ , y ) we then have F w,w ′ ( g ) = F φ ∗ ( w ) ,w ′ ( g ) ◦ F w,φ ∗ ( w ) (1 x ) = F φ ∗ ( w ) ,w ′ ( g ) ◦ φ , as required. Thus, an indiscernibility in O C isnothing but an ordinary isomorphism in the codomain category, so univalence at O C reduces to univalence of the latter category.A similar argument applies at O D . The only difference is that we haven’tasserted existential saturation directly on the domain, so we have to prove thatfor any isomorphism φ : x ∼ = x and w : F O ( x , y ) there is a w ′ : F O ( x , y ) suchthat F w,w ′ ( φ ) = 1 y . However, we have some w ′′ : F O ( x , y ′ ) and an isomorphism F w,w ′′ ( φ ) : y ∼ = y ′ , so by existential saturation we can transport w ′′ back to a w ′ : F O ( x , y ) with the desired property. . STRUCTURED 1-CATEGORIES 67 Once we have univalence at both F O and O C , we can prove that for each x : O D the type P ( y : O C ) F O ( x, y ) is a proposition. For if we have y, y ′ : O C with w : F O ( x, y ) and w ′ : F O ( x, y ′ ) , then there is an isomorphism h : y ∼ = y ′ such that F w,w ′ (1 x ) = h . By univalence at O C , this h comes from an identification p : y = y ′ ,and the transported witness p ∗ ( w ) : F O ( x, y ′ ) acts on arrows by conjugating with h .But since F w,w ′ (1 x ) = h , by functoriality this implies that p ∗ ( w ) acts the same as w ′ on all arrows; hence by univalence at F O they are equal, and so ( y, w ) = ( y ′ , w ′ ) in P ( y : O C ) F O ( x, y ) .Thus P ( y : O C ) F O ( x, y ) is a proposition; but since it is inhabited (this is one ofthe axioms of an anafunctor), it is contractible. In particular, there is a function F : O D → O C with W : Q ( x : O D ) F O ( x, F ( x )) . Thus, although Makkai originallyintroduced anafunctors in [ Mak96 ] to avoid using the axiom of choice, in univalentfoundations any anafunctor is represented by an actual functor, since the onlyrelevant choices are unique ones. (This was also observed, in somewhat differentterminology, in [ AKS15 ].) However, the notion of anafunctor is still useful becauseit is the only way to represent a functor via a single structure in our framework.Finally, a morphism of models f : M → N consists of functors betweenthe domain and codomain categories, say f D : M D → N D and f C : M C → N C , together with functions M F O ( x, y ) → N F O ( f D ( x ) , f C ( y )) that respect F A .Applying this to the M W ( x ) : M F O ( x, M F ( x )) constructed above, we obtain N F O ( f D ( x ) , f C ( M F ( x ))) . Since we also have N W ( f D ( x )) : N F O ( f D ( x ) , N F ( f D ( x ))) ,we obtain an isomorphism f C ( M F ( x )) ∼ = N F ( f D ( x )) . Respect for F A implies thatthese isomorphisms are natural in x , and they determine the entire morphism ofmodels uniquely (this uses saturation again). That is, a morphism between satu-rated anafunctors is a square of functors that commutes up to isomorphism. Example 8.5 (Profunctors) . A profunctor from C to D is a functor F : C op × D → Set . We can represent two categories and a profunctor between them using thefollowing signature: T C I C E C F A E F T D I D E D A C F O A D O C O Dcdacd o cd This looks very much like the signature for anafunctors, but we include an equalityrelation on F O , and moreover the composition equations are different: we have da ≡ oc and ca ≡ od imposing contravariance in the first factor. The rest of thetheory of this structure is just a two-sided version of Example 8.3.Note that an adjunction between two categories is uniquely determined by aprofunctor satisfying “representability” axioms on both sides. Thus, by addingaxioms to this example we obtain a theory for two categories together with anadjunction between them. A different theory for the latter could be obtained byexplicitly representing two categories with one anafunctor (Example 8.4) in eachdirection between them, together with unit and counit natural transformations(Example 8.6); we leave the details to the reader. Example 8.6 (Natural transformations) . The signature for two categories C and D , two functors F, G : D → C , and a natural transformation Λ : F → G can begiven as follows. T D I D E D F A Λ G A T C I C E C A D F O G O A C O D O C Here the composites Λ → F O → O D and Λ → G O → O D are equal, so that Λ depends on one element of O D (but two elements of O C ). We write an instanceof Λ as Λ x,y,z ( w , w , λ ) , with x : O D , y, z : O C , w : F O ( x, y ) , w : G O ( x, z ) ,and λ : A C ( y, z ) ; this signifies that λ is the value of Λ on the object x : O D (relative to the values y and z for F ( x ) and G ( x ) ). In addition to the saturatedanafunctor axioms for F and G separately, we assert that for any x : O D , thefiber of Λ over x is inhabited. Since P ( y : O C ) F O ( x, y ) and P ( z : O C ) G O ( x, z ) arecontractible this equivalently says that for any x, y, z, w , w there exists a λ suchthat Λ x,y,z ( w , w , λ ) . In addition, we assert that this λ is unique (using equality E C ), and that they are natural with respect to morphisms in A D , in the sense thatfor any h : A D ( x, x ′ ) with w : F O ( x, y ) and w ′ : F O ( x ′ , y ′ ) while w : G O ( x, z ) and w ′ : G O ( x ′ , z ′ ) , if Λ x,y,z ( w , w , λ ) and Λ x ′ ,y ′ ,z ′ ( w ′ , w ′ , λ ′ ) then λ ′ ◦ F w ,w ′ ( h ) = G w ,w ′ ( h ) ◦ λ (expressed precisely using T C , of course). Finally, we assert that E C is a congruence for the relation Λ .This last axiom ensures that the addition of Λ doesn’t change the notion ofindiscernibility in A C . To show that it also doesn’t change the notion of indiscerni-bility in F O , we must show that given w, w ′ : F O ( x, y ) such that F w,w ′ (1 x ) = 1 y ,we necessarily have Λ x,y,z ( w, v, λ ) → Λ x,y,z ( w ′ , v, λ ) for any v : G O ( x, z ) and λ : A C ( y, z ) . But if Λ x,y,z ( w, v, λ ) and Λ x,y,z ( w ′ , v, λ ′ ) , then by naturality wehave λ ′ ◦ y = λ ′ ◦ F w,w ′ (1 x ) = G v,v (1 x ) ◦ λ = 1 z ◦ λ, i.e., λ ′ = λ . A similar argument applies to G O ; hence univalence at these sorts onceagain says just that F and G are saturated anafunctors.An indiscernibility y ≍ y ′ in O C consists of an isomorphism φ : y ∼ = y ′ such thatadditionally Λ x,y,z ( w , w , λ ) → Λ x,y ′ ,z ( φ ∗ ( w ) , w , λ ◦ φ − ) , where φ ∗ ( w ) is the(necessarily unique) witness of F O ( x, y ′ ) obtained from w and φ by saturation, andsimilarly for other holes. But since F w ,φ ∗ ( w ) (1 x ) = φ , this follows automaticallyfrom naturality.Similarly, an indiscernibility x ≍ x ′ in O D consists of an isomorphism φ : x ∼ = x ′ such that Λ x,y,z ( w , w , λ ) → Λ x ′ ,y,z ( φ ∗ ( w ) , φ ∗ ( w ) , λ ) , and similarly for otherholes. Here φ ∗ ( w ) is obtained as sketched in Example 8.4, by choosing some witness w ′ : F O ( x ′ , y ′ ) and transporting it back across the isomorphism F w ,w ′ ( φ ) . Analo-gously, φ ∗ ( w ) is obtained by choosing some witness w ′ : G O ( x ′ , z ′ ) and transport-ing back along G w ,w ′ ( φ ) . Since we have F w ,φ ∗ ( w ) ( φ ) = 1 y and G w ,φ ∗ ( w ) ( φ ) =1 z , the desired implication follows again by naturality. Thus, univalence at O D and O C reduce respectively to ordinary univalence of the domain and codomaincategories. . STRUCTURED 1-CATEGORIES 69 Example 8.7 (Structures on categories) . Any structure on a category or family ofcategories that can be expressed in terms of functors and natural transformationscan be represented by combining copies of Examples 8.4 and 8.6, perhaps withdomains and/or codomains identified. For instance, here is the signature for acategory equipped with an endofunctor: T I E F A A F O O Here and in the remainder of this example, we leave it to the reader to formulatesuitable axioms on top of this signature.Here is the signature for a pointed endofunctor (an endofunctor equipped witha natural transformation η : Id → F ): T I E F A HA F O O Since the domain of η is the identity functor, we only need one arrow H → F O . Aninstance H x,y ( w, η ) for w : F O ( x, y ) and η : A ( x, y ) says that η is the component ofthe transformation at x relative to the witness w that F ( x ) = y . Similarly, here isthe signature for a monad: T I E F A H MA F O O An instance M x,y,z ( w, w ′ , µ ) says that µ : A ( z, y ) is the component of the multi-plication F → F at x relative to the witnesses w : F O ( x, y ) and w ′ : F O ( y, z ) .Functors involving product categories can also be represented by adding extra de-pendencies. For instance, a category equipped with a functor C × C → C has thesignature T I E F A A F O O where F O ( x, y, z ) means that “ z = F ( x, y ) ”. A category equipped with an object U (about which we assert nothing) has the signature T I E U A A U O O Here U O and U A represent an anafunctor whose domain is the terminal category,also known as an “ana-object” (with dependencies ignored, it is a functor out ofa contractible groupoid). Univalence and saturation imply that P x : O U O ( x ) iscontractible, and that if we have some particular u : O with w : U O ( u ) the type U O ( x ) for any other x is equivalent to the type of isomorphisms x ∼ = u . The sort U A appears to be necessary, providing the “anafunctorial action” of the saturatedana-object: for w : U O ( x ) and w : U O ( x ) the proposition U A ( w , w , g ) saysintuitively that g is the composite isomorphism x ∼ = u ∼ = x .Combining the latter two signatures with some natural transformations, hereis the signature for a monoidal category: T I E ⊗ A ⊗ U A ⊗ l ⊗ r A ⊗ O U O O Here ⊗ O and ⊗ A represent the tensor product (ana)functor C × C → C , while U O and U A represent the unit (ana)object, and ⊗ , ⊗ l , and ⊗ r represent theassociativity and unit natural transformations. In fact, in this case we can omitthe sort U A ; it is necessary in the above signature for an arbitrary ana-object toensure that two different “values” of the object are canonically isomorphic, butwhen the ana-object is the unit object of a monoidal category this is automatic: if U and U are two different units then we have a composite of unit isomorphisms U ∼ = U ⊗ U ∼ = U .We can upgrade the previous theory to the theory of symmetric monoidal cat-egories by adding, to its signature, a braiding , that is, a natural transformation B with components B x,y : x ⊗ y → y ⊗ x as follows (we only draw an excerpt of thesignature): E B ⊗ A . . . A ⊗ O . . .O Here, B x,y,a,b ( w , w , β ) , with w : ⊗ O ( x, y, a ) , w : ⊗ O ( y, x, b ) , and β : A ( a, b ) indicates that β is the component of B on ( x, y ) ; we write B ( w , w ) = β . We . STRUCTURED 1-CATEGORIES 71 assert that the braiding is symmetric, i.e., it satisfies B ( w , w ) ◦ B ( w , w ) = 1 a for any w : ⊗ O ( x, y, a ) and w : ⊗ O ( y, x, b ) . (Of course, if we omitted this axiomwe would obtain a theory for braided monoidal categories.)In all these examples, we assert the same sorts of axioms, including existentialsaturation of the object-functor sorts (e.g., F O , ⊗ O ) and that the equalities onarrows are congruences for all rank-2 sorts. Univalence at the object-functor sortsthen implies the uniqueness aspect of saturation, and together with functorialityand naturality it follows that univalence at each object sort O reduces simply toordinary univalence of the corresponding category. Example 8.8 (Cartesian monoidal categories) . A cartesian monoidal category canbe characterized as a symmetric monoidal category (as specified in Example 8.7)equipped with well-behaved diagonals and augmentations—specifically, with • a natural transformation ∆ : 1 C → ⊗ ◦ δ with δ : C → C × C the diagonalfunctor; and • a natural transformation H : 1 C → U ;satisfying certain conditions ([ HV12 , Theorem 6.13]). We can add these naturaltransformations to the theory of symmetric monoidal categories by adding, to theunderlying signature, the sorts ∆ and H , and their dependencies, as follows: E ∆ ⊗ A H U A . . . A ⊗ O U O . . .O We assert the usual axioms for ∆ and H to represent natural transformations, alongwith the compatibility axioms mentioned above. As usual, univalence at the sorts ∆ and H entails that these are propositions pointwise; the addition of these naturaltransformations does not change indiscernibilities in the other sorts. Example 8.9 (Unbiased monoidal categories) . In Example 8.7 we defined thetheory of categories with a binary monoidal structure. Here, we define categorieswith unbiased monoidal structure. By this, we mean a category equipped with atensor product for any number n of objects, instead of just two.Explicitly, such an unbiased monoidal category C is equipped with(1) for any n : N , an n-fold tensor product ⊗ n : C n → C ;(2) for any n, k , . . . , k n : N , a natural isomorphism γ n ; k ,...,k n : ⊗ n ◦ (cid:0) ⊗ k × . . . × ⊗ k n (cid:1) → ⊗ P ni =1 k i ; and(3) a natural isomorphism ι : 1 C → ⊗ ;subject to some axioms (for details, see, e.g., [ Lei04 , Def. 3.1.1]). A suitable signature would look like this: T I E ⊗ A ι ⊗ A γ , ⊗ A A ⊗ O ⊗ O ⊗ O . . .O Here we have only only drawn, as exemplary for the family γ of natural isomor-phisms, the component γ , : ⊗ ◦ ( ⊗ × ⊗ ) → ⊗ .Indiscernibilities at O are exactly isomorphisms; the category underlying anunbiased monoidal category is univalent if the structure is univalent.A morphism of models for this theory is a strong monoidal functor (called“weak” in [ Lei04 , Def. 3.1.3]). Example 8.10 (Unbiased symmetric monoidal categories) . In Example 8.7 we ob-tained a theory of symmetric monoidal categories from that of monoidal categoriesby adding, to the signature of the latter, a braiding operation.Another theory of symmetric monoidal categories is obtained by modifying thesignature of Example 8.9; specifically by replacing finite ordered sets there (givenby natural numbers) by finite unordered sets; this approach is analogous to thatin Examples 7.6, 8.13 and 11.3. Concretely, this means that the family of tensorproducts is indexed by FinSet instead of N , and the family γ is parametrized byfamilies of finite sets [ n ]; [ k ] , . . . , [ k n ] ; we have γ [ n ];[ k ] ,..., [ k n ] : ⊗ [ n ] ◦ (cid:16) ⊗ [ k ] × . . . × ⊗ [ k n ] (cid:17) → ⊗ P ( i :[ n ]) k i . We can visualize the resulting signature as follows: T I E ⊗ [0] A ι ⊗ [1] A γ [2];[1] , [0] ⊗ [2] A . . .A ⊗ [0] O ⊗ [1] O ⊗ [2] O . . .O S The symmetric group S n acts on the sorts ⊗ [ n ] O , as indicated by the loop in thesignature. We also have more complicated actions on the sorts ⊗ [ n ] A . Suitableaxioms are asserted, see, e.g., [ DM82 , Prop. 1.5] or [ Bra16 ] for details.A morphism of such models is exactly an (unbiased) strong symmetric monoidalfunctor [ Bra16 , Def. 2.2]. Example 8.11 (Categories with a binary product functor) . Here we present thetheory of a category with a specified cartesian monoidal structure. Its underlying . STRUCTURED 1-CATEGORIES 73 signature is as follows: P A T I E P AO Here, similar to Example 8.1, an element p : ( P O ) x,y,z ( f, g ) denotes a productdiagram x f ←− y g −→ z . Given another p ′ : ( P O ) x ′ ,y ′ ,z ′ ( f ′ , g ′ ) and h : A ( x, x ′ ) , k : A ( z, z ′ ) , ℓ : A ( y, y ′ ) , an element t : ( P A ) x,y,z,x ′ ,y ′ ,z ′ ( p, p ′ , h, k, ℓ ) signifies that ℓ = h × k . We assert as axioms that P O has a product for each input pair ( x, z ) .The sort P A is asserted to represent a function in ( p, p ′ , k, h ) ; univalence at P A ensures that P A is a proposition pointwise, and we write ( P A )( p, p ′ , h, k ) = ℓ . Wealso assert functoriality axioms ( P A )( p, p, x , z ) = 1 y and ( P A )( p , p , k , h ) ◦ ( P A )( p , p , k , h ) = ( P A )( p , p , k ◦ k , h ◦ h ) . Furthermore, we assert existentialsaturation: given p : ( P O ) a,y,b ( f, g ) and a f ′ ←− y ′ g ′ −→ b and z : y ∼ = y ′ commutingwith f , f ′ , g , and g ′ , ya by ′ f g ∼ = zf ′ g ′ there exists p ′ : ( P O ) a,y ′ ,b ( f ′ , g ′ ) such that ( P A )( p, p ′ , a , b ) = z .An indiscernibility p ≍ p ′ in P O consists, in particular, of the assertion that ( F A )( p, p ′ , a , b ) = 1 ab ; by functoriality, such an indiscernibility is nothing morethan that. Univalence at P O then ensures the uniqueness part of saturation.If we have E ( f, f ′ ) and w : ( P O ) a,y,b ( f, g ) , then we obtain a unique w ′ :( P O ) a,y,b ( f ′ , g ) by saturation; indeed, we have ya by ′ f g ∼ = 1 f ′ g and the left-hand triangle commutes because E is assumed to be a congruence for T , specifically, T (1 , f, f ) and E ( f, f ′ ) imply T (1 , f ′ , f ) . An indiscernibility f ≍ f ′ is hence nothing more than an equality E ( f, f ′ ) , and univalence at A means exactlythat A is a set with equality E .Given objects a, b : O , an indiscernibility a ≍ b consists of an isomorphism a ∼ = b in the underlying category, together with transport functions for P O and P A . But in P O , these transport functions are uniquely specified by saturation, and in P A by the functorial axioms. Thus an indiscernibility a ≍ b is just an isomorphism a ∼ = b , and the category underlying a univalent structure is univalent.A morphism of structures consists of a functor a natural transformation; it isan equivalence if the functor is an equivalence and the natural transformation is anisomorphism. Example 8.12 (Multicategories/Colored operads) . A (non-symmetric) multicate-gory (or colored non-symmetric operad) (see, e.g., [ Lei04 , Section I.2]) has arrowsof different arity, generalizing the notion of n -ary functions on sets. The data of amulticategory is specified via the signature below: I T T T , T , T . . . E i A A A . . . plus A i O In this signature, A is the sort of arrows known from categories, with one “input”object. The sort A denotes arrows with no inputs, the sort A arrows of 2 inputs,and so on. Accordingly, we have composition operations for such morphisms: thesort T denotes the composition of two arrows with one input each—the compo-sition known from categories. The sort T , denotes composition of two unaryarrows with one arrow of two inputs, resulting in a composite arrow of two inputs.The signature for multicategories also includes an equality sort E i ⇒ A i for each i , but for readability we have omitted these from the main diagram. On a structureof this signature we can impose suitable axioms for the composition and identity insuch a way that a model of the resulting theory is precisely a multicategory in theusual sense.An isomorphism φ : a ∼ = b in a multicategory is analogous to an isomorphismin a category: it consists of a morphism f : A ( a, b ) together with g : A ( b, a ) thatis both pre- and post-inverse to f . Given a structure for the signature above, anindiscernibility φ : a ≍ b consists, in particular, of equivalences as in Eqs. (3.13)to (3.26) (where A needs to be replaced by A ); we have established in Theo-rem 3.11 that this data determines uniquely an isomorphism in the multicategory.In addition, the indiscernibility φ consists of further analogous equivalences for thesorts of n -ary arrows A i and their compositions. For instance, it includes a familyof equivalences φ xy • : A ( x, y ; a ) ∼ = A ( x, y ; b ) and a family of equivalences(8.1) ( T , ) w,x,y,a ( f, g, h ) ↔ ( T , ) w,x,y,b ( f, φ y • ( g ) , φ wx • ( h )) . This latter equivalence with h : ≡ f and g : ≡ a shows that the family φ xy • is givenby postcomposition with the isomorphism corresponding to φ , and similarly forthe other families of maps. Thus, indiscernibilities in a multicategory also coincidewith isomorphisms, so a multicategory is univalent precisely when its underlyingcategory is.A morphism of models accordingly corresponds to a functor between multicat-egories; it is an equivalence if the functor is an equivalence. . STRUCTURED 1-CATEGORIES 75 Example 8.13 ((Fat) symmetric multicategories) . A symmetric multicategory isa multicategory with an action of the symmetric group S n on the arrows A n ; e.g.,morphisms A ( x, y ; z ) correspond uniquely to morphisms A ( y, x ; z ) . These actionsare furthermore asserted to be compatible with composition.Here, we consider an equivalent formulation of symmetric multicategories, viathe notion of fat symmetric multicategories (see, e.g., [ Lei04 , Appendix A.2]). Itssignature is similar to that of non-symmetric multicategories, but the arrows areinstead indexed by unordered finite sets [ n ] of cardinality n . That is, similarly toExamples 7.6 and 11.3, the type L (1) of rank-1 sorts is FinSet , a 1-type that is nota set. Similarly, the compositions are indexed by the type P ( X : FinSet ) ( X → FinSet ) where ( X, Y ) denotes the composition of one morphism whose inputs are indexedby X with a family of X morphisms of which the x th has inputs indexed by Y ( x ) .This is even harder to draw non-misleadingly than our other examples with highertypes of sorts, but we can give it a try: I T [0];[1] T [1];[1] T { [0] , [0] } ;[2] T { [1] , [1] } ;[2] T [2];[1] . . .A [0] A [1] A [2] . . .O S S S S The sorts we have drawn, representing the elements of the 0-truncation of the typesof sorts, are almost like the sorts for non-symmetric multicategories, but some getidentified. For instance, for non-symmetric multicategories there are two differentsorts T , and T , for composition of a binary operation with a(n ordered)pair of a zeroary and a unary operation, but for the symmetric variant, thesetwo compositions collapse into one connected component that we have written T { [0] , [1] } ;[2] , which has an S symmetric action. In general, the isotropy group of T { [ k ] ,..., [ k n ] } ;[ n ] is the semidirect product ( S k × · · · × S k n ) ⋊ S n . As in the non-symmetric case, we have omitted the equality sorts E [ n ] on A [ n ] for readability. Weassert associativity and unitality axioms for composition as spelt out in [ Lei04 ,Appendix A.2].Univalence at the top-level sorts entails that the equality, composition, andidentity sorts are pointwise propositions; at A [ n ] , it entails that A [ n ] are pointwisesets with equality given by their respective equality sorts.An indiscernibility a ≍ b in O consists of equivalences of sorts, e.g., for n : ≡ we have φ x • : A [1] ( { x } ; a ) ∼ = A [1] ( { x } ; b ) , and similar for the other hole and bothholes in A [1] . These equivalences are furthermore coherent with respect to the sorts I and T , e.g., they satisfy the analog to Equation (8.1). Given a ≍ b , we obtain inparticular φ : ≡ φ a • (1 a ) : A [1] ( { a } ; b ) . The morphism φ is an isomorphism; by thecoherence with respect to T , the other equivalences for the sorts A [ n ] are given bysuitable composition with φ or its inverse. Thus an indiscernibility a ≍ b in O isexactly an isomorphism a ∼ = b . A morphism of such models is precisely a functor of symmetric multicategories;it is an equivalence if the functor is an equivalence.If in this example we replace FinSet by Set , we obtain a signature for a certainclass of polynomial monads , presented in a style with operations indexed by boththeir input and output sorts (see [ Cap19 ]). Indeed, as shown in [ GHK17 ], sym-metric ∞ -multicategories can be identified with finitary polynomial ∞ -monads onslice categories of ∞ -groupoids, and hence symmetric 1-multicategories correspondto a subclass of the latter characterized by homotopy level restrictions (thoughmore general than the classical class of finitary polynomial monads on slices of thecategory of sets: the polynomial data must be allowed to contain 1-types). Replac-ing FinSet by Set in our example removes the finiteness restriction, but retains thelatter restriction. In Chapter 9 we will define signatures and theories for highercategories, which could also be adapted to define fat symmetric n -multicategoriesfor higher (finite) n . Example 8.14 (Semi-displayed categories; see also [ Mak95 , p. 107]) . Displayedcategories [ AL19 ] were developed, in particular, as a framework to define, in typetheory, fibrations of categories without referring to equality of objects. A displayedcategory D over a category C is given by, for any c : C , a type D ( c ) of “objects over c ”, and, for any morphism f : C ( a, b ) and x : D ( a ) and y : D ( b ) , a type D f ( x, y ) of “morphisms from x to y over f ”, together with suitably typed composition andidentity operations. A naïve translation of this definition into a diagram signaturemight look like the following: T D I D E D T I E A D A O D O but this is not well-behaved. In particular, since A has rank 1 in a height-4 signa-ture, it might not be a set even in a univalent structure, and similarly O might notbe a 1-type. The finger of blame can with some justification be pointed at the sort E , which cannot behave like an ordinary equality relation if it has a further sort E D depending on it. Makkai makes essentially this point when discussing fibrations: itonly makes sense to impose equality relations, in the usual sense, on sorts that areonly one level below the top.One way to solve this problem would be to allow the base category to be abicategory (though the fibers are only 1-categories), as in Example 9.1 below. InExample 10.4 we will see another way to solve it, using heterogeneous equality. . STRUCTURED 1-CATEGORIES 77 However, we can avoid the complexity of these approaches with the following sig-nature due to Makkai, whose only dependency is for the objects: T I E F A T D I D E D A A D O D O The dependency A D → A is replaced by the relation F A , asserted to be a func-tional relation, and the dependencies T D → T and I D → I are replaced by axioms,e.g., ( I D ) c,x ( f ) ∧ ( F A ) c,c,x,x ( f, f ) → I c ( f ) . A model of this theory might be called a“semi-displayed category”; it consists of, for any c : C , a type D ( c ) of objects over C ,and for any x : D ( a ) and y : D ( b ) a type D ( x, y ) with a function D ( x, y ) → C ( a, b ) .While they may appear more ad hoc than displayed categories, semi-displayed cate-gories do suffice to define notions involving strict fibers of functors, such as fibrationsof categories.As usual, we assert that E and E D are congruences for all the relations, in-cluding F A . Thus, in a univalent model M , all the top sorts are propositions, both A and A D are sets with standard equality, and each fiber category over c : M O is aunivalent category in the usual sense. An indiscernibility between objects c, d : M O consists of an ordinary isomorphism φ : c ∼ = d in the underlying base category to-gether with all possible liftings of it in both directions, e.g., for any x : M O D ( c ) a choice of a y : M O D ( d ) and an isomorphism x ∼ = y over φ , and dually. Since(assuming univalence at O D and above) such liftings are unique when they exist,the type of such indiscernibilities is a subtype of that of ordinary isomorphisms.Thus, in a univalent semi-displayed category, M O is a 1-type, even though Propo-sition 5.8 only implies that it is a 2-type. Moreover, when M is univalent, theunderlying ordinary category of the base category is univalent if and only if thesemi-displayed category is an isofibration (which is a pure existence axiom; cf. also[ AL19 , Problem 5.11]).A morphism of models consists of a functor between the underlying categoriesand a “semi-displayed functor” above it; it is an equivalence when both functors areequivalences. Example 8.15 (Categorical structures for the interpretation of Martin-Löf TypeTheory) . Various structures on categories have been devised for the interpretationof Martin-Löf Type Theory. An analysis of some of these structures in univalentfoundations is given in [ ALV18 ] (to which we also refer the reader for referencesto the original literature). We look here at split type categories (a.k.a. categorieswith attributes) and categories with families.A split type category consists of a category C equipped with • a presheaf T : C op → Set ; • a “comprehension structure”, associating to any Γ : C and B : T (Γ) anobject Γ .B and a morphism π B : Γ .B → Γ ; • for any Γ and B as above, and any f : ∆ → Γ , ∆ .f ∗ B Γ .B ∆ Γ π q πf where f ∗ B is reindexing of B along f given by the action of T on mor-phisms, an arrow q = q ( f, B ) that completes the diagram to a pullbacksquare; • such that q is functorial.Note that the comprehension structure, together with the operation q , forms afunctor from the category of elements of T to the underlying category C . Thefamily π of morphisms then forms a natural transformation from that functor tothe forgetful functor R T → C .A suitable signature for split type categories looks as follows: π qT I E C T A E T A T O O Here, the presheaf T is given by the sorts ( T O , T A ) with the equality E T , as inExample 8.3. The sort C represents the comprehension: a witness w : C Γ ( B, ∆) signifies, intuitively, that ∆ is the context Γ extended by a variable of type B . Thepair of sorts ( C, q ) represent the comprehension functor. The sort π represents theaforementioned natural transformation: a witness t : π ( w, f ) with w as above saysthat f is a “canonical projection” from ∆ to Γ .Since all the structure is categorical, an indiscernibility a ≍ b in O is just anisomorphism a ∼ = b in the underlying category. This entails that in a univalent splittype category, the underlying category is univalent. Categories with families , in the formulation of Fiore [ Fio12 ] and Awodey[ Awo16 ] share some structure with split type categories, notably the category C ,the presheaf T and the comprehension structure π B : Γ .B → Γ for any Γ and B .However, in this case the comprehension structure is not assumed a priori to befunctorial. Instead, a category with families has • a presheaf T m on C ; • a natural transformation p : T m → T ; • for each object Γ : C and B : T (Γ) , an element V A : T m (Γ .B ) , such that p Γ .B ( V A ) = T ( π B )( B ) : T (Γ .B ) and such that the induced commutative . STRUCTURED 1-CATEGORIES 79 square of presheaves and natural transformations よ (Γ .B ) T m よ (Γ) T V A よ ( π ) pB is a pullback; here, よ denotes the Yoneda embedding.Expressed as a signature, this yields π VT I E C T A p T m A A T O T m O O Here, ( T O , T A ) and ( T m O , T m A ) are assumed to be presheaves; for readability, weomit the equalities E ⇒ T O and E ⇒ T m O in the signature above. An element x : V (Γ , ∆ , B, w, t ) with B : T O (Γ) , t : T m O (∆) , and w : C (Γ , B, ∆) states that t isthe generic variable obtained from the context extension ∆ = Γ .B . We assert, viasuitable axioms, that the data thus given yields pullback squares.Prima facie, this structure is not categorical; in particular, an indiscernibility a ≍ b in O consists of an isomorphism φ : a ∼ = b together with transport functionsin C , π , and V . But these sorts are exactly specifying the pullback data, and arehence closed under isomorphism in O . This means that transport in these sorts isfor free; an indiscernibility a ≍ b is exactly an isomorphism φ : a ∼ = b .In a univalent model of the above theory, the data specified by ( C, π, V ) existsuniquely [ ALV18 , Lemma 34]. The type of univalent models of this theory is henceequivalent to the type of univalent models of the theory of “representable maps ofpresheaves”, where the representation of p is merely assumed to exist: T I E T A p T m A A T O T m O O However, as in Example 8.2, incorporating the comprehension structure in thesignature ensures that it is preserved by arbitrary morphisms of models, whichotherwise would not be the case. Example 8.16 (Semicategories) . In addition to adding more structure to a cate-gory, is also interesting to consider what happens if we remove some of its structure.For instance, a semicategory is like a category, but has no identities, though itscomposition is still associative. Thus an appropriate signature for semicategories is: T EAO. As usual, univalence at A makes it a set with equality E . An indiscernibility a ≍ b in O consists of: • A natural isomorphism of representable presheaves A ( − , a ) ∼ = A ( − , b ) (these notions make perfect sense for semicategories), • A natural isomorphism of representable copresheaves A ( a, − ) ∼ = A ( b, − ) (these notions make perfect sense for semicategories), and • A semigroup isomorphism A ( a, a ) ∼ = A ( b, b ) , • Which respect all the additional composition operations on these sets, i.e., A ( x, a ) × A ( a, y ) → A ( x, y ) A ( a, a ) × A ( a, y ) → A ( a, y ) A ( x, a ) × A ( a, a ) → A ( x, a ) A ( a, x ) × A ( x, a ) → A ( a, a ) for all x, y : O .In particular, if f : A ( a, b ) is a morphism such that pre-composition and post-composition with f : A ( b, y ) → A ( a, y ) A ( x, a ) → A ( x, b ) are isomorphisms for all x, y : O , then f induces an indiscernibility a ≍ b . Amorphism in a semicategory with this property is called an isomorphism in [ Tri13 ],and neutral in [ CK17 ]. If g : A ( b, a ) also has this property, then f and g inducethe same indiscernibility if pre- and post-composition with gf (or, equivalently, f g ) are both the identity. However, not all indiscernibilities in a semicategoryarise from morphisms: e.g., in a semicategory with no morphisms, all objects areindiscernible! A morphism of semicategories is a semifunctor, i.e., a graph morphism preserv-ing composition. It is an equivalence if it is fully faithful and also split essentiallysurjective up to indiscernibility. We leave it to the reader to define a theory forstructures such as two semicategories with a semifunctor between them, and so on.Instead of removing identities, we can remove composition from categories,thus obtaining reflexive graphs . We leave it to the reader to design a suitablediagram theory (with and without equality) for such graphs, and to characterize theindiscernibilities in each sort, as well as the morphisms and equivalences of modelsof the theory. Example 8.17 (A functor between two fixed categories) . In Example 8.4 we de-scribed a theory whose models consist of two categories together with an (ana)functorbetween them. Alternatively, we might fix two categories C and D and ask for asignature for “functors from C to D ”. Such a signature has a family of sorts F O,x,y indexed by C × D , and another family of sorts F A,f,g indexed by pairs of arrows In particular, the result of [ CK17 ] that a univalent (there called “complete”) semicategoryis a category does not hold for our notion of univalence: the semicategory with one object and nomorphisms is univalent. . STRUCTURED 1-CATEGORIES 81 f in C and g in D , with morphisms from F A,f,g to F O,x ,y and F O,x ,y where f : C ( x , x ) and g : D ( y , y ) : . . . F A,f,g . . .. . . F O,x ,y F O,x ,y . . . The axioms of an anafunctor can be simply restated about structures for this sig-nature, with F O,x,y replacing F O ( x, y ) and so on.In fact this signature can be obtained from that of Example 8.4 in a straight-forward way. First we modify the rank function of Example 8.4 so that the sorts F O and F A have rank 3 and 4 respectively. (We will show in Corollary 15.9 that thisdoes not change the structures.) Now we take a third derivative of this signature;the input data for this consists precisely of the two categories C and D , and theresulting derivative is precisely the signature described above.We can use the same method to obtain signatures for any kind of structurerelative to some fixed ambient fragment of that structure. For instance, given afixed category C , there is a signature for “presheaves on C ” or “monoidal structureson C ”.HAPTER 9 Higher categories Just as theories of structured sets (Chapter 7) involve signatures of height 2,and theories of structured categories (Chapter 8) generally involve signatures ofheight 3 (with a few exceptions), theories of higher categories involve signaturesof height ≥ . We begin with the theory of bicategories; strict 2-categories aresomewhat subtler, and will be studied in Example 10.2. Example 9.1 ((Ana)bicategories; [ Mak95 , Section 7]) . We can represent bicate-gories with the following signature from [ Mak95 , p. 110] (with equality added): T I E H A L RC T I C C Here C , C , C are the sorts of objects, 1-cells, and 2-cells. The relations T , I ,and E , with their axioms, make the 1-cells and 2-cells into hom-categories. Thetype T , which depends on a triangle of elements of C , represents composition: t : T ( f, g, h ) is a “reason why” g ◦ f is equal to h . In general this is not a proposition,so composition is an anafunctor; thus (again following Makkai) we are actuallyrepresenting “anabicategories”. Similarly, I ( f ) is the type of witnesses that f isan identity 1-cell. The relation A specifies the associativity isomorphisms: given t : T ( f , f , f ) and t : T ( f , f , f ) and also t : T ( f , f , f ) and t ′ : T ( f , f , f ′ ) , the relation A specifies a 2-cell in C ( f , f ′ ) that playsthe role of the associativity morphism (which we assert to be invertible with anaxiom). Similarly, L and R specify the left and right unit isomorphisms. Finally,the relation H specifies the “horizontal” composite of two 2-cells along an object,given witnesses for how to compose their domains and codomains.Note that if we drop the sorts I , I , L, R relating to identities, the resultinginverse category is a truncation of the coface maps in Joyal’s category Θ [ Joy97 ].The identity sorts are a “fattening” of this to incorporate the degeneracies whileremaining inverse, as done for the simplex category in [ Koc06 ]. We expect thatunder the simplicial set interpretation, a model of this theory can be rectified toobtain an actual simplicial presheaf on Θ , analogously to the discussion for cat-egories and bisimplicial sets in Section 3.2. Under the interpretation of Θ -spaces 834 9. HIGHER CATEGORIES as models for ( ∞ , -categories [ Rez10, Ara14 ], our anabicategories should beidentified with the image of 2-categories inside ( ∞ , -categories.On the other hand, if we drop the bottom sort C , we obtain precisely thesignature for monoidal categories from Example 8.7 (with the unnecessary sort U A removed and the others renamed) — as we should expect, since a monoidal categoryis a one-object bicategory. Just as in that example, we assert as axioms that E isa congrence for all the top-rank relations and that the functor T is existentiallysaturated. This ensures that univalence at C makes it consist of sets with equality E , that full saturation holds at T , and that univalence at C reduces to ordinaryunivalence of each hom-category. Finally, a “two-sided bicategorical Yoneda lemma”implies that indiscernibilities in C are equivalent to internal adjoint equivalences,so univalence at C means that these are equivalent to identifications. The transportin C and C of an indiscernibility a ≍ b is given by 1-composition and whiskeringwith the corresponding internal adjoint equivalence φ : a ≃ b , respectively.A morphism of saturated anabicategories corresponds to a (pseudo) functor ofbicategories. It is an equivalence of models if the functor is a (strong) biequiva-lence, i.e., such that the maps on hom-types of all dimensions are split essentiallysurjective.A signature for two bicategories and a pseudo-anafunctor between them can bedesigned in analogy to the signature of anafunctors of Example 8.4. For pseudo-anafunctors, suitable saturation conditions need to be stated on the level of 0-cells(with respect to adjoint equivalences) and 1-cells (with respect to isomorphisms).The analysis of the univalence condition on a pseudo-anafunctor, and of morphismsof pseudo-anafunctors, is left as an exercise.In [ AFMvdW19 ], the authors define and study univalent bicategories in UF,and also a bicategorical version of the displayed categories of Example 10.4. Unlikein the models of our theory of bicategories above, their bicategories are algebraic,in that identities and composition are given as operations. Example 9.2 (Opetopic bicategories) . Example 9.1 is based on the classical defini-tion of bicategory (adapted to use anafunctors). Another possibility is to use a “non-algebraic” definition of bicategory, such as a semisimplicial or fat-simplicial [ Koc06 ]version of the Street–Duskin [ Str87, Dus01 ] simplicial nerve, or the opetopicnerve [ BD98, HMP00 ].The opetopic approach is particularly interesting because one of Makkai’s orig-inal applications of FOLDS [ Mak04 ] was a definition of opetopic (or “multitopic”) ω -category. A suitable signature for opetopic bicategories is as follows: T T , T T T , . . .C , C , C , C , . . .C C . HIGHER CATEGORIES 85 together with a binary equality predicate E n, and a unary predicate U n, on each C n, . We regard the elements of C n, as 2-cells whose domain is a composablestring of n n + 1 arrows to C . Similarly, the relation T k ,...,k n ; n represents a multicategorical-style compositeof n k , . . . , k n with one 2-cell whose domainis of length n ; thus it has an arrow to each C k i and to C n , as well as an arrow to C k + ··· + k n specifying the composite. The predicate U n, singles out certain 2-cellsas universal .The axioms (when suitably simplified from ω -categories to -categories) saythat any composable diagram of 2-cells has a unique composite, that identity 2-cells exist, that 2-cells can be factored uniquely through universal ones, and thatevery composable string of 1-cells is the domain of a universal 2-cell. In addition,we assume an “existential saturation” property that universal cells are closed undercomposition with isomorphisms. It follows that the specified universal 2-cells (i.e.,those satisfying U n, ) are precisely those that satisfy the usual universality prop-erty , and give identities and composition of 1-cells analogously to how a monoidalcategory can be characterized as a representable multicategory.A detailed comparison of opetopic bicategories with classical bicategories canbe found in [ Che03 ]. Note, though, that all existing references we are aware of useonly opetopic sets , whereas our definition yields a notion of higher category basedon opetopic spaces (e.g., simplicial sets), analogous to [ Rez01, Rez10 ].As usual, univalence at top-level ensures that each T k ,...,k n ; n is a mere relation,and at the next level that each C n, is a set with equality E n, . Since C , formsthe morphisms of a category with objects C , an indiscernibility at C includes thedata of a 2-cell isomorphism, which can then be shown to uniquely determine therest of an indiscernibility by the usual arguments; thus univalence at C says thatthe category of 1-cells is univalent.From an indiscernibility φ : x ≍ y in C we obtain morphisms φ : C ( x, y ) and φ ′ : C ( y, x ) in the usual way, and from universal cells in C , (1 x , x ; 1 x ) and C , (1 y , y ; 1 y ) we obtain universal cells in C , ( φ, φ ′ ; 1 x ) and C , ( φ ′ , φ ; 1 y ) witness-ing f and g as inverse adjoint equivalences. (These 2-cells are universal becausethe predicate U , is part of the signature, hence is preserved by indiscernibilities.)As usual, the entire indiscernibility can then be recovered uniquely from such anadjoint equivalence; thus univalence at C is analogous to Example 9.1. We expectother non-algebraic definitions to behave similarly.Unlike the situation for ordinary categories, where the vast majority that occurnaturally in applications are univalent (although see Chapter 13 for some notableexceptions), there is a large class of naturally-occurring bicategories that are notunivalent. The bicategory of univalent categories and functors is univalent, as aremany other related bicategories such as univalent monoidal categories and monoidalfunctors, univalent toposes and geometric morphisms, etc. However, the bicategory of rings and bimodules is not univalent: the identifi-cations of objects are ring isomorphisms, while the equivalences are Morita equiv-alences. For similar reasons, neither is the bicategory of categories (even univalentones) and profunctors. In [ Shu08 ] it was argued that bicategories of this secondsort are more naturally viewed as double categories . Various advantages of this The bicategory of not-necessarily-univalent precategories and functors is not univalent, butthis is a different sort of issue. perspective were discussed therein, but a further one is that they do tend to beunivalent as double categories. Example 9.3 (Double (ana-bi)categories) . A double category is similar to a 2-category or bicategory, but has two families of 1-cells, called vertical and horizontal ,respectively. The 2-cells take the shape of fillers for squares of 1-cells (two of eachsort). For example, rings are the objects of a double category whose two familiesof 1-cells are ring homomorphisms and bimodules, while categories are the objectsof a double category containing both functors and profunctors.Curiously, it is quite difficult to define a double category in which compositionis weak in both directions. The closest approximation in the literature is the doublebicategories of Verity [ Ver92 , Definition 1.4.1]; in addition to squares, these havevertical and horizontal 2-cells of the usual “globular” shape, forming two separatebicategories with the same objects, together with operations by which the squaresare acted on by the appropriate kind of globular 2-cells on all four sides. These aremore general than the intuitive notion of “doubly weak double category” in thatthe globular 2-cells may not coincide with the squares having identity morphismson two parallel sides, although we are free to assume as an additional axiom thatthe natural map between these two sets is a bijection.A suitable signature for double bicategories hence looks as follows: W H,T W H,B I H T H E S T V I V W V,L W V,R C H, S C V, C H, C V, C where we omit the bicategorical structure on C X, ⇒ C X, ⇒ C for X = H, V (see Example 9.1) for readability. Intuitively, an element λ : S w,x,y,z ( f, g, h, k ) canbe pictured as a filler z xy w h k λ fg and the vertical action ( W V,R ) w,x,y,z,f,g,h,k,f ′ ( α, λ, λ ′ ) attaches a vertical 2-cell α : f ⇒ f ′ on the right of λ to yield a filler λ ′ of a square of 1-cells f ′ , g, h, k . Similarly,we have vertical action on the left ( W V,L ) and horizontal action on the top andbottom. As usual, these relations are asserted to be functional. Squares can becomposed vertically ( T V ) and horizontally ( T H ), and we have identities I V and I H for these compositions. We assert that the equalities (not pictured) on vertical and . HIGHER CATEGORIES 87 horizontal 2-cells, as well as the equality E S on squares S , are congruences withrespect to these operations.Univalence at S says that S is pointwise a set with equality given by E S . Giventwo vertical 1-cells f, f ′ : C V, ( x, w ) , an indiscernibility between them is given byan isomorphism φ : f ∼ = f ′ in the underlying vertical bicategory together with atransport function for S , e.g., φ ∗ : S w,x,y,z ( f, g, h, k ) → S w,x,y,z ( f ′ , g, h, k ) . Butcoherence with respect to W V,R says that this transport function is given by actionwith the 1-isomorphism φ , and similar for the other variables.Given a, b : C , an indiscernibility a ≍ b consists of a pair of a horizontal ad-joint equivalence φ H : a ≃ H b and a vertical adjoint equivalence φ V : a ≃ V b together with transport functions for the sort S that are coherent with respect tothe top-level sorts. In particular, we have a transport function S a,a,a,a (1 , , , ∼ = S b,a,a,a ( φ V , φ H , , ; call Ψ : S b,a,a,a ( φ V , φ H , , the image of the identity filler un-der this isomorphism. Analogously, we have a transport function S b,b,b,b (1 , , , ∼ = S b,b,b,a (1 , , φ V , φ H ) ; call Φ : S b,b,b,a (1 , , φ V , φ H ) the image of the identity filler un-der this isomorphism. The coherence laws for the top-sorts then entail that all theother transport functions are fully determined by the choice of Ψ and Φ , and that Ψ and Φ compose with each other along φ V and φ H to identities. In summary, anindiscernibility in C consists of a quadruple ( φ H , φ V , Ψ , Φ) with these properties,a.k.a. a companion pair (see, e.g., [ GP04 , §1.2]) of adjoint equivalences, whichCampbell [ Cam20 ] has called a gregarious equivalence .The class of double categories studied in [ Shu08 ] as replacements for bicate-gories — there called framed bicategories , but elsewhere known as fibrant doublecategories or proarrow equipments — in particular have the property that everyvertical arrow has a horizontal companion. Since the companion of an equivalenceis always an equivalence, and companions are unique up to unique isomorphism,in a framed bicategory the indiscernibilities are simply the vertical equivalences(which might be simply vertical isomorphisms, if the vertical bicategory is locallydiscrete, i.e., equivalent to a 1-category). Thus, we can assemble rings, ring ho-momorphisms, and bimodules into a univalent double bicategory, and likewise forcategories, functors, and profunctors.A morphism of double bicategories, regarded as models of our theory, is exactlya horizontal map as defined in [ Ver92 , Definition 1.4.7] (a.k.a. a double pseudo-functor). It is an equivalence if it is fully faithful on squares, full on horizontaland vertical 1-cells up to globular isomorphism, and surjective on objects up togregarious equivalence. These are the weak equivalences in the model structure (onstrict double categories) of [ Cam20 ], and when restricted to framed bicategoriesthey reduce to the equivalences characterized in [ Shu08 , §7]. Remark 9.4. In Example 9.1 we noted that morphisms of saturated anabicate-gories correspond to pseudofunctors, and that pseudo-anafunctors between satu-rated anabicategories can also be represented as models of a single diagram theory. We do use here the extra generality of double bicategories over double categories: to ensurethat the type of vertical equivalences is the set of ring isomorphisms, we must take the verticalglobular 2-cells to be only the identities, rather than all the squares with two horizontal identitiesin their boundary. The latter choice would yield instead the double category of one-object Ab -enriched categories, functors, and profunctors, and the type of equivalences between two one-object(enriched) categories is not equivalent to the set of isomorphisms between their hom-monoids(though one is inhabited if and only if the other is). However, the situation with lax functors is much subtler, since lax functors be-tween bicategories do not preserve equivalences — indeed, they need not even take identity morphisms to equivalences — nor are they invariant under equivalences ofbicategories. For instance, a lax functor whose domain is the terminal bicategorysends the identity morphism in its domain to an arbitrary monad in its codomain(which need not be an equivalence), while a lax functor whose domain is equivalent to the terminal bicategory instead selects a collection of monads with bimodulesbetween them.Thus, it seems difficult, if not impossible, to represent a lax functor betweenunivalent bicategories as a model of a diagram theory. However, many lax functorsarising in practice involve non-univalent bicategories, and often this is because theyare more naturally viewed as framed bicategories, i.e., as certain double categories.Since a horizontally lax double functor does preserve vertical equivalences, and isinvariant under equivalence of framed bicategories, there is no difficulty in writingdown a signature for such functors, which includes many if not most naturally-occuring lax functors. We leave the details to the reader.HAPTER 10 Strict categorical structures All the higher-categorical structures considered in Chapter 9 were “maximallyweak”. One might guess that our framework can only speak about maximally weakhigher categories, but in fact this is not the case. In this chapter we discuss a methodfor representing strict structures, starting with a notion that has no analogue inset-based category theory: the strict categories mentioned in Section 3.2. Example 10.1 (Strict categories) . Recall from Section 3.2 that a strict categoryis a precategory whose underlying type of objects is a set. A natural way to forcethe type O in an L cat+E -structure to be a set is to just add an equality predicateon it: T I E A A E O O Since E O has no types that depend on it, univalence will make it a proposition,even though it is not at top rank. However, recall that in order for univalenceto force equality at a sort (such as O ) to coincide with a given equality predicateon that sort, the equality needs to be asserted to be a congruence for everythingelse dependent on that sort. In previous examples the equality predicate has beenat top rank (like E A ), so that all the other sorts dependent on its sort (like T, I dependent on A ) are mere predicates, and the meaning of “congruence” is clear.But in the present situation it is less obvious what exactly it means for E O to be a“congruence for A ” when A is not a mere predicate on O .A solution is to make the equality of arrows heterogeneous , meaning that we donot require that the two morphisms on which E A depends to have the same sourceand target, so that there are in total four distinct arrows E A → O in the signature.We denote heterogeneous equalities by e E rather than E ; thus in this case we havetypes ( e E A ) x,y,z,w ( f, g ) for f : A ( x, y ) and g : A ( z, w ) . We still require e E A to be anequivalence relation, in the appropriate heterogeneous sense, and we assert that it isa congruence for T and I in appropriate ways that respect their dependencies. Forinstance, if I x ( f ) and ( e E A ) x,x,z,z ( f, g ) , then I z ( g ) , and similarly for T . This sufficesto ensure that the induced homogeneous equality ( E A ) x,y ( f, g ) : ≡ ( e E A ) x,y,x,y ( f, g ) ,for f, g : A ( x, y ) , coincides with indiscernibilities in A .We will also write e E O for the equality on O , even though there is no distinctionbetween homogeneous and heterogeneous equality on a rank-0 sort. We assertas axioms that e E O is an equivalence relation, and that if ( e E A ) x,y,z,w ( f, g ) then 890 10. STRICT CATEGORICAL STRUCTURES e E O ( x, z ) and e E O ( y, w ) . We can now also assert transport of A along e E O , in thesense that given f : A ( x, y ) and e E O ( x, z ) and e E O ( y, w ) , there exists a g : A ( z, w ) such that ( e E A ) x,y,z,w ( f, g ) . This is sensible as a mere existence statement, sincesuch a g is unique up to homogeneous e E A (using the fact that e E A is a heterogeneousequivalence relation).Now suppose univalence holds at all sorts above O , and that we have an in-discernibility φ : a ≍ b in O . This of course includes a map e E O ( a, a ) → e E O ( a, b ) ,so that we have e E O ( a, b ) . It also includes maps like φ x • : A ( x, a ) → A ( x, b ) asbefore, but now these must also respect e E A . In particular, if f : A ( x, a ) , thensince ( e E A ) x,a,x,a ( f, f ) , we have ( e E A ) x,a,x,b ( f, φ x, • ( f )) , so that φ x, • ( f ) is determineduniquely (up to homogeneous e E A ) as the g asserted to exist by our transport axiom.Similar reasoning applies at other sorts, so any equality e E O ( a, b ) can be ex-tended uniquely to an indiscernibility φ : a ≍ b , i.e., we have ( a ≍ b ) ≃ e E O ( a, b ) .Since the latter is a mere relation, in a univalent structure O must be a set, whoseequality relation is e E O . So the univalent models of this theory are precisely strictcategories.A morphism of structures is precisely a functor; it is an equivalence if thefunctor is an isomorphism of strict categories.Note also that since strict categories are composed entirely of sets, they canalso be considered as the (univalent) models of the essentially algebraic theory ofcategories, which can be regarded as a height-2 theory in our framework as inExample 7.5. The value of presenting them as a height-3 theory instead is that itgeneralizes to “partially-strict” structures such as strict 2-categories and displayedcategories, as we now explain. Example 10.2 (Strict 2-categories) . In standard category-theoretic terminology, astrict 2-category [ ML98 , XII.3] is an ordinary category equipped with additional 2-cells; thus it is like a bicategory but composition of 1-cells is strictly associative andunital. This suggests that in a univalent representation, the type of 1-cells should bea set, so that we can compare them for equality; in other words, the hom-categoriesshould be strict categories. But even in a strict 2-category, one generally does notcompare objects for equality, only for isomorphism ; thus a strict 2-category is nota fully strict set-level structure but should have a nontrivial univalence conditionon the objects. (Thus one might more precisely call it a “locally strict 2-category.”)A suitable signature for strict 2-categories looks as follows: L R I C V e E C T I A C E A AO Here, the sort C denotes the sort of 2-cells, V stands for vertical composition, L and R for left and right whiskering, respectively, and I C for identity 2-cells. For instance, 0. STRICT CATEGORICAL STRUCTURES 91 L a,b,c,g,h,k,ℓ ( f, α, β ) signifies that β : C a,c ( k, ℓ ) is the left whiskering of f : A ( a, b ) and α : C b,c ( g, h ) . Intuitively, L (and R ) should not only depend on three 2-cells,but also on two triangles T ( f, g, k ) and T ( f, h, ℓ ) , to indicate that the boundary ofthe left and right whiskering is the composite of the boundaries of the input. How-ever, this condition can be stated as an axiom instead: L a,b,c,g,h,k,ℓ ( f, α, β ) implies T a,b,c ( f, g, k ) and T a,b,c ( f, h, ℓ ) . The absence of these dependencies enables T to bepointwise a proposition in a univalent structure. Similar to Example 10.1, the sort e E C denotes a heterogeneous equality, but it is only “partially heterogeneous”: e.g.it depends on four elements of A , but these four elements must be parallel in pairs,so that it depends on only four elements of O rather than eight.Vertical composition and left and right whiskering are asserted to be func-tions. We also impose the usual axioms of a strict 2-category. The sort e E C isasserted to be a congruence for the other top-level sorts. By the same reasoningas in Example 10.1, this entails that the homogeneous equality ( E C ) f,g ( α, α ′ ) : ≡ ( e E C ) f,g,f,g ( α, α ′ ) induced by the heterogeneous equality coincides with indiscerni-bilities α ≍ α ′ .The equality E A is asserted to be a congruence with respect to the other sortsof the same rank and above. In particular, transport of C along E A is assertedas follows: given α : C ( f, g ) and E A ( f, f ′ ) and E A ( g, g ′ ) , there exists β : C ( f ′ , g ′ ) such that ( e E C ) f,g,f ′ ,g ′ ( α, β ) . Such β is unique up to homogeneous equality, usingthat e E C is a heterogeneous equivalence relation.An indiscernibility g ≍ g ′ at A ( x, y ) comes, in particular, with an equality ( E A ) x,y ( g, g ′ ) . It furthermore comes with a transport φ f • : C x,y ( f, g ) → C x,y ( f, g ′ ) respecting e E C , in the sense that ( e E C ) x,y,f,g,f,g ′ ( α, φ f • ( α )) . Consequently, the map φ f • coincides, up to homogeneous equality, with the transport of C along E A as-serted as part of E A being a congruence. Conversely, any equality ( E A ) x,y ( g, g ′ ) gives rise, in a unique way, to the data of an indiscernibility g ≍ g ′ , and we obtainthat ( E A ) x,y ( g, g ′ ) ≃ ( g ≍ g ′ ) . In particular, in a univalent strict 2-category, eachtype A ( x, y ) of arrows is a set.Given a, b : O , an indiscernibility a ≍ b consists of an isomorphism φ : a ∼ = b in the underlying category together with transport functions φ x • ff ′ : C x,a ( f, f ′ ) → C x,b ( φ x • ( f ) , φ x • ( f ′ )) ≡ C x,b ( φ ◦ f, φ ◦ f ′ ) and similar for the other dependency of C ,and in both dependencies. These transport functions are furthermore compatiblewith sorts L , R , I C , V , and e E C . Compatibility of φ x • ff ′ with R means that R x,a,a,f,f ′ ,f,f,f ′ ( α, , α ) → R x,a,b,f,f ′ ,φ x • ( f ) ,φ x • ( f ′ ) ( α, φ x • (1) , φ x • ff ′ ( α )) , which means that φ x • fg ( α )) is the right whiskering of α with φ : A ( a, b ) . Analo-gously, we obtain that the transport function φ • xff ′ is given exactly by left whisker-ing, and the transport in both dependencies by applying both left and right whisker-ing. This means that an indiscernibility a ≍ b is simply an isomorphism a ∼ = b inthe category underlying the strict 2-category.A strict 2-category is univalent iff its underlying 1-category is univalent, C ispointwise a set with equality given by E C (the homogeneous fragment of e E C ), and L , R , I C , and V are pointwise propositions.A morphism of structures is exactly a functor between strict 2-categories; it isan equivalence if the functor is an equivalence of 2-categories. Remark 10.3. It is worth repeating here the observation from Section 3.2 thatnearly all naturally-occurring large categories, when defined in HoTT/UF, are uni-valent and not strict. Thus, the notion of strict category is of limited practicalutility when working in HoTT/UF, although small categories (such as the domainsof diagrams) can often be defined in a strict way. For a similar reason, very fewnaturally-occurring bicategories are strict 2-categories in the sense of Example 10.2:even the bicategory of univalent categories and functors is not a strict 2-category,because its hom-categories are not strict. There is, however, a strict 2-category ofstrict 1-categories. Moreover, the technique of heterogeneous equality is also usefulfor other examples that do occur more frequently in practice, such as the following. Example 10.4 (Displayed categories) . Using heterogeneous equality, we can con-sider displayed categories instead of the semi-displayed categories of Example 8.14. T D I D e E D T I E A D A O D O Here, the sort e E D is a heterogeneous equality as in Examples 10.1 and 10.2. In thesignature above, there are two dependencies of e E D on A . We assert transport of A D along E : given g : ( A D ) a,b ( x, y, f ) and E ( f, f ′ ) , there is g ′ : ( A D ) a,b ( x, y, f ′ ) and ( E D ) a,b,x,y,f,f ′ ( g, g ′ ) .As before, indiscernibilities in A D correspond to homogeneous equalities E D induced by e E D ; hence, in a univalent structure, A D is a set with equality E D .Given f, f ′ : A ( a, b ) , an indiscernibility f ≍ f ′ comes with a transport function φ • : ( A D ) a,b ( x, y, f ) → ( A D ) a,b ( x, y, f ′ ) that is compatible with e E D —in particular,we obtain ( e E D ) a,b,x,y,f,f ′ ( g, φ • ( g )) . This means that φ • ( g ) is, up to homogeneousequality E D , the same as the postulated transport above. Altogether, an indis-cernibility f ≍ f ′ is exactly an equality E a,b ( f, f ′ ) ; thus, in a univalent structure, A is a set with equality E .Given b : O and y , y : O D ( b ) , an indiscernibility y ≍ y is exactly a displayedisomorphism over the identity on b ; this is shown analogously to the characterizationof indiscernibilities of objects in a precategory (see Section 3.4). In more detail,such an indiscernibility consists, in particular, of an equivalence φ b,b,y , • , b : ( A D ) b,b ( y , y , b ) ≃ ( A D ) b,b ( y , y , b ) , and thus in particular of a displayed morphism φ : ≡ φ b,b,y , • , b ( f y ) : ( A D ) b,b ( y , y , b ) .The morphism φ is an isomorphism, and transport in A D is given by compositionwith φ or its inverse, e.g., ( T D ) a,b,b,x,y ,y ,f, ,f ( f , y , f ) → ( T D ) a,b,b,x,y ,y ,f, ,f ( f , φ, φ b,b,y , • , b ( f )) . Regarding indiscernibilities at O , the same reasoning as in Example 8.14 ap-plies. In particular, for a univalent structure, the underlying category is univalentif and only if the displayed category is an isofibration. 0. STRICT CATEGORICAL STRUCTURES 93 Remark 10.5. In [ Mak95 , Appendix C], Makkai describes a general methodfor starting with a diagram signature that has no equalities at all, and addingheterogeneous equalities (which he calls “global equalities”) to all non-relationalsorts, as well as a family of FOLDS-axioms for these equalities. Our signature forstrict categories in Example 10.1 can be obtained by this method, if we start withthe signature for categories with the equality on arrows removed (otherwise it wouldget duplicated), and our congruence and transport axioms are instances of Makkai’s.Based on this example, it is natural to conjecture that a structure for any diagramsignature with all heterogeneous equalities added that satisfies Makkai’s equalityaxioms is univalent if and only if all its sorts are sets with standard equality. Onemight also hope to generalize Makkai’s construction to add equalities only at somesorts (perhaps at a sieve of sorts) and thereby recover our Examples 10.2 and 10.4.HAPTER 11 Graphs and Petri nets In Chapter 7 we considered signatures of height 2, which are (if univalent) nec-essarily built only out of sets; while in Chapters 8 to 10 we considered signatures ofgreater height for categorical structures. Generally speaking, the presence of com-position and identities in a categorical structure is what reduces the a priori rathercomplicated notion of indiscernibility to a more familiar notion of isomorphism orequivalence; in Example 8.16 we saw a taste of what happens in the absence ofidentities.In this chapter we look at a few signatures of height > for graphs and graph-like structures that entirely lack composition and identities. The resulting notions ofindiscernibility are a little strange, and naturally-occurring examples seem unlikelyto be univalent. However, with the technique of heterogeneous equality introducedin Chapter 10 we can eliminate the strange behavior and force all the types involvedto be sets again. Example 11.1 (Directed multigraphs) . In Example 7.4 we considered sets equippedwith a relation on them, which are special cases of directed graphs with at most oneedge between any two nodes. A natural signature for directed multi graphs, whichmay have several edges between nodes, is simply the signature for categories withboth composition and identities removed: EAO The sort E is asserted to be an equivalence relation. In a univalent structure forthis signature, E is pointwise a proposition, and, for any a, b : O , the type A ( a, b ) is a set with equality given by E a,b . An indiscernibility a ≍ b of objects a, b : M O consists of families of bijections A ( x, a ) ∼ = A ( x, b ) between the sets of edges into a and b , respectively, and between the edges out of a and b , and between the loopson a and b . 956 11. GRAPHS AND PETRI NETS As noted above, if we add an equality relation on O as well, and make theequality of A heterogeneous: e E A A e E O O with suitable congruence axioms, then in a univalent structure both O and A willbe sets with standard equality. Example 11.2 (Pre-nets, tensor schemes) . A pre-net [ BMMS01 , Definition 3.1]has a type of “places” and for each pair of natural numbers m, n , a type of “transi-tions” dependent on m + n places. The same notion is known under the name of“tensor scheme” [ JS91 , Definition 1.4]; it is the natural underlying data from whichto generate a free monoidal or symmetric-monoidal category. E , E , E , E , . . . E m,n . . .T , T , T , T , . . . T m,n . . .S × n × m Here, the sort T m,n of transitions has m + n arrows to (a.k.a. dependencies on)the sort S of places (a.k.a. “species”), regarded as m inputs and n outputs. Thediscussion is largely the same as in Example 11.1; an indiscernibility a ≍ b in S consists of families of bijections between the sets of transitions with a and b appearing in one or more of their inputs or outputs, while by adding heterogeneousequalities we can force S to also be a set with standard equality. A morphism ofpre-nets [ BMMS01 , Definition 3.2] is a pair of functions on places and transitionsthat are compatible in a suitable sense; this is exactly a morphism of structures forthe above signature. Example 11.3 (Other kinds of Petri nets) . In a pre-net, the sets T , ( x, y ; z ) and T , ( y, x ; z ) are unrelated; but in a symmetric monoidal category the hom-sets hom( x ⊗ y, z ) and hom( y ⊗ x, z ) are isomorphic. A Petri net is a refinement ofa pre-net that incorporates some kind of “symmetry” like this (though historicallythey are the earlier notion). There are many different inequivalent notions of “Petrinet”, not all of which are amenable to formalization in our framework. But fromour present perspective, one natural approach to add symmetry to Example 11.2is to replace the indexing set N by the 1-type FinSet , noting that N is both the0-truncation of FinSet and the type of ordered finite sets.That is, whereas in Example 11.2 the type of rank-1 sorts is N × N , we nowtake the type of rank-1 sorts to be FinSet × FinSet . Thus, as in Example 7.6, weconsider here a diagram signature in which the types L ( n ) are not all sets, which 1. GRAPHS AND PETRI NETS 97 we can attempt to draw as follows: E [0] , [0] E [0] , [1] E [1] , [0] E [1] , [1] E [2] , [0] . . . E [ m ] , [ n ] . . .T [0] , [0] T [0] , [1] T [1] , [0] T [1] , [1] T [2] , [0] . . . T [ m ] , [ n ] . . .S S × n × m S m × S n In a univalent structure for this signature, the equality sorts E [ m ] , [ n ] are pointwisepropositions, and the sorts of edges T [ m ] , [ n ] are pointwise sets with equality givenby E [ m ] , [ n ] . The indiscernibilities behave just as in Example 11.2.The structures for this signature are closely related to the whole-grain Petrinets of Kock [ Koc20 , Section 2.1], which are diagrams of sets S ← I → T ← O → S in which the functions I → T and O → T have finite fibers. Thus these functionsare jointly classified by a map T → FinSet × FinSet , which we can replace by a typefamily T : FinSet × FinSet → U . If we also encode the remaining functions I → S and O → S by a further dependency of T on some power of S , we obtain exactly astructure for the above signature.The structures arising from whole-grain Petri nets in this way can be charac-terized as those for which each T [ m ] , [ n ] is a set with equality E [ m ] , [ n ] (that is, thestructure is univalent at E [ m ] , [ n ] and T [ m ] , [ n ] ), and in addition S is a set and also T ≡ X ( X,Y : FinSet ) X ( s : X + Y → S ) T X,Y ( s ) is a set. This latter requirement says equivalently that the action of S m × S n on T [ m ] , [ n ] is free; if we drop it, we obtain a notion studied by [ BGMS21 ] underthe name of “ Σ -nets” (called a “digraphical species” in [ Koc20 ]). Thus, if we addheterogeneous equality and its axioms to this signature, its univalent models areprecisely the Σ -nets.HAPTER 12 Enhanced categories and higher categories The phrase “enhanced (higher) category” was introduced, though not reallydefined, by [ LS12 ]. Here we use it to mean a categorical structure that containsa “underlying” ordinary category or higher category, but in which the additionalstructure on that underlying category is not purely categorical, i.e., not expressedpurely in terms of functors and natural transformations. This frequently has theeffect that, in contrast to the categorical structures studied in Chapters 8 and 9,the notion of indiscernibility often does not coincide with that in the underlyingcategory. Yet, in most cases this different notion of indiscernibility turns out tohave already been recognized in the literature as the “correct” notion of “sameness”.In this chapter we describe some enhanced categorical structures where theextra structure can be expressed in terms of functors, but with additional strictconditions on equality of objects. In Chapter 13 we will consider enhanced struc-tures involving truly non-functorial or unnatural operations. Example 12.1 ( † -categories and -anafunctors) . A † -category is a category withcoherent isomorphisms ( _ ) † : hom( x, y ) → hom( y, x ) . Historically this has beenproposed as an especially interesting example to consider in structural approachesto category theory, since the correct notion of “sameness” for objects of a † -categoryis not ordinary isomorphism but rather unitary isomorphism (one satisfying f − = f † ), and similarly “ † -structure” on a category does not transport naturally acrossequivalence of categories.In our framework we can deal with this by incorporating the † -structure intothe signature, represented of course by its graph. A signature for † -categories is asfollows, D T I EAO oi d c with co ≡ di and do ≡ ci and the exo-equalities of Figure 1. In addition to theaxioms of a category, we require E to be a congruence for D , and we require D tobe a functional relation that maps compositions to compositions and identities toidentities. We also write g = f † for D ( f, g ) .Given a model of this theory, univalence at D means that D is pointwise aproposition. Since E is a congruence for D , univalence at A still entails that A isa set with equality given by E . Given a, b : O , an indiscernibility a ≍ b consists ofan isomorphism φ : a ∼ = b such that (unfolding the definition of indiscernibility at D ), for any morphism f , we have φ ◦ f † = ( f ◦ φ − ) † , ( φ ◦ f ) † = f † ◦ φ − , and an equation about composition on both the left and the right. In particular, we have D a,a (1 a , a ) ↔ D a,b ( φ, φ − ) , where the lefthand side holds by one of the axiomsimposed. We thus have φ † = φ − , and the other equations follow from this and thecompabitibility of ( _ ) † with composition. An isomorphism φ such that φ † = φ − is called unitary ; thus an indiscernibility a ≍ b is exactly a unitary isomorphism a ∼ = b .Consequently, an equivalence of † -categories is a † -functor that is fully faith-ful and unitarily-essentially split-surjective. This in turn corresponds exactly toan adjoint equivalence of † -categories, involving † -functors, such that the unit andcounit are unitary natural isomorphisms; the usual construction (see, e.g., [ AKS15 ,Lemma 6.6]) applies, using additionally that the constructions back and forth pre-serve unitarity of the input.The signature of a † -anafunctor is analogous to that of an anafunctor betweencategories given in Example 8.4. In addition to the axioms given there, we re-quire that the isomorphisms ( _ ) † are preserved by the anafunctor, in the sensethat for w : F O ( a , b ) and w : F O ( a , b ) and f : DA ( a , a ) , we have that F A w ,w ( f ) † = F A w ,w ( f † ) . This implies that F preserves unitary isomorphisms.Since x is a unitary isomorphism, it follows that the canonical isomorphisms F w,w ′ (1 x ) relating different values of F are unitary. Therefore, the existential sat-uration condition must be restricted to unitary isomorphisms: given w : F O ( x, y ) and a unitary g : y ∼ = y ′ , there exists a w ′ : F O ( x, y ′ ) such that F w,w ′ (1 x ) = g .The rest of the theory is exactly parallel to Example 8.4 but with all isomor-phisms being unitary. In particular, an indiscernibility y ≍ y between objects inthe codomain † -category C is exactly a unitary isomorphism y ∼ = y , and similarlyfor the domain D . Furthermore, a morphism of structures is a square of † -functorsthat commutes up to a unitary natural isomorphism. Example 12.2 ( M -categories, e.g., homotopical categories) . An M -category (called“subset-category” in [ Pow02 ]) is a category enriched over the category whose ob-jects are subset-inclusions and whose morphisms are commutative squares. In de-tail, it consists of a type of objects and, for any two objects, two sets of morphisms,which we call (following [ LS12 ]) tight and loose , and an inclusion of tight intoloose morphisms. One class of examples of M -categories are homotopical cate-gories , in which the tight morphisms are called “weak equivalences”; another classof examples is provided by the hereditary membership structures that model a ZF-like membership-based set theory (which can be constructed in UF as in [ Uni13 ,§10.5]), in which the loose morphisms are functions and the tight morphisms areactual subset inclusions (not just injections). M -categories can alternatively be expressed via a unary predicate “being tight”on one family of (loose) morphisms, such that the predicate is closed under identityand composition. We first consider a signature for this alternative formulation, M T I EAO 2. ENHANCED CATEGORIES AND HIGHER CATEGORIES 101 with axioms asserting that E is a congruence for M and the other top-level sorts,and that M is closed under identity and composition. Univalence at M then meansthat M is pointwise a proposition. Univalence at A still means that A is a set withequality given by E , since E is required to be a congruence for M . Given a, b : O , anindiscernibility a ≍ b consists of an isomorphism φ : a ∼ = b in the underlying categorythat is coherent with respect to M , i.e., such that M a,y ( f ) ↔ M b,y ( φ • y ( f )) for any y : O and f : A ( a, y ) and similar for holes on the right and in both variables. Thesecoherence conditions simplify to the condition of φ being tight: on the one hand,setting y : ≡ a and f : ≡ a yields the coherence condition M a,a (1 a ) ↔ M a,b ( φ ) , andsince M contains identities, this means in particular that φ is required to be tight.On the other hand, if φ is tight, the remaining coherence conditions then followfrom M being closed under composition. In summary, in a univalent M -category,an indiscernibility a ≍ b is exactly a tight isomorphism.A morphism of M -categories is an M -functor, i.e., a functor that preservestightness. An equivalence of M -categories is an M -functor that is fully faithful,reflects tightness, and is split essentially surjective with respect to tight isomorphism(i.e., every object of the codomain is tightly isomorphic to the image of some objectin the domain).An alternative theory, closer to the first description, has the following signature, T T I T E T F A T L I L E L A T A L O where A T represents the tight morphisms, and A L the loose morphisms. This isessentially the signature of a functor (see Example 8.4) whose map on objects is theidentity. Here, ( F A ) x,y ( f, g ) means that the tight morphism f : A T ( x, y ) is mappedto the loose morphism g : A L ( x, y ) by F A . We also write this as F A ( f ) = g . Weimpose axioms stating that F A is a function from A T to A L , preserves identitiesand compositions, and is injective (so that the functor is faithful).Univalence at the top-level sorts, as usual, means exactly that these sorts arepointwise propositions. Univalence at A T and A L means that these sorts are setswith equality given by E T and E L , respectively.Given a, b : O , an indiscernibility consists of an isomorphism φ T in the tightfragment and an isomorphism φ L in the loose fragment that are coherent withrespect to F A . This means for instance that ( F A ) y,a ( f, g ) ↔ ( F A ) y,b ( φ T ◦ f, φ L ◦ g ) ,and similar for the other variable, and for both variables simultaneously. Since F A preserves identities, the previous condition in particular entails F A ( φ T ) = φ L (obtained for y : ≡ a and f, g : ≡ a ), that is, φ L is determined by φ T . All thecoherences can then be deduced from this equation and the fact that F A preservescompositions.In summary, we again obtain that an indiscernibility a ≍ b is exactly a tightisomorphism a ∼ = b .A morphism of such structures consists of a “functor” with an action on bothtight and loose morphisms that preserves the inclusion of tight into loose morphisms. 02 12. ENHANCED CATEGORIES AND HIGHER CATEGORIES Such a functor is an equivalence when it is tight-essentially split-surjective and fullyfaithful on both tight and loose morphisms.Given a model of the first theory, we obtain a model of the second theory bydefining A T to consist of those arrows that satisfy M . Using the univalence axiom,this construction can be shown to be an equivalence between the respective typesof models of these theories. The first theory is of course simpler, but the secondhas the advantage that it can be generalized by removing the injectivity axiom on F ; see for instance the example of Freyd-categories discussed after Example 13.4. Example 12.3 ( F -bicategories) . An F -category is a 2-categorical version of an M -category: it can be defined as a 2-category equipped with a subclass of its 1-morphisms called “tight”, or as a 2-functor that is the identity on objects, injectiveon 1-cells, and locally fully faithful. F -categories were introduced in [ LS12 ] torepresent 2-categories of algebras for a 2-monad, where the tight morphisms arestrict or pseudo algebra morphisms and the loose morphisms are lax or colax ones.The analogous weak notion of F -bicategory can be defined as a bicategoryequipped with a subclass of its 1-morphisms called “tight” that is invariant underisomorphism, or as a pseudofunctor that is the identity on objects and locally fullyfaithful. The pseudoalgebras for a pseudomonad together with their pseudo and laxmorphisms form an F -bicategory, and likewise for the pseudo and colax morphisms.Another example of an F -bicategory is a proarrow equipment [ Woo82 ].If we represent an F -bicategory analogously to the second variant of Exam-ple 12.2, we obtain the following signature: F T F F I T ,T C ,T I ,T F T ,L C ,L I ,L C ,T C ,L C where for readability we omit top-level sorts A , H , E , L , R , T , and I as inExample 9.1 on both the tight (subscript T ) and the loose (subscript L ) fragmentof the signature. We furthermore impose axioms asserting that F ⇒ F is a familyof pointwise (i.e., for any two x, y : C ) saturated anafunctors (cf. Example 8.4),and that these anafunctors are fully faithful. On F T and F I we impose the axiomsof a family of natural transformations.As usual, univalence at F T , F C , and F I means that these sorts are pointwisepropositions. Univalence at F means that F is pointwise a set. As per thediscussion of Example 8.4 and Example 8.6, the indiscernibilities at C (in T and L ) are exactly the isomorphisms; they are not changed by the presence of thefunctors F ⇒ F and natural transformations F T and F I .An indiscernibility a ≍ b in C consists of (1) a tight adjoint equivalence φ T : a ≃ T b , i.e., an adjoint equivalence in the tight fragment of the signature; (2) aloose adjoint equivalence φ L : a ≃ L b in the loose fragment of the signature; 2. ENHANCED CATEGORIES AND HIGHER CATEGORIES 103 and (3) transport functions for the sorts F corresponding to the family of func-tors. For instance, we have equivalences ( F ) x,a ( f, g ) ≃ ( F ) x,b ( φ x • ( f ) , φ x • ( g )) .Since ( F ) a,a (1 a , a ) , an indiscernibility in particular yields w : ( F C ) a,b ( φ T , φ L ) ,meaning that, by saturation of F in the fiber over a, b , the equivalence φ L is de-termined by φ T . The other transport functions for F are determined in turn by w : ( F C ) a,b ( φ T , φ L ) , since F is suitably compatible with 1-composition. Similarly,transport at F is determined by compatibility of F with action in source and tar-get. Summarily, an indiscernibility in C is exactly an adjoint equivalence internalto the bicategory spanned by the tight fragment (index T ) of the signature.We can also write down an analogue of the first variant of Example 12.2: on topof the ordinary signature for bicategories we add one more sort T dependent on asingle 1-cell, where the intended interpretation of T x,y ( f ) is “ f is tight”. Since thereare no sorts dependent on this T , it is a family of propositions (even though it is notat top rank). We assert as an axiom that in addition to T containing identities andbeing preserved by composition, it is also invariant under isomorphism: if T x,y ( f ) and f ∼ = g then T x,y ( g ) — this is an analogue of the saturation of the identity-on-objects anafunctor under the other approach. (Note that in contrast to thesignature for “a category with a specified object”, it does make sense for T to be amere predicate even though it is not at top rank, because “being tight” really is justan isomorphism-invariant property, whereas “being the specified object” is structure that can be transported along an isomorphism, but only in a specified way.) Thisaxiom, analogous to asserting that equality relations are congruences for top-levelpredicates, ensures that the notion of indiscernibility for 1-cells remains unchanged.And since identities are tight, indiscernibilities of objects once again reduce to tightadjoint equivalences.By combining this example with Example 10.2, we can also obtain a signaturefor strict F -categories in the original sense of [ LS12 ]. Example 12.4 (Bicategories with contravariance [ Shu18 ]) . A bicategory withcontravariance has a set of objects together with, for any two objects x and y , two hom-categories A + ( x, y ) and A − ( x, y ) , with four composition operationsthat multiply signs. The primordial example is Cat , where the two hom-categoriesconsist of covariant functors and contravariant functors. We can represent this withan adaptation of the signature of Example 9.1, whose height-3 truncation is I C +2 T ++1 T + − T − +1 T −− C − C +1 C − C and whose rank-3 sorts implement equality, all sorts of composition of 2-cells, andthe associativity and unit isomorphisms.Univalence at ranks > means that both hom-categories are univalent in theusual sense. An indiscernibility at C is a covariant adjoint equivalence. Thus,univalence at C means that the underlying bicategory of covariant morphisms isunivalent. 04 12. ENHANCED CATEGORIES AND HIGHER CATEGORIES By adding heterogeneous equality as in Example 10.2, we can also representstrict 2-categories with contravariance.HAPTER 13 Unnatural transformations and nonfunctorialoperations Recall that in Examples 8.4, 8.6 and 8.7 we found that indiscernibilities be-tween objects of a structured category reduced to ordinary indiscernibilities in theunderlying category. However, this conclusion depended crucially on the structurebeing composed of functors and natural transformations, and it can fail in the pres-ence of non-functorial operations on objects or unnatural transformations. Suchstructures may seem strange, but they do occur from time to time (as the examplesbelow will show), and are also interesting for exploring the limits of our framework.In general, an indiscernibility in such a structure turns out to be an isomor-phism on which the non-functorial operations or unnatural transformations are functorial or natural, respectively. For structures appearing in the literature, thisoften reduces to a familiar notion in the relevant theory. Example 13.1 (Unnatural transformations) . By an unnatural transformation be-tween two functors F, G we mean an assignment of a morphism λ x : F x → Gx toeach object x of the domain, with no further conditions. To model this in ourframework we can use the same signature from Example 8.6 for a natural transfor-mation, with the naturality axiom omitted. However, rather than simply deletingthis axiom, it seems most sensible to replace it by naturality on identity morphisms :for any w i : F O ( x, y i ) and w ′ j : GO ( x, z j ) for i, j ∈ { , } , the following square com-mutes: y y z z F w ,w (1 x ) λ w ,w ′ λ w ,w ′ G w ′ ,w ′ (1 x ) The analogous condition for non-ana functors is of course trivial; for anafunctorsthis condition says that λ x is independent of which values we choose for F x and Gx . In Example 8.6 we used naturality in four places: to show that indiscernibilitiesin F O , GO , O C , and O D reduce to ordinary ones for anafunctors and categoriesrespectively. Naturality on identity morphisms suffices for the first three of these,but not the fourth. In the latter case, the extra condition Λ x,y,z ( w , w , λ ) → Λ x ′ ,y,z ( φ ∗ ( w ) , φ ∗ ( w ) , λ ) says precisely that the putative naturality square for φ : Thus “unnatural” means “not necessarily natural”, just as a “noncommutative ring” meansone that is not necessarily commutative. x ∼ = x ′ does commute: y yz z F w ,φ ∗ ( w (1 x ) λ w ,w λ φ ∗ ( w ,φ ∗ ( w G w ,φ ∗ ( w (1 x ) In other words, an indiscernibility x ≍ x ′ in the domain category of an unnaturaltransformation λ is an isomorphism on which λ is natural. In particular, thedomain category is univalent in the ordinary sense if and only if λ is natural on allisomorphisms.Thus, new behavior in the indiscernibilities can only arise from unnatural trans-formations when the domain category is not univalent. As we have said, mostnaturally-occurring categories in univalent foundations are univalent, but there areexceptions.The most blatant example is that from any category D , perhaps univalent, andany function F : C → D , we can construct a new category D F with ( D F ) = C and D F ( x, y ) = D ( F ( x ) , F ( y )) . The isomorphisms in D F will be just those of D ,but the identifications will be those of C , which could be quite different from thoseof D ; so D F will often fail to be univalent. As a particular case of this example, C could be the type of objects of D equipped with some structure. For instance, if D is a symmetric monoidal category,then C could be the type of monoid objects in D ; then D F is weakly equivalentto the full subcategory of D consisting of those objects that can be equipped witha monoid structure, but it is not in general univalent: its isomorphisms are mereisomorphisms in D , but its identifications are monoid isomorphisms. The abstractstructure of this D F is the following. Example 13.2 (Supply in monoidal categories) . A symmetric monoidal categoryis said to supply monoids [ FS19b ] if every object is equipped with a specifiedmonoid structure, such that the specified monoid structure of x ⊗ y is that inducedfrom those of x and y . Note that these monoid structures consist of unnaturaltransformations U → x and x ⊗ x → x . Thus, we can obtain a signature fora symmetric monoidal category that supplies monoids by augmenting the signa-ture of symmetric monoidal categories (Example 8.7) with two predicates for theseunnatural transformations: N MU O A ⊗ O As in Example 13.1, the indiscernibilities of objects will be the isomorphisms onwhich these transformations are natural: i.e., the monoid isomorphisms. Thus,the example D F constructed above, though not univalent as a mere category, isunivalent as a symmetric monoidal category that supplies monoids. In fact, this construction is universal, in the sense that every not-necessarily-univalent cat-egory C can be obtained as D F for some univalent category D and function F : C → D : just let D be the univalent completion of C . However, in practice it is much more common to start witha naturally-occurring univalent D and apply this construction to obtain a non-univalent D F . 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 107 More generally, there is a notion of when a symmetric monoidal category sup-plies P , for any prop P : namely, every object is equipped with a P -structure,compatibly with the tensor product. (For example, when P is the prop for specialcommutative Frobenius algebras, an SMC that supplies P is called a hypergraphcategory [ FS19a ].) Once P is fixed, we can write a signature for SMCs that sup-ply P , in which the indiscernibilities of objects will be the supply isomorphisms ,i.e., the isomorphisms that commute with the P -structures. In particular, given anySMC D , if we let C be the type of P -algebras in D and f : C → D the forgetfulmap, then D F will be univalent as an SMC that supplies P .Note that examples of the enhanced categorical structures considered in Chap-ter 12 are also often obtained by this method. For instance, the standard † -categoryof Hilbert spaces is D F , where D is the univalent category of vector spaces, C isthe type of Hilbert spaces, and F : C → D is the forgetful function.Another common example of a non-univalent category is a Kleisli category. Inset-based category theory the Kleisli category C T of a monad T on a category C can be defined as either:(1) The category whose objects are those of C and with C T ( x, y ) : ≡ C ( x, T y ) .(2) The full subcategory of the Eilenberg–Moore category C T on the objectsof the form T x for some x ∈ C .In Univalent Foundations, the former yields a precategory that is not univalent,while the latter yields a univalent category (at least if C is univalent) that is theunivalent completion of the former. Indeed, the former definition is an instance ofthe construction D F described above, where F : C → C T is the free algebra functor.This non-univalent Kleisli category (but not the univalent one!) can be equippedwith several kinds of unnatural or nonfunctorial structure, motivated by the theoryof programming languages in which the monad T represents “impure effects” thatcan be added to a pure functional programming language. Example 13.3 (Thunk-force categories) . A thunk-force category or abstract Kleislicategory [ Füh99 ] is a category D equipped with • A functor L : D → D , • A natural transformation ε : L → D , and • An unnatural transformation ϑ : 1 D → L ,such that ( L, ϑL, ε ) is a comonad (so that in particular ϑL : L → LL is a nat-ural transformation) and each ϑ x : x → Lx equips x with the structure of an L -coalgebra. If D is the non-univalent Kleisli category C T for a monad T , withcorresponding adjunction F : C ⇄ D : U such that F is the identity on objects, wecan give it this structure where ( L, ϑL, ε ) = ( F U, F ηU, ε ) is the comonad inducedby the adjunction and ϑ x : C T ( x, F U x ) = C ( x, T T x ) is the composite η T x ◦ η x . As long as “for some” is interpreted with a propositional truncation. Otherwise, it yieldsthe same non-univalent result as the former definition. 08 13. UNNATURAL AND NONFUNCTORIAL OPERATIONS A signature for thunk-force categories is T I E L A H NA L O O where N and H represent ε and ϑ respectively. The axioms are straightforwardto formulate, and as in Example 13.1 we find that the indiscernibilities in O arethe isomorphisms on which ϑ is natural. In general, morphisms (not necessarilyisomorphisms) on which ϑ is natural (that is, morphisms that are L -coalgebramaps) are called thunkable . As shown in [ Füh99 ] they form a (non-full, but wide)subcategory that can be equipped with a monad whose Kleisli category is the giventhunk-force category. (Indeed, they are the full subcategory of the Eilenberg-Moorecategory of the comonad ( L, ϑL, ε ) on the objects ( x, ϑ x ) .) In this sense a thunk-force category is precisely “what is left of a Kleisli category when we forget theunderlying category”.In a non-univalent Kleisli category C T , the functor F : C → C T lands inside thethunkable morphisms. Thus, if C is a univalent category, then C T is univalent as athunk-force category just when every thunkable isomorphism in C T is the F -imageof a unique isomorphism in C . This is the case for any monad such that x T x T T x η T ηηT is an equalizer diagram, which happens frequently but not always. For instance,the trivial monad on Set defined by T x = 1 admits a thunkable isomorphism ∼ = 1 in Set T , but there is no isomorphism ∼ = 1 in Set .The opposite of a thunk-force structure is called a runnable monad (thus athunk-force structure could also be called a “corunnable comonad”), and the dualsof thunkable morphisms are called linear .Thunk-force categories are used to model call-by-value programming languages,while runnable monads are used for call-by-name languages. Since real-world pro-gramming languages allow functions to take more than one argument, these struc-tures generally need to be enhanced with some kind of product; but in the presenceof computational effects this is something weaker than a monoidal structure. Example 13.4 (Premonoidal categories) . A premonoidal category [ PR97, Pow02 ]is like a monoidal category, but the tensor product operation is only required tobe functorial in each variable separately, rather than jointly. That is, for objects x, y we have a tensor product object x ⊗ y , and for any f : x → x ′ we have f ⊗ y : x ⊗ y → x ′ ⊗ y and for g : y → y ′ we have x ⊗ g : x ⊗ y → x ⊗ y ′ , but thereis no “ f ⊗ g : x ⊗ y → x ′ ⊗ y ′ ”, and the square x ⊗ y x ⊗ y ′ x ′ ⊗ y x ′ ⊗ y ′ x ⊗ gf ⊗ y f ⊗ y ′ x ′ ⊗ g 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 109 need not commute. If for some f this square does commute for all g , and a dualcondition holds with f on the right, we say that f is central . The associativityand unit isomorphisms in a premonoidal category are additionally asserted to becentral; note that naturality of the associator has to be formulated as three differentaxioms relative to morphisms in the three possible places.If T is a bistrong monad on a monoidal category C , then its Kleisli category C T is premonoidal: its tensor product is that of C , while for f ⊗ y is the composite x ⊗ y f ⊗ y −−−→ T x ′ ⊗ y → T ( x ′ ⊗ y ) with the strength, and dually for x ⊗ g .We can obtain a signature for premonoidal categories by splitting the sort ⊗ A of a monoidal category in two, for the two functors x ⊗ − and − ⊗ y : T I E ⊗ A,L ⊗ A,R ⊗ U A ⊗ l ⊗ r A ⊗ O U O O That is, for w : ⊗ O ( x, y, z ) and w ′ : ⊗ O ( x ′ , y, z ′ ) with f : A ( x, x ′ ) and h : A ( z, z ′ ) ,the relation ⊗ A,L ( w, w ′ , f, h ) says that f ⊗ y = h relative to w and w ′ , and similarlyfor ⊗ A,R . We assert the usual axioms of a premonoidal category, including uniqueexistence of an h as in the previous sentence, which we denote f ⊗ Lw,w ′ y ; similarlywe have x ⊗ Rw,w ′ g for g : A ( y, y ′ ) . We define a morphism f : A ( x , x ) to be central if for any g : A ( y , y ) and any w ij : ⊗ O ( x i , y j , z ij ) (for i, j ∈ { , } ) the followingsquare commutes: z z z z , x ⊗ Rw ,w gf ⊗ Lw ,w y f ⊗ Lw ,w y x ⊗ Rw ,w g as well as a dual property on the other side. However, the naturality of the iso-morphisms between any two values of an anafunctor means that it suffices if thisholds for some w ij . Recall also that the axioms of a premonoidal category includecentrality of the associator and unit isomorphisms.We also assert that for any w : ⊗ O ( x, y, z ) and w ′ : ⊗ O ( x, y, z ′ ) , we have x ⊗ Lw,w ′ y = x ⊗ Rw,w ′ y . In other words, if we have two values of x ⊗ y , thecanonical isomorphisms between them obtained from the two anafunctors x ⊗ − and − ⊗ y coincide, giving a morphism that we denote x ⊗ w,w ′ y . This is an“anafunctorial” version of the standard condition that the two functors are “equalon objects”. In particular, it is necessary to prove that identity morphisms arecentral : for any x : O and g : A ( y , y ) with w j : ⊗ O ( x, y j , z j ) the following squaresare equal: z z z z x ⊗ Rw ,w g x ⊗ Lw ,w y x ⊗ Lw ,w y x ⊗ Rw ,w g z z z z x ⊗ Rw ,w gx ⊗ Rw ,w y x ⊗ Rw ,w y x ⊗ Rw ,w g 10 13. UNNATURAL AND NONFUNCTORIAL OPERATIONS and the right-hand square commutes by functoriality of ⊗ R .We can also show that if g : A ( y , y ) is central, then so is any x ⊗ Rw ,w g . Forif we have h : A ( u , u ) with appropriate witnesses of the tensor product, we canform the following diagram: ( x ⊗ y ) ⊗ R h ( x ⊗ R g ) ⊗ L u ( x ⊗ R g ) ⊗ L u x ⊗ R ( y ⊗ R h ) x ⊗ R ( g ⊗ L u ) x ⊗ R ( g ⊗ L u ) x ⊗ R ( y ⊗ R h )( x ⊗ y ) ⊗ R h Here the inner square commutes by centrality of g and functoriality of x ⊗ R − ,while the diagonal arrows are components of the associativity isomorphism and thetrapezoids commute by naturality. Therefore, the outer square commutes. Togetherwith a similar argument on the other side, this implies that x ⊗ Rw ,w g is centralwhen g is. Similarly, f ⊗ L y is central as soon as f is.In particular, it follows that the isomorphism x ⊗ w,w ′ y between any twovalues of x ⊗ y is central. Therefore, the existential saturation condition must besimilarly restricted: it asserts that given w : ⊗ O ( x, y, z ) and a central h : z ∼ = z ′ ,there exists a w ′ : ⊗ O ( x, y, z ′ ) such that x ⊗ w,w ′ y = h .As usual, E is required to be a congruence for all rank-2 relations, so thatunivalence at A means it is a set with E as equality, and univalence at U O meansit is a saturated ana-object. Now consider w , w : ⊗ O ( x, y, z ) ; the indiscernibilitytype w ≍ w is the proposition that w and w act the same on all arrows on bothsides (the dependency of the natural transformations is automatically transportableby naturality, as in Example 8.6). In other words, it says that g ⊗ Lw ,w ′ y = g ⊗ Lw ,w ′ y for any w ′ : ⊗ O ( x ′ , y, z ′ ) and g : A ( x, x ′ ) , and similarly on the other side. As forordinary anafunctors, by functoriality this is equivalent to its special case x ⊗ w ,w y = 1 z . Thus, univalence at ⊗ O means that if x ⊗ w ,w y = 1 z then w = w ,hence that the w ′ asserted to exist in the existential saturation axiom is unique.Finally, an indiscernibility x ≍ x in O consists of an isomorphism φ : x ∼ = x together with equivalences such as φ • y : ⊗ O ( x , y, z ) ≃ ⊗ O ( x , y, z ) and so on forthe other holes, which respect all the rank-2 relations. Respect for ⊗ A,L implies inparticular that for w : ⊗ O ( x , y, z ) we have φ ⊗ Lw,φ • y ( w ) y = 1 x ⊗ Lφ • y ( w ) ,φ • y ( w ) y =1 z . Now respect for ⊗ A,R implies that for any w : ⊗ O ( x , y , z ) and w : ⊗ O ( x , y , z ) with g : A ( y , y ) we have ⊗ A,R ( w , w , g, h ) ↔ ⊗ A,R ( φ • y ( w ) , φ • y ( w ) , g, h ) ,or equivalently x ⊗ Lw ,w g = x ⊗ Rφ • y ( w ) ,φ • y ( w ) g . But since φ ⊗ Lw ,φ • y ( w ) y = 1 z and φ ⊗ Lw ,φ • y ( w ) y = 1 z , this implies that the following square commutes, since 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 111 its vertical arrows are identities and its horizontal arrows are equal: . φ ⊗ Lw ,φ • y w y x ⊗ Lw ,w g φ ⊗ Lw ,φ • y w y x ⊗ Rφ • y w ,φ • y w g Together with a similar argument on the other side, this implies that φ : x ∼ = x is necessarily central.From here the usual sort of arguments imply that the rest of the structureof an indiscernibility (such as the equivalences φ • y used above) is uniquely deter-mined by saturation applied to φ . This is perhaps least obvious in the case ofthe equivalences φ •• : ⊗ O ( x , x , z ) ≃ ⊗ O ( x , x , z ) , since ⊗ is not jointly functo-rial in its arguments. But once we have shown that φ x • and φ • x are uniquelydetermined, respect for ⊗ A,R tells us that for any w : ⊗ O ( x , x , z ) we have ⊗ A,R ( w, φ x • ( w ) , φ, h ) ↔ ⊗ A,R ( φ •• ( w ) , φ • x ( φ x • ( w )) , x , h ) , which uniquely de-termines φ •• ( w ) by saturation.Thus x ≍ x is equivalent to the type of central isomorphisms x ∼ = x , andso in a univalent premonoidal category x = x is also equivalent to this type.In particular, since as we noted above the values of the tensor product are alsodetermined uniquely up to unique central isomorphism, the type of such values iscontractible, so we obtain an actual function ⊗ : O → O → O as we would hope.Similarly to the situation for thunk-force categories, a Kleisli category C T isunivalent as a premonoidal category just when every central isomorphism in C T is the image of a unique isomorphism in C . This fails, for instance, when T isa commutative monad, in which case every morphism is central but not everyisomorphism of free algebras is in the image of the free functor (e.g., the nontrivialautomorphism of the free abelian group on one generator).The situation for morphisms of premonoidal categories is rather subtle, evenclassically. In [ PR97 ], a premonoidal functor is defined to be a functor that pre-serves centrality of morphisms and preserves the tensor product and unit object upto coherent central natural isomorphisms. However, there are also examples thatone might like to call “premonoidal functors” but that do not preserve centrality ofmorphisms or even isomorphisms. For instance, any morphism of bistrong monads T → T on a monoidal category C induces a functor C T → C T that preservesthe tensor product strictly , but need not preserve centrality of isomorphisms; acounterexample can be found in [ SL13 , Section 5.2]. On the other hand, simplyremoving the preservation of centrality from the definition of premonoidal functoryields a notion that is not closed under composition. (We thank Paul Blain Levyfor pointing out these subtleties.)Our morphisms of structures are, of course, always closed under composition.Between univalent models of our theory of premonoidal categories, the structuremorphisms are precisely the premonoidal functors of [ PR97 ]. But to understandthe morphisms between non-univalent models, we have to pay more careful attentionto how the operation ⊗ : O → O → O is made into the “ana-function” ⊗ O .The most obvious choice is to define a witness w : ⊗ O ( x, y, z ) to be a central isomorphism x ⊗ y ∼ = z . This ensures that the existential saturation condition holds,and if the underlying L cat+E -structure is a T cat -precategory, the resulting structure 12 13. UNNATURAL AND NONFUNCTORIAL OPERATIONS is univalent at all sorts of rank > ; but it will not generally be univalent at O .The morphisms between structures of this kind are the functors of precategoriesthat are premonoidal in the sense of [ PR97 ]. Thus, this approach includes thenon-univalent Kleisli categories C T , but does not include all functors of the kindmentioned above.On the other hand, we could define a witness w : ⊗ O ( x, y, z ) to be an identi-fication x ⊗ y = z . If the underlying precategory is a strict category, then theseare “strict premonoidal functors”, but in general they need not be very strict; e.g.,if C is univalent, then the identifications of objects in C T are the isomorphisms in C . Now there can be morphisms between non-univalent models of this kind thatdo not preserve centrality; e.g., every functor C T → C T induced by a morphism ofbistrong monads does induce a morphism between models of this kind. However,these structures do not in general satisfy the existential saturation axiom.Note that this is a “real-world” example of the situation observed in Exam-ple 5.11 that morphisms of structures need not preserve indiscernibility. In partic-ular, if there is a “univalent completion” operation for premonoidal categories (withexistential saturation omitted), then there will be morphisms between non-univalentstructures that do not extend to their univalent completions.Thus the Kleisli category of a bistrong monad is both a thunk-force category anda premonoidal category, and the two structures are not unrelated. For instance,every thunkable morphism is also central; in the cartesian case this is [ Füh99 ,Proposition 2.20], while the general case can be found at [ Lev20 ]. Thus, the Kleislicategory of a bistrong monad on a cartesian monoidal category is what is calleda precartesian abstract Kleisli category in [ Füh99 ]: a thunk-force category that isalso premonoidal in which every thunkable morphism is central and the monoidalstructure restricts to a cartesian monoidal structure on the thunkable morphisms.We leave it to the reader to write down a signature for such things and check thatits indiscernibilities of objects are the thunkable isomorphisms.Note that although every morphism in the original category yields a thunkable(hence central) morphism in the Kleisli category, this operation may not be faithful.If we remember the actual morphisms in the original category as extra data, weobtain a Freyd-category [ PT99 ]: a category V with finite products, a symmetricpremonoidal category C with the same objects as V , and an identity-on-objectsstrict symmetric premonoidal functor J : V → C that lands in the center of C . Wecan write down a signature for Freyd-categories by combining Example 12.2 (forthe identity-on-objects functor, with faithfulness omitted) with Example 13.4 (forthe premonoidal structure on C ), and an enhancement of Example 8.11 (for thefinite products on V ). Unsurprisingly, the indiscernibilities in a Freyd-category arejust isomorphisms in V .Levy [ Lev17 ] develops a notion similar to our indiscernibilities, there called“contextual isomorphism”, for the study of isomorphism of types in some simply-typed λ -calculi with effects. Given types A, B , a contextual isomorphism A ∼ = B consists, very roughly, of a family of bijections θ Γ ⊢ C : Q ((Γ ⊢ C )[ A ]) ∼ = Q ((Γ ⊢ C )[ B ]) of (equivalence classes of) well-formed λ -terms, respectively, for each judg-ment Γ ⊢ C with a type-hole, filled with A and B respectively. Levy analyzesa particular λ -calculus called “call-by-push-value” with two kinds of types, valuetypes and computation types, and consequently with two different kinds of judg-ments ⊢ v (value judgment) and ⊢ c (computation judgment), and with denotational 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 113 (categorical) semantics in something akin to a Freyd-category (cf. [ Lev17 , §5.1]).However, the contextual isomorphisms are defined, in [ Lev17 , §5.2], via quantifica-tion over the computation judgments only. Thus, the end result is more akin to ourExample 13.3, and indeed Levy finds that these “partial” contextual isomorphismsare precisely the thunkable isomorphisms [ Lev17 , §7.2]. Example 13.5 (Duploids) . A duploid [ MM13 ] is a structure that combines call-by-value structure (such as in a thunk-force category) and call-by-name structure(such as in its dual, a runnable monad) in one. It starts with a pre-duploid , which isalmost like a category equipped with a map to the chaotic category on two objects { + , −} , except that the associativity law ( h ◦ g ) ◦ f = h ◦ ( g ◦ f ) need only hold ifeither the codomain of f (i.e., the domain of g ) lies over − (“is negative”) or thecodomain of g (i.e., the domain of h ) lies over + (“is positive”). A signature forpre-duploids is as follows: I P T P P P T P P N T P NP T NP P T P NN T NP N T NNP T NNN I N A P P A P N A NP A NN O P O N plus equality congruences on all four sorts A •• that we have omitted to write, whichthus coincide with the indiscernibilities on those sorts.Since the positive objects form a category in their own right, an indiscernibility p ≍ p between p , p : O P consists in particular of an isomorphism φ : p ∼ = p in that category, together with equivalences φ • n : A P N ( p , n ) ≃ A P N ( p , n ) and φ n • : A NP ( n, p ) ≃ A NP ( n, p ) respecting composition of all sorts. The usualarguments imply that φ • n and φ n • are given by composition with φ or its in-verse, so it remains to consider respect for composition. This includes, for instance, T P NN ( g ◦ φ, h, k ◦ φ ) ↔ T P NN ( g, h, k ) , which is to say that h ◦ ( g ◦ φ ) = ( h ◦ g ) ◦ φ for all g : A P N ( p , n ) and h : A NN ( n , n ) ; and similarly for T P NP . That is, theassociativity law that isn’t generally asserted in a pre-duploid does hold when φ isthe first morphism. In the context of a pre-duploid, this is taken as the definitionof when a morphism is thunkable . The remaining conditions are automatic, so theindiscernibilities between positive objects are precisely the thunkable isomorphisms.Dually, the indiscernibilities between negative objects are precisely the linear iso-morphisms: those for which the missing associativities hold when they are the lastmorphism in the triple composite.A duploid is a pre-duploid together with “parity shift” functions ⇑ taking posi-tive objects to negative ones and ⇓ taking negative objects to positive ones, togetherwith unnatural families of linear isomorphisms force : ⇑ p ∼ = p , for positive p , andthunkable isomorphisms wrap : n ∼ = ⇓ n , for negative n . However, it turns out that ⇑ and ⇓ can in fact be made into functors, and force and wrap natural. Thus, thisadditional structure does not change the notions of indiscernibility or univalence. Example 13.6 (Factorization systems) . A factorization system on a category C consists of two classes of morphisms L and R satisfying certain axioms. For a weak factorization system, these axioms are that every morphism of C factors as an L -map followed by an R -map, that L and R are closed under retracts, and that any 14 13. UNNATURAL AND NONFUNCTORIAL OPERATIONS commutative square(13.1) x uy v, ℓ g rhs with ℓ ∈ L and r ∈ R , has a diagonal filler s as shown. For an orthogonal or unique factorization system, one requires that such diagonal fillers are unique, orequivalently that factorizations are unique up to unique isomorphism.One natural signature for a factorization system (of either sort) is a slightgeneralization of Example 12.2, with two predicates L and R instead of just theone M . L R T I EAO Building on Example 12.2 (and the fact that in a weak factorization system, both L and R contain all isomorphisms), an indiscernibility between two objects a and b of a category with a weak factorization system will then be simply an isomorphismbetween a and b . Similarly, a morphism between such structures is just a functorthat preserves L and R , and an equivalence of structures is an equivalence of theunderlying categories that preserves and reflects L and R .A weak factorization system is functorial if there is a specified functor C → C factoring each morphism as an L -map followed by an R -map. (Here C is the cat-egory whose objects are morphisms in C and whose morphisms are commutativesquares, and similarly C is the category whose objects are composable pairs of mor-phisms in C .) An orthogonal factorization system is automatically and essentially-uniquely functorial, but a weak factorization system may not be. We can writedown a signature for a functorial weak factorization system as follows: F A L R I T E F O AO Here for f : A ( x, y ) , the elements of ( F O ) x,y,z ( f, ℓ, r ) are witnesses that the func-torial factorization of f is ( ℓ, r ) , where ℓ : A ( x, z ) and r : A ( z, y ) . We assert asan axiom that E ( f, r ◦ ℓ ) , where the composition equations in the signature en-sure that this is well-typed. Similarly, for w : F O ( f, ℓ, r ) and w ′ : F O ( f ′ , ℓ ′ , r ′ ) , 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 115 F A ( w, w ′ , g, h, k ) asserts that, assuming E ( f ′ ◦ g, h ◦ f ) , the image of this com-mutative square under the functorial factorization is k . Functoriality is straight-forward to ensure with axioms; note we only assert that there is a k satisfy-ing F A ( w, w ′ , g, h, k ) under the assumption that E ( f ′ ◦ g, h ◦ f ) . Since this k isunique, we denote it by F w,w ′ ( f, f ′ , g, h ) . We also assert existential saturation: if w : ( F O ) x,y,z ( f, ℓ, r ) and k : z ∼ = z ′ , there exists w ′ : ( F O ) x,y,z ′ ( f, k ◦ ℓ, r ◦ k − ) suchthat F w,w ′ ( f, f, x , y ) = k .As usual, univalence at F A makes it a proposition, and univalence at F O makesit a set such that the w ′ in existential saturation is unique. We may worry aboutwhether univalence at A would disrupt its equality and even its h-level, since A now has two ranks dependent on it. However, the functoriality of F on identitysquares implies that E is also a “congruence” for F O in an appropriate sense: if E ( f, f ′ ) and we have w : ( F O ) x,y,z ( f, ℓ, r ) and w ′ : ( F O ) x,y,z ′ ( f ′ , ℓ ′ , r ′ ) , then wehave F w,w ′ ( f, f ′ , x , y ) : z ∼ = z ′ , and by saturation and functoriality there is auniquely determined w ′ : ( F O ) x,y,z ( f ′ , ℓ, r ) . Thus, univalence at A again simplyensures that it is a set with equality E , and similarly univalence at O makes theunderlying category univalent in the ordinary sense. A morphism of such structuresis a functor that preserves both L and R as well as the functorial factorizations, upto coherent isomorphism.Things get more interesting if we consider weak factorization systems with a specified but non-functorial factorization. (Most weak factorization systems arisingin practice are functorial, but some such as [ Isa01 ] are not; whereas recent workon constructive homotopy theory such as [ Hen20 ] has found at least specifiedfactorizations to be indispensable.) As we did for unnatural transformations, it isnatural to assert at least functoriality on identities , with a signature such as F A L R I T E F O AO in which F A ( w, w ′ , k ) , for w : ( F O ) x,y,z ( f, ℓ, r ) and w ′ : ( F O ) x,y,z ′ ( f ′ , ℓ ′ , r ′ ) , assertsthat assuming E ( f, f ′ ) then k : z ∼ = z ′ is the image of that equality under thefactorization. This suffices for the above analysis of saturation and univalence atall sorts except O . But at O , an indiscernibility a ≍ b will now be an isomorphism φ : a ∼ = b together with “all possible functorial actions of the factorization on φ ”.If we assumed that the factorization were functorial on all isomorphisms , then thiswould reduce to simply an ordinary isomorphism in the underlying category; butin general this need not be the case. Hence, in particular, univalence of a “categorywith weak factorization system” in this sense is different from univalence of itsunderlying category.As in the case of thunk-force and premonoidal categories, to see nontrivialexamples of this we need a construction that produces non-univalent categories. Anaturally-occurring example in this case is the category of pro-objects in a category 16 13. UNNATURAL AND NONFUNCTORIAL OPERATIONS C . As with Kleisli categories, this has two natural definitions, one of which isnaturally univalent and the other of which is not:(1) The objects of pro - C are functors X : I → C , where I is a small cofilteredcategory. Its hom-sets are pro - C ( X, Y ) = lim i,j C ( X i , Y j ) . (2) pro - C is the full subcategory of the presheaf category of [ C , Set ] op on theobjects that are cofiltered limits of representables.As before, the latter is always univalent, and if C is univalent then the latter isthe Rezk completion of the former. The former is not univalent; an identification X = Y therein is an isomorphism I ∼ = J making a triangle that commutes up toisomorphism. This is called a level isomorphism ; more generally a level map X → Y is an isomorphism I ∼ = J with a natural transformation inhabiting the triangle.For example, in [ Isa01 ] it is shown that when C is the category of simplicial sets, pro - C supports a Quillen model structure, which includes two weak factorizationsystems. The construction of the factorizations of f : X → Y proceeds by firstconstructing a level map f ′ : X ′ → Y ′ and non-level isomorphisms X ∼ = X ′ and Y ∼ = Y ′ such that the composite X ∼ = X ′ f ′ −→ Y ′ ∼ = Y is f , and then factoring f ′ levelwise. This can all be done in a specified way, but not (at least not obviously)in a way that respects non-level isomorphisms of pro-objects. Thus, this gives anexample of a structure for the above signature in which the underlying category isnot univalent. (We have not analyzed whether this structure is univalent at O , i.e.,whether the level isomorphisms coincide with the indiscernibilities.)We can also regard the lifts in a weak factorization as structure. If we alsorelegate the factorization back to a property (for simplicity), this yields the followingthe signature. L R S T I EAO Here S ( ℓ, g, h, r, s ) says that s is the chosen lift in the square (13.1). Now anindiscernibility between two objects a, b : O consists of an isomorphism φ : a ∼ = b with the additional requirements that S ( ℓ, y, x, r, s ) ↔ S ( ℓ ◦ φ, y, x ◦ φ, r, s ) S ( ℓ, y, x, r, s ) ↔ S ( φ − ◦ ℓ, y ◦ φ, x, r, s ◦ φ ) S ( ℓ, y, x, r, s ) ↔ S ( ℓ, y, φ ◦ x, r ◦ φ − , φ ◦ s ) S ( ℓ, y, x, r, s ) ↔ S ( ℓ, φ ◦ y, x, φ ◦ r, s ) whenever these compositions exist. In view of Footnote 2, it is unsurprising that the former can be obtained as D F , where D = [ C , Set ] op and F : ( P I ( I → C )) → D takes a functor X : I → C from a small cofilteredcategory, composes it with the Yoneda embedding, and then takes its limit. 3. UNNATURAL AND NONFUNCTORIAL OPERATIONS 117 These requirements hold for any isomorphism if S is compositional in the sensethat S ( ℓ , y, t, r, s ) × S ( ℓ , y ◦ ℓ , x, r, t ) → S ( ℓ ◦ ℓ , y, x, r, s ) and S ( ℓ, y, r ◦ s, r , t ) × S ( ℓ, t, x, r , s ) → S ( ℓ, t, x, r ◦ r , s ) . Orthogonal factorization systems are compositional (since lifts are unique), but fora weak factorization system it is rarely possible to choose a compositional liftingfunction. Instead, when regarding lifts as structure it is probably better to consider algebraic weak factorization systems (see, e.g., [ GT06, Gar09, Rie11 ]), in whichthe predicates L and R are made into structure as well. We leave it to the reader towrite down a signature for a category with an algebraic weak factorization system. art 3 Theory of functorial structures HAPTER 14 Functorial signatures In Part 3 we will give precise definitions and proofs of the general theoremswe claimed in Part 1. In addition, rather than working with diagram signatures,we will introduce a more general notion that we call a functorial signature . Butto motivate this notion, we start by further analyzing the notion of derivativeof a diagram signature. In particular, we aim to prove our claim in Section 4.4that an exo-functor L → U e is uniquely determined, up to isomorphism, by an M : L (0) → U e and an exo-functor L ′ M → U e . This requires investigating thefunctoriality of derivatives. Morphisms of diagram signatures will be exo-functors that preserve ranks strictlyand also “preserve the dependency structure”, in the following sense. Note that if F : L → M preserves ranks, then it induces a function F m ( K ) : Fanout m ( K ) → Fanout m ( F K ) for every K : L ( n ) and m < n . We sometimes write F instead of F m ( K ) when no confusion can arise. Definition 14.1. Let F : L → M be a rank-preserving exo-functor between inverseexo-categories. It is a discrete opfibration when all the functions F m ( K ) : Fanout m ( K ) → Fanout m ( F K ) are isomorphisms. Let hom DSig ( p ) ( L , M ) denote the exotype of such discrete opfi-brations. Proposition 14.2. The exotype DSig ( p ) and hom-exotypes hom DSig ( p ) ( L , M ) , withthe obvious composition and identities, form an exo-category. Proof. Given F : hom DSig ( p ) ( L , M ) and G : hom DSig ( p ) ( M , N ) , their compos-ite is a discrete opfibration since for every n : N e
DSig ( p ) , the iden-tity exo-functor L : hom DSig ( p ) ( L , L ) is a discrete opfibration. This composition isclearly associative and unital. (cid:3) Proposition 14.3. If F : L → M is a discrete opfibration, then for any exo-functor M : M → U e and K ∈ L ( m ) , we have an isomorphism M K ( M ◦ F ) ∼ = M F K M. In particular, if M is Reedy fibrant, so is M ◦ F . Proof. Definition 4.9 is phrased mostly in terms of fanout exotypes, and thediscrete opfibration condition also ensures that the morphism g in L is also uniquely determined by its image F ( g ) in M . Thus, the definitions of both sides can beidentified. (cid:3) In the following definition, for present purposes it would suffice to fix the sig-nature L and let the structure M vary; but for later use we allow the signature tovary as well. Definition 14.4. Let L and M be inverse exo-categories of height p > , let H : L → M be a discrete opfibration, let L : L (0) → U e and M : M (0) → U e , andlet h : Q ( K : L (0)) LK → M HK . We define a functor H ′ h : L ′ L → M ′ M as follows. • Consider an n : N e , and L : L (0) → U e , (1 L ) ′ λx. Lx ≡ L ′ L . (2) for inverse exo-categories L , M , N of height p > , discrete opfibrations H : L → M and I : M → N , and families L : L (0) → U e , M : M (0) → U e , and N : N (0) → U e , plus h : Q ( x : L (0)) Lx → M Hx and i : Q ( x : M (0)) M x → N Ix , I ′ i ◦ H ′ h ≡ ( I ◦ H ) ′ i ◦ h where ( i ◦ h )( x, ℓ ) : ≡ i ( Hx, h ( x, ℓ )) . Proof. Note that the desired exo-equalities are obvious on the first compo-nents of objects and morphisms in L ′ L . The desired exo-equalities on the secondcomponents of morphisms follow from UIP and function extensionality. Thus, wecheck the exo-equalities just on the second components of objects.To check the exo-equality of Item 1 on objects, observe that π (1 L ) ′ L ( K, α ) ≡ λF.λx. Lx ( π (1 − L F ) , α (1 − L F ) ≡ α. To check the exo-equality of Item 2 on objects, calculate that (cid:0) π ( I ◦ H ) ′ i ◦ h ( K, α ) (cid:1) ( F ) ≡ ih ( π (( IH ) − F ) , α (( IH ) − F )) ≡ i ( H ⊥ π (( IH ) − F ) , h ( π (( IH ) − F ) , α (( IH ) − F ))) ≡ i ( π ( I − F ) , h ( π ( H − I − F ) , α ( H − I − F ))) ≡ ( π ( I ′ i ◦ H ′ h )( K, α )) ( F ) . (cid:3) We also need to know that this functor lands in discrete opfibrations. Definition 14.6. For an inverse exo-category L of height p > , let L > be its fullsubcategory on the objects of rank > . This is an inverse exo-category of height p − , where the rank of all objects is reduced by one from L ; thus L > ( n ) : ≡ L ( n +1) . Lemma 14.7. For L an inverse exo-category of height > and M : L (0) → U e ,the evident forgetful functor U : L ′ M → L > is a discrete opfibration. Proof. Consider a ( K, α ) : L ′ M where K : L ( n +1) and α : Q ( F : Fanout ( K )) M ( π F ) ,and a ( L, f ) : Fanout m ( K ) where L : L ( m ) and f : hom( K, L ) . Let U − ( L, f ) be (( L, β ) , ( f, γ )) where we define β : Q ( F : Fanout ( L )) M ( π F ) by β ( F ) : ≡ α ( F ◦ f ) , andobtain γ : Q ( F : Fanout ( L )) α ( F ◦ f ) ≡ β ( F ) by construction.Clearly, U U − ≡ Fanout m ( K ) . To show U − U ≡ Fanout m (( K,α )) , consider a (( L, β ) , ( f, γ )) : Fanout m (( K, α )) . We get that U − U (( L, β ) , ( f, γ )) ≡ (( L, β ′ ) , ( f, γ ′ )) and γ − ∗ γ ′ : Y F : Fanout ( L ) β ( F ) ≡ β ′ ( F ) . By function extensionality, β ≡ β ′ ; and by UIP and function extensionality, γ ≡ γ ′ . (cid:3) Lemma 14.8. For exo-functors F : L → M and G : M → N such that G ◦ F and G are discrete opfibrations, also F is a discrete opfibration. Proof. This is a standard lemma in category theory, but we reproduce theproof. Consider a K : L ( n ) . The following strictly commutative diagram showsthat F is an isomorphism on fanouts, and thus a discrete opfibration. Fanout m ( K ) Fanout m ( F K ) Fanout m ( GF K ) FG ◦ F ∼ = G ∼ = (cid:3) Proposition 14.9. The functor H ′ h : L ′ L → M ′ M from Definition 14.4 is a discreteopfibration. Proof. The following square commutes. L ′ L M ′ M L > M > H ′ h U UH > Note that since H is a discrete opfibration, so is H > . Since both instances of U are also discrete opfibrations (Lemma 14.7), we find (using Lemma 14.8) that H ′ h is a discrete opfibration. (cid:3) Proposition 14.10. Let L be an inverse exo-category of height > . Then wehave a functor L ′ from L (0) → U e (with category structure inherited from U e ) tothe category of inverse exo-categories and discrete opfibrations over L > . Proof. Take H to be the identity in Definition 14.4. Lemma 14.7 and Propo-sition 14.9 show that this functor lands in discrete opfibrations over L > . (cid:3) 24 14. FUNCTORIAL SIGNATURES Now recall from ordinary category theory that the category of discrete opfi-brations over a given category C is equivalent to the functor category [ C , Set ] . Bythe same argument in exo-category theory, the codomain of the functor L ′ fromProposition 14.10 is equivalent to the exo-functor exo-category [ L > , U e ] . Theorem . For an inverse exo-category L of height p > , the exo-functorexo-category [ L , U e ] is equivalent (as an exo-category) to the Artin gluing Gl ( L ′ ) ofthe functor L ′ from Proposition 14.10. The latter is equivalently the following exo-category: • Its objects are pairs ( M ⊥ , M ′ ) , where M ⊥ : L (0) → U e and M ′ is a functor L ′ M ⊥ → U e . • A morphism ( M ⊥ , M ′ ) → ( N ⊥ , N ′ ) consists of a family of functions α ⊥ : Q ( K : L (0)) M ⊥ ( K ) → N ⊥ ( K ) and a natural transformation L ′ M ⊥ U e L ′ N ⊥ M ′ _ ◦ α ⊥ N ′ ⇓ α ′ Proof. By definition, the Artin gluing is the comma exo-category of theidentity functor of [ L > , U e ] over L ′ . Thus, its objects are triples consisting of M ⊥ : L (0) → U e , a functor M ′ : L > → U e , and a natural transformation from M ′ to the L > -diagram corresponding to L ′ M ⊥ . But the latter two data are equiv-alent to a functor L ′ M ⊥ → U e . We leave it to the reader to similarly identify themorphisms.Now let P be the profunctor from L (0) (considered as a discrete exo-category)to L > that is defined by the hom-functors of L with rank-0 codomain. Then L isthe collage of P , i.e., it is the disjoint union of L (0) and L > with extra morphismsfrom the latter to the former supplied by P . The collage of a profunctor has auniversal property (see, e.g., [ Str81, Woo85 ]), which in this case says that [ L , U e ] is equivalent to the category of triples consisting of a functor M ⊥ : L (0) → U e ,a functor M ′ : L > → U e , and a natural transformation from P to the inducedprofunctor U e ( M ′ , M ⊥ ) . The latter is equivalently a natural transformation from M ′ to the P -weighted limit of M ⊥ . (This is an instance of [ Shu15 , Theorem4.5].) But the latter weighted limit is precisely the L > -diagram corresponding to L ′ M ⊥ . (cid:3) We can also make this functorial: Proposition 14.12. For F : hom DSig ( p ) ( L , M ) , the following square commutes upto natural exo-isomorphism: [ M , U e ] Gl ( M ′ )[ L , U e ] Gl ( L ′ ) ≃ ∼ = ≃ Here the horizontal arrows are the equivalences of exo-categories from Theorem 14.11,and the right-hand arrow sends ( M ⊥ , M ′ ) to ( M ⊥ ◦ F (0) , M ′ ◦ F ′ ) . (cid:3) Next we compare Reedy fibrancy of diagrams, using the following fundamentallemma. Lemma 14.13. Let p > and L : DSig ( p ) , and let M : L → U e be an exo-functorcorresponding to ( M ⊥ , M ′ ) under Theorem 14.11. Then for any K : L ( n + 1) , thefibers of the map M K → M K M are precisely the fibers of all the maps M ′ ( K, α ) → M ( K,α ) M ′ as α varies. Proof. If we unwind the construction of Theorem 14.11, we see that the func-tor M ′ : L ′ M ⊥ → U e sends a sort ( K, α ) ∈ L ′ M ⊥ ( n ) to the strict fiber over α of themap(14.1) M K → Q (( L,f ): Fanout ( K )) M L that sends x : M K to λ ( L, f ) .M f ( x ) . Now recall that M K M is a sub-exotype of Q ( m M K → M K M : M K M K M Q (( L,f ): Fanout ( K )) M L The fiber of M K M over α is a sub-exotype of Q ( m Let p > and L : DSig ( p ) , and let M : L → U e be an exo-functor corresponding to ( M ⊥ , M ′ ) under Theorem 14.11. Then M is Reedy fibrantif and only if(1) M ⊥ is pointwise fibrant, i.e., it is a function L (0) → U ; and(2) M ′ is a Reedy fibrant diagram on L ′ M ⊥ . Proof. Since the matching object at a rank-0 sort is always , condition 1 isequivalent to Reedy fibrancy of M at rank-0 sorts. Thus, it suffices to show thatfor any K : L ( n + 1) , the map M K → M K M is a fibration if and only if for all α : Q ( F : Fanout ( K )) M ⊥ ( π F ) the map M ′ ( K, α ) → M ( K,α ) M ′ is a fibration. Butthis follows from Lemma 14.13. (cid:3) By combining Theorem 14.11 and Proposition 14.14 we will be able to proveour claim that the exo-category of Reedy fibrant exo-diagrams on any diagram sig-nature is equivalent, as an exo-category, to one whose exotype of objects is fibrant.However, to describe and work with the latter type more easily, we introduce thenotion of functorial signature . In fact, for this result it would suffice to assume that the exotypes L ( n ) are cofibrant ratherthan sharp. 26 14. FUNCTORIAL SIGNATURES Theorem 14.11 and Proposition 14.14 show that the “essential content” of adiagram signature L consists of the type L (0) and the derived diagram signatures L ′ M for all M : L (0) → U . The notion of “functorial signature” simply takes ananalogous decomposition as an inductive definition . Definition 14.15 ( Functorial signature ) . We define a family of exo-categories Sig ( n ) of signatures of height n by induction. Let Sig (0) be the trivial exo-category on .An object L of Sig ( n + 1) consists of(1) a sharp exotype L ⊥ : U ;(2) an exo-functor L ′ : [ L ⊥ , U ] → Sig ( n ) , where [ L ⊥ , U ] is the exo-functor exo-category from the discrete exo-category L ⊥ to the canonical exo-category U .Arguments of L ′ will be written as subscripts, as in L ′ M .For L , M : Sig ( n + 1) , an element α of hom Sig ( n +1) ( L , M ) consists of thefollowing:(1) a function α ⊥ : L ⊥ → M ⊥ (2) an exo-natural transformation α ′ as in the diagram [ M ⊥ , U ] Sig ( n )[ L ⊥ , U ] M ′ _ ◦ α ⊥ L ′ ⇑ α ′ Arguments of α ′ will also be written as subscripts, as in α ′ M .Composition and identities are given by function composition and identity at ⊥ ,and inductively for the derivative. Similarly, the categorical laws are easily provedby induction.The decomposition of a diagram signature into L (0) and its derivatives yieldsa functorial signature, and in fact this is an exo-functor. Theorem . For each p : N e , define an exo-functor E p : DSig ( p ) → Sig ( p ) by induction on p as follows.Since Sig (0) is the trivial category on , there is a unique exo-functor DSig (0) → Sig (0) (which is actually an equivalence).For p > and L : DSig ( p ) , let E p ( L ) consist of:(1) The sharp exotype L ⊥ : ≡ L (0) : U .(2) The functor E p − L ′− : ( L ⊥ → U ) → Sig ( p − defined on objects as in Def-inition 4.13 and Proposition 4.17 and on morphisms as in Definition 14.4and Proposition 14.9.For L , M : DSig ( p ) and F : hom( L , M ) , let E p ( F ) consist of:(1) The function F ⊥ : L ⊥ → M ⊥ . (2) The natural transformation with underlying function E p − F ′ λx. − x : Y M : M ⊥ →U hom( L ′ M ◦ F ⊥ , M ′ M ) defined in Definition 14.4 and Proposition 14.9. Proof. We check that E p is functorial.For any L : DSig ( p ) , we have the following. π E p (1 L ) ≡ L ⊥ ≡ π (1 E p L ) π E p (1 L ) ≡ E p − ◦ L′ λx. − x ≡ E p − L′ λx. − x ≡ π (1 E p L ) For any M , N , P : DSig ( p ) , F : hom( M , N ) , G : hom( N , P ) , we have thefollowing. π E p ( G ◦ F ) ≡ ( G ◦ F ) ⊥ ≡ G ⊥ ◦ F ⊥ ≡ π ( E p G ◦ E p F )( π E p ( G ◦ F )) ( M ) ≡ E p − ◦ ( G ◦ F ) ′ λx. Mx ≡ E p − ( G ′ λx. Mx ◦ F ′ λx. Mx ) ≡ ( E p − G ′ λx. Mx ) ◦ ( E p − F ′ λx. Mx ) ≡ π E p − G ◦ π E p − F. (cid:3) Intuitively, this translation can be thought of as mapping into the exo-category coinductively defined by a derivative functor, with the result landing inside theinductive part (our functorial signatures) because our diagram signatures have finiteheight. (We have not investigated the possibility of signatures of infinite height.)It can also be thought of as a sort of “Taylor expansion” of a diagram signature,consisting of all its iterated derivatives, with the functorial signatures playing therole of formal power series (although, again, since our signatures all have finiteheight, our “power series” are actually just polynomials).The notion of functorial signature is perfectly adapted to define L -structures inductively. Definition 14.17 ( L -structure ) . If L : Sig (0) , we define the type of L -structures to be Str ( L ) : ≡ .If L : Sig ( n + 1) , we define the type of L -structures to be Str ( L ) : ≡ X M ⊥ : L ⊥ →U Str ( L ′ M ⊥ ) . We write the two components of M : Str ( L ) as ( M ⊥ , M ′ ) .Note that when L arises from a diagram signature as in Theorem 14.16, thisdefinition reduces to Definition 4.18. 28 14. FUNCTORIAL SIGNATURES We expect to have a whole exo-category of L -structures. This is true, butrequires a bit more work. In particular, while the definition of structures for signa-tures doesn’t require the fact that signatures form an exo-category, defining mor-phisms of structures will require the “pullback” of an M -structure along a morphism α : L → M of signatures. Definition 14.18. For any α : hom Sig ( n ) ( L , M ) , we define the pullback α ∗ : Str ( M ) → Str ( L ) inductively as follows.If n : ≡ , then let α ∗ : Str ( M ) → Str ( L ) be the identity.If n > , consider M : Str ( M ) . We let ( α ∗ M ) ⊥ be M ⊥ ◦ α ⊥ . By induction, themorphism α ′ M ⊥ : hom Sig ( n − ( L ′ M ⊥ ◦ α ⊥ , M ′ M ⊥ ) produces a ( α ′ M ⊥ ) ∗ : Str ( M ′ M ⊥ ) → Str ( L ′ M ⊥ ◦ α ⊥ ) , so we set ( α ∗ M ) ′ : ≡ ( α ′ M ⊥ ) ∗ M ′ .Pullback is functorial: pullback along a composition of signature morphismsis the composition of pullbacks, and pullback along an identity morphism is theidentity. Definition 14.19 ( Morphism of structures ) . Consider L : Sig ( n ) and M, N : Str ( L ) ; we define the (fibrant) type hom Str ( L ) ( M, N ) by recursion on n : N e .When n : ≡ , we let hom Str ( L ) ( M, N ) : ≡ .When n > , a morphism f : hom Str ( L ) ( M, N ) consists of(1) f ⊥ : Q ( K : L ⊥ ) M ⊥ ( K ) → N ⊥ ( K ) (2) f ′ : hom Str ( L ′ M ⊥ ) ( M ′ , ( L ′ f ⊥ ) ∗ N ′ ) .Composition of structure morphisms requires pullback of structure morphismsalong signature morphisms: Definition 14.20 ( Pullback of structure morphisms along signature mor-phisms ) . Let L and M be signatures of height n , and α : hom Sig ( n ) ( L , M ) . Let M, N : Str ( M ) and f : hom Str ( M ) ( M, N ) . We define α ∗ f : hom Str ( L ) ( α ∗ M, α ∗ N ) by induction on n .If n : ≡ , then α ∗ f is the unique morphism in hom Str ( L ) ( α ∗ M, α ∗ N ) .If n > , then we define α ∗ f as follows:(1) ( α ∗ f ) ⊥ : Q ( K : L ⊥ ) ( α ∗ M ) ⊥ ( K ) → ( α ∗ N ) ⊥ ( K ) is given by ( α ∗ f ) ⊥ ( K ) : ≡ f ⊥ ( α ⊥ ( K )) : M ⊥ ( α ⊥ ( K )) → N ⊥ ( α ⊥ ( K )) (2) We have f ′ : hom Str ( M ′ M ⊥ ) ( M ′ , ( M ′ f ⊥ ) ∗ N ′ ) .By induction hypothesis, we can pull back f ′ along the signaturemorphism α ′ M ⊥ : hom Sig ( n − ( L ′ M ◦ α ⊥ , M ′ M ) , yielding ( α ′ M ⊥ ) ∗ ( f ′ ) : hom Str ( L ′ M ◦ α ⊥ ) (( α ′ M ⊥ ) ∗ M ′ , ( α ′ M ⊥ ) ∗ ( M ′ f ⊥ ) ∗ N ′ ) . By naturality of α ′ , the following square commutes up to exo-equality, L ′ M ⊥ ◦ α ⊥ M ′ M ⊥ L ′ N ⊥ ◦ α ⊥ M ′ N ⊥ α ′ M ⊥ L ′ f ⊥◦ α ⊥ M ′ f ⊥ α ′ N ⊥ and hence we define ( α ∗ f ) ′ : ≡ ( α ′ M ⊥ ) ∗ ( f ′ ) : hom Str ( L ′ M ⊥◦ α ⊥ ) (( α ∗ M ) ′ , ( L ′ ( α ∗ f ) ⊥ ) ∗ ( α ∗ N ) ′ ) . Definition 14.21 ( Identities of structure morphisms ) . Let L be a signatureof height n , and M be an L -structure. We define identity structure morphisms byinduction on n . For n : ≡ , the unique morphism M → M is the identity on M .For n > , we define the identity M to be given by(1) M ⊥ is given by M ⊥ ( K ) : ≡ M ⊥ ( K ) (2) M ′ : hom Str ( L ′ M ⊥ ) ( M ′ , ( L ′ (1 M ) ⊥ ) ∗ M ′ ) ≡ hom Str ( L ′ M ⊥ ) ( M ′ , M ′ ) is given byinduction hypothesis, using that ( L ′ ) ∗ M ≡ ∗ M ≡ M . Definition 14.22 ( Composition of structure morphisms ) . We define, by in-duction on n , the composition of structure morphisms.Let L be a signature of height n , M, N, O : Str ( L ) , with f : hom Str ( L ) ( M, N ) and g : hom Str ( L ) ( N, O ) . If n : ≡ , then g ◦ f : hom Str ( L ) ( M, O ) is the uniquemorphism from M to O . If n > , then we define g ◦ f as follows:(1) ( g ◦ f ) ⊥ ( K ) : ≡ g ⊥ ( K ) ◦ f ⊥ ( K ) (2) We have f ′ : hom Str ( L ′ M ⊥ ) ( M ′ , ( L ′ f ⊥ ) ∗ ( N ′ )) and g ′ : hom Str ( L ′ N ⊥ ) ( N ′ , ( L ′ g ⊥ ) ∗ ( O ′ )) .Then we have ( L ′ f ⊥ ) ∗ g ′ : hom Str ( L ′ M ⊥ ) (( L ′ f ⊥ ) ∗ N ′ , ( L ′ f ⊥ ) ∗ ( L ′ g ⊥ ) ∗ ( O ′ )) and, using that ( L ′ f ⊥ ) ∗ ( L ′ g ⊥ ) ∗ ( O ′ ) ≡ ( L ′ ( g ◦ f ) ⊥ ) ∗ ( O ′ ) , we define (using theinduction hypothesis) ( g ◦ f ) ′ : ≡ ( L ′ f ⊥ ) ∗ g ′ ◦ f ′ . Similarly, we can prove by induction that pullback preserves composition andidentities, and then that composition is associative and unital. Thus, for any func-torial signature L , we have an exo-category Str ( L ) with a fibrant type of objectsand fibrant hom-types, and for any signature morphism α : L → M we have anexo-functor Str ( M ) → Str ( L ) . With a little more work, we can show that Str ( − ) isa contravariant exo-functor from Sig ( n ) to the exo-category Cat of exo-categories.We can now finally prove the theorem we have been leading up to. Theorem . For any diagram signature L : DSig ( p ) , the exo-category [ L , U e ] Rfib is equivalent, as an exo-category, to Str ( E p ( L )) . Moreover, for any dis-crete opfibration F : hom DSig ( p ) ( L , M ) , these equivalences commute, up to naturalexo-isomorphism, with pullback and precomposition: [ M , U e ] Rfib Str ( E p ( M ))[ L , U e ] Rfib Str ( E p ( L )) ≃ ( −◦ F ) ∼ = ( E p ( F )) ∗ ≃ Proof. We prove the two statements by mutual induction on p . When p : ≡ they are trivial.When p > , by Theorem 14.11 and Proposition 14.14, [ L , U e ] Rfib is equiv-alent to the exo-category of pairs ( M ⊥ , M ′ ) where M ⊥ : L (0) → U e and M ′ :[ L ′ M ⊥ , U e ] Rfib , where a morphism ( M ⊥ , M ′ ) → ( M ⊥ , M ′ ) consists of a family offunctions f ⊥ : Q ( K : L (0)) M ⊥ ( K ) → N ⊥ ( K ) and a natural transformation M ′ → 30 14. FUNCTORIAL SIGNATURES N ′ ◦ L ′ f ⊥ . By the inductive hypotheses, this is equivalent to the exo-category ofpairs ( M ⊥ , M ′ ) where instead M ′ : Str ( E p ( L ′ M ⊥ )) , and where the natural transfor-mation is replaced by a morphism of structures M ′ → ( E p ( L ′ f ⊥ )) ∗ ( N ′ ) . But since E p commutes with derivation by definition, the latter is precisely the exo-category Str ( L ) .The proof of the commutation statement is analogous, using Proposition 14.12in place of Theorem 14.11. (cid:3) Our definitions of axiom and theory from Section 4.5 can be copied essentiallyverbatim for functorial signatures. Definition 14.24. Let L be a functorial signature. An L -axiom is a function Str ( L ) → Prop U . A functorial theory is a pair ( L , T ) of a functorial signature L and a family T of L -axioms indexed by a cofibrant exotype. A model of a theory ( L , T ) then consists of a L -structure M together with a proof t ( M ) for each axiom t of T . A morphism of models is a morphism of the underlying structures.Of course, any diagram theory gives rise to a functorial theory, including all theexamples from Part 2. In Chapter 18 we will discuss some examples of functorialtheories not arising in this way.HAPTER 15 Levelwise equivalences of structures In Proposition 4.26 we asserted that all structures for a diagram signaturesatisfy a tautological “levelwise” form of univalence, saying that identifications ofstructures are equivalent to levelwise equivalences. We now make an analogousclaim for all functorial signatures, and prove it. Definition 15.1 ( Levelwise equivalence of structures ) . Consider L : Sig ( n ) and M, N : Str ( L ) .If n : ≡ , we define every f : hom Str ( L ) ( M, N ) to be a levelwise L -equivalence.That is, we define LvlEquiv L ( f ) : ≡ .For n > , f : hom Str ( L ) ( M, N ) is a levelwise L -equivalence when(1) f ⊥ ( K ) is an equivalence of types for all K : L ⊥ , and(2) f ′ is a levelwise L ′ M ⊥ -equivalence.That is, let LvlEquiv L ( f ) : ≡ Y ( K : L ⊥ ) isEquiv ( f ⊥ ( K )) × LvlEquiv L ′ M ⊥ ( f ′ ) . We denote the type of levelwise L -equivalences between two L -structures M, N by M ≅ L N , or simply M ≅ N . Lemma 15.2. If f : M → N is an isomorphism in the exo-category Str ( L ) , thenit is a levelwise L -equivelence. Proof. If f is an isomorphism, then f ⊥ is pointwise an isomorphism of exotypes—and hence an equivalence of types—and f ′ is an isomorphism in Str ( L ′ M ⊥ ) . Theresult follows by induction. (cid:3) Lemma 15.3. If L is a diagram signature, then a morphism of L -structures is alevelwise equivalence in the sense of Definition 15.1 if and only if its correspond-ing morphism of Reedy fibrant diagrams is a levelwise equivalence in the sense ofDefinition 4.25. Proof. By induction, it suffices to prove that when L has height p > , amorphism f : M → N is a levelwise equivalence in the sense of Definition 4.25 ifand only if f K is an equivalence for all K : L (0) and f ′ is also a levelwise equivalencein the sense of Definition 4.25. The former is exactly what Definition 4.25 says forrank-0 sorts. For the latter, we note that by Proposition 14.3, the square M ′ ( K, α ) (( L ′ f ⊥ ) ∗ N ′ )( K, α ) M ( K,α ) M ′ M ( K,α ) (( L ′ f ⊥ ) ∗ N ′ ) is isomorphic to M ′ ( K, α ) N ′ ( K, f α ) M ( K,α ) M ′ M ( K,fα ) N ′ . Thus, by Lemma 14.13, the maps on fibers of all these squares, for all sorts ( K, α ) of L ′M ⊥ , are precisely the maps on fibers of the analogous squares for f at all sorts K of positive rank in L . (cid:3) Remark 15.4. We expect that levelwise equivalences of structures can equivalentlybe characterized via the existence of a structure morphism in the other directionand composites that are (homotopically) identical to identities; i.e., by replacingstrict equalities by identifications in the notion of isomorphism of structures. Lemma 15.5. For any morphism f : M → N between two L -structures, theexotype LvlEquiv L ( f ) is a fibrant proposition. (cid:3) Lemma 15.6. For any signature L and L -structure M , the identity morphism on M is a levelwise equivalence. Proof. By induction on n : for n : ≡ , any morphism is a levelwise equivalence.For n > , we have that M ⊥ ( K ) = 1 MK , which is an equivalence of types. Theidentity on M ′ is a levelwise equivalence by induction hypothesis. (cid:3) Definition 15.7 ( idtolvle ) . Let L be a signature, and M be an L -structure. Wedefine, by [=] -induction, the function idtolvle : ( M = N ) → ( M ≅ L N ) refl M M Here we use that the identity morphism is a levelwise equivalence per Lemma 15.6. Proposition 15.8. For structures M, N of a signature L , the canonical map idtolvle M,N : ( M = N ) → ( M ≅ N ) is an equivalence of types. Proof. When n : ≡ , idtolvle : → , hence is an equivalence.Let ua : ( M ⊥ ≃ N ⊥ ) → ( M ⊥ = N ⊥ ) be given by the univalence axiom. First weshow that ua ( e ) − ∗ ( N ′ ) = ( L ′ e ) ∗ N ′ for any e : M ⊥ ≃ N ⊥ , where ua ( e ) − ∗ denotestransport along ua ( e ) − . Now the square in the diagram ( M ⊥ ≃ N ⊥ ) ( M ⊥ = N ⊥ ) ( M ⊥ ≃ N ⊥ ) hom Sig ( n ) ( L ′ M ⊥ , L ′ N ⊥ )( N ⊥ = M ⊥ ) Str ( L ′ N ⊥ ) → Str ( L ′ M ⊥ ) ua ( − ) − idtolvle L ′− ( − ) ∗ ( − ) ∗ commutes (up to = ) since both functions ( M ⊥ = N ⊥ ) → Str ( L ′ N ⊥ ) → Str ( L ′ M ⊥ ) send refl M ⊥ to Str ( L ′ M ) (by exo-functoriality of the pullback). Precomposing thesewith ua , we find that ( L ′ e ) ∗ N ′ = ua ( e ) − ∗ ( N ′ ) . Now we have that ( M = N ) = X p : M ⊥ = N ⊥ M ′ = p − ∗ ( N ′ ) 5. LEVELWISE EQUIVALENCES OF STRUCTURES 133 = X e : M ⊥ ≃ N ⊥ M ′ = ua ( e ) − ∗ ( N ′ )= X e : M ⊥ ≃ N ⊥ M ′ = ( L ′ e ) ∗ N ′ = X e : M ⊥ ≃ N ⊥ M ′ ≅ ( L ′ e ) ∗ N ′ ≡ ( M ≅ N ) where the second identification is the univalence axiom and the fourth is our induc-tive hypothesis. This equivalence, from left to right, is idtolvle M,N . (cid:3) To end this chapter, we observe that we can now deduce that the type ofstructures for a diagram signature is independent of the rank function. Corollary 15.9. Let L : DSig ( p ) be an inverse exo-category, and let M : DSig ( q ) be the same exo-category but made into an inverse exo-category with a differentrank function. Then the types Str ( E p ( L )) and Str ( E q ( M )) are equivalent. Proof. The notion of Reedy fibrancy is independent of the rank function, sothe exo-categories [ L , U e ] Rfib and [ M , U e ] Rfib are equivalent. By Theorem 14.23, theyare also equivalent to the exo-categories Str ( E p ( L )) and Str ( E q ( M )) respectively, sothese two exo-categories are equivalent. However, by Proposition 15.8, the naturalexo-isomorphisms witnessing this equivalence of exo-categories yield identifications,so that the underlying types Str ( E p ( L )) and Str ( E q ( M )) are also equivalent. (cid:3) HAPTER 16 Indiscernibility and univalence Next, we make the definitions of indiscernibility and univalence from Chapter 5completely precise, in the generality of functorial signatures. We begin with twoauxiliary definitions, generalizing those of Chapter 5. Definition 16.1. Let L be a sharp exotype, K : L , M : L → U , and a : M ( K ) .We define the indicator function of K to be [ K ] : ≡ λx. ( x = K ) : L → U and we define the function ˆ a : Q ( x : L ) [ K ]( x ) → M ( x ) by applying Lemma 2.4 to a : M ( K ) , so that ˆ a ( K, refl K ) = a . When there is no risk of confusion, we write ˆ a as simply a .Below we consider the pointwise disjoint union M +[ K ] in L → U , the canonicalinjection ι M : Q ( x : L ) M ( x ) → ( M + [ K ])( x ) , and the induced function h M , ˆ a i : Q ( x : L ) ( M + [ K ])( x ) → M ( x ) . Definition 16.2. Consider L : Sig ( n + 1) , K : L ⊥ , M : Str ( L ) , a : M ⊥ ( K ) . Define ∂ a M : ≡ ( L ′h M ⊥ , ˆ a i ) ∗ M ′ : Str ( L ′ M ⊥ +[ K ] ) . This is the first place we use our assumption that L ⊥ is pointwise sharp , ratherthan just cofibrant .Now we can define the type of indiscernibilities between objects within an L -structure: Definition 16.3 ( Indiscernibility ) . Consider L : Sig ( n + 1) , K : L ⊥ , M : Str ( L ) , a, b : M ⊥ ( K ) . We define the type of indiscernibilities from a to b to be ( a ≍ b ) : ≡ X p : ∂ a M = ∂ b M ǫ − a · ( L ′ ι M ⊥ ) ∗ p · ǫ b = M ′ = M ′ refl M ′ , where ǫ x is the concatenated identification ( L ′ ι M ⊥ ) ∗ ∂ x M ′ ≡ ( L ′ ι M ⊥ ) ∗ ( L ′h M ⊥ ,x i ) ∗ M ′ = ( L ′h M ⊥ ,x i◦ ι M ⊥ ) ∗ M ′ = ( L ′ M ⊥ ) ∗ M ′ = M ′ . Remark 16.4. Using identification instead of levelwise equivalence of structuresin Definition 16.3 is justified by Proposition 15.8. Lemma 16.5. The type of indiscernibilities a ≍ b of Definition 16.3 is equivalentto the type X p : ∂ a M = ∂ b M ( L ′ ι M ⊥ ) ∗ p = ǫ a · ǫ − b . (cid:3) We now define univalence of L -structures . For this, we first need to define thecanonical map from identifications to indiscernibilities. Definition 16.6 ( Identity indiscernibility ) . For L : Sig ( n + 1) , K : L ⊥ , M : Str ( L ) , and m : M ⊥ ( K ) , we define the indiscernibility m ≍ m . Let M : Str ( L ) .For any a : M ⊥ ( K ) , we have refl ∂ a M : ∂ a M = ∂ a M . Then ǫ − a · ( L ′ ι M ) ∗ ( refl ∂ a M ) · ǫ a ≡ ǫ − a · refl ( L ′ ιM ) ∗ ∂ a M · ǫ a = refl M ′ , where the second identification uses the groupoidal properties of types. This givesthe desired indiscernibility. Definition 16.7. Consider L : Sig ( n + 1) , K : L ⊥ , M : Str ( L ) . For any a, b : M ⊥ ( K ) , let idtoindisc a,b : ( a = b ) → ( a ≍ b ) be the function which sends refl a tothe identity indiscernibility exhibited in Definition 16.6.We say that M is univalent at K if for all a, b : M ⊥ ( K ) , the map idtoindisc a,b : ( a = b ) → ( a ≍ b ) is an equivalence. Definition 16.8 ( Univalence of structures and models ) . We define by induc-tion what it means for a structure of a signature L : Sig ( n ) to be univalent.When n : ≡ , every structure M : Str ( L ) is univalent.Otherwise, a structure M : Str ( L ) is univalent if M is univalent at all K : L ⊥ and M ′ is univalent.We denote by uStr ( L ) the type of univalent structures of L .Given a functorial theory T ≡ ( L , T ) , a T -model is univalent if its underlying L -structure is univalent. Lemma 16.9. Given a functorial signature L ,(1) for any L -structure M , the exotype “ M is univalent” is a fibrant proposi-tion,(2) the exotype uStr ( L ) is fibrant, and(3) for M, N : uStr ( L ) we have ( M = uStr ( L ) N ) ≃ ( M = Str ( L ) N ) . (cid:3) Our first general observations about univalent structures give truncation boundsfor their sorts and for the type of such structures. Theorem . Let L : Sig ( n + 1) , M : uStr ( L ) , K : L ⊥ . Then M ⊥ ( K ) is an ( n − -type. Theorem . Let L : Sig ( n ) . The type of univalent L -structures is an ( n − -type. Proof of Theorems 16.10 and 16.11. Define the following exotypes. P ( n ) : ≡ Y ( L : Sig ( n +1)) Y ( M : uStr ( L )) Y ( K : L ⊥ ) is - ( n − - type ( M ⊥ ( K )) Q ( n ) : ≡ Y(cid:0) M , N : Sig ( n ) α :hom( M , N ) (cid:1) Y ( N : uStr ( N )) is - ( n − - type ( α ∗ N = α ∗ N ) 6. INDISCERNIBILITY AND UNIVALENCE 137 The exotype P ( n ) is the statement of Theorem 16.10, and the exotype Q ( n ) impliesthe statement of Theorem 16.11 by [ Uni13 , Thm. 7.2.7]. We prove P ( n ) and Q ( n ) simultaneously.For P ( n ) , we need to show that a = M ⊥ K b is an ( n − -type for all L : Sig ( n + 1) , M : uStr ( L ) , K : L ⊥ , a, b : M ⊥ K . But since M is univalent, this type isequivalent to ( a ≍ b ) ≡ X e : ∂ a M = ∂ b M ǫ − a · ( L ′ ι M ) ∗ p · ǫ b = M ′ = M ′ refl M ′ . Thus, it will suffice to show that ∂ a M = ∂ b M and ǫ − a · ( L ′ ι M ) ∗ p · ǫ b = M ′ = M ′ refl M ′ are ( n − -types.To show P (0) and Q (0) consider L : Sig (1) , M : uStr ( L ) , K : L ⊥ , a, b : M ⊥ K, M , N : Sig (0) , α : hom( M , N ) , N : uStr ( N ) . We have that M ′ , ∂ a M, ∂ b M, α ∗ N : so thetypes ∂ a M = ∂ b M , ǫ − a · ( L ′ ι M ) ∗ p · ǫ b = M ′ = M ′ refl M ′ , and α ∗ N = α ∗ N are con-tractible. Thus, P (0) and Q (0) hold.Suppose that P ( n ) and Q ( n ) hold. We first show Q ( n + 1) . Consider M , N : Sig ( n + 1) , α : hom( M , N ) , N : uStr ( N ) . We have that ( α ∗ N = α ∗ N ) ≃ Σ e :( α ∗ N ) ⊥ =( α ∗ N ) ⊥ ( α ∗ N ) ′ = e ∗ ( α ∗ N ) ′ ≡ Σ e :( N ⊥ ◦ α ⊥ )=( N ⊥ ◦ α ⊥ ) ( α ′ N ⊥ ) ∗ N ′ = e ∗ ( α ′ N ⊥ ) ∗ N ′ . Our inductive hypothesis Q ( n ) ensures that ( α ′ N ⊥ ) ∗ N ′ = ( α ′ N ⊥ ) ∗ N ′ is an ( n − -type, and hence ( α ′ N ⊥ ) ∗ N ′ = e ∗ ( α ′ N ⊥ ) ∗ N ′ is an ( n − -type by [ Uni13 , Thm. 7.2.7].It remains to show that ( N ⊥ ◦ α ⊥ ) = ( N ⊥ ◦ α ⊥ ) is an ( n − -type. Note that N is a univalent structure of an ( n + 1) -signature, and our inductive hypothesis P ( n ) then implies that for all K : N ⊥ , the type N ⊥ ( K ) is an ( n − -type. Then since ( N ⊥ ◦ α ⊥ ) is a function which takes values in ( n − -types, we can conclude that ( N ⊥ ◦ α ⊥ ) = ( N ⊥ ◦ α ⊥ ) is an ( n − -type [ Uni13 , Thm. 7.1.9]. Thus, Q ( n + 1) holds.To show that P ( n + 1) holds, consider L : Sig ( n + 2) , M : uStr ( L ) , K : L ⊥ , a, b : M ⊥ K . By [ Uni13 , Thm. 7.2.7], Q ( n + 1) implies that ∂ a M = ∂ b M and ǫ − a · ( L ′ ι M ) ∗ p · ǫ b = M ′ = M ′ refl M ′ are ( n − -types. Therefore, P ( n + 1) holds. (cid:3) HAPTER 17 Equivalence of structures and the univalenceprinciple Finally, we define general notions of equivalence for structures, and prove ourunivalence principles. Definition 17.1 ( Split-surjective equivalence ) . Suppose f : hom Str ( L ) ( M, N ) ,where M, N : Str ( L ) and L : Sig ( n ) . If n : ≡ , then f is a split-surjective equiva-lence. For n > , f is a split-surjective equivalence if(1) f ⊥ ( K ) is a split surjection for every K : L ⊥ , and(2) f ′ is a split-surjective equivalence. Surjective weak equivalences are defined similarly, but only requiring each f ⊥ ( K ) to be surjective.As noted in Chapter 6, we are currently unable to prove our desired generalresult with surjective weak equivalences, so for the present we restrict to the split-surjective equivalences. We write SSEquiv ( f ) for the type “ f is a split-surjectiveequivalence”, which in the inductive case is SSEquiv ( f ) : ≡ Y ( K : L ⊥ ) Y ( y : N ⊥ ( K )) X x : M ⊥ ( K ) ( f ⊥ ( K )( x ) = y ) × SSEquiv ( f ′ ) , and ( M ։ N ) : ≡ P ( f :hom Str ( L ) ( M,N )) SSEquiv ( f ) for the type of split-surjectiveequivalences. Lemma 17.2. If L is a diagram signature, then a morphism of L -structures is asplit-surjective equivalence (resp. surjective weak equivalence) in the sense of Def-inition 17.1 if and only if its corresponding morphism of Reedy fibrant diagramsis a split-surjective equivalence (resp. surjective weak equivalence) in the sense ofDefinition 6.1. Proof. Just like Lemma 15.3, using (split-)surjective maps in place of equiv-alences. (cid:3) Definition 17.3 ( From levelwise equivalences to split-surjective equiva-lences ) . Let f : hom Str ( L ) ( M, N ) ; we define U f : LvlEquiv ( f ) → SSEquiv ( f ) byinduction on n . If n : ≡ , U f is the identity function on . For n > , we use thatany equivalence of types is a split surjection, and the inductive hypothesis. Let lvletosse M,N : ≡ (1 , U ) : ( M ≅ N ) → ( M ։ N ) . Definition 17.4 ( From identifications to split-surjective equivalences ) . For L : Sig ( n ) and M, N : Str ( L ) we define idtosse : ≡ lvletosse ◦ idtolvle : ( M = N ) → ( M ։ N ) . Our first univalence principle states that if M is univalent, then idtosse M,N isan equivalence. It uses the following lemma. Lemma 17.5. Let L : Sig ( n + 1) , M, N : Str ( L ) , f ⊥ : M ⊥ → N ⊥ , and e : M ′ =( L ′ f ⊥ ) ∗ N ′ . Then for x, y : M ⊥ ( K ) , an indiscernibility f ⊥ x ≍ f ⊥ y produces anindiscernibility x ≍ y . Proof. By [=] -induction on e , we may assume M ′ ≡ ( L ′ f ⊥ ) ∗ N ′ .Consider the following diagram whose cells commute up to ≡ or = , as pictured.(17.1) M ⊥ M ⊥ + [ K ] M ⊥ N ⊥ N ⊥ + [ K ] N ⊥ ≡ ≡ f ⊥ ι M ⊥ M ⊥ f ⊥ +1 h ,x i f ⊥ ≡ ι N ⊥ N ⊥ = h ,f ⊥ ( K ) x i This diagram commutes 2-dimensionally, which is to say that the “pasting” of allfour displayed identities is exo-equal to the strict equality f ⊥ ◦ M ⊥ ≡ N ⊥ ◦ f ⊥ .Applying the composite exo-functor Str ( L ′− ) , we obtain:(17.2) Str ( L ′ M ⊥ ) Str ( L ′ M ⊥ +[ K ] ) Str ( L ′ M ⊥ ) Str ( L ′ N ⊥ ) Str ( L ′ N ⊥ +[ K ] ) Str ( L ′ N ⊥ ) ≡ ( α ) ≡ ( ǫ x )( L ′ f ⊥ ) ∗ ( L ′ ιM ⊥ ) ∗ Str ( L′ M ⊥ ) ( L ′ f ⊥ +1 ) ∗ ( L ′h ,x i ) ∗ ( L ′ f ⊥ ) ∗ ≡ ( ǫ f ⊥ x )( L ′ ιN ⊥ ) ∗ Str ( L′ N ⊥ ) = ( β x )( L ′h ,f ⊥ x i ) ∗ which commutes in the same way. Moreover, the upper and lower exo-equalities inthis diagram are ǫ x and ǫ f ⊥ x respectively; we call the others α and β x .We have an analogous diagram for y , in which the left-hand square α is thesame.Then since ∂ f ⊥ ( K ) x N ≡ ( L ′h ,f ⊥ ( K ) x i ) ∗ N ′ , M ′ ≡ ( L ′ f ⊥ ) ∗ N ′ , and ∂ x M ≡ ( L ′h ,x i ) ∗ M ′ ,we have an identification β x N : ( L ′ f ⊥ +1 ) ∗ ∂ f ⊥ ( K ) x N = ∂ x M. The same can be shown for y .Consider an indiscernibility f ⊥ x ≍ f ⊥ y which consists, by Lemma 16.5, of (1)an identification i : ∂ f ⊥ x N = ∂ f ⊥ y N and (2) an identification j between ( L ′ ι N ⊥ ) ∗ i and the concatenation ( L ′ ι N ⊥ ) ∗ ( L ′h ,f ⊥ x i ) ∗ N ′ ǫ f ⊥ x = N ′ ǫ − f ⊥ y = ( L ′ ι N ⊥ ) ∗ ( L ′h ,f ⊥ y i ) ∗ N ′ (which is an exo-equality, though i is not).We need to construct an indiscernibility x ≍ y which consists of (1) an identi-fication k : ∂ x M = ∂ y M and (2) an identification ( L ′ ι M ⊥ ) ∗ k = ǫ x · ǫ − y . 7. EQUIVALENCE OF STRUCTURES AND THE UNIVALENCE PRINCIPLE 141 The first component, k , of our desired indiscernibility x ≍ y is the followingconcatenation: ( L ′h ,x i ) ∗ ( L ′ f ⊥ ) ∗ N ′ β x = ( L ′ f ⊥ +1 ) ∗ ( L ′h ,f ⊥ x i ) ∗ N ′ ( L ′ f ⊥ +1 ) ∗ i = ( L ′ f ⊥ +1 ) ∗ ( L ′h ,f ⊥ y i ) ∗ N ′ β − y = ( L ′h ,y i ) ∗ ( L ′ f ⊥ ) ∗ N ′ Now we need ( L ′ ι M ⊥ ) ∗ k = ǫ x · ǫ − y . Consider the commutative diagram inFigure 1 (on Page 142) where straight lines denote exo-equalities, squiggly linesdenote identifications, and double (squiggly) lines denote identifications betweenidentifications. The 2-dimensional identification labeled ν arises from naturality,while those labeled σ arise from the 2-dimensional commutativity of Diagram (17.2).The concatenation of the three top horizontal identifications in Figure 1 is ( L ′ ι M ⊥ ) ∗ k .Thus, Figure 1 exhibits an identification of this with ǫ x · ǫ − y . (cid:3) Theorem Univalence principle, split-surjective case ) . Consider L : Sig ( n ) and M, N : Str ( L ) such that M is univalent. The morphism idtosse :( M = N ) → ( M ։ N ) is an equivalence. Proof. It suffices to show that each U f of Definition 17.3 is an equivalence.We proceed by induction on n . When n : ≡ , each U f is a endofunction on , andso is an equivalence.When n > , we first construct a map F f : SSEquiv ( f ) → LvlEquiv ( f ) . Consideran element of SSEquiv ( f ) : a right inverse s ( K ) of f ⊥ ( K ) for each K : L ⊥ , and s ′ : SSEquiv ( f ′ ) . Since M ′ is univalent, the inductive hypothesis for s ′ implies f ′ isa levelwise equivalence; thus it remains to show each f ⊥ ( K ) is an equivalence.Since s ( K ) is a right inverse of f ⊥ ( K ) , it remains to show that we have s ( K ) f ⊥ ( K ) m = m for any m : M ⊥ ( K ) . We have f ⊥ ( K ) s ( K ) f ⊥ ( K ) m = f ⊥ ( K ) m and thus f ⊥ ( K ) s ( K ) f ⊥ ( K ) m ≍ f ⊥ ( K ) m . We have already shown that f ′ is a lev-elwise equivalence M ′ ≅ ( f ⊥ ) ∗ N ′ , so by Proposition 15.8, we get M ′ = ( L ′ f ⊥ ) ∗ N ′ .Thus, by Lemma 17.5, we have s ( K ) f ⊥ ( K ) m ≍ m ; and since M is univalent thisyields s ( K ) f ⊥ ( K ) m = m .Thus, given our ( λK.s ( K ) , s ′ ) : SSEquiv ( f ) , we have constructed an elementof LvlEquiv ( f ) ; this defines F f : SSEquiv ( f ) → LvlEquiv ( f ) . Since LvlEquiv ( f ) isa proposition (by Lemma 15.5), F f U f = 1 . Moreover, we constructed F f and U f such that U f F f = 1 . Hence, U f : LvlEquiv ( f ) → SSEquiv ( f ) is an equivalence.Thus, the function lvletosse M,N : ( M ≅ L N ) → ( M ։ N ) is also an equiva-lence. Using Proposition 15.8, we find then that idtosse : ( M = N ) → ( M ։ N ) isan equivalence. (cid:3) We now move on to consider equivalences that are only essentially surjective.Here we have to be careful in the inductive step, because when considering f :hom Str ( L ) ( M, N ) we want all the indiscernibilities to lie in N and its derivatives Since we showed that f ⊥ ( K ) was an equivalence by making s ( K ) a homotopy inverse of it,and U f remembers not just the inverse map but one of the homotopies, we technically have to usehere the fact that a homotopy inverse of a function g can be enhanced to an element of isEquiv ( g ) while changing at most one of the constituent homotopies. . E Q U I VA L E N C E O F S T R U CT U R E S AN D T H E UN I VA L E N C EP R I N C I P L E ( L ′ ι M ⊥ ) ∗ ∂ x M ( L ′ ι M ⊥ ) ∗ ( L ′ f ⊥ +1 ) ∗ ∂ f ⊥ x N ( L ′ ι M ⊥ ) ∗ ( L ′ f ⊥ +1 ) ∗ ∂ f ⊥ y N ( L ′ ι M ⊥ ) ∗ ∂ y M ( L ′ f ⊥ ) ∗ ( L ′ ι N ⊥ ) ∗ ∂ f ⊥ x N ( L ′ f ⊥ ) ∗ ( L ′ ι N ⊥ ) ∗ ∂ f ⊥ y NM ǫ x ( L ′ ιM ⊥ ) ∗ β x ( L ′ ιM ⊥ ) ∗ ( L ′ f ⊥ +1 ) ∗ iα ( L ′ ιM ⊥ ) ∗ ( β y ) − α ( L ′ f ⊥ ) ∗ ( L ′ ιN ⊥ ) ∗ iν ( L ′ f ⊥ ) ∗ ( ǫ f ⊥ x ) ( L ′ f ⊥ ) ∗ j ǫ − y ( L ′ f ⊥ ) ∗ ( ǫ − f ⊥ y ) σ σ F i g u r e . D i ag r a m f o r p r oo f o f L e mm a17 . 7. EQUIVALENCE OF STRUCTURES AND THE UNIVALENCE PRINCIPLE 143 directly, not in their pullbacks to derivatives at M . This forces us to define asomewhat more general notion.For a, b : M ⊥ ( K ) , we write a ≍ MK b instead of a ≍ b if needed to eliminateambiguity. Definition 17.7 ( Relative equivalence ) . Let L , M : Sig ( n ) and α : hom Sig ( n ) ( L , M ) ,let M : Str ( L ) and N : Str ( M ) , and let f : hom Str ( L ) ( M, α ∗ N ) . If n : ≡ , then f isan equivalence relative to α . For n > , f is an equivalence relative to α if(1) For all K : L ⊥ and y : N ⊥ ( α ⊥ ( K )) , we have a specified x : M ⊥ ( K ) andindiscernibility f ⊥ ( x ) ≍ Nα ⊥ ( K ) y .(2) f ′ : hom Str ( L ′ M ⊥ ) ( M ′ , ( L ′ f ⊥ ) ∗ ( α ∗ N ) ′ ) ≡ hom Str ( L ′ M ⊥ ) ( M ′ , ( L ′ f ⊥ ) ∗ ( α ′ N ⊥ ) ∗ N ′ ) is an equivalence relative to the composite L ′ M ⊥ L ′ f ⊥ −−−→ L ′ N ⊥ ◦ α ⊥ α ′ N ⊥ −−−→ M ′ N ⊥ . Relative weak equivalences are defined similarly, but requiring only (cid:13)(cid:13)(cid:13) X x : M ⊥ ( K ) ( f ⊥ ( x ) ≍ Nα ⊥ ( K ) y ) (cid:13)(cid:13)(cid:13) for each K, y .An unadorned equivalence means one relative to α : ≡ L . We write SEquiv α ( f ) for the type “ f is an equivalence relative to α ”, which in the inductive case means SEquiv α ( f ) : ≡ Y ( K : L ⊥ ) Y ( y : N ⊥ ( α ⊥ ( K ))) X x : M ⊥ ( K ) (cid:16) f ⊥ ( K )( x ) ≍ Nα ⊥ ( K ) y (cid:17) × SEquiv α ′ ◦ f ⊥ ( f ′ ) and ( M ≃ N ) : ≡ P ( f :hom Str ( L ) ( M,N )) SEquiv ( f ) for the type of equivalences.Importantly, f ⊥ ( x ) ≍ Nα ⊥ ( K ) y is distinct from f ⊥ ( x ) ≍ α ∗ NK y , even though ( α ∗ N ) ⊥ ( K ) ≡ N ⊥ ( α ⊥ ( K )) by definition. Lemma 17.8. If L is a diagram signature, then a morphism of L -structures is anequivalence (resp. weak equivalence) in the sense of Definition 17.7 if and only ifits corresponding morphism of Reedy fibrant diagrams is an equivalence (resp. weakequivalence) in the sense of Definition 6.3. Proof. This is mostly just like Lemma 15.3, but for the induction we need arelative version of Definition 6.3. We leave the details to the reader. (cid:3) Lemma 17.9. For f : hom Str ( L ) ( M, α ∗ N ) , we have a map SSEquiv ( f ) → SEquiv α ( f ) ,which is an equivalence if N is univalent. Proof. By induction on n . When n : ≡ , both are . For n > , the desiredmap consists of the inductively defined SSEquiv ( f ′ ) → SEquiv α ′ N ⊥ ◦L ′ f ⊥ ( f ′ ) togetherwith a morphism Y ( K : L ⊥ ) Y ( y : N ⊥ ( α ⊥ ( K ))) X x : M ⊥ ( K ) (cid:0) f ⊥ ( K )( x ) = N ⊥ ( α ⊥ ( K )) y (cid:1) → Y ( K : L ⊥ ) Y ( y : N ⊥ ( α ⊥ ( K ))) X x : M ⊥ ( K ) (cid:16) f ⊥ ( K )( x ) ≍ Nα ⊥ ( K ) y (cid:17) 44 17. EQUIVALENCE OF STRUCTURES AND THE UNIVALENCE PRINCIPLE that is simply induced by idtoindisc f ⊥ ( K )( x ) ,y . The latter is an equivalence when N is univalent by definition, as is the inductively defined map since N ′ is univalent.(This last step would fail if we worked only with absolute equivalences, since α ∗ N can fail to be univalent even if N is so.) (cid:3) Theorem Univalence principle ) . Consider L : Sig ( n ) and M, N : Str ( L ) such that M and N are both univalent. The canonical morphism idtoeqv :( M = N ) → ( M ≃ N ) is an equivalence. Proof. Combine Theorem 17.6 and Lemma 17.9. (cid:3) As in the diagram case, this implies: Corollary 17.11. Any L -axiom t is invariant under equivalence of univalent L -structures: given univalent L -structures M , N and an equivalence M ≃ N , then t ( M ) ↔ t ( N ) . One might also hope for a univalence principle for weak equivalences, i.e., ananalogue of [ AKS15 , Lemma 6.8]. A natural way to try to prove this would be byenhancing Lemma 17.5 to say that some induced map “ f : ( x ≍ y ) → ( f x ≍ f y ) ”is an equivalence, so that a weak equivalence between univalent structures wouldbe an embedding and hence an equivalence. Unfortunately, as we have seen inExamples 5.11 and 13.4, an arbitrary morphism between structures does not induceany such map on types of indiscernibilities, even when it is an identity on derivedstructures as in Lemma 17.5.HAPTER 18 Examples of functorial structures Functorial signatures are significantly more general than diagram signatures.As we saw in Example 7.5, exofinite height-2 diagram signatures are essentially thesame as signatures for multi-sorted first-order logic. However, height-2 functorialsignatures can represent any signature in multi-sorted higher -order logic. Beforedescribing such a representation in general, we give two classes of examples toillustrate the idea. Example 18.1 ( T -spaces) . Since a topology is a structure on one underlyingset, to describe a structure for topological spaces it suffices to consider height-2signatures with L ⊥ : ≡ , with L ′ : U → U remaining to be specified. A first guessmight be L ′ M : ≡ ( M → Prop U ) , so that an L -structure would be a type M with apredicate on its “type of subsets” M → Prop U representing “is open”. Unfortunately,this is not a covariant exo-functor. We can make it covariant via direct images (usingpropositional truncation), but this is not strictly exo-functorial.One way around this problem is to introduce a separate sort for open sets, withthe following diagram signature: [ ∈ ] M O where M represents the set of points, O the set of opens, and [ ∈ ] the membershiprelation; we write [ ∈ ]( x, w ) infix as x ∈ w . (Note that there are no “equality”relations.) We assert the usual axioms of a topology, e.g., for all u, v : O thereexists a w : O such that for all x : M we have ( x ∈ w ) ↔ ( x ∈ u ) ∧ ( x ∈ v ) .Univalence at [ ∈ ] makes it a proposition. An indiscernibility u ≍ v for u, v : O then asserts that ( x ∈ u ) ↔ ( x ∈ v ) for all x : M ; thus in a univalent structure anelement u : O is uniquely determined by a subset of M . Similarly, an indiscernibility x ≍ y for x, y : M asserts that ( x ∈ u ) ↔ ( y ∈ u ) for all u : O , which if O is atopology amounts to saying that the topology is T .However, a morphism of topological spaces, regarded as structures for thissignature, is a function on sets and a function on open sets that preserves themembership relation. In other words, we have f : M → N together with, for eachopen subset u of M , an open subset f ! ( u ) of N , such that if x ∈ u then f ( x ) ∈ f ! ( u ) .This is quite different from the usual notion of continuous map, and does not evencoincide with the standard notion of open map (that would require that y ∈ f ! ( u ) if and only if y = f ( x ) for some x ∈ u ).A different way to obtain covariant exo-functoriality is to use the double -powerset functor M (( M → Prop U ) → Prop U ) . The covariant functorial action of a function f : M → N takes a set of subsets x to the set of all subsets U of N such that f − ( U ) ∈ x .In this case we need a definition of topological spaces that refers to sets ofsubsets instead of individual subsets. Perhaps the simplest approach is to take L ′ M : ≡ (( M → Prop U ) → Prop U ) , so that a structure consists of a type M togetherwith a family of sets of subsets of M . We regard a topological space M as such astructure by equipping it with the family of all supersets of the set of open subsets,i.e., a predicate that holds of x just when U ∈ x for every open subset U of M .Then a morphism of structures is a function f : M → N such that if x contains allopens in M , then its image under f contains all opens in N , which is to say that f − ( U ) ∈ x for all opens U in N . This is equivalent to saying that f − ( U ) is openin M for all opens U in N , i.e., that f is continuous.Of course, univalence at rank 1 says that this predicate on sets of subsets is aproposition. For x, y : M , an indiscernibility x ≍ y is the assertion that for a set x of subsets of M + , its image under h M , x i contains all opens if and only if itsimage under h M , y i does. Such a x is determined by two sets of subsets of M , say x = ( x + ∅ ) ∪ ( x + { ⋆ } ) , and its image under h M , x i consists of those sets in x thatdon’t contain x and those sets in x that do contain x . Thus, x ≍ y is equivalentto saying that any open set U contains x if and only if it contains y . Hence M isunivalent just when it is T , as before. In addition, a continuous map f : M → N between not-necessarily univalent structures is an equivalence if surjective up toindiscernibility — i.e., for any y ∈ N there is an x ∈ M such that f ( x ) and y belong to the same open sets — and moreover M has the topology induced from N . Another way to present topological spaces using double-powersets is in terms ofa convergence relation between filters (which are sets of subsets) and points. Thissuggests a different signature with L ′ M : ≡ (( M → Prop U ) → Prop U ) × M so that a structure is a set M equipped with a relation between sets-of-subsets andpoints. We could require that this relation holds of ( x , x ) only when x is itself afilter converging to x , or when x contains some filter converging to x . In eithercase, since covariant functoriality specializes to the direct image of filters, the L -structure morphisms between topological spaces will be functions that preserveconvergence, which is equivalent to continuity. Univalence means that convergenceis a proposition, that M is a set, and that two points are identified if exactly thesame filters converge to them. For topological spaces, the latter is equivalent tosaying that the principal filter at each point converges to the other, which is anequivalent way of saying the space is T , i.e., no two distinct points belong tothe same sets. Finally, the equivalences are again the continuous maps that aresurjective up to indiscernibility and give their domain the induced topology.Other topological structures such as uniform spaces and proximity spaces, withthe usual morphisms between them, can be represented in a similar way. Example 18.2 (Suplattices, DCPOs) . A suplattice is a partially ordered setthat has joins of all subsets, or equivalently of all indexed families. One suitablesignature for the theory of suplattices is given as follows. Consider the height-2signature L with L ⊥ : ≡ , and with L ′ M : ≡ ( M × M ) + (( P ( A : Set ) ( A → M )) × M ); 8. EXAMPLES OF FUNCTORIAL STRUCTURES 147 this assignment is covariantly exo-functorial. Here, the first summand M × M standsfor the partial ordering— ( m, n ) meaning m ≤ n —whereas the second summanddenotes suprema: ( X, s ) holds if and only if s is a supremum of the family X ofelements of M . We assert suitable axioms turning ≤ into a preorder, and that m is indeed the supremum of X ; in particular, we assert that there exists somesupremum of any family X .Given a structure M for this signature, two elements m , m : M of the carriertype of M are indiscernible if m ≤ m and m ≤ m ; the fact that m and m are suprema of exactly the same families X is then automatic. Univalence at ⊥ hence means that M is a set, and that the preorder ≤ on M is antisymmetric, like inExample 7.4. A morphism of structures is sup-preserving morphism of preorders (inthe sense that it takes any supremum to some other supremum); it is an equivalenceif it is (split) surjective up to isomorphism and reflects the preorder (and hence alsosuprema of families).Directed-complete partial orders (DCPOs) can be formulated similarly, by re-stricting the families P ( A : Set ) A → M to directed families, i.e., to families ( A, f : A → M ) such that for any i, j : A , there is k : A such that f ( i ) ≤ f ( k ) and f ( j ) ≤ f ( k ) . It should also be possible to omit to include the partial orderingexplicitly, since m ≤ m holds precisely when m is a supremum of the doubleton { m , m } .However, this signature does have the disadvantage that it is “larger” than itsstructures, in the sense of universe level. For it to correctly represent the suplatticesin some universe U , the type Set appearing in the definition of L must consist of allthe sets in U , with the consequence that L itself lives in the next higher universe U ′ . In particular, this implies that we cannot use the same signature L to describesuplattices in all universes, but rather we need a different L for each “size” ofsuplattice. This creates no actual problems for our results in this book, but itmight become problematic when constructing univalent completions.An alternative way of presenting suplattices is to use a double-powerset encod-ing akin to Example 18.1. Now we use the height-2 signature with L ⊥ : ≡ , andwith L ′ M : ≡ ( M × M ) + ((( M → Prop U ) → Prop U ) × M ) . The first summand stands for the partial ordering, as before, and for the secondsummand we assert that ( X, s ) holds if and only if X is of the form { B ⊆ M | A ⊆ B } for some A ⊆ M , and s is a supremum of A . We again assert suitable axioms.This representation is chosen to ensure the correct morphisms of structures: if f : M → N is a morphism of carriers, then the induced map on double powersetstakes { B ⊆ M | A ⊆ B } to { C ⊆ N | f ! ( A ) ⊆ C } , where f ! ( A ) is the imageof A under f . Thus, a morphism of structures is again a sup-preserving map ofpreorders. And once again, univalence means M is a set and ≤ is antisymmetric.Technically, this representation also suffers from the same problem of universe-dependence, as do those of Example 18.1, since Prop U lives in the next higheruniverse. But if we assume the axiom of “propositional resizing” (see, e.g., [ Uni13 ,§3.5]), which holds in all higher topos models, then Prop U is equivalent to a typein U , so we can construct an equivalent signature that lies in U .Examples 18.1 and 18.2 illustrate both the potential and pitfalls of using func-torial signatures to represent higher-order theories. On one hand, unlike ordinary 48 18. EXAMPLES OF FUNCTORIAL STRUCTURES higher-order logic, our functorial signatures come with a canonical notion of non-invertible morphism between structures. By taking care with the representation,we can often arrange that this notion coincides with some desired one, includingnotions of morphism that behave either covariantly or contravariantly on subsets.On the other hand, this flexibility comes at a cost: we have to encode singlepowersets using double powersets, and in general there will be many different waysto encode a particular higher-order theory. In particular, we do not expect thatany one general method of translating higher-order theories into functorial theorieswould produce the desired result in all cases; some customization will usually berequired. However, to make the point about the extreme generality of functorialsignatures, we will at least sketch a proof of the following: Theorem . For any exofinite multi-sorted relational higher-order signature S , there is a height-2 functorial theory ( L , T ) such that the type of S -structures isequivalent to the type of ( L , T ) -models M . Note that although S is only a signature (with no axioms), we have to imposesome axioms on the L -structures to obtain an equivalence. A theory over S , ofcourse, can then be transferred to a larger theory over L . Proof. We start with a slightly idiosyncratic definition of higher-order signa-ture. First, let the higher-order operations of arity n : N e be the exo-functors F : U n × ( U op ) n → U inductively generated as composites of projections π i : U n → U , cartesian products U × U → U , and powersets P : U op → U , where P A : ≡ ( A → Prop U ) . Since projec-tions and products preserve both embeddings and surjections, while P interchangesembeddings and surjections, any such F takes an input of n embeddings and n sur-jections to an embedding, and n surjections and n embeddings to a surjection.Now composing the action of such an F on objects with the diagonal, we obtaina function (not a functor!) F ∆ : U n → U n × U n → U . We define a (finite, relational) higher-order signature to consist of: • An exo-natural number n : N e (the number of base sorts ). • An exo-natural number m : N e of relations , and for each j < m a higher-order operation F j as the domain of that symbol.A structure for such a signature consists of • A family of sets M : Set n U . • For each relation R with domain F , a predicate M R : F ∆( M ) → Prop U .Now given such a higher-order signature, let L be the height-2 functorial signaturewith L ⊥ : ≡ N e 8. EXAMPLES OF FUNCTORIAL STRUCTURES 149 A structure for this signature L consists of a family of types M : U n and a typefamily M ′ : L ′ M → U .Now for any A : U , there is a map A → P A sending a : A to the “single-ton” λx. k x = a k ; and if A is a set, then this map is an embedding. Thus, bycontravariance we have a map L ′ M ≡ F (1 × P )∆( M ) → F ∆( M ) which is a surjection if M is a family of sets. Therefore, an S -structure is equivalentto an L -structure M such that(1) M ′ consists of propositions (equvialently, is univalent);(2) M : U n consists of sets; and(3) M ′ is the composite L ′ M → F ∆ MR −−→ Prop U for some M R (necessarilyunique by surjectivity).This is a subtype of Str ( L ) ; hence by our very general notion of “theory”, it is thetype of models of a theory T over L . (cid:3) We end with an example suggesting that there may at least be some interestin non-diagram signatures of height greater than 2. Example 18.4 (Ultracategories [ Mak87, Lur, CT03 ]) . There are two notionsof “ultracategory” in the literature. A Makkai–Lurie ultracategory [ Mak87, Lur ]is a category C equipped with a functor R S ( − ) dµ : C S → C for any set S and anyultrafilter on S . (In fact Makkai’s and Lurie’s definitions differ somewhat in theaxioms imposed, but the basic structure is the same.) This can be represented by adiagram signature in the style of Example 8.7, but with the type P S : Set Ultra ( S ) of“sets equipped with an ultrafilter” indexing a family of rank-1 sorts, and similarly afamily of rank-2 sorts for the functoriality of these operations. As usual, univalencereduces to ordinary univalence of the underlying category. Note that P S : Set Ultra ( S ) is a 1-type, so this example exhibits behavior similar to Example 8.9. It is also “largeand universe-sensitive” in the same way as the “suprema of families” presentationof suplattices (Example 18.2).By contrast, a Clementino–Tholen ultracategory [ CT03 ] is more like a multi-category: it has a set O of objects together with, for every ultrafilter x on the set O and every y : O , a hom-set A ( x , y ) , with composition operations and axioms. Wecan represent this with a height-3 non-diagram signature with L ⊥ : ≡ , and for M O : U L ′ M O ⊥ : ≡ Ultra ( M O ) × M O, with the top rank encoding the identity and composition operations as in Exam-ples 8.12 and 8.13. We mention this because it is our only example of a non-diagramsignature of height greater than 2, but we have not investigated it in detail. In par-ticular, since we can in general expect M O to be a proper 1-type rather than a set,the correct notion of “ultrafilter” on it is perhaps not entirely clear.HAPTER 19 Conclusion Using a relativized form of the identity of indiscernibles , we defined a generalnotion of indiscernibility of objects in a categorical structure, yielding a notion ofunivalence for such structures. These notions depend only on the shape of thestructures as specified by the signature, not on any axioms they satisfy. We thenshowed a Structure Identity Principle for univalent structures that specializes toknown results for first-order logic and univalent 1-categories, as well as many otherimportant examples.Regarding the setting we have chosen for our work, it seems impossible todefine a fully coherent notion of signature without 2LTT. A sufficiently-coherent“wild” notion might suffice for our particular results, but further development ofthe theory may require the fully coherent version. In addition, 2LTT is necessaryfor treating FOLDS-signatures of arbitrary height (cf. Chapter 4).In this paper we have focused on laying out the basic definitions, proving thefundamental univalence principle, and describing a large number of examples toshow the wide applicability of the theory. However, there are many importantquestions that we have left open, including the following. • Can we remove the splitness condition from Theorem 17.6, as discussedat the end of Chapter 17? • Is there a completion operation for structures, i.e., a universal way toturn a structure into a univalent one, generalizing the Rezk completionfor categories [ AKS15 , Section 8]? • As discussed in Remark 6.7, it should be the case that axioms expressed inMakkai’s language FOLDS are invariant under our notion of weak equiv-alence. • Also as discussed in Remark 6.7, is there a weak-equivalence-invariantnotion of “axiom” that also includes our examples involving non-FOLDSsignatures? • As discussed in Remark 10.5, can we prove a general theorem that uni-valent structures with fully heterogeneous equality consist of sets, andis there a general method to add heterogeneous equalities to only somesorts? • Can the theory of univalence be extended from our functorial signaturesto a wider class of Generalized Algebraic Theories? In particular, canwe deal directly with theories that include functions, perhaps by finding auniform way to encode their graphs as relations? (We thank Steve Awodeyfor raising this question to us.) • We have so far considered only signatures of finite height, which permitarguments by induction. Can the theory be extended to signatures ofinfinite height, perhaps using coinduction? • The results presented here should be formalizable in a computer proofassistant implementing 2LTT. ibliography [ACKS19] Danil Annenkov, Paolo Capriotti, Nicolai Kraus, and Christian Sattler. Two-leveltype theory and applications. arXiv preprint, 2019, 1705.03307v3.[Acz11] Peter Aczel. On Voevodsky’s univalence axiom. In Samuel R. Buss, Ulrich Kohlen-bach, and Michael Rathjen, editors, Mathematical Logic: Proof Theory, Construc-tive Mathematics , chapter 1, page 2967. Mathematisches Forschungsinstitut Ober-wolfach, Oberwolfach, 2011. doi:10.4171/OWR/2011/52.[AF18] David Ayala and John Francis. Flagged higher categories. arXiv:1801.08973, 2018.[AFMvdW19] Benedikt Ahrens, Dan Frumin, Marco Maggesi, and Niels van der Weide.Bicategories in univalent foundations. In Herman Geuvers, editor, , volume 131 of LIPIcs , pages 5:1–5:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019.doi:10.4230/LIPIcs.FSCD.2019.5. Extended version available at arXiv:1903.01152.[AKS15] Benedikt Ahrens, Krzysztof Kapulkin, and Michael Shulman. Univalent cate-gories and the Rezk completion. Mathematical Structures in Computer Science ,25(05):1010–1039, 2015. doi:10.1017/S0960129514000486.[AL19] Benedikt Ahrens and Peter LeFanu Lumsdaine. Displayed categories. Logical Meth-ods in Computer Science , 15(1):1–20, 2019. doi:10.23638/LMCS-15(1:20)2019.[ALV18] Benedikt Ahrens, Peter LeFanu Lumsdaine, and Vladimir Voevodsky. Categoricalstructures for type theory in univalent foundations. Logical Methods in ComputerScience , 14(3), 2018. doi:10.23638/LMCS-14(3:18)2018.[ANST20] Benedikt Ahrens, Paige Randall North, Michael Shulman, and Dimitris Tse-mentzis. A higher structure identity principle. In Proceedings of the 35thAnnual ACM/IEEE Symposium on Logic in Computer Science (LICS ’20),July 8–11, 2020, Saarbrücken, Germany , New York, NY, USA, 2020. ACM.doi:10.1145/3373718.3394755.[Ara14] Dimitri Ara. Higher quasi-categories vs higher Rezk spaces. Journal of K-theory ,14(3):701–749, 2014. doi:10.1017/S1865243315000021. arxiv:1206.4354.[AW09] S. Awodey and M. A. Warren. Homotopy theoretic models of identity types. Math.Proc. Camb. Phil. Soc. , 146(45):45–55, 2009.[Awo96] Steve Awodey. Structure in mathematics and logic: a categorical perspective. Phi-los. Math. (3) , 4(3):209–237, 1996.[Awo04] S. Awodey. An answer to Hellman’s question: ‘Does category theory provide aframework for mathematical structuralism?’. Philosophia Mathematica , 12 (1):54–64, 2004.[Awo14] S. Awodey. Structuralism, invariance and univalence. Philosophia Mathematica , 22(1):1–11, 2014.[Awo16] Steve Awodey. Natural models of homotopy type theory. Mathemat-ical Structures in Computer Science , pages 1–46, 2016, 1406.3219.doi:10.1017/S0960129516000268.[BCH14] Marc Bezem, Thierry Coquand, and Simon Huber. A model of type theoryin cubical sets. In Ralph Matthes and Aleksy Schubert, editors, , vol-ume 26 of Leibniz International Proceedings in Informatics (LIPIcs) , pages 107–128, Dagstuhl, Germany, 2014. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.doi:10.4230/LIPIcs.TYPES.2013.107. [BD98] John C. Baez and James Dolan. Higher-dimensional algebra. III. n -categories andthe algebra of opetopes. Adv. Math. , 135(2):145–206, 1998.[BdBLM20] Guillaume Brunerie, Menno de Boer, Peter LeFanu Lumsdaine, and Anders Mört-berg. Initiality for Martin-Löf type theory. A formalization in Agda of the proof,2020. URL https://github.com/guillaumebrunerie/initiality .[Ben65] P. Benacerraf. What numbers could not be. The Philosophical Review , 74 (1):47–73,Jan. 1965.[Ber09] Julia E. Bergner. A survey of ( ∞ , -categories. In John C. Baez and J. Peter May,editors, Towards Higher Categories , volume 152 of The IMA Volumes in Mathe-matics and its Applications , pages 69–83. Springer, 2009. arXiv:math.CT/0610239.[BGMS21] John C. Baez, Fabrizio Genovese, Jade Master, and Michael Shulman. Categoriesof nets. arXiv preprint, 2021, 2101.04238.[Bla78] Georges Blanc. Équivalence naturelle et formules logiques en théorie des catégories. Arch. Math. Logik Grundlag. , 19(3-4):131–137, 1978. doi:10.1007/BF02011874.[BMMS01] Roberto Bruni, José Meseguer, Ugo Montanari, and Vladimiro Sassone. Func-torial models for Petri nets. Inf. Comput. , 170(2):207?236, November 2001.doi:10.1006/inco.2001.3050.[Bra16] Martin Brandenburg. Unbiased symmetric monoidal categories, 2016. URL .[Cam20] Alexander Campbell. The gregarious model structure for double categories. Talkslides available at https://acmbl.github.io/greg_slides.pdf , 2020.[Cap19] Paolo Capriotti. Polynomial monads as opetopic types. Talk at HoTTEST seminar, ,April 2019.[Car86] John Cartmell. Generalized algebraic theories and contextual categories. Annals ofPure and Applied Logic , 32:209–243, 1986. doi:10.1016/0168-0072(86)90053-9.[CD13] Thierry Coquand and Nils Anders Danielsson. Isomorphism is equality. Indaga-tiones Mathematicae , 24(4):1105 – 1120, 2013. doi:10.1016/j.indag.2013.09.002. Inmemory of N.G. (Dick) de Bruijn (1918–2012).[Che03] Eugenia Cheng. Opetopic bicategories: comparison with the classical theory. arXivpreprint, 2003, math/0304285.[CK17] Paolo Capriotti and Nicolai Kraus. Univalent higher categories via completesemi-Segal types. Proc. ACM Program. Lang. , 2(POPL), December 2017.doi:10.1145/3158132.[CT03] Maria Manuel Clementino and Walter Tholen. Metric, topology and multicate-gory—a common approach. Journal of Pure and Applied Algebra , 179(1):13 – 47,2003. doi:https://doi.org/10.1016/S0022-4049(02)00246-3.[DKS89] W.G. Dwyer, D.M. Kan, and J.H. Smith. Homotopy commutative diagrams andtheir realizations. Journal of Pure and Applied Algebra , 57(1):5 – 24, 1989.doi:https://doi.org/10.1016/0022-4049(89)90023-6.[DM82] Pierre Deligne and James S. Milne. Tannakian Categories , pages 101–228. SpringerBerlin Heidelberg, Berlin, Heidelberg, 1982. doi:10.1007/978-3-540-38955-2_4.[Dus01] John W. Duskin. Simplicial matrices and the nerves of weak n -categories I: nervesof bicategories. Theory and Applications of Categories , 9(10):198–308, 2001.[Fio12] Marcelo Fiore. Discrete generalised polynomial functors, 2012. Slides from talkgiven at ICALP 2012, .[Fre76] Peter Freyd. Properties invariant within equivalence types of categories. In Algebra,topology, and category theory (a collection of papers in honor of Samuel Eilenberg) ,pages 55–61, New York, 1976. Academic Press.[FS19a] Brendan Fong and David I. Spivak. Hypergraph categories. Jour-nal of Pure and Applied Algebra , 223(11):4746 – 4777, 2019.doi:https://doi.org/10.1016/j.jpaa.2019.02.014.[FS19b] Brendan Fong and David I Spivak. Supplying bells and whistles in symmetricmonoidal categories. arXiv preprint, 2019, 1908.02633.[Füh99] Carsten Führmann. Direct models of the computational lambda-calculus. Electronic Notes in Theoretical Computer Science , 20:245–292, 1999.doi:10.1016/S1571-0661(04)80078-1. MFPS XV, Mathematical Foundationsof Progamming Semantics, Fifteenth Conference. IBLIOGRAPHY 155 [Gar09] Richard Garner. Understanding the small object argument. Appl. Categ. Struc-tures , 17(3):247–285, 2009. arXiv:0712.0724.[GHK17] David Gepner, Rune Haugseng, and Joachim Kock. ∞ -operads as analytic monads.arXiv preprint, 2017, 1712.06469.[GP04] Marco Grandis and Robert Pare. Adjoint for double categories. Cahiers deTopologie et Géométrie Différentielle Catégoriques , 45(3):193–240, 2004. URL .[Gra18] Daniel R. Grayson. An introduction to univalent foundations for mathematicians. Bull. Amer. Math. Soc. , 55:427–450, 2018. doi:10.1090/bull/1616.[GT06] Marco Grandis and Walter Tholen. Natural weak factorization systems. Arch.Math. (Brno) , 42(4):397–408, 2006.[Hen20] Simon Henry. Weak model categories in classical and constructive mathematics. Theory and Applications of Categories , 35(24):875–958, 2020.[HMP00] Claudio Hermida, Michael Makkai, and John Power. On weak higher dimen-sional categories I-1. Journal of Pure and Applied Algebra , 154:221–246, 2000.doi:10.1016/S0022-4049(99)00179-6.[HS98] Martin Hofmann and Thomas Streicher. The groupoid interpretation of type theory.In Twenty-five years of constructive type theory (Venice, 1995) , volume 36 of Oxford Logic Guides , pages 83–111. Oxford Univ. Press, New York, 1998.[HV12] Chris Heunen and Jamie Vicary. Lectures on categorical quantum mechanics, 2012.URL .[Isa01] Daniel C. Isaksen. A model structure on the category of pro-simplicial sets. Trans.Amer. Math. Soc. , 353(7):2805–2841 (electronic), 2001, arXiv:math.AT/0106152.[Joy81] André Joyal. Une théorie combinatoire des séries formelles. Advances in Mathe-matics , 42(1):1 – 82, 1981. doi:https://doi.org/10.1016/0001-8708(81)90052-9.[Joy97] André Joyal. Disks, duality, and Θ -categories. https://ncatlab.org/nlab/files/JoyalThetaCategories.pdf , 1997.[Joy02] A. Joyal. Quasi-categories and Kan complexes. Journal of Pure and Applied Alge-bra , 175:207–222, 2002.[JS91] André Joyal and Ross Street. The geometry of tensor calculus, i. Advances inMathematics , 88(1):55–112, 1991. doi:10.1016/0001-8708(91)90003-P.[KL19] Chris Kapulkin and Peter LeFanu Lumsdaine. The simplicial model of univalentfoundations (after Voevodsky). Journal of the European Mathematical Society ,2019, 1211.2851. To appear. arXiv:1211.2851.[Koc06] Joachim Kock. Weak identity arrows in higher categories. IMRP Int. Math. Res.Pap. , pages 69163, 1–54, 2006, math/0507116.[Koc20] Joachim Kock. Elements of Petri nets and processes. arXiv preprint, 2020,2005.05108.[Lei04] Tom Leinster. Higher Operads, Higher Categories , volume 298 of London Mathe-matical Society Lecture Note Series . Cambridge University Press, Cambridge, 2004,math/0305049.[Lev17] Paul Blain Levy. Contextual isomorphisms. In Giuseppe Castagna and Andrew D.Gordon, editors, Proceedings of the 44th ACM SIGPLAN Symposium on Principlesof Programming Languages, POPL 2017, Paris, France, January 18-20, 2017 ,pages 400–414, New York, NY, USA, 2017. Association for Computing Machinery.URL http://dl.acm.org/citation.cfm?id=3009898 .[Lev20] Paul Blain Levy. Thunkable implies central. ,2020.[LS12] Stephen Lack and Michael Shulman. Enhanced 2-categories and lim-its for lax morphisms. Advances in Mathematics , 229(1):294–356, 2012.doi:10.1016/j.aim.2011.08.014. arXiv:1104.2111.[LS19] Peter LeFanu Lumsdaine and Michael Shulman. Semantics of higher inductivetypes. Mathematical Proceedings of the Cambridge Philosophical Society , pages1–50, 2019. doi:10.1017/S030500411900015X. arXiv:1705.07088.[Lur] Jacob Lurie. Ultracategories. .[Lur09] J. Lurie. Higher topos theory . Number 170 in Annals of Mathematics Studies.Princeton University Press, 2009, arXiv:math.CT/0608040. 56 BIBLIOGRAPHY [Lur17] Jacob Lurie. Higher algebra. Available at ,Sep 2017.[LW15] Peter LeFanu Lumsdaine and Michael A. Warren. The local universes model: Anoverlooked coherence construction for dependent type theories. ACM Trans. Com-put. Logic , 16(3):23:1–23:31, July 2015. arXiv:1411.1736.[Mak87] M. Makkai. Stone duality for first order logic. Advances in Mathematics , 65(2):97– 170, 1987. doi:https://doi.org/10.1016/0001-8708(87)90020-X.[Mak95] Michael Makkai. First order logic with dependent sorts, with applications to cat-egory theory. ,1995.[Mak96] Michael Makkai. Avoiding the axiom of choice in general category theory. J. PureAppl. Algebra , 108(2):109–173, 1996.[Mak98] Michael Makkai. Towards a categorical foundation of mathematics , volume 11 of Lecture Notes Logic , pages 153–190. Springer, Berlin, 1998.[Mak04] Michael Makkai. The multitopic ω -category of all multitopic ω -categories, 2004.URL .[Mak21] Michael Makkai. Notions of identity for and in higher dimensionalcategories, 2021. Talk at the Bohemian Logical & Philosophical Café,recordings available at , .[ML98] S. Mac Lane. Categories for the Working Mathematician (Graduate Texts in Math-ematics) . Springer, 1998.[MM13] Guillaume Munch-Maccagnoni. Syntax and Models of a non-Associative Composi-tion of Programs and Proofs . Theses, Université Paris-Diderot - Paris VII, Decem-ber 2013. URL https://tel.archives-ouvertes.fr/tel-00918642 .[Pal18] Erik Palmgren. On equality of objects in categories in constructive type theory.In Andreas Abel, Fredrik Nordvall Forsberg, and Ambrus Kaposi, editors, , vol-ume 104 of Leibniz International Proceedings in Informatics (LIPIcs) , pages 7:1–7:7, Dagstuhl, Germany, 2018. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.doi:10.4230/LIPIcs.TYPES.2017.7.[Pow02] John Power. Premonoidal categories as categories with algebraic structure. Theo-retical Computer Science , 278:303–321, 2002. doi:10.1016/50304-3975(00)00340-6.[PR97] John Power and Edmund Robinson. Premonoidal categories and no-tions of computation. Math. Structures Comput. Sci. , 7(5):453–468, 1997.doi:10.1017/S0960129597002375. Logic, domains, and programming languages(Darmstadt, 1995).[PT99] John Power and Hayo Thielecke. Closed Freyd- and κ -categories. In Jiří Wieder-mann, Peter van Emde Boas, and Mogens Nielsen, editors, Automata, Languagesand Programming , pages 625–634, Berlin, Heidelberg, 1999. Springer Berlin Hei-delberg.[Rez98] Charles Rezk. Fibrations and homotopy colimits of simplicial sheaves. arXivpreprint, 1998, math/9811038.[Rez01] Charles Rezk. A model for the homotopy theory of homotopy theory. Trans. Amer.Math. Soc. , 353(3):973–1007 (electronic), 2001, arXiv:math.AT/9811037.[Rez10] Charles Rezk. A cartesian presentation of weak n -categories. Geometry and Topol-ogy , 14:521–571, 2010. arXiv:0901.3602.[Rie11] Emily Riehl. Algebraic model structures. New York Journal of Mathematics ,17:173–231, 2011, arXiv:0910.2733.[Shu08] Michael Shulman. Framed bicategories and monoidal fibrations. Theory and Ap-plications of Categories , 20(18):650–738 (electronic), 2008. arXiv:0706.1286.[Shu15] Michael Shulman. Reedy categories and their generalizations. arXiv preprint, 2015,1507.01065.[Shu17] Michael Shulman. Univalence for inverse EI diagrams. Homology, Homotopy andApplications , 19(2):219–249, 2017. doi:10.4310/HHA.2017.v19.n2.a12.[Shu18] Michael Shulman. Contravariance through enrichment. Theory and Applications ofCategories , 33(5):95–130, 2018. arXiv:1606.05058. IBLIOGRAPHY 157 [Shu19] Michael Shulman. All ( ∞ , -toposes have strict univalent universes. arXiv preprint,2019, 1904.07004.[Shu20] Michael Shulman. Homotopy type theory: the logic of space. In Gabriel Catrenand Mathieu Anel, editors, New Spaces in Mathematics and Physics: Volume I –New Spaces in Mathematics . Cambridge University Press, 2020, 1703.03007.[SL13] Sam Staton and Paul Blain Levy. Universal properties of impure pro-gramming languages. SIGPLAN Not. , 48(1):179–192, January 2013.doi:10.1145/2480359.2429091.[Str81] Ross Street. Cauchy characterization of enriched categories. Rend. Sem. Mat. Fis.Milano , 51:217–233 (1983), 1981. Reprinted as Repr. Theory Appl. Categ. 4:1–16,2004.[Str87] Ross Street. The algebra of oriented simplexes. J. Pure Appl. Algebra , 49:283–335,1987.[Tri13] Salvatore Tringali. Plots and their applications - Part I: Foundations. arXivpreprint, 2013, 1311.3524v1.[Uni13] The Univalent Foundations Program. Homotopy Type Theory: Univalent Founda-tions of Mathematics . https://homotopytypetheory.org/book , Institute for Ad-vanced Study, 2013.[Ver92] Dominic Verity. Enriched categories, internal categories andchange of base . PhD thesis, Cambridge University, 1992. URL . Reprintsin Theory and Applications of Categories, No. 20 (2011) pp 1-266.[Voe15] Vladimir Voevodsky. An experimental library of formalized mathematics basedon the univalent foundations. Mathematical Structures in Computer Science ,25(5):1278–1294, 2015. doi:10.1017/S0960129514000577.[Woo82] R. J. Wood. Abstract proarrows. I. Cahiers Topologie Géom. Différentielle ,23(3):279–290, 1982.[Woo85] R. J. Wood. Proarrows. II. Cahiers Topologie Géom. Différentielle Catég. ,26(2):135–168, 1985.[Yor14] Brent Abraham Yorgey.