Lectures onType Theory
Chapter 207
Chapter 207Core route

Univalent Categories and Rezk Completion

In ordinary category theory, isomorphic objects need not be equal. In a univalent universe, however, equivalent types determine identifications, and transport along those identifications carries structure. A category internal to such a theory must therefore answer a concrete question: when should an isomorphism of objects be an identification? Requiring the canonical map idtoiso:(a=b)(ab) to be an equivalence answers it; Rezk completion then repairs precategories that fail this requirement.

Convention 74.1 — Ambient notation

In internal path and categorical formulas, = denotes the identity type; metatheoretic arithmetic and side conditions use ordinary meta-equality. The universe U is univalent and closed under the formers of chapter 26chapter 30, so function extensionality is available. The Rezk constructions additionally use propositional truncation, set quotients, and the HITs of chapter 68; truncation levels and closure properties are those of chapter 66.

Precategories and univalent categories

A precategory merely has a type of objects. A univalent category further requires idtoiso:(a=b)(ab) to be an equivalence.

Definition 74.2 — Precategory

A precategory A consists of:

  1. a type A0 of objects; we write a:A for a:A0;

  2. for all a,b:A, a set homA(a,b) of morphisms;

  3. for each a:A an identity 1a:homA(a,a);

  4. a composition (g,f)gf:homA(b,c)homA(a,b)homA(a,c);

  5. identifications f=1bf,  f=f1a, and h(gf)=(hg)f for all composable f,g,h.

Since hom-types are sets, the equations in (v) are mere propositions, and no coherence between them need be imposed.

Definition 74.3 — Isomorphism

Recall the categorical definition from definition 141.21: a morphism f:homA(a,b) in a precategory is an isomorphism if there is g:homA(b,a) with gf=1a and fg=1b. We write ab for the type of isomorphisms from a to b, and f1 for the inverse of an isomorphism f.

Lemma 74.4

For any f:homA(a,b), “f is an isomorphism” is a mere proposition; consequently each type ab is a set.

Proof of Lemma 74.4

Proof. Let (g,η,ϵ) and (g,η,ϵ) witness invertibility of f, with η:gf=1a, ϵ:fg=1b, and likewise for the primed data. The equations inhabit identity types of sets, hence are mere propositions; by theorem 62.30 it suffices to identify g with g. Using ϵ and η, g=rightunitg1b=ϵg(fg)=associativity(gf)g=η1ag=leftunitg. Thus ab is a subtype of the set homA(a,b), hence a set. ◻

Construction 74.5 — idtoiso

For a precategory A and a,b:A there is a map idtoisoa,b:(a=A0b)(ab),idtoiso(refla)1a, defined by path induction: it suffices to consider refla, and 1a is an isomorphism.

Definition 74.6 — Univalent category

A precategory A is a univalent category (briefly: a category) if for all a,b:A the map idtoisoa,b of construction 74.5 is an equivalence. We write isotoid:(ab)(a=b) for its inverse.

Example 74.7 — The category of sets

Put Set:=A:UisSet(A),Prop:=P:UisProp(P). We suppress the coercions to U, so an element of Set is used as a type. There is a precategory SetU with objects Set, with homSetU(A,B):=(AB), and with identity functions and composition of functions. It is univalent. Indeed, for sets A,B:

  1. identifications (A,s)=(B,t) of objects correspond to identifications A=B of carriers, since isSet is a mere proposition (theorem 62.30);

  2. for f:AB between sets, “f is an equivalence” (definition 62.21) and “f is an isomorphism in SetU” are both mere propositions (lemma 74.4), and each implies the other; hence (AB)(AB);

  3. the composite (A=B) idtoeqv (AB)(AB) sends refl to 1A, hence equals idtoiso by path induction; the first map is an equivalence by univalence (definition 65.6) and the second by (ii).

Lemma 74.8

In a univalent category the type of objects is a 1-type.

Proof of Lemma 74.8

Proof. Each a=b is equivalent to the set ab (lemma 74.4); a type whose identity types are sets is a 1-type (definition 66.2). ◻

Example 74.9 — Groupoids

Let X be a 1-type. Taking hom(x,y):=(x=Xy) — a set, since X is a 1-type — with 1x:=reflx and qp:=pq yields a univalent category in which every morphism is invertible: xy is equivalent to x=y, and idtoiso is the canonical such equivalence. If X is a set, this is the discrete category on X; in general we call it the groupoid of X.

Lemma 74.10 — Transport of morphisms

