Abstract 1 Introduction 2 Additional related work 3 Background on type theory and colimits 4 Wild categories 5 The main connection 6 Creation of colimits 7 Preservation of the left class of an OFS 8 Mapping colimits to weak limits 9 Conclusion and future work References

Coslice Colimits in Homotopy Type Theory

Perry Hart ORCID Department of Computer Science and Engineering, University of Minnesota, Minneapolis, MN, USA Kuen-Bang Hou (Favonia) ORCID Department of Computer Science and Engineering, University of Minnesota, Minneapolis, MN, USA
Abstract

We contribute to the theory of (homotopy) colimits inside homotopy type theory. The heart of our work characterizes the connection between colimits in coslices of a universe, called coslice colimits, and colimits in the universe (i.e., ordinary colimits). To derive this characterization, we find an explicit construction of colimits in coslices that is tailored to reveal the connection. We use the construction to derive properties of colimits. Notably, we prove that the forgetful functor from a coslice creates colimits over trees. We also use the construction to examine how colimits interact with orthogonal factorization systems and with cohomology theories. As a consequence of their interaction with orthogonal factorization systems, all pointed colimits (special kinds of coslice colimits) preserve n-connectedness, which implies that higher groups are closed under colimits on directed graphs. We have formalized our main construction of the coslice colimit functor in Agda.

Keywords and phrases:
colimits, homotopy type theory, category theory, higher inductive types, synthetic homotopy theory
Copyright and License:
[Uncaptioned image] © Perry Hart and Kuen-Bang Hou; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Type theory
Related Version:
Technical report: https://doi.org/10.48550/arXiv.2411.15103 [6]
Supplementary Material:
Software  (Agda Code): https://github.com/PHart3/colimits-agda/tree/v0.1.0 [7]
Acknowledgements:
We thank the anonymous reviewers for their feedback that improved the writing of this paper. We also thank the anonymous reviewer for HoTT/UF 2023 who pointed out the relationship between adjunctions and factorization systems.
Funding:
This material is based upon work supported by the Air Force Office of Scientific Research under award number FA9550-21-1-0009. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the United States Air Force.
Editors:
Jörg Endrullis and Sylvain Schmitz

1 Introduction

Homotopy type theory (HoTT) extends Martin-Löf type theory (MLTT) with univalence and higher inductive types [27]. The key feature of HoTT is that all types behave as homotopy types of topological spaces [9]. Thus, with HoTT, we can use purely type-theoretic methods to prove new properties of spaces. Moreover, higher inductive types (HITs) let us bring a vast range of spaces into HoTT. As a result, HoTT is a useful system for developing synthetic homotopy theory and formalizing it in proof assistants like Coq and Agda [5, 8].

We study HITs arising as (homotopy) colimits in coslices of a universe, called coslice colimits. Coslices of a universe are type-theoretic versions of coslice categories. A colimit in a category is an object formed by gluing together simpler objects in a coherent fashion. The coherent requirement ensures that the colimit has a universal property, which reduces proofs about the colimit to proofs about the simpler objects it is built out of. When these objects are spaces, perhaps endowed with extra structure, colimits built out of them find wide use in homotopy theory. For example, the class of HITs we study includes colimits of pointed spaces. Such colimits are key to the Brown representability theorem, which is about homotopy functors on the (-)category of pointed connected spaces. Indeed, its proof relies on the fact that this category is generated under colimits by compact cogroups.

1.1 Contributions

In this section, we explain the contributions of the paper along with its organization. We start by outlining the heart of the paper, which we call the main connection. Afterward, we describe three independent applications of the main connection in synthetic homotopy theory. Details, proofs, and related additional results are found in our associated technical report [6]. Further, we have formalized in Agda our construction of A-colimits as well as the universality of ordinary colimits for Corollary 21.

1.1.1 The main connection (Section 5)

Suppose 𝒰 is a universe and A is a type in 𝒰. We want to construct colimits in the coslice A/𝒰, or A-colimits. The (wild) category A/𝒰 has objects T:𝒰AT and morphisms XAYk:𝗉𝗋1(X)𝗉𝗋1(Y)k𝗉𝗋2(X)𝗉𝗋2(Y). Here, is defined by f1f2x:Xf1(x)=f2(x) for any dependent functions f1,f2:x:XY(x), called the type of homotopies from f1 to f2.

HoTT has a general schema for HITs that would let us simply postulate A-colimits. We, however, explicitly construct A-colimits with just the machinery of MLTT augmented with pushouts (Section 5.3).111A theoretical advantage of such a construction is that pushouts, the simplest nontrivial HITs, can be postulated with a less powerful schema than that required to postulate A-colimits. We take this different approach to reveal the connection between A-colimits and their underlying colimits in 𝒰. In fact, our construction is not a case of a general method to encode higher-dimensional HITs with pushouts but rather tailored to reveal this connection.

Why do we care about this connection? It sheds light on three established areas of synthetic homotopy theory. We preview them now and return to them in Sections 6, 7, and 8.

The universality of colimits (Section 6)

The universality of colimits is a special feature of locally cartesian closed (LCC) -categories, such as that of spaces. The main connection will establish a well-known classical result inside type theory: The forgetful functor A/𝒰𝒰 creates colimits of diagrams over contractible graphs (Theorem 18), which make up a large subclass of graphs.222For a definition of creating (co)limits, see [16]. Examples of such colimits include sequential colimits [25]. With the forgetful functor creating colimits, we can transfer universality of ordinary colimits to A-colimits over contractible graphs (Corollary 21). This is notable as LCC -categories are not closed under coslices.

The categories of higher groups are cocomplete (Section 7)

A striking feature of colimits is their interaction with (orthogonal) factorization systems. In Section 7, we use the main connection to show that colimits in A/𝒰 preserve left classes of maps of factorization systems on 𝒰. It is significant that we consider factorization systems on 𝒰 rather than A/𝒰. We could derive a similar preservation theorem for systems on A/𝒰 directly from the universal property of an A-colimit. In practice, however, the factorization systems we tend to care about are on 𝒰. Since the main connection relates the action of A-colimits on maps to the action of the underlying ordinary colimits on maps (Section 5.4), we manage to deduce the preservation theorem for systems on 𝒰.

To prove this theorem, we find it useful to develop the theory of factorization systems in a more general setting than 𝒰. In Section 4.1, we study such systems on wild categories, which make up one approach to category theory in HoTT. We prove that if a functor F of well-behaved wild categories with factorization systems has a right adjoint G, then F preserves the left class when G preserves the right class (Theorem 13). We combine this result with the main connection to deduce the desired preservation property.

When we focus on the (n-connected, n-truncated) factorization system on 𝒰 [27, Chapter 7.6] and take A as the unit type, the main connection shows that the colimit of every diagram of pointed n-connected types is n-connected. One useful corollary of this is that the higher category (n,k)𝖦𝖳𝗒𝗉𝖾 of k-tuply groupal n-groupoids considered by [2] is cocomplete on (directed) graphs for all truncation levels 2n and 1k< (Example 23).

Cohomology sends colimits to weak limits (Section 8)

Finally, we examine how colimits interact with cohomology theories, which are important algebraic invariants of spaces. To do so, we consider weak limits, which are key ingredients in the Brown representability theorem (BRT). A weak colimit in a category need not satify the uniqueness property required of a colimit. The BRT specifies conditions for a presheaf on the homotopy category 𝐇𝐨(𝐓𝐨𝐩,c) of pointed connected spaces to be representable. The standard proof of the BRT requires the presheaf to send countable homotopy colimits in 𝐓𝐨𝐩,c to weak limits in 𝐒𝐞𝐭 [14, Section 1.4.1]. Eilenberg-Steenrod cohomology theories enjoy this property as set-valued functors.

In Section 8, we use the main connection to establish a restricted, type-theoretic version of this property. From the main connection we derive another construction of A-colimits, as pushouts of coproducts (Corollary 26), which mirrors a well-known classical lemma. We take A as the unit type and combine the new construction with the Mayer-Vietoris sequence to find that cohomology takes finite colimits to weak limits assuming the axiom of choice.

2 Additional related work

2.1 Construction of nonrecursive 𝟐-HITs

The HITs we consider are nonrecursive 2-HITs, in the sense that they have only nonrecursive constructors of points and of paths of dimension one or two. Van Doorn et al. explicitly construct nonrecursive 2-HITs in MLTT augmented with pushouts [28, Section 5]. When specialized to A-colimits, however, their construction has a significantly different form from ours and does not directly lead to the properties of A-colimits we derive. Moreover, they do not prove the full induction principle enjoyed by the 2-HIT for their construction, whereas we do for ours. The full induction principle is necessary (and sufficient) to characterize the 2-HIT uniquely.

2.2 Orthogonal factorization systems

Our work also builds on the theory of factorization systems. Such systems play important roles in model category theory [20], a key framework for classical homotopy theory. Moreover, in type theory, Rijke et al. have shown that factorization systems on 𝒰 are closely connected to modalities [22], which are important in logic. We extend factorization systems to wild categories other than 𝒰. Moreover, we lift factorization systems on 𝒰 to wild categories of 𝒰-valued diagrams (Lemma 22).

3 Background on type theory and colimits

Before describing the main connection and its applications, we need to review the type system we work in. For us, the most important data type of this system is the ordinary colimit, i.e., the colimit of a diagram of types over a graph. We define this type in Section 3.3 and call it “ordinary” to distinguish it from the notion of coslice colimit. The latter takes place in coslices of a universe rather than the universe itself, and we will construct coslice colimits out of ordinary colimits.

3.1 Type system

We assume the reader is familiar with MLTT and HITs in the style of [27]. We will work in MLTT augmented with ordinary colimits and denote this system by 𝖬𝖫𝖳𝖳+𝖢𝗈𝗅𝗂𝗆. In fact, we need only augment MLTT with pushouts as they let us construct all nonrecursive 1-HITs, including ordinary colimits, with all of their computational properties. Notably, 𝖬𝖫𝖳𝖳+𝖢𝗈𝗅𝗂𝗆 comes with strong function extensionality for free. This property is critical for reasoning about functions in type theory and underlies our entire development (see, for example, Lemma 8). Overall, we carry out our proofs inside 𝖬𝖫𝖳𝖳+𝖢𝗈𝗅𝗂𝗆 until Section 7. For Section 7 and Section 8, we also assume Voevodsky’s univalence axiom.

Before reviewing ordinary colimits, we recall two essential constructions in our type system. The first is the function 𝖺𝗉:(x=y)(f(x)=f(y)) defined by path induction for all functions f:XY and x,y:X. (We use = for the identity type and for definitional equality.) If we view X as an -groupoid, then 𝖺𝗉 is the action of f on morphisms of X (thereby exhibiting f as a functor). The second is the transport function 𝗍𝗋𝖺𝗇𝗌𝗉Y:x,y:Xp:x=yY(x)Y(y) for any type family Y over X. This notion also gives us a dependent version of 𝖺𝗉: If f:x:XY(x), then we have a function 𝖺𝗉𝖽f:x,y:Xp:x=y𝗍𝗋𝖺𝗇𝗌𝗉Y(p,f(x))=f(y). The transport function is essential for stating the induction principle for HITs, e.g., the colimits in Section 3.3. It also satisfies the following coherence law, which we need for our construction of A-colimits.

Lemma 1.

Let f,g:XY. For all x,y:X, p:x=y, and H:fg, we have a commuting square of identities

Finally, a remark on notation: we may use the Agda notation (x:X)Y(x) for the type x:XY(x) for any type family Y over X.

3.2 Graphs

Let 𝒰 be a universe and A:𝒰. In classical 1-category theory, a diagram in a category 𝒞 is a functor F:𝒞, where is the shape of the diagram. As long as 𝒞 is cocomplete, we can form the functor 𝖼𝗈𝗅𝗂𝗆 sending each diagram over to its colimit in 𝒞. We, however, want the colimit of a diagram in the -category A/𝒰. This requires the diagram to be an -functor: the functor laws must satisfy coherence laws up to homotopy, which themselves must satisfy higher coherence laws, and so on at arbitrarily high levels. It is unknown whether such -functors are definable in HoTT.

To avoid infinite coherence conditions, we specialize to the free category generated by a graph. A graph Γ is a pair (Γ0,Γ1) consisting of a type Γ0:𝒰 of vertices and a family Γ1:Γ0Γ0𝒰 of edges. A Γ-shaped diagram F in A/𝒰 is a pair (F0,F1) consisting of a function F0:Γ0A/𝒰 and a family of maps F1:(i,j:Γ0)Γ1(i,j)F0(i)AF0(j). We may write F for F0 and F1. The induced diagram in A/𝒰 satisfies all the infinite coherence laws because its domain is freely generated by the points and edges of Γ.

Example 2.

For each graph Γ and D:𝖮𝖻(A/𝒰), the constant diagram 𝖼𝗈𝗇𝗌𝗍Γ(D) at D is defined by (𝖼𝗈𝗇𝗌𝗍Γ(D))0(i)D and (𝖼𝗈𝗇𝗌𝗍Γ(D))1(i,j,g)𝗂𝖽D. We often refer to 𝖼𝗈𝗇𝗌𝗍Γ(D) simply by D.

We will see that A-colimits interact nicely with trees. A tree is a graph without non-directed cycles. Formally, a graph Γ is a tree if the quotient Γ0/Γ1 is contractible. Both and are trees when equipped with the successor ordering:

Another example of a tree is a span , on which pushouts are defined.

Rijke has defined the notion of directed tree and has defined an interpretation function sending an element of a 𝖶-type to a directed tree [23, The underlying trees of elements of W-types]. Intuitively, a directed tree is a rooted graph such that for each vertex v, there is a single directed path (including the trivial path) from v to the root. Every directed tree is a tree in our sense [6, Corollary 4.0.6]. Thus, elements of a 𝖶-type can be realized as trees.

3.3 Colimits in 𝓤

Let F be a Γ-shaped diagram in 𝒰. The (ordinary) colimit of F is the HIT 𝖼𝗈𝗅𝗂𝗆Γ(F) generated by

These two constructors make 𝖼𝗈𝗅𝗂𝗆Γ(F) a cocone under F (or F-cocone): a type C equipped with maps u:i:Γ0FiC and homotopies K:i,j,gujFi,j,gui. What characterizes 𝖼𝗈𝗅𝗂𝗆Γ(F) as a colimit of F is that κ is a (homotopy) initial F-cocone [24]. Equivalently, for every X:𝒰, the function

𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉:(𝖼𝗈𝗅𝗂𝗆Γ(F)X)𝖢𝗈𝖼𝗈𝗇𝖾F(X)
𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(f)(λi.fιi,λiλjλgλ(x:Fi).𝖺𝗉f(κi,j,g(x)))

is an equivalence, where 𝖢𝗈𝖼𝗈𝗇𝖾F(X) denotes the type of F-cocones on X.

Our proof of Theorem 15 will use the induction principle for 𝖼𝗈𝗅𝗂𝗆Γ(F). This states that for every type family E over 𝖼𝗈𝗅𝗂𝗆Γ(F) together with data

r:i:Γ0x:FiE(ιi(x))R:i,j:Γ0g:Γ1(i,j)x:Fi𝗍𝗋𝖺𝗇𝗌𝗉E(κi,j,g(x),r(j,Fi,j,g(x)))=r(i,x)

we have a function 𝗂𝗇𝖽(E,r,R):z:𝖼𝗈𝗅𝗂𝗆Γ(F)E(z) that satisfies 𝗂𝗇𝖽(E,r,R)(ιi(x))r(i,x) and is equipped with an identity ρ𝗂𝗇𝖽(E,r,R)(i,j,g,x):𝖺𝗉𝖽𝗂𝗇𝖽(E,r,R)(κi,j,g(x))=R(i,j,g,x).