Let A be a precategory, p:a=A0a, q:b=A0b, and f:homA(a,b). Then transport in the two-variable family (x,y)homA(x,y) satisfies tr(p,q)homA(f)=idtoiso(q)fidtoiso(p)1.

Proof of Lemma 74.10 — Transport of morphisms

Proof. By path induction assume prefla, qreflb; then the left side is f and the right side is 1bf1a, identified with f by the unit laws. ◻

The strict alternative already fails on the category of sets. Boolean negation is a nonidentity automorphism of 2. If the object type of SetU were a set, its loop type at 2 would be a proposition; univalence would then identify the loop corresponding to negation with reflexivity. Applying idtoiso would identify negation with the identity function, contradicting their values at tt. Thus the higher object identity is forced by ordinary automorphisms, not added for decoration.

Proposition 207.11 — Strict univalent categories

For a univalent category A, the object type A0 is a set if and only if every automorphism f:aa is equal to the identity isomorphism 1a.

Proof of Proposition 207.11 — Strict univalent categories

Proof. Suppose first that A0 is a set. Then each loop type a=a is a mere proposition. Univalence makes idtoiso:(a=a)(aa) an equivalence, so aa is a proposition as well. Its two elements f and 1a=idtoiso(refla) are therefore equal.

Conversely, suppose every automorphism is the identity. For p,q:a=b, the composite idtoiso(q)1idtoiso(p):aa equals 1a by hypothesis. Cancelling idtoiso(q)1 gives idtoiso(p)=idtoiso(q); injectivity of this equivalence then gives p=q. Thus every identity type a=b is a proposition, which is exactly that A0 is a set. ◻

Remark 74.11 — Three notions

Three strengthenings of the precategory definition coexist. A strict category is a precategory whose type of objects is a set; this transcribes the set-theoretic notion and inherits its defects (isomorphic objects need not be identifiable, and “every fully faithful, essentially surjective functor is an equivalence” becomes equivalent to the axiom of choice). A univalent category instead identifies a=b with ab; section 74.2 shows that with this choice the choice-free theory goes through. A bare precategory commits to neither. Unless contrasted with a precategory, “category” means “univalent category.” By proposition 207.11, a univalent category is strict iff every automorphism is an identity.

Proposition 207.13 — The fundamental pregroupoid

For any type X, let Π1(X) have objects X and hom(x,y):=x=Xy0, with identities induced by reflexivity and composition induced by concatenation. This is a precategory, and it is univalent exactly when X is a 1-type.

Proof of Proposition 207.13 — The fundamental pregroupoid

Proof. Truncation eliminates concatenation into the set-valued hom type. Double truncation induction reduces associativity and both unit laws to the corresponding path-groupoid laws of theorem 30.20; hence the precategory equations hold. Its map from object identity to isomorphism has underlying arrow |p|0. Inverses are represented by p1, and the inverse equations again follow by truncation induction.

This map is an equivalence for every x,y precisely when x=Xyx=Xy0 is an equivalence. By lemma 66.55, that holds precisely when each path type is a set, which is the definition that X is a 1-type. ◻

Exercise 74.1

★☆☆ Prove idtoiso(p1)=idtoiso(p)1 and idtoiso(pq)=idtoiso(q)idtoiso(p), and derive the corresponding equations for isotoid in a univalent category.

Exercise 74.2

★★☆ A precategory whose hom-sets are mere propositions is the same data as a type A0 with a reflexive transitive mere relation . Show that such a precategory is univalent if and only if A0 is a set and is antisymmetric, i.e. a poset.

Exercise 74.3

★★☆ Reprove proposition 207.13, writing the double-truncation induction for associativity and the inverse fields explicitly.

Exercise 74.4

★★☆ Reprove proposition 207.11, writing out the cancellation step and the application of the inverse of idtoiso explicitly.

Functors, equivalences, and equality of categories

The functor apparatus needs no modification; what univalence adds is that the classically distinct comparisons of categories — equivalence, isomorphism, equality — collapse into one another.

Definition 74.12 — Functor

A functor F:AB between precategories consists of F0:A0B0; functions Fa,b:homA(a,b)homB(Fa,Fb) (all written F); and identifications F(1a)=1Fa and F(gf)=FgFf. Composition satisfies (GF)0(a)=G0(F0(a)) and (GF)(f)=G(F(f)); the identity functor fixes objects and morphisms.

Definition 74.13 — Natural transformation

For functors F,G:AB, a natural transformation γ:FG consists of components γa:homB(Fa,Ga) together with, for every f:homA(a,b), an identification Gfγa=γbFf. Equivalently, the following square commutes: Mathematical diagramDiagram

Lemma 74.14