4 Wild categories

Any universe, along with its coslices, fits into the framework of wild categories. This is one approach to category theory in HoTT and is used by other works of synthetic homotopy theory [3, 5, 11]. It is useful for the relationship between A-colimits and factorization systems we establish in Section 7. This requires us to formulate factorization systems on categories other than universes, namely the category of type-valued diagrams over a graph.

The key distinction between wild categories and (pre-)categories [27, Chapter 9.1] is that the latter have 0-truncated hom types. This means that instead of trivializing the higher coherence data for morphisms, wild categories simply ignore them. We choose them over pre-categories because we will focus on universes and their coslices (see Example 7), which are wild categories but not pre-categories.

Definition 3 ([6, Definition 3.1.1]).

A wild category (in a universe 𝒰) is a tuple consisting of a type 𝖮𝖻:𝒰 of objects, a family 𝗁𝗈𝗆:𝖮𝖻𝖮𝖻𝒰 of hom types, identity morphisms 𝗂𝖽, composition , left 𝖫𝖨𝖽 and right 𝖱𝖨𝖽 unit laws for , and associativity laws 𝖺𝗌𝗌𝗈𝖼 for .

By itself, the data of a wild category is insufficient for our work on factorization systems. We need two extra ingredients. The first is the notion of a wild bicategory. The second is a wild-categorical version of univalence.

Definition 4.

A wild category 𝒞 is a (wild) bicategory if it is equipped with identities

  1. (a)

    𝖺𝗉f(𝖺𝗌𝗌𝗈𝖼(k,g,h))𝖺𝗌𝗌𝗈𝖼(k,gh,f)𝖺𝗉k(𝖺𝗌𝗌𝗈𝖼(g,h,k))=𝖺𝗌𝗌𝗈𝖼(kg,h,f)𝖺𝗌𝗌𝗈𝖼(k,g,hf) for all composable morphisms k, g, h, and f

  2. (b)

    𝖺𝗌𝗌𝗈𝖼(g,𝗂𝖽,h)𝖺𝗉g(𝖫𝖨𝖽(h))=𝖺𝗉h(𝖱𝖨𝖽(g)) for all composable morphisms g and h.333A wild bicategory is called a wild 2-precategory by [3].

 Remark.

For us, a bicategory is always a wild (2,1)-category since the 2-cells, which are identities in 𝒰, are invertible.

Before moving to univalence, we transfer a well-known lemma of classical 2-category theory to type theory. This was first proved for monoidal categories [10], but the proof is applicable to all bicategories. (The type-theoretic version also appears as [3, Lemma 4.3].)

Lemma 5 ([6, Lemma 3.1.3]).

Let 𝒞 be a bicategory. For all A,B,C:𝖮𝖻(𝒞), f:𝗁𝗈𝗆𝒞(A,B), g:𝗁𝗈𝗆𝒞(B,C), we have 𝖫𝖨𝖽(gf)1𝖺𝗌𝗌𝗈𝖼(𝗂𝖽,g,f)1𝖺𝗉f(𝖫𝖨𝖽(g))=𝗋𝖾𝖿𝗅gf.

Definition 6.

We say that a wild category 𝒞 is univalent if the canonical function (A=𝖮𝖻(𝒞)B)(A𝒞B) is an equivalence. Here, elements of the righthand type are equivalences, defined as bi-invertible morphisms (in the manner of [27, Definition 4.3.1]).

Example 7.

The following are univalent bicategories assuming the univalence axiom.

  • The category 𝒰 of types and functions

  • For each A:𝒰, the coslice A/𝒰 of 𝒰 under A

  • The category 𝖣𝗂𝖺𝗀(Γ,A/𝒰) of Γ-shaped diagrams in A/𝒰. We define its hom types (natural transformations) when we present the action of the A-colimit on maps (Section 5.4).

Our ultimate interest is in colimits in the wild category A/𝒰. This category is defined by

For each X:𝖮𝖻(A/𝒰), the identity morphism on X is (𝗂𝖽𝗉𝗋1(X),λa.𝗋𝖾𝖿𝗅𝗉𝗋2(X)(a)). Composition is defined by (g,gp)(f,fp)(gf,λa.𝖺𝗉g(fp(a))gp(a)). The associativity and unit laws follow from routine path algebra. Note that the categories 𝟎/𝒰 and 𝒰 are equivalent.

We write 𝗍𝗒 and 𝗌𝗍𝗋 for the functions 𝗉𝗋1:𝖮𝖻(A/𝒰)𝒰 and 𝗉𝗋2:(Z:𝖮𝖻(A/𝒰))A𝗉𝗋1(Z), i.e., the underlying type and structure map of an object in A/𝒰, respectively. Also, we write 𝖿𝗎𝗇 and 𝗉𝗍 for the functions 𝗉𝗋1:𝗁𝗈𝗆A/𝒰(W,Z)𝗍𝗒(W)𝗍𝗒(Z) and 𝗉𝗋2:(h:𝗁𝗈𝗆A/𝒰(W,Z))𝗉𝗋1(h)𝗌𝗍𝗋(W)𝗌𝗍𝗋(Z), respectively.

Lemma 8.

Let f,g:XAY. Define fAg as the type of homotopies H:𝖿𝗎𝗇(f)𝖿𝗎𝗇(g) equipped with a commuting triangle

for each a:A. The canonical function f=gfAg is an equivalence, with inverse denoted by ,:fAgf=g.

Elements of fAg are called A-homotopies between f and g.

4.1 Orthogonal factorization systems

We now introduce (orthogonal) factorization systems on wild categories. For us, the key property of such systems is that they interact nicely with adjunctions. In Section 7, we deduce from this property, combined with the main connection, that A-colimits preserve the left classes of factorization systems on 𝒰.

Definition 9.

Let 𝒞 be a wild category. An orthogonal factorization system (OFS) on 𝒞 consists of predicates ,:A,B:𝒞𝗁𝗈𝗆𝒞(A,B)𝖯𝗋𝗈𝗉 such that

  1. 1.

    both and are closed under composition and have all identities

  2. 2.

    for every h:𝗁𝗈𝗆𝒞(A,B), the following type is contractible:

    𝖿𝖺𝖼𝗍,(h)D:𝖮𝖻(𝒞)f:𝗁𝗈𝗆𝒞(A,D)g:𝗁𝗈𝗆𝒞(D,B)(gf=h)×(f)×(g)

For the next lemma, where 𝒞 is a univalent bicategory, 𝒞 is similar enough to 𝒰 that the proof of the lemma for 𝒰 can be transferred to 𝒞.444For the proof of this lemma for 𝒰, see [22, Lemma 1.46]. Indeed, univalence lets us characterize the identity types of 𝖿𝖺𝖼𝗍,(h) via the fundamental theorem of identity types [21, Theorem 11.2.2]. Moreover, Lemma 5 gives us a suitable diagonal filler for the key commuting square used by the proof. Before stating the next lemma, we need a definition.

Definition 10.

Let 𝒞 be a wild category. Let l:𝗁𝗈𝗆𝒞(A,B) and be a property of morphisms in 𝒞. We say that l has the left lifting property against if for every r:𝗁𝗈𝗆𝒞(C,D) such that (r) and every commuting square

the type of diagonal fillers

d:𝗁𝗈𝗆𝒞(B,C)Hf:dl=fHg:rd=g𝖺𝗌𝗌𝗈𝖼(r,d,l)𝖺𝗉r(Hf)=𝖺𝗉l(Hg)S

is contractible.

Lemma 11 ([6, Corollary 3.3.6]).

Suppose that 𝒞 is a univalent bicategory with an OFS (,). A map is in if and only if it has the left lifting property against .

This alternative definition of is useful for the proof of Theorem 13, below. For this theorem, we need to introduce adjoint pairs of functors between wild categories.

Definition 12.

Let L:𝒞𝒟 and R:𝒟𝒞 be functors of wild categories. An adjunction LR consists of an equivalence α:𝗁𝗈𝗆𝒟(LA,X)𝗁𝗈𝗆𝒞(A,RX) for all A:𝖮𝖻(𝒞) and X:𝖮𝖻(𝒟) along with naturality proofs:

𝗇1 :A:𝖮𝖻(𝒞)X,Y:𝖮𝖻(𝒟)g:𝗁𝗈𝗆𝒟(X,Y)h:𝗁𝗈𝗆𝒟(LA,X)R(g)α(h)=α(gh)
𝗇2 :Y:𝖮𝖻(𝒟)A,B:𝖮𝖻(𝒞)f:𝗁𝗈𝗆𝒞(A,B)h:𝗁𝗈𝗆𝒟(LB,Y)α(h)f=α(hL(f))
Theorem 13 ([6, Corollary 3.3.9]).

Consider an adjunction LR where both 𝒞 and 𝒟 are univalent bicategories. If R preserves , then L preserves .

5 The main connection

Let 𝒰 be a universe. Let Γ be a graph and suppose F is a diagram in A/𝒰 over Γ. Working in 𝖬𝖫𝖳𝖳+𝖢𝗈𝗅𝗂𝗆, we want to construct the A-colimit of F so as to show the connection between A-colimits and ordinary colimits. After defining A-colimit, we mention a reasonable yet wrong approach to constructing it. Then, we explain another construction and prove it is correct by exhibiting it as left adjoint to the constant diagram functor. The Agda proof of this adjunction is found in the folder [7, Colimit-code/Main-Theorem].

5.1 Definition of 𝑨-colimits

We can generalize ordinary colimits in Section 3 to all coslices A/𝒰. For each Y:𝖮𝖻(A/𝒰), an F-cocone on Y consists of a family of maps h:(i:Γ0)FiAY in A/𝒰 together with an identity Hi,j,g:hjFi,j,g=hi for all i,j:Γ0 and g:Γ1(i,j). In this situation, we say that Y is a colimit of F if (h,H) is initial in the category of F-cocones. This means that for each X:𝖮𝖻(A/𝒰), the function

𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(h,H):(YAX)𝖢𝗈𝖼𝗈𝗇𝖾F(X)
𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(h,H,f)(λi.fhi,λiλjλg.𝖺𝗌𝗌𝗈𝖼(f,hj,Fi,j,g)𝖺𝗉f(Hi,j,g))

is an equivalence. We must include the associativity term since associativity of maps does not hold judgmentally in A/𝒰 (whereas it does in 𝒰).

Observe that by a variant of Lemma 8, hjFi,j,g=hi is equivalent to the type of homotopies ηi,j,g:𝖿𝗎𝗇(hj)𝖿𝗎𝗇(Fi,j,g)𝖿𝗎𝗇(hi) equipped with a commuting square

of paths for each a:A. It is this family of 2-cells which distinguishes the colimit of F, in A/𝒰, from 𝖼𝗈𝗅𝗂𝗆Γ((F)). Here, we reuse to denote the evident forgetful functor from Γ-shaped diagrams in A/𝒰 to those in 𝒰. The 2-cells affect 𝖼𝗈𝗅𝗂𝗆Γ((F)) by collapsing its nontrivial loops formed by paths of the form η(𝗌𝗍𝗋(Fi)(a)). We call such loops distinguished loops in 𝖼𝗈𝗅𝗂𝗆Γ((F)). For example, if ij and Fi,j,g𝗂𝖽Fi, then (5.1) is equivalent to η(𝗌𝗍𝗋(Fi)(a))=𝗋𝖾𝖿𝗅𝖿𝗎𝗇(hi)(𝗌𝗍𝗋(Fi)(a)). In this case, it fills the loop η(𝗌𝗍𝗋(Fi)(a)).

5.2 Misleading approach

If our setting behaved like the classical one, the colimit of F in A/𝒰 would arise as the ordinary colimit of the augmented diagram: (F) augmented with the canonical arrow from A to (Fi) for each i:Γ0 [17, Proposition 4.6]. If Γ is discrete, i.e., Γ1 is the empty relation, then the A-colimit of F inside HoTT is, in fact, the colimit of

In general, though, this construction is wrong inside HoTT. For example, the pointed colimit of the diagram 𝟏𝗂𝖽𝟏 is trivial, but the colimit of the augmented diagram

is the circle S1. The reason for the discrepancy between the classical case and ours is that unless Γ is discrete, the augmented diagram inside HoTT adds arrows that are intended as composites but are not interpreted as such in the model of HoTT. Rather, the model sees them as freely added to the diagram.

5.3 Our approach

Our approach to building the colimit of F never creates an augmented diagram, thereby avoiding the problem of Section 5.2. We start with the ordinary colimit 𝖼𝗈𝗅𝗂𝗆Γ((F)) which ignores the coslice structure of F. Then, we glue onto this colimit the 2-cells required by the coslice colimit. We do this via a quotient of 𝖼𝗈𝗅𝗂𝗆Γ((F)) that fills its distinguished loops.

To this end, define 𝖼𝗈𝗅𝗂𝗆ΓA𝜓𝖼𝗈𝗅𝗂𝗆Γ((F)) by colimit induction, as the function induced by the cocone

under the constant diagram at A. The homotopy W:ιj𝗌𝗍𝗋(Fj)ιi𝗌𝗍𝗋(Fi) is defined by W(a)𝖺𝗉ιj(𝗉𝗍(Fi,j,g)(a))1κi,j,g(𝗌𝗍𝗋(Fi)(a)). Intutively, ψ finds the distinguished loops of 𝖼𝗈𝗅𝗂𝗆Γ((F)). Next, form the pushout square

which, by the definition of pushout types, comes with a homotopy 𝗀𝗅𝗎𝖾𝒫F:𝗂𝗇𝗅[𝗂𝖽A]𝗂𝗇𝗋ψ. This pushout is our approach to forming the desired quotient of 𝖼𝗈𝗅𝗂𝗆Γ((F)).

Example 14.

Suppose that Γ has a single vertex v and a single loop at v. Let 𝟐 denote the type of booleans. Define the pointed diagram F over Γ by Fv(𝟐,𝗍𝗋𝗎𝖾) and Fv,v,(𝗂𝖽𝟐,𝗋𝖾𝖿𝗅). Then 𝖼𝗈𝗅𝗂𝗆Γ((F))S1+S1. In this case, the function ψ traces the left copy of S1, the distinguished loop, exactly once. The pushout 𝒫F is formed from S1+S1 by filling this loop, which collapses the left copy of S1 to a point. As a result, 𝒫F𝟏+S1.

Back to the general case, with the equivalence , of Lemma 8, we can form an F-cocone on (𝒫F,𝗂𝗇𝗅)

as follows. We have a homotopy δi,j,gλ(x:𝗍𝗒(Fi)).𝖺𝗉𝗂𝗇𝗋(κi,j,g(x)) from 𝗂𝗇𝗋ιj𝖿𝗎𝗇(Fi,j,g) to 𝗂𝗇𝗋ιi. Further, for each a:A, we have a chain ϵi,j,g(a) of identities