Naturality is a mere proposition; hence the type of natural transformations FG is a set, and two natural transformations are equal as soon as their components are.

Proof of Lemma 74.14

Proof. Naturality is a product of identifications in sets, a mere proposition by the closure theorems; so the type of natural transformations is a subtype of the set a:A0homB(Fa,Ga) (a product of sets, using theorem 65.18). ◻

Definition 74.15 — Functor precategory

For precategories A,B, the precategory BA has functors AB as objects and natural transformations as morphisms, with (1F)a:=1Fa and (δγ)a:=δaγa. Thus, for example, ((ϵδ)γ)a=(ϵaδa)γa=ϵa(δaγa)=(ϵ(δγ))a. The unit equations are proved at a in the same way, and lemma 74.14 turns these component equalities into equalities of transformations.

Lemma 74.16

γ:FG is an isomorphism in BA if and only if each γa is an isomorphism in B.

Proof of Lemma 74.16

Proof. If δ inverts γ, then δaγa=1Fa and γaδa=1Ga. Conversely let each γa have inverse δa; the family δ is natural since for f:homA(a,b), Ffδa=δbγb=1δbγbFfδa=naturalityofγδbGfγaδa=γaδa=1δbGf, and (δγ)a=1Fa and (γδ)a=1Ga; lemma 74.14 promotes these component equations to the two inverse identities. ◻

Theorem 74.17 — Functor categories

If A is a precategory and B a univalent category, then BA is a univalent category.

Proof of Theorem 74.17 — Functor categories

Proof. Fix F,G:AB; we invert idtoiso:(F=G)(FG). Given a natural isomorphism γ, each component is an isomorphism (lemma 74.16), so univalence of B yields isotoid(γa):Fa=Ga, and function extensionality (theorem 65.18) an identification γ¯:F0=G0 with happly(γ¯)(a)=isotoid(γa). Among the data of a functor, the two equation families are mere propositions. By theorem 62.30, the second component is an identification between the transport of the hom-action of F along γ¯ and the hom-action of G. The first component of the required Σ-path is γ¯; the functor-law components need no further choice because they are mere propositions. For the hom-action component, the computation rule for funext evaluates happly(γ¯) at a and b, so lemma 74.10 carries Ff (for f:homA(a,b)) to idtoiso(isotoid(γb))Ffidtoiso(isotoid(γa))1=definition74.6γbFfγa1=naturalityGf. This defines isotoid:(FG)(F=G).

For the round trips: an identification F=G is determined by its image in F0=G0, because the remaining components of the characterization above are mere propositions; and if γ=idtoiso(p) then γa=idtoiso(happly(p0)(a)) by path induction, whence γ¯=p0 by funext. Conversely idtoiso(γ¯)a=idtoiso(isotoid(γa))=γa, and natural transformations are determined by their components (lemma 74.14). ◻

Definition 74.18

A functor F:AB is faithful if each Fa,b is injective, full if each Fa,b is surjective, and fully faithful if each Fa,b is an equivalence; for functions between sets, fully faithful is equivalent to full and faithful.

Definition 74.19

F:AB is split essentially surjective if b:B0a:A0(Fab), and essentially surjective if b:B0a:A0(Fab). A weak equivalence is a fully faithful, essentially surjective functor; an equivalence of (pre)categories is a fully faithful, split essentially surjective functor.

Proposition 74.20

F:AB is an equivalence of precategories if and only if there are a functor G:BA and natural isomorphisms η:1AGF and ϵ:FG1B.

Proof of Proposition 74.20

Proof. Given (G,η,ϵ): the assignment gηb1G(g)ηa is a two-sided inverse of Fa,b (a chase using naturality and functoriality), so F is fully faithful, and ϵb:FGbb splits essential surjectivity. Conversely, given fully faithful F and a splitting b(G0b, ϵb:FG0bb), define G on g:homB(b,b) as the unique morphism with F(G(g))=ϵb1gϵb, and let ηa be the unique morphism with F(ηa)=ϵFa1. Functoriality of G and naturality of η,ϵ follow from faithfulness of F. Indeed, F(G(1b))=ϵb1ϵb=1FGb, so G(1b)=1Gb; and for g:bb, h:bb, F(G(hg))=ϵb1hgϵb=F(GhGg), so G(hg)=GhGg. The defining equality for Gg rearranges to gϵb=ϵbF(Gg), which is naturality of ϵ. Applying F to the naturality square for η gives on both sides ϵFa1Ff; faithfulness gives the square in A. ◻

Lemma 74.21 — Unique choice of preimages

If A is a univalent category and F:AB is fully faithful, then for every b:B the type a:A0(Fab) is a mere proposition.