𝖺𝗉𝗂𝗇𝗋(κi,j,g(𝗌𝗍𝗋(Fi)(a)))1𝖺𝗉𝗂𝗇𝗋ιj(𝗉𝗍(Fi,j,g)(a))τj(a)
= 𝖺𝗉𝗂𝗇𝗋(𝖺𝗉ιj(𝗉𝗍(Fi,j,g)(a))1κi,j,g(𝗌𝗍𝗋(Fi)(a)))1τj(a)𝗋𝖾𝖿𝗅𝗂𝗇𝗅(a)
= 𝖺𝗉𝗂𝗇𝗋(𝖺𝗉ψ(κi,j,g(a)))1τj(a)𝗋𝖾𝖿𝗅𝗂𝗇𝗅(a) (via ρψ(i,j,g,a))
= 𝖺𝗉𝗂𝗇𝗋(𝖺𝗉ψ(κi,j,g(a)))1τj(a)𝖺𝗉𝗂𝗇𝗅(𝖺𝗉[𝗂𝖽A](κi,j,g(a))) (via ρ[𝗂𝖽A](i,j,g,a))
= 𝗍𝗋𝖺𝗇𝗌𝗉𝗂𝗇𝗋ψ𝗂𝗇𝗅[𝗂𝖽A](κi,j,g(a),τj(a)) (Lemma 1)
= τi(a) (by 𝖺𝗉𝖽𝗀𝗅𝗎𝖾()1(κi,j,g(a)))

Let 𝒦(𝒫F) denote this F-cocone structure on (𝒫F,𝗂𝗇𝗅).

Theorem 15 ([6, Theorem 5.4.3]).

The function

𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),T,fT):((𝒫F,𝗂𝗇𝗅)A(T,fT))𝖢𝗈𝖼𝗈𝗇𝖾F(T,fT)

is an equivalence for every (T,fT):𝖮𝖻(A/𝒰).

Proof.

We construct an inverse 𝖢𝗈𝖼𝗈𝗇𝖾F(T,fT)Θ((𝒫F,𝗂𝗇𝗅)A(T,fT)) of 𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),T,fT) as follows. Let (r,K):𝖢𝗈𝖼𝗈𝗇𝖾F(T,fT). The forgetful functor from cocones under F to ordinary cocones under (F) gives rise to the function 𝗂𝗇𝖽(r,K):𝖼𝗈𝗅𝗂𝗆Γ((F))T by colimit induction. For all i:Γ0 and a:A, we have

Further, for all i,j:Γ0, g:Γ1(i,j), and a:A, we have a chain of identities

𝗍𝗋𝖺𝗇𝗌𝗉fT[𝗂𝖽A]=𝗂𝗇𝖽(r,K)ψ(x)(κi,j,g(a),𝗉𝗋2(rj)(a)1)
= 𝖺𝗉fT(𝖺𝗉[𝗂𝖽A](κi,j,g(a)))1𝗉𝗋2(rj)(a)1𝖺𝗉𝗂𝗇𝖽(r,K)(𝖺𝗉ψ(κi,j,g(a))) (Lemma 1)
= 𝖺𝗉fT(𝖺𝗉[𝗂𝖽A](κi,j,g(a)))1𝗉𝗋2(rj)(a)1𝖺𝗉𝗉𝗋1(rj)(𝗉𝗍(Fi,j,g)(a))1𝗉𝗋1(Ki,j,g)(𝗌𝗍𝗋(Fi)(a)) (via ρψ(i,j,g,a) and then ρ𝗂𝗇𝖽(r,K)(i,j,g,𝗌𝗍𝗋(Fi)(a)))
= (𝗉𝗋1(Ki,j,g)(𝗌𝗍𝗋(Fi)(a))1𝖺𝗉𝗉𝗋1(rj)(𝗉𝗍(Fi,j,g)(a))𝗉𝗋2(rj)(a))1 (via ρ[𝗂𝖽A](i,j,g,a))
= 𝗉𝗋2(ri)(a)1 (by 𝖺𝗉1(𝗉𝗋2(Ki,j,g)(a)))

By induction on 𝖼𝗈𝗅𝗂𝗆ΓA, this gives us a homotopy fT[𝗂𝖽A]𝗂𝗇𝖽(r,K)ψ and thus a function hr,K:𝒫FT

defined by pushout induction on 𝒫F. Finally, since h(𝗂𝗇𝗅(a))fT(a) for all a:A, we have

Θ(r,K)(hr,K,λa.𝗋𝖾𝖿𝗅fT(a)):(𝒫F,𝗂𝗇𝗅)A(T.fT)

Each of the homotopies 𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),T,fT)Θ𝗂𝖽 and Θ𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),T,fT)𝗂𝖽 requires intricate computations to prove. We leave their proofs to the formalization (see the folders [7, Colimit-code/R-L-R] and [7, Colimit-code/L-R-L], respectively).

5.4 Action on maps

So far, we have defined a function 𝖼𝗈𝗅𝗂𝗆ΓA𝒫:𝖮𝖻(𝖣𝗂𝖺𝗀(Γ,A/𝒰))𝖮𝖻(A/𝒰) sending a Γ-shaped diagram in A/𝒰 to its A-colimit. We now make 𝒫 a functor by describing its action on maps of diagrams. We want to describe this action in terms of the action of the ordinary colimit functor by using the special form of 𝒫’s object function. Moreover, we must verify that such a description is correct by proving that 𝒫 is left adjoint to the constant diagram functor, i.e., enjoys the universal property of the colimit functor.

Suppose that F and G are Γ-shaped diagrams in A/𝒰. The type of natural transformations from F to G consists of families d:(i:Γ0)𝗍𝗒(Fi)A𝗍𝗒(Gi) of maps equipped with an A-homotopy Gi,j,gdiAdjFi,j,g for all i,j,g, where A is as in Lemma 8. Consider a natural transformation δ(d,ξ,ξ~)

from F to G, where , is as in Lemma 8. We form a map 𝖼𝗈𝗅𝗂𝗆ΓA(δ):𝖼𝗈𝗅𝗂𝗆ΓA(F)A𝖼𝗈𝗅𝗂𝗆ΓA(G) as follows. Start with the function 𝖼𝗈𝗅𝗂𝗆Γ((F))δ¯𝖼𝗈𝗅𝗂𝗆Γ((G)) induced by the following map of 𝒰-valued diagrams over Γ:

Note that for each a:A,

ξ~i,j,g(a):ξi,j,g(𝗌𝗍𝗋(Fi)(a))1𝖺𝗉𝖿𝗎𝗇(Gi,j,g)(𝗉𝗍(di)(a))𝗌𝗍𝗋(Gi,j,g)(a)=𝖺𝗉𝖿𝗎𝗇(dj)(𝗉𝗍(Fi,j,g)(a))𝗉𝗍(dj)(a)

We may assume that ξ~i,j,g(a) instead has the equivalent type

ξi,j,g(𝗌𝗍𝗋(Fi)(a))=𝖺𝗉𝖿𝗎𝗇(Gi,j,g)(𝗉𝗍(di)(a))𝗌𝗍𝗋(Gi,j,g)(a)𝗉𝗍(dj)(a)1𝖺𝗉𝖿𝗎𝗇(dj)(𝗉𝗍(Fi,j,g)(a))1Ei,j,g(a)

Here we abbreviate the right endpoint of the path by Ei,j,g(a). Now, the triangle

commutes by induction on 𝖼𝗈𝗅𝗂𝗆ΓA. Indeed, the computation rules of these functions give us

Ci(a)𝖺𝗉ιi(𝗉𝗍(di)(a)):δ¯(ψF(ιi(a)))=ψG(ιi(a))

for all i:Γ0 and a:A. Further, by defining Λi,j,g(a)Cj(a)𝖺𝗉ψG(κi,j,g(a)), we have a chain of identities

𝗍𝗋𝖺𝗇𝗌𝗉δ¯ψFψG(κi,j,g(a),Cj(a))
= 𝖺𝗉δ¯(𝖺𝗉ψF(κi,j,g(a)))1Cj(a)𝖺𝗉ψG(κi,j,g(a)) (Lemma 1)
= (𝖺𝗉ιj(ξi,j,g(𝗌𝗍𝗋(Fi)(a)))1κi,j,g(𝖿𝗎𝗇(di)(𝗌𝗍𝗋(Fi)(a))))1𝖺𝗉ιj𝖿𝗎𝗇(dj)(𝗉𝗍(Fi,j,g)(a))Λi,j,g(a) (via ρψF(i,j,g,a) and then ρδ¯(i,j,g,𝗌𝗍𝗋(Fi)(a)))
= (𝖺𝗉ιj(Ei,j,g(𝗌𝗍𝗋(Fi)(a)))1κi,j,g(𝖿𝗎𝗇(di)(𝗌𝗍𝗋(Fi)(a))))1𝖺𝗉ιj𝖿𝗎𝗇(dj)(𝗉𝗍(Fi,j,g)(a))Λi,j,g(a) (by 𝖺𝗉(𝖺𝗉ιj()1κi,j,g(𝖿𝗎𝗇(di)(𝗌𝗍𝗋(Fi)(a))))1(ξ~i,j,g(a)))
= Ci(a) (via ρψG(i,j,g,a))

for all i,j:Γ0, g:Γ1(i,j), and a:A, so (5.4) commutes. We now have a map

of spans, which induces a function Ψδ:𝒫F𝒫G by the universal property of pushouts. Since Ψδ(𝗂𝗇𝗅(a))𝗂𝗇𝗅(a) for all a:A, we may take 𝖼𝗈𝗅𝗂𝗆ΓA(δ) as (Ψδ,λa.𝗋𝖾𝖿𝗅𝗂𝗇𝗅(a)):𝒫FA𝒫G.

To verify that the functor 𝖣𝗂𝖺𝗀(Γ,A/𝒰)𝖼𝗈𝗅𝗂𝗆ΓAA/𝒰 we’ve defined is correct, we must show that it is left adjoint to the constant diagram functor. To do so, we construct the terms 𝗇1 and 𝗇2 required by Definition 12.

Lemma 16 ([6, Lemma 5.4.5]).

For every map s:VAU, the following square commutes:

Lemma 17 ([6, Lemma 5.4.12]).

For every V:𝖮𝖻(A/𝒰) and δ:FAG, the following square commutes:

The two lower horizontal functions are induced by post-composition with s and pre-composition with δ [6, Definition 5.4.11], respectively.

Lemma 16 is a routine computation, whereas Lemma 17 is quite difficult. The proof of Lemma 17 is easier for the map 𝖼𝗈𝗅𝗂𝗆ΓA(F)A𝖼𝗈𝗅𝗂𝗆ΓA(G) obtained by applying the inverse of 𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),𝒫G,𝗂𝗇𝗅) to the canonical F-cocone on 𝒫G induced by δ. Therefore, we decide to reduce the goal to an equality between this map and 𝖼𝗈𝗅𝗂𝗆ΓA(δ). We achieve this by showing that they belong to the same fiber of 𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉(𝒦(𝒫F),𝒫G,𝗂𝗇𝗅), which is contractible by Theorem 15. Though much easier than a direct approach to Lemma 17, this method requires intricate computations. We have formalized both Lemma 16 and Lemma 17 (see [7, Colimit-code/Map-Nat/CosColimitPstCmp.agda] and [7, Colimit-code/Map-Nat/CosColimitPreCmp.agda], respectively).

6 Creation of colimits

Classically, if 𝒟 is an -category, then all forgetful functors of -coslices create 𝒟-shaped colimits when the -groupoid obtained by freely inverting all morphisms of 𝒟 is contractible (see [15, Tag 02KS]). Theorem 18 expresses the same result inside HoTT.

Theorem 18.

The forgetful functor A/𝒰𝒰 creates colimits over trees.

Proof.

The idea is that a tree has no cycles, and thus we have no distinguished loops to fill. As a result, coslice colimits over trees look the same as their underlying colimits in 𝒰.

To be precise, suppose that Γ is a tree and let F be a diagram in A/𝒰 over Γ. Then the function [𝗂𝖽A]:𝖼𝗈𝗅𝗂𝗆ΓAA is an equivalence, and one can check that

is a pushout square. By uniqueness of pushouts, this gives us an equivalence γ:𝒫F𝖼𝗈𝗅𝗂𝗆Γ((F)) such that γ(𝗂𝗇𝗋(ιi(x)))ιi(x) for all i:Γ0 and x:𝗍𝗒(Fi). We also see that

𝖺𝗉γ(𝖺𝗉𝗂𝗇𝗋(κi,j,g(x)))=𝖺𝗉γ𝗂𝗇𝗋(κi,j,g(x))𝖺𝗉𝗂𝖽(κi,j,g(x))=κi,j,g(x)

for all i,j:Γ0, g:Γ1(i,j), and x:𝗍𝗒(Fi). This means that γ is a morphism of cocones under (F). It follows that the forgetful functor preserves colimits over Γ.

It remains to prove that the forgetful functor reflects colimits over Γ. Consider an A-cocone 𝒥 under F

as well as the cocone (𝒥)(𝗍𝗒(C),𝖿𝗎𝗇r,H) under (F) obtained by applying the forgetful functor to 𝒥. Suppose that (𝒥) is colimiting in 𝒰. By the universal property of colimits in A/𝒰, we have a morphism (𝒫F,𝗂𝗇𝗅)𝜏C of A-cocones, which induces a morphism 𝒫F(τ)𝗍𝗒(C) of cocones in 𝒰. This morphism is unique by the universal property of ordinary colimits. Moreover, by the uniqueness of ordinary colimits, there is a cocone equivalence from 𝒫F to 𝗍𝗒(C) as both of them are colimiting. This implies (τ) is an equivalence. Thus, τ is an A-cocone morphism whose underlying function 𝒫F𝗍𝗒(C) is an equivalence. This means that τ is an A-cocone equivalence, so that 𝒥 is colimiting.

 Remark.

The fact that the forgetful functor 𝒰𝒰 from pointed types creates pushouts appears in the agda-unimath library, though without proof [23, Pushouts of pointed types].

Theorem 18 lets us lift powerful features of ordinary colimits to A-colimits. For example, let Γ be a graph and F be an A-diagram over Γ. We say that 𝖼𝗈𝗅𝗂𝗆ΓA(F) is universal, or pullback-stable [19], if for every pullback square

in A/𝒰, the canonical map

σf,h:𝖼𝗈𝗅𝗂𝗆i:ΓA(Fi×VY)A𝖼𝗈𝗅𝗂𝗆ΓA(F)×VY

is an equivalence.555We show how to construct pullbacks in A/𝒰 in [6, Note 6.0.4]. The distinguishing feature of a LCC -category, such as 𝒰, is that all of its colimits are universal. Although the coslice of a LCC category need not be LCC, we now show that all of its colimits over trees are universal.

Lemma 19.

The forgetful functor :A/𝒰A preserves limits.

Proof.

The functor is right adjoint to the functor XX+A, so it preserves limits.

Theorem 20.

All colimits in 𝒰 are universal.

We have formalized Theorem 20 in Agda (see the folder [7, Pullback-stability]).

Corollary 21.

For each tree Γ and each A-diagram F over Γ, the colimit 𝖼𝗈𝗅𝗂𝗆ΓA(F) is universal.

Proof.

Suppose that Γ is a tree and consider the pullback square (6). By Theorem 18 combined with Theorem 20, the function

𝗍𝗒(𝖼𝗈𝗅𝗂𝗆i:ΓA(Fi×VY))𝖿𝗎𝗇(σf,h)𝗍𝗒(𝖼𝗈𝗅𝗂𝗆ΓA(F))×𝗍𝗒(V)𝗍𝗒(Y)

is an equivalence. The codomain is in this form because preserves pullbacks by Lemma 19. It follows that σf,h is an equivalence.

7 Preservation of the left class of an OFS

In this section, we combine our construction of 𝖼𝗈𝗅𝗂𝗆ΓA(δ) from Section 5.4 with Theorem 13 to prove that 𝖼𝗈𝗅𝗂𝗆ΓA always preserves the left class of an OFS on 𝒰. We assume the univalence axiom to have access to the the tools of univalent bicategories developed in Section 4.

Let (,) be an OFS on 𝒰. For all diagrams F,G:𝒟Γ𝖣𝗂𝖺𝗀(Γ,𝒰) and natural transformations (H,γ):FG, define the predicates ^(H,γ)(i:Γ0)(Hi) and ^(H,γ)(i:Γ0)(Hi).