Proof of Lemma 74.21 — Unique choice of preimages

Proof. Let (a,f) and (a,f) be two elements. Then f1f:FaFa, and since F is fully faithful there is g:aa with Fg=f1f. By univalence of A take p:=isotoid(g):a=a. Path induction (as in lemma 74.10) computes the transport of f along p in the family x(Fxb) as trp(f)=lemma74.10f(Fidtoiso(p))1=p=isotoid(g)f(Fg)1=Fg=f1fff1f=inverse and unit lawsf, so (a,f)=(a,f) by theorem 62.30. ◻

Theorem 74.22

For a functor F between univalent categories, “F is an equivalence” and “F is a weak equivalence” are equivalent, and both are mere propositions.

Proof of Theorem 74.22

Proof. An equivalence is a weak equivalence by truncating the splitting pointwise. Conversely let F be fully faithful and essentially surjective. For each b the type a:A0(Fab) is a mere proposition (lemma 74.21) and merely inhabited, hence inhabited by the elimination rule of truncation (definition 66.33); so F is split essentially surjective. Propositionality: full faithfulness is a family of isEquiv-conditions, and split essential surjectivity is a product of mere propositions by lemma 74.21. ◻

Remark 74.23 — Where choice went

Classically, “fully faithful and essentially surjective implies equivalence” is equivalent to the axiom of choice: one must choose a preimage for every object. For univalent categories the choice is unique up to contractibility (lemma 74.21), so no axiom is consumed — the category-theoretic principle of unique choice. For strict categories the classical situation reappears, and for general precategories no consistent form of choice makes the statement true.

Definition 74.24

A functor F:AB is an isomorphism of precategories if F is fully faithful and F0:A0B0 is an equivalence of types.

Theorem 74.25 — Equality of precategories

For precategories A and B, the canonical map (A=B)(AB) — defined by path induction, sending refl to the identity functor, where AB denotes the type of isomorphisms of precategories — is an equivalence.

Proof of Theorem 74.25 — Equality of precategories

Proof. The type of precategories is an iterated Σ-type, so by repeated use of theorem 62.30 an identification A=B amounts to: P0:A0=B0; a family of identifications homA(a,b)=homB(trP0(a),trP0(b)) (the axiom components being mere propositions over the rest); and identifications matching identities and composition. Applying univalence to P0 and to each hom-identification — and funext to pass between families of identifications and identifications of families — this data is equivalent to: an equivalence F0:A0B0; equivalences Fa,b:homA(a,b)homB(F0a,F0b); and the functor equations F(1a)=1F0a, F(gf)=FgFf — precisely an isomorphism of precategories. To identify the composite with the canonical map, path-induct on A=B. At reflexivity every transport, both applications of univalence, and the resulting functor compute to the identity, so the comparison is reflexivity. ◻

Lemma 74.26

A functor between univalent categories is an equivalence of categories if and only if it is an isomorphism of precategories.

Proof of Lemma 74.26

Proof. Both are mere propositions (being fully faithful is a product of isEquiv-conditions, as is isEquiv(F0); split essential surjectivity is one by lemma 74.21), so a logical equivalence suffices. If F is an isomorphism, then for b:B we get a with F0a=b, hence Fab by idtoiso: split essential surjectivity. Conversely let F be an equivalence, with (G,η,ϵ) as in proposition 74.20. By theorem 74.17 the precategories AA and BB are univalent, so the natural isomorphisms η,ϵ yield identifications 1A=GF and FG=1B; projecting to object parts, G0 is a two-sided inverse of F0 up to identification, so F0 is an equivalence of types. ◻

Theorem 74.27 — Equality of univalent categories

For univalent categories A,B, the canonical map from A=B to the type of equivalences of categories AB is an equivalence of types.

Proof of Theorem 74.27 — Equality of univalent categories

Proof. Being univalent is a mere proposition (a product of isEquiv-conditions), so identifications of univalent categories coincide with identifications of their underlying precategories (theorem 62.30). Now combine theorem 74.25 with lemma 74.26: the subtype of functors that are isomorphisms agrees with the subtype of equivalences. ◻

Corollary 74.28

The type of univalent categories in U is a 2-type.

Proof of Corollary 74.28

Proof. For univalent A,B the type of equivalences AB is a subtype of the objects of the univalent category BA (theorem 74.17), a 1-type by lemma 74.8; by theorem 74.27 each A=B is thus a 1-type. ◻

Example 207.31 — A precategory that is not univalent