Lemma 22 ([6, Theorem 7.0.8]).

Let Q:FG. The following type is contractible:

𝖿𝖺𝖼𝗍^,^(Q)M:𝒟ΓS:FMT:MG(TS=Q)×^(S)×^(T).

By Lemma 22, we see that (,) lifts levelwise to 𝒟Γ. Since the functor 𝖼𝗈𝗇𝗌𝗍Γ:𝒰𝒟Γ clearly takes to ^, we deduce that 𝖼𝗈𝗅𝗂𝗆Γ() takes ^ to by Theorem 13.666The adjunction 𝖼𝗈𝗅𝗂𝗆Γ𝖼𝗈𝗇𝗌𝗍Γ follows directly from the equivalence 𝗉𝗈𝗌𝗍𝖼𝗈𝗆𝗉 in Section 3.3.

For each X,Y:𝖮𝖻(A/𝒰), consider the predicate A(f,p)(f) on XAY. Also, define the predicate ^A on maps of A-diagrams over Γ by ^A(H,γ)i:Γ0A(Hi). Then the functor 𝖼𝗈𝗅𝗂𝗆ΓA takes ^A to A. Indeed, consider a map δ:𝒜A of A-diagrams over Γ. The underlying function of 𝖼𝗈𝗅𝗂𝗆ΓA(δ) is induced by the morphism of spans

Thus, if δ is in ^A, then all three vertical functions are in . Since a map of spans is a map of diagrams, we see that 𝖼𝗈𝗅𝗂𝗆ΓA(δ) is in A.

Recall that a type X is (,)-connected if the function X𝟏 is in . If F is a diagram of pointed types over Γ such that each 𝗍𝗒(Fi) is (,)-connected, then the type 𝖼𝗈𝗅𝗂𝗆Γ(F)𝖼𝗈𝗅𝗂𝗆Γ𝟏(F) is also (,)-connected. Indeed, we can deduce that 𝖼𝗈𝗅𝗂𝗆Γ𝟏=𝟏 from the construction of 𝒫F. Thus, 𝖼𝗈𝗅𝗂𝗆Γ takes the unique map F𝟏 of pointed diagrams to (c,cp):𝖼𝗈𝗅𝗂𝗆Γ(F)𝖼𝗈𝗅𝗂𝗆Γ𝟏 where c:𝖼𝗈𝗅𝗂𝗆Γ(F)𝟏 is the constant map. In addition, (c) holds because 𝖼𝗈𝗅𝗂𝗆Γ takes ^𝟏 to 𝟏.

Example 23.

Let n be a truncation level [27, Chapter 7]. The archetypal OFS in HoTT has n-connected functions as its left class and n-truncated ones as its right. Thus, by our preceding argument, if each 𝗍𝗒(Fi) is n-connected, then so is 𝖼𝗈𝗅𝗂𝗆Γ(F).

Now, let 1k< also be a truncation level. Recall the category (n,k)𝖦𝖳𝗒𝗉𝖾 of k-tuply groupal n-groupoids [2]. (These are examples of higher groups, in the sense of group theory). This is equivalent to the full subcategory 𝒰k,n+k of 𝒰 on (k1)-connected, (n+k)-truncated pointed types. For each truncation level m, consider the m-truncation functor m:A/𝒰A/𝒰, which takes a type X to the universal m-type admitting a function from X [27, Section 7.3]. This functor preserves colimits as a left adjoint [6, Proposition 3.4.6], and its associated counit is an isomorphism. It follows that 𝒰k,n+k, hence (n,k)𝖦𝖳𝗒𝗉𝖾, inherits colimits over graphs from 𝒰.

It is a special feature of pointed colimits that they always preserve n-connectedness. If Γ is not a tree, then 𝖼𝗈𝗅𝗂𝗆Γ may fail to preserve n-connectedness. Indeed, let Γ be the graph with a single point and a single edge from to itself. Define the diagram F over Γ by F0()𝟏 and F,,𝗂𝖽𝟏. Then 𝖼𝗈𝗅𝗂𝗆Γ(F) is equivalent to the circle S1, which is not 1-connected.

 Remark 24.

Although Example 23 is only about pointed types, we do benefit from the formulation of the main connection for general coslices. Indeed, for each object G of 𝒰k,n+k, the coslice G/𝒰k,n+k is a reflective subcategory of 𝗍𝗒(G)/𝒰k,n+k for which the reflector is 2-coherent [6, Definition B.0.1]. (Here 𝒰k,n+k denotes the subuniverse of (k1)-connected, (n+k)-truncated types.) Hence G/𝒰k,n+k inherits colimits over graphs from the coslice 𝗍𝗒(G)/𝒰k,n+k [6, Corollary 7.1.3]. In its full generality, Section 5 gives us an explciit construction of such colimits.

In particular, let n,m: with n>0 and m<n. The Eilenberg-MacLane space K(,n) [13] is the free group on one generator in the category (n,m)𝖦𝖳𝗒𝗉𝖾. Therefore, when m>0, we may view K(,n)/𝒰m,n+m as a higher version of the category of pointed abelian groups [18]. We see, then, that Section 5 lets us build colimits of higher pointed abelian groups inside HoTT.

8 Mapping colimits to weak limits

Finally, we look at the interaction between colimits and (Eilenberg-Steenrod) cohomology theories. Specifically, we apply the 3×3 lemma to the main connection to obtain the familiar construction of 𝖼𝗈𝗅𝗂𝗆ΓA(F) as a pushout of coproducts in A/𝒰. Afterward, we apply this new construction to the Mayer-Vietoris sequence to prove that cohomology theories send finite colimits to weak limits in 𝐒𝐞𝐭 assuming the axiom of choice.

8.1 Decomposition of 𝑨-colimits into simpler pieces

To make use of the 3×3 lemma, we first form the following grid of commuting squares:


Call the pushouts of the left, middle, and right vertical spans V1, V2, and V3, respectively. Call the pushouts of the top, middle, and bottom horizontal spans H1, H2, and H3, respectively. We can form two additional pushouts from this grid:

  • δ1 denotes the function induced by the middle-to-left map of spans;

  • δ2 denotes the function induced by the middle-to-right map of spans;

  • η1 denotes the function induced by the middle-to-top map of spans; and

  • η2 denotes the function induced by the middle-to-bottom map of spans.

The 3×3 lemma now gives us an equivalence τ1:PHPV of types defined by double induction on pushouts [12, Section VII].

 Note.

Let Δ be a discrete graph and G an A-diagram over Δ. The pushout

together with 𝗂𝗇𝗅 is the coproduct of the Gi in A/𝒰. We denote D by i:Δ0𝗍𝗒(Gi).

Lemma 25.

We have two equivalences of spans

where ν is defined by double induction on pushouts through the commuting square

Notice that the pushout of the topmost span appearing in Lemma 25 is exactly 𝒫F. As a result, the equivalence supplied by the 3×3 lemma gives us 𝖼𝗈𝗅𝗂𝗆ΓA(F) as a familiar pushout of coproducts.

Corollary 26 ([6, Corollary 5.5.3]).

We have a pushout square

8.2 Weak continuity of cohomology

With this new construction of 𝖼𝗈𝗅𝗂𝗆ΓA, we can transfer the weak continuity of cohomology to HoTT. This application is described in detail in [6, Section 8].

Let 𝐀𝐛 denote the category of abelian groups. Suppose that H:(𝒰)op𝐀𝐛 is a cohomology theory.777See [1, Section 6] for a description of Eilenberg-Steenrod cohomology theory inside HoTT. A slightly more general definition, which works in our setting, is found in [6, Section 8.1]. Consider the pushout

of a span of pointed maps. In [4], Cavallo constructs the Mayer-Vietoris sequence for P, a long exact sequence (LES) of the form

Let F be a diagram of pointed types over a finite graph Γ, which means that Γ0 is finite and Γ1(i,j) is finite for all i,j:Γ0. As cohomology preserves finite wedges [4, Section 4.2], Corollary 26 combined with this LES gives us an exact squence

for each n:.888When H is a singular cohomology theory, we may extend the class of graphs to those satisfying the set-level axiom of choice, in the sense of [1, Definition 6.1]. Here, ζn is defined as the composite

and μn and νn are defined by (f,h)(f,λiλjλg.Hn(Fi,j,g)(hj)) and (f,h)(f,λiλjλg.hi), respectively. Moreover, the universal property of limits in 𝐀𝐛 induces a commuting triangle

for each i:Γ0, induced by the cone (Hn(𝖼𝗈𝗅𝗂𝗆Γ(F)),Hn(ι)) over Hn(F). One can check that the exactness of (8.2) implies that ΔF is epic as a map of sets.

At this stage, if we were in a classical system, then it would follow that ΔF has a section, which in turn would imply that Hn(𝖼𝗈𝗅𝗂𝗆Γ(F)) is a weak limit in 𝐒𝐞𝐭. Inside HoTT, we may assume the axiom of choice [27, Chapter 3.8] to conclude that ΔF is merely a weak limit.999As in [27, Chapter 3.10], the adverb merely refers to propositional truncation. In this sense, H enjoys a restricted version of weak continuity inside HoTT.

9 Conclusion and future work

We explored colimits inside HoTT. The heart of our work was the connection between A-colimits and ordinary colimits, i.e., the main connection. To derive the main connection, we found an explicit construction of A-colimits that was tailored to reveal the connection. We used the main connection to prove that the forgetful functor from a coslice creates colimits over trees and that A-colimits over trees are universal. We also used the main connection to examine how colimits interact with factorization systems. As a result, we found that all pointed colimits preserve n-connectedness, which implies that higher groups are closed under colimits on directed graphs. Finally, we used the main connection to see that cohomology takes finite colimits to weak limits in 𝐒𝐞𝐭 assuming the axiom of choice.

A natural direction is to extend our development to colimits of diagrams over 2-computads [26]. To our knowledge, colimits of type-valued diagrams over higer-dimensional graphs have not been developed in the untruncated setting. We believe both Section 6 and Section 7 can be generalized to the setting of 2-computads.

References

  • [1] Ulrik Buchholtz and Kuen-Bang Hou (Favonia). Cellular Cohomology in Homotopy Type Theory. Logical Methods in Computer Science, Volume 16, Issue 2, 2020. doi:10.23638/LMCS-16(2:7)2020.
  • [2] Ulrik Buchholtz, Floris van Doorn, and Egbert Rijke. Higher Groups in Homotopy Type Theory. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’18, pages 205–214, New York, NY, USA, 2018. Association for Computing Machinery. doi:10.1145/3209108.3209150.
  • [3] Paolo Capriotti and Nicolai Kraus. Univalent higher categories via complete Semi-Segal types. Proc. ACM Program. Lang., 2(POPL), 2017. doi:10.1145/3158132.
  • [4] Evan Cavallo. Synthetic Cohomology in Homotopy Type Theory. Master’s thesis, Carnegie Mellon University, 2015. URL: https://staff.math.su.se/evan.cavallo/works/thesis15.pdf.
  • [5] J Daniel Christensen and Luis Scoccola. The Hurewicz theorem in homotopy type theory. Algebraic and Geometric Topology, 23(5):2107–2140, 2023. doi:10.2140/agt.2023.23.2107.
  • [6] Perry Hart and Kuen-Bang Hou. Coslice Colimits in Homotopy Type Theory, 2024. arXiv:2411.15103.
  • [7] Perry Hart and Kuen-Bang Hou (Favonia). A formalized construction of coslice colimits, 2024. v0.1.0. URL: https://github.com/PHart3/colimits-agda/tree/v0.1.0.
  • [8] Kuen-Bang Hou (Favonia), Eric Finster, Daniel R. Licata, and Peter LeFanu Lumsdaine. A Mechanization of the Blakers-Massey Connectivity Theorem in Homotopy Type Theory. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, pages 565–574, New York, NY, USA, 2016. Association for Computing Machinery. doi:10.1145/2933575.2934545.
  • [9] Krzysztof Kapulkin and Peter LeFanu Lumsdaine. The simplicial model of Univalent Foundations (after Voevodsky). J. Eur. Math. Soc., 23(6):2071–2126, 2021. doi:10.4171/JEMS/1050.
  • [10] Max Kelly. On MacLane’s Conditions for Coherence of Natural Associativities, Commutativities, etc. Journal of Algebra, 1(4):397–402, 1964. doi:10.1016/0021-8693(64)90018-3.
  • [11] Nicolai Kraus and Jakob von Raumer. Path Spaces of Higher Inductive Types in Homotopy Type Theory . In 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–13, Los Alamitos, CA, USA, June 2019. IEEE Computer Society. doi:10.1109/LICS.2019.8785661.
  • [12] Daniel R. Licata and Guillaume Brunerie. A Cubical Approach to Synthetic Homotopy Theory. In 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 92–103, 2015. doi:10.1109/LICS.2015.19.
  • [13] Daniel R. Licata and Eric Finster. Eilenberg-MacLane spaces in homotopy type theory. In Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS ’14, New York, NY, USA, 2014. Association for Computing Machinery. doi:10.1145/2603088.2603153.
  • [14] Jacob Lurie. Higher Algebra. Unpublished, 2017. URL: https://www.math.ias.edu/~lurie/papers/HA.pdf.
  • [15] Jacob Lurie. Kerodon. https://kerodon.net, 2024.
  • [16] nLab authors. created limit. https://ncatlab.org/nlab/show/created+limit, 2024. Revision 21.
  • [17] nLab authors. (infinity,1)-limit. https://ncatlab.org/nlab/show/%28%E2%88%9E%2C1%29-limit, 2024. Revision 78.
  • [18] nLab authors. pointed abelian group. https://ncatlab.org/nlab/show/pointed+abelian+group, November 2024. Revision 3.
  • [19] nLab authors. pullback-stable colimit. https://ncatlab.org/nlab/show/pullback-stable+colimit, October 2024. Revision 18.
  • [20] Emily Riehl. Categorical Homotopy Theory. New Mathematical Monographs. Cambridge University Press, 2014. doi:10.1017/CBO9781107261457.
  • [21] Egbert Rijke. Introduction to Homotopy Type Theory, 2022. arXiv:2212.11082.
  • [22] Egbert Rijke, Michael Shulman, and Bas Spitters. Modalities in homotopy type theory. Logical Methods in Computer Science, Volume 16, Issue 1, January 2020. doi:10.23638/LMCS-16(1:2)2020.
  • [23] Egbert Rijke, Elisabeth Stenholm, Jonathan Prieto-Cubides, Fredrik Bakke, and others. The agda-unimath library. URL: https://github.com/UniMath/agda-unimath/.
  • [24] Kristina Sojakova. Higher Inductive Types as Homotopy-Initial Algebras. SIGPLAN Not., 50(1):31–42, 2015. doi:10.1145/2775051.2676983.
  • [25] Kristina Sojakova, Floris van Doorn, and Egbert Rijke. Sequential Colimits in Homotopy Type Theory. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’20, pages 845–858, 2020. doi:10.1145/3373718.3394801.
  • [26] Ross Street. Limits indexed by category-valued 2-functors. Journal of Pure and Applied Algebra, 8(2):149–181, 1976. doi:10.1016/0022-4049(76)90013-X.
  • [27] The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. https://homotopytypetheory.org/book, Institute for Advanced Study, 2013.
  • [28] Floris van Doorn, Jakob von Raumer, and Ulrik Buchholtz. Homotopy Type Theory in Lean. In Interactive Theorem Proving, pages 479–495. Springer International Publishing, 2017. doi:10.1007/978-3-319-66107-0_30.