Let 2ch have object type 2 and hom(x,y):=1. The objects tt and ff are distinct: example 30.12 gives a map tt=2ff0. Nevertheless the unique arrows between them are inverse, so ttff is inhabited. Consequently idtoiso:(tt=ff)(ttff) is not an equivalence, and 2ch is not univalent. Rezk completion repairs precisely this mismatch between object identity and isomorphism.

Exercise 74.5

★★☆ Let X be merely inhabited. The chaotic precategory Xch on X has objects X and hom(x,y):=1. Show that the unique functor Xch1ch is a weak equivalence, but an isomorphism of precategories only if X is contractible. Generalize example 207.31: characterize exactly when Xch is univalent.

Exercise 74.6

★★★ Complete the proof of proposition 74.20: verify that G is a functor, that η and ϵ are natural, and that the two constructions are mutually inverse when A is univalent.

Exercise 74.7

★☆☆ Show by path induction that the equivalence constructed in theorem 74.25 is the canonical map.

The Rezk completion

Every precategory generates a univalent category; the construction is a completion, universal among functors into univalent categories.

The object quotient suggested by the slogan is not a construction of a category. If [a] denotes an isomorphism class, the clause hom([a],[b])=?homA(a,b) depends on representatives, and choosing representatives destroys the choice-free universal property. Replacing the object type by its 0-truncation has the same defect: the hom-family has not yet been shown invariant under the paths introduced by truncation. The repair is to embed objects in a category where isomorphic representables are already identical.

Definition 74.29

The opposite Aop of a precategory A has the same objects, homAop(a,b):=homA(b,a), and identities and composition inherited from A. The presheaf precategory of A is SetUAop; it is univalent by theorem 74.17, example 74.7.

Definition 74.30 — Yoneda embedding

For a precategory A, the functor y:ASetUAop sends a:A to the presheaf ya:=(xhomA(x,a)),(ya)(g):=(hhg)for g:homA(x,x), and f:homA(a,b) to the natural transformation with components hfh. On identities, y(1a)x(h)=1ah=h; on composites, y(gf)x(h)=(gf)h=g(fh)=(ygyf)x(h). These equations make y a functor.

Theorem 74.31 — Yoneda lemma

For any precategory A, object a:A, and presheaf F:SetUAop, evaluation at the identity, ααa(1a):homSetUAop(ya,F)Fa, is an isomorphism of sets, natural in a and F.

Proof of Theorem 74.31 — Yoneda lemma

Proof. Inverse: to x:Fa associate the transformation α with αa(f):=F(f)(x); its naturality is functoriality of F. One composite: αa(1a)=F(1a)(x)=x. The other: for α:yaF and f:homA(a,a), naturality gives αa(f)=αa((ya)(f)(1a))=F(f)(αa(1a)), which is the transformation associated to αa(1a). For a natural transformation θ:FG, both routes send α to θa(αa(1a)); this is naturality in F. For k:aa, both routes send α to F(k)(αa(1a)), by the naturality square of α; this is naturality in a. ◻

Corollary 74.32

The Yoneda embedding is fully faithful.

Proof of Corollary 74.32

Proof. hom(ya,yb)(yb)(a)homA(a,b) by theorem 74.31, and the isomorphism is inverse to the action of y on hom-sets. ◻

Lemma 74.33 — Full subcategories

Let B be a univalent category and P:B0Prop. The full sub-precategory B|P with objects b:B0P(b) and hom-sets inherited from B is univalent.

Proof of Lemma 74.33 — Full subcategories

Proof. Identifications of objects of B|P agree with identifications of their carriers (theorem 62.30, P being prop-valued), isomorphisms agree by definition, and idtoiso commutes with both comparisons by path induction. ◻

Theorem 74.34 — Rezk completion

For every precategory A there exist a univalent category A^ and a weak equivalence I:AA^.

Proof of Theorem 74.34 — Rezk completion

Proof. Take A^:=SetUAop|P, the full subcategory of the presheaf category on the mere property P(F):=a:A0(yaF); it is univalent by lemma 74.33 and definition 74.29. The corestriction I of y lands in A^ and is fully faithful by corollary 74.32; it is essentially surjective by the definition of P. ◻

Remark 74.35 — Size

The presheaf construction raises the universe level: if A lies in U, then SetUAop is a category only in the next universe, and a priori so is A^. A propositional resizing axiom repairs this; alternatively, a higher inductive construction produces A^ in the same universe as A (construction 74.36).

Remark 74.36 — Rezk completion as a HIT

HoTT Book Theorem 9.9.5, second proof, constructs a Rezk completion in the same universe by a higher inductive object type [Uni13]. Its signature has generators i(a), paths j(f):i(a)=i(b) for isomorphisms f:ab, unit and composition coherences for j, and a 1-truncation constructor. The source gives the simultaneous elimination principles needed to define the hom-family and category operations and to prove univalence and weak equivalence. The present book has admitted only the individual HIT signatures of chapter 68; it therefore imports the conclusion and does not treat this constructor list as a local definition. The presheaf construction of theorem 74.34 remains the core route.

Theorem 74.37 — Universal property

Let H:AB be a weak equivalence of precategories and C a univalent category. Then precomposition (H):CBCA is an isomorphism of precategories. In particular every functor AC factors through I:AA^, uniquely up to identification. For F:AC, the factorization relation is the commuting triangle Mathematical diagramDiagram

Proof of Theorem 74.37 — Universal property

Proof. This is HoTT Book Theorem 9.9.4 [Uni13]. Its signature is a weak equivalence H:AB of precategories and a univalent category C, exactly as here; it concludes that precomposition is an isomorphism of precategories, not merely an equivalence on objects. Lemmas 9.9.1–9.9.3 in the same source prove faithfulness from essential surjectivity and fullness from fullness plus essential surjectivity. The object component is constructed by characterizing the image object and its action on morphisms by contractible types; univalence of C converts the unique isomorphism between two choices into the identity needed for truncation elimination. Thus no choice or resizing principle is hidden in the import.

Apply the imported isomorphism to H:=I from theorem 74.34. Its essential surjectivity gives a factor of every AC through A^. Explicitly, if K,L:A^C and p:KI=LI, faithfulness of precomposition gives the unique p¯:K=L with ap(I)(p¯)=p. Thus the factorization is unique. This exact import is used only for the two examples immediately below; no subsequent core theorem depends on it. ◻

Example 74.38

The Rezk completion of the fundamental pregroupoid Π1(X) of proposition 207.13 is the fundamental groupoid of X: the groupoid (example 74.9) of the 1-truncation X1. The map sends x to |x|1 and a truncated path class to its image under ap||1. It is fully faithful because theorem 66.56 gives |x|1=X1|y|1x=Xy0, and it is essentially surjective by 1-truncation induction into the proposition x:X(|x|1=z). The target is univalent by example 74.9, so the universal property theorem 74.37 identifies it as the completion.

Example 74.39

The precategory with objects U and hom(X,Y):=XY0 is the homotopy precategory of types; its Rezk completion is the homotopy category. The comparison requiring completion is explicit: object identity remains the untruncated type X=Y, whereas isomorphisms are built from the set-truncated homs XY0. These two types are not identified by the definition of the precategory.

Exercise 74.8

★★☆ Prove the naturality claims in theorem 74.31: the displayed isomorphism is natural in F, and in a along y.

Exercise 74.9

★★☆ Call F:SetUAop representable if a:A0(yaF). Show that if A is a univalent category, representability is a mere proposition; conclude that in a univalent category any two representations agree.

Exercise 74.10

★☆☆ Show that if A is already univalent then I:AA^ is an equivalence of categories. (Use theorem 74.22.)

Transport of structure and the structure identity principle

Univalence converts equivalences into identifications, and identifications transport all structure; the structure identity principle packages the consequence — isomorphic structures are identical — for a general class of structures.

Theorem 74.40 — Transport of structure

Let P:UU be any type family and e:AB an equivalence. Then trua(e)P:P(A)P(B) is an equivalence, with inverse trua(e)1P. Its value is computed by the transport operation of the particular family P; no general syntactic variance rule is asserted.

Proof of Theorem 74.40 — Transport of structure

Proof. Transport along any identification is an equivalence, since trpP and trp1P have homotopies trp1P(trpP(u))=u,trpP(trp1P(v))=v, obtained by functoriality of transport and the paths pp1=refl and p1p=refl (proposition 62.2(ii)). Thus transport along the inverse path is an inverse map. ◻

Example 74.41 — Semigroups

For m:XXX, let AssocX(m):=x,y,z:Xm(x,m(y,z))=m(m(x,y),z),SgStr(X):=m:XXXAssocX(m). For e:AB and (m,s):SgStr(A), the transport rules for Σ-, Π-, and function types compute trua(e)SgStr(m,s)=(m,s),m(b1,b2)=e(m(e1(b1),e1(b2))), with s the associativity proof obtained by conjugating s — precisely the multiplication “carried across the bijection”. For an n-ary operation ω, iteration of the domain-transport calculation gives ω(b)=e(ω(e1(b))), where e1 acts componentwise on b:Bn. Nullary operations give distinguished points, while families of operations give the transported operations of monoids, groups, rings, modules over a fixed ring, and lattices.

Proof of Example 74.41 — Semigroups

Calculation. Write p:=ua(e). Transport in a function family is contravariant in its domain and covariant in its codomain, so two iterations give trpXXXX(m)(b1,b2)=trpXX(m(trp1XX(b1),trp1XX(b2))). The ua transport equations are trua(e)XX(a)=e(a),trua(e)1XX(b)=e1(b). Substitution into the preceding formula gives the displayed m. Apply ap to the associativity path s(x,y,z) and substitute e1(b1),e1(b2),e1(b3); the two sides reduce to the two associativity composites for m. This constructs s and proves the claimed pair equation by the path rule for Σ. ◻

Definition 74.42 — Notion of structure

Let X be a precategory. A notion of structure (P,H) over X consists of:

  1. a family P:X0U; elements of Px are structures on x;

  2. for α:Px, β:Py, f:homX(x,y), a mere proposition Hαβ(f) (“f is a homomorphism”);

  3. Hαα(1x) for all α;

  4. closure of H under composition.

For α,β:Px put (αxβ):=Hαβ(1x); by (iii) and (iv) this is a preorder on Px. The notion is standard if each x is a partial order: equivalently, identity homomorphisms in both directions, Hαβ(1x) and Hβα(1x), force α=β. This is the step by which the structure identity principle later turns mutually identity-preserving structure data into equality.

Lemma 207.46 — Standard fibers are sets

If (P,H) is standard, then each type Px is a set.

Proof of Lemma 207.46 — Standard fibers are sets

Proof. Fix x and α,β:Px, and put

R(α,β):=(αxβ)×(βxα).

This is a proposition because the two H-judgments are propositions. Path induction, using reflexivity of x, defines u:(α=β)R(α,β); antisymmetry defines v:R(α,β)(α=β). Hence vu is a weakly constant endomap of every path type: u(p)=u(q) by propositionhood of R(α,β), and applying v gives (vu)(p)=(vu)(q). The collapse lemma lemma 66.27, applied to Px, now makes Px a set. ◻

Construction 74.43 — Precategory of structures

For (P,H) over X, the precategory Str(P,H)(X) has objects x:X0Px and hom-sets hom((x,α),(y,β)):=f:homX(x,y)Hαβ(f), a subtype of a set; identities and composition are inherited from X, lifted by (iii) and (iv) of definition 74.42.

Theorem 74.44 — Structure identity principle

If X is a univalent category and (P,H) is a standard notion of structure over X, then Str(P,H)(X) is a univalent category.

Proof of Theorem 74.44 — Structure identity principle

Proof. By theorem 62.30, an identification (x,α)=(y,β) consists of p:x=y together with trp(α)=β, and the latter is a mere proposition since P is set-valued by lemma 207.46. An isomorphism (x,α)(y,β) consists of an isomorphism f:xy in X such that Hαβ(f) and Hβα(f1) — again a mere condition on f. Since X is univalent, (x=y)(xy); it therefore suffices to show, for p:x=y, trp(α)=βHαβ(idtoiso(p))  Hβα(idtoiso(p)1). Left to right is the existence of idtoiso for Str(P,H)(X) itself. For right to left, path induction reduces to preflx, where the hypotheses read αxβ and βxα; standardness gives α=β. The two mere conditions correspond under this equivalence by construction, so idtoiso for the structure precategory is an equivalence. ◻

Definition 74.45 — Group structure

For X:Set let GrpStr(X):=m:XXXe:Xi:XXax(m,e,i), where ax(m,e,i) is the conjunction of the mere propositions x:Xy:Xz:Xm(x,m(y,z))=m(m(x,y),z),x:X(m(e,x)=x)×x:X(m(x,e)=x),x:X(m(i(x),x)=e)×x:X(m(x,i(x))=e). For α=(mα,eα,iα):GrpStr(X) and β:GrpStr(Y), put Hαβ(f):=x:Xy:Xf(mα(x,y))=mβ(f(x),f(y)). A group is an object of Grp:=Str(GrpStr,H)(SetU).

Theorem 74.46 — SIP for groups

(GrpStr,H) is a standard notion of structure over SetU; hence Grp is a univalent category, and for groups G,H the canonical map (G=H)(GH) into the type of group isomorphisms is an equivalence.

Proof of Theorem 74.46 — SIP for groups

Proof. GrpStr(X) is a set: XXX and XX are sets and ax is a mere proposition, by the closure theorems of chapter 66. Each Hαβ(f) is a product of identifications in a set, hence a mere proposition; identities are homomorphisms and homomorphisms compose, so (P,H) is a notion of structure. For standardness, suppose αXβ and βXα: the identity function preserves multiplication both ways, so mα(x,y)=mβ(x,y) for all x,y, whence mα=mβ by funext (theorem 65.18). The units agree, a two-sided unit being unique: eα=eβisarightunitformβmβ(eα,eβ)=mα=mβmα(eα,eβ)=eαisaleftunitformαeβ. Inverses are determined by m and e, so iα=iβ by funext; and ax is a mere proposition. Hence α=β by theorem 62.30, and theorem 74.44 applies, with SetU univalent by example 74.7. ◻

Remark 74.47

Fix a single-sorted finitary first-order signature Ω, with operation symbols Ω0, relation symbols Ω1, and arity ||. Put Px:=(ω:Ω0(x|ω|x))×(ρ:Ω1(x|ρ|Prop)). For sets x,y, data α=(α0,α1):Px and β=(β0,β1):Py, and a function f:xy, let fn:xnyn act componentwise and define Hαβ(f):=(ω:Ω0a:x|ω|f(α0(ω)(a))=yβ0(ω)(f|ω|(a)))×(ρ:Ω1a:x|ρ|α1(ρ)(a)β1(ρ)(f|ρ|(a))). Identity and composition preserve these equations and implications pointwise. If both Hαβ(1x) and Hβα(1x) hold, function extensionality identifies the operation components; the two implications identify each relation by propositional extensionality, and function extensionality identifies the relation components. The path rule for the displayed product then gives α=β. Thus the raw Ω-structures form a standard notion of structure.

Algebraic examples also impose laws. Let Axx(α):Prop be the proposition expressing the chosen equational and relational axioms, and replace the raw fiber by PAxx:=α:PxAxx(α). Define a homomorphism between (α,a):PAxx and (β,b):PAxy to be an inhabitant of Hαβ(f). Identity and composition still use the displayed pointwise clauses. Two identity homomorphisms in opposite directions first give α=β by the raw standardness calculation. After transport along that path, the axiom witnesses a and b are equal because Axx(β) is a proposition; the path rule for Σ gives (α,a)=(β,b). Consequently (PAx,H) is standard. Pointed sets, monoids, rings, modules over a fixed ring, and lattices are instances obtained by choosing their symbols and axiom predicate. Isomorphic such structures are therefore identical, and any construction or property of one transports to the other along the identification — the formal warrant for the informal practice of “identifying isomorphic objects”. For example, theorem 69.25 established a group isomorphism π1(S1)Z; the structure identity principle now upgrades that isomorphism to an identification of groups, along which every group-structured construction transports.

Exercise 74.11

★★★ Carry out definition 74.45, theorem 74.46 for monoids and for rings, isolating exactly which components of the structure must be mentioned in H for standardness to hold.

Exercise 74.12

★☆☆ Show that a multiplication-preserving function between groups preserves the unit and inverses. Conclude that H of definition 74.45 is equivalent to the seemingly stronger “preserves m, e, and i”.

Exercise 74.13

★★☆ For P(X):=X and Hx0y0(f):=(f(x0)=y0), show that (P,H) is a standard notion of structure over SetU, and identify the resulting univalent category of pointed sets.

Suggested first pass.

None of these problems is a prerequisite for a later chapter. Begin with exercise 207.14, then complete exercise 207.15.

Exercise 207.14

★★★ For a one-object precategory induced by a monoid, describe the objects and morphisms seen by its Rezk completion. Prove that the unit is fully faithful and identify the essential-surjectivity witness supplied by completion.

Exercise 207.15

★★★ Practical project.finite-rezk-skeleton Implement in Agda or Kappa a finite-category skeletonizer that merges isomorphic objects while retaining hom-set representatives. Preserve composition and identities and print the unit functor. On a category with two isomorphic objects it must return one object and a fully faithful unit; on two merely parallel objects it must retain both. Mutation test: merging on the existence of one arrow must fail the latter acceptance test.

Bibliographic notes

The category-theoretic development follows Chapter 9 of the HoTT Book [Uni13]. Univalent categories and the Rezk completion originate with Ahrens, Kapulkin, and Shulman; the term “univalent category” is used where the Book says “category”. The structure identity principle is due in this form to Aczel; the standard-notion-of-structure formulation follows [Uni13], with worked algebraic examples in [Rij25]. Precategory Rezk completion takes a precategory and returns a univalent category. Family univalent completion in chapter 201 instead takes a type-indexed family; their input data and universal properties are different.

Search the book

Type to search the local edition.