1 Introduction

The loop space functor \(\Omega \) is an operation on pointed types and pointed maps between them. In this note, we study the delooping of types and maps: given a pointed type X, when can we find a pointed type whose loop space is equivalent to X? And given a pointed map \(f: \Omega A \rightarrow _\textrm{pt}\Omega B\), when can we find a map \(A \rightarrow _\textrm{pt}B\) whose looping equals f? The general answer is rather complicated [9], involving group operations and an infinite tower of coherences, but according to the stabilisation theorem [1], the answer becomes much simpler if we put some connectivity and truncation assumptions on A and B. The purpose of this note is to give a direct, type-theoretic account of these simple special cases. We also explain how to use these results to set up the theory of Eilenberg–MacLane spaces and cup products. We assume only basic familiarity with homotopy type theory, as developed in [12]. We will not need to assume the Freudenthal suspension theorem, nor will we make use of any higher inductive types other than propositional truncation.

1.1 Notation

As in [12], we write \(a = b\) for the type of identifications between a and b, \(\textsf{refl}_a: a = a\) for the reflexivity identification, for path concatenation, \(\textrm{ap}_f: (a = b) \rightarrow (f\, a = f\, b)\) for the action of a function on paths, \(\mathcal {U}\) for a univalent universe, and \(\Vert A\Vert \) for propositional truncation. We write \((a: A) \rightarrow B\, a\) for the \(\Pi \)-type \(\Pi _{a: A} B\, a\), and \((a: A) \times B\, a\) for the \(\Sigma \)-type \(\Sigma _{a: A} B\, a\). We write \(\mathcal {U}_\textrm{pt}\) for the type \((X: \mathcal {U}) \times X\) of pointed types. For \(A: \mathcal {U}_\textrm{pt}\), we will write \(|A|: \mathcal {U}\) for its underlying type, and \(\textrm{pt}_A: |A|\) for its point. For \(A, B: \mathcal {U}_\textrm{pt}\), we write \(A \rightarrow _\textrm{pt}B\) for the type \((f: |A| \rightarrow |B|) \times (f\, \textrm{pt}_A = \textrm{pt}_B)\) of pointed functions. For \(f: A \rightarrow _\textrm{pt}B\), we write \(|f|: |A| \rightarrow |B|\) for the underlying function, and \(\textrm{pt}_f: |f|\, \textrm{pt}_A = \textrm{pt}_B\) for the proof that it is pointed. For \(A: \mathcal {U}_\textrm{pt}\), we write \(\Omega A: \mathcal {U}_\textrm{pt}\) for the loop space \((\textrm{pt}_A = \textrm{pt}_A, \textsf{refl}_{\textrm{pt}_A})\). For \(f: A \rightarrow _\textrm{pt}B\) we write \(\Omega f: \Omega A \rightarrow _\textrm{pt}\Omega B\) for the action on loops, . We write \(A \simeq _\textrm{pt}B\) for the type \((f: A \simeq B) \times f\, \textrm{pt}_A = \textrm{pt}_B\) of pointed equivalences.

2 Delooping types

Let \(X: \mathcal {U}_\textrm{pt}\) be a pointed type, and suppose we want – without further inputs – to construct a delooping of X. That is, we want to find a pointed type whose loop space is equivalent to X. One way would be to use the suspension \(\Sigma X\) [8], which is freely generated by a map \(X \rightarrow _\textrm{pt}\Omega \Sigma X\) and so necessarily maps to any delooping of X. Instead, we will use a cofree construction, which necessarily has a map from any delooping of X. Similar ideas are discussed in [4].

Definition 1

For \(X: \mathcal {U}_\textrm{pt}\), the type TX of X-torsors is given byFootnote 1

$$\begin{aligned} TX :=(Y: \mathcal {U}) \times \Vert Y\Vert \times (y: Y) \rightarrow X \simeq _\textrm{pt}(Y, y). \end{aligned}$$

Intuitively, an X-torsor is a type which looks like X at every point, and merely has a point, even though we might not have access to any particular point.

Theorem 2

If the type \(((Y,h,\mu ): TX) \times Y\) of pointed torsors is contractible, then TX is a delooping of X. That is, we have a point \(\textrm{pt}_{TX}: TX\) with an equivalence \(\Omega (TX, \textrm{pt}_{TX}) \simeq _\textrm{pt}X\). Moreover, TX is the unique connected delooping of X in this case.

Proof

For the first part, we apply the fundamental theorem of identity types [11, Theorem 11.2.2] to the type family over TX given by \((Y,h,\mu ) \mapsto Y\). Say \((Y,h,\mu ): TX\) and y : Y. We then point TX by \(\textrm{pt}_{TX} :=(Y,h,\mu )\). Note that \(X \simeq _\textrm{pt}(Y,y)\) by \(\mu (y)\). The fundamental theorem tells us that \((Y,h,\mu ) = (Y',h',\mu ')\) is equivalent to \(Y'\) for any \((Y',h',\mu '): TX\), where the map from \((Y,h,\mu ) = (Y',h',\mu ')\) to \(Y'\) is given by transporting y. That is, saying a torsor is trivial is equivalent to saying that it is pointed. In particular \((\textrm{pt}_{TX} = \textrm{pt}_{TX}) \simeq _\textrm{pt}(Y,y) \simeq _\textrm{pt}X\) as claimed. We can also see that TX is connected in this way: for \((Y',h',\mu '): TX\) we have \(h': \Vert Y'\Vert \) and so \(\Vert \textrm{pt}_{TX} = (Y',h',\mu ')\Vert \).

We now show uniqueness. Consider another delooping \(Z: \mathcal {U}_\textrm{pt}\), \(e: \Omega Z \simeq _\textrm{pt}X\) with Z connected. We first define a map \(f: |Z| \rightarrow TX\). For z : |Z|, we take the underlying type of \(f\, z\) to be \(z = \textrm{pt}_Z\). This is merely inhabited since Z is connected, and for any \(p: z = \textrm{pt}_Z\) we have \((z = \textrm{pt}_Z,p) \simeq _\textrm{pt}\Omega Z \simeq _\textrm{pt}X\) by induction on p. This finishes the definition of f. We have \(f\,\textrm{pt}_Z = \textrm{pt}_{TX}\) since \(f\, \textrm{pt}_Z\) is pointed by \(\textsf{refl}_{\textrm{pt}_Z}\) and hence trivial. The action of f on paths \((z = \textrm{pt}_Z) \rightarrow (f\,z = \textrm{pt}_{TX})\) must send \(p: z = \textrm{pt}_Z\) to the proof \(f\,z = \textrm{pt}_{TX}\) corresponding to the point p of \(f\,z\), by induction p. By unfolding definitions it can be seen that the action \(\Omega Z \rightarrow _\textrm{pt}\Omega TX\) on loops corresponds to the identity \(X \rightarrow _\textrm{pt}X\). In particular it is an equivalence. By Whitehead’s principle [12, Corollary 8.8.2], f itself is an equivalence. By univalence, the delooping (Ze) equals the one given by TX. \(\square \)

The following lemma provides an alternative description of the type of pointed X-torsors, which will make it feasible to determine when it is contractible.

Lemma 3

We have an equivalence of types

$$\begin{aligned} ((Y, h, \mu ): TX) \times Y \simeq (\mu : (x: |X|) \rightarrow X \simeq _\textrm{pt}(|X|, x)) \times (\mu \, \textrm{pt}_X = \textsf{id}_X). \end{aligned}$$

More concretely, the right-hand side can be understood as the type of left-invertible cohererent H-space structures on X in the sense of [4]. That is, it is equivalent to the type

$$\begin{aligned}{} & {} (\mu : |X| \rightarrow |X| \rightarrow |X|) \times (\mu _l: (x: |X|) \rightarrow \mu (\textrm{pt}_X,x) = x)\\{} & {} \quad \times (\mu _r: (x: |X|) \rightarrow \mu (x,\textrm{pt}_X) = x) \\{} & {} \quad \times (\mu _l(\textrm{pt}_X) = \mu _r(\textrm{pt}_X)) \times (x: |X|) \rightarrow \textsf{isEquiv}(y \mapsto \mu (x,y)). \end{aligned}$$

Proof

We have

$$\begin{aligned} ((Y, h, \mu ) : TX) \times Y&\simeq (Y : \mathcal {U}) \times \Vert Y\Vert \times ((y : Y) \rightarrow X \simeq _\textrm{pt}(Y, y)) \times Y \\&\simeq (Z : \mathcal {U}_\textrm{pt}) \times (\mu : (z : |Z|) \rightarrow X \simeq _\textrm{pt}(|Z|, z)) \\&\simeq (Z : \mathcal {U}_\textrm{pt}) \times (\mu : (z : |Z|) \rightarrow X \simeq _\textrm{pt}(|Z|, z)) \\&\quad \times (p : X \simeq _\textrm{pt}Z) \times (\mu \, \textrm{pt}_Z = p)\\&\simeq (\mu : (x : |X|) \rightarrow X \simeq _\textrm{pt}(|X|, x)) \times (\mu \, \textrm{pt}_X = \textsf{id}_X). \end{aligned}$$

In the first line, we simply unfold the definition of TX, and in the second line we do some simple rearrangement, dropping the redundant assumption \(\Vert Y\Vert \). In the third line, we use contractibility of singletons to add two redundant fields \(p: X \simeq _\textrm{pt}Z\) and \(\mu \, \textrm{pt}_Z = p\). And in the final line, we use univalence and contractibility of singletons to remove two redundant fields Z and p. \(\square \)

The following lemma will be our main tool to determine when types are contractible. It is a special case of Lemma 8.6.1 from [12], and has a direct proof by induction.

Lemma 4

If \(A: \mathcal {U}_\textrm{pt}\) is an n-connectedFootnote 2 pointed type, \(B: |A| \rightarrow \mathcal {U}\) is a family of \((n+m+1)\)-truncated types, and \(\textrm{pt}_B: B\, \textrm{pt}_A\), then the type of ‘pointed sections of B’,

$$\begin{aligned} (f: (a: |A|) \rightarrow B\, a) \times (f\, \textrm{pt}_A = \textrm{pt}_B), \end{aligned}$$

is m-truncated.

Corollary 5

If \(A: \mathcal {U}_\textrm{pt}\) is n-connected and \(B: \mathcal {U}_\textrm{pt}\) is \((n+m+1)\)-truncated, then \(A \rightarrow _\textrm{pt}B\) is m-truncated. If A and B are both n-connected and \((n+m+1)\)-truncated, then \(A \simeq _\textrm{pt}B\) is also m-truncated.

Proof

The first claim is a direct consequence of Lemma 4. For the second, we have an equivalence between \(A \simeq _\textrm{pt}B\) and the type \((f: A \rightarrow _\textrm{pt}B) \times (g\, h: B \rightarrow _\textrm{pt}A) \times (f \circ g = \textsf{id}_B) \times (h \circ f = \textsf{id}_A)\) of biinvertible pointed maps. This is m-truncated since m-truncated types are closed under \(\Sigma \) and identity types. \(\square \)

Corollary 6

If X is n-connected and \((2n+m+2)\)-truncated, then the type of pointed X-torsors is m-truncated.

Proof

Combining Lemma 3, Lemma 4, and Corollary 5. \(\square \)

Corollary 7

If X is n-connected and 2n-truncated, then TX is the unique connected delooping of X.

A different proof that such X have unique connected deloopings is in [1, Theorem 6].

Proof

In this case, the type of pointed X-torsors is \((-2)\)-truncated, so Theorem 2 applies. \(\square \)

Corollary 8

If X is n-connected and \((2n+1)\)-truncated, then TX is merely inhabited if and only if X has a delooping, and in this case TX is the unique connected delooping of X.

Proof

In this case the type of pointed X-torsors is \((-1)\)-truncated, i.e. a proposition. If TX is merely inhabited, then there also merely exists a pointed X-torsor. A merely inhabited proposition is contractible, so Theorem 2 applies. Conversely, if X has a delooping Z, then we can define a map \(|Z| \rightarrow TX\) as in the proof of Theorem 2, so that TX is merely inhabited. \(\square \)

3 Delooping maps

Suppose \(A, B: \mathcal {U}_\textrm{pt}\) are pointed types, and \(f: \Omega A \rightarrow _\textrm{pt}\Omega B\) is a pointed map on loop spaces. When can we find \(F: A \rightarrow _\textrm{pt}B\) such that \(f = \Omega F\)? More precisely, we want a useful description of the type \(\Omega ^{-1}f :=(F: A \rightarrow _\textrm{pt}B) \times (f = \Omega F)\). For example, it is necessary that we have .

Lemma 9

We have an equivalence of types

$$\begin{aligned} \Omega ^{-1} f \simeq (a: |A|) \rightarrow (b: |B|) \times C\, a\, b \end{aligned}$$

where \(C: |A| \rightarrow |B| \rightarrow \mathcal {U}\) is given by

$$\begin{aligned} C\, a\, b :=(h: (a = \textrm{pt}_A) \rightarrow (b = \textrm{pt}_B)) \times ((p: a = \textrm{pt}_A) \rightarrow f = D(h,p)) \end{aligned}$$

and we define \(D(h, p): \Omega A \rightarrow _\textrm{pt}\Omega B\) for \(h: (a = \textrm{pt}_A) \rightarrow (b = \textrm{pt}_B)\) and \(p: a = \textrm{pt}_A\) by

pointed in the obvious way.

We can think of C as a proof-relevant relation approximating a function \(F: |A| \rightarrow |B|\); it would be a function if only \((b: |B|) \times C\, a\, b\) were contractible for all a : |A|.

Proof

We have

$$\begin{aligned}&\Omega ^{-1} f \simeq (F : |A| \rightarrow |B|) \times (\textrm{pt}_F : F\, \textrm{pt}_A = \textrm{pt}_B)) \times (f = \Omega (F, \textrm{pt}_F)) \\&(a : |A|) \rightarrow (b : |B|) \times C\, a\, b \simeq (F : |A| \rightarrow |B|) \times (a : |A|) \rightarrow C\, a\, (F\, a). \end{aligned}$$

So it suffices to show that for \(F: |A| \rightarrow |B|\), we have

$$\begin{aligned}(\textrm{pt}_F: F\, \textrm{pt}_A = \textrm{pt}_B) \times (f = \Omega (F, \textrm{pt}_F)) \simeq (a: |A|) \rightarrow C\, a\, (F\, a).\end{aligned}$$

We can compute

$$\begin{aligned} (a : |A|) \rightarrow C\, a\, (F\, a)&\simeq (h : (a : |A|) \rightarrow (a = \textrm{pt}_A) \rightarrow (F\, a = \textrm{pt}_B)) \\&\ \ \ \ \times (a : |A|) \rightarrow (p : a = \textrm{pt}_A) \rightarrow f = D(h\,a, p) \\&\simeq (h : (a : |A|) \rightarrow (a = \textrm{pt}_A) \rightarrow (F\, a = \textrm{pt}_B)) \\&\quad \times (f = D(h\,\textrm{pt}_A, \textsf{refl}_{\textrm{pt}_A})). \end{aligned}$$

In the first line, we commuted \(\Pi \) and \(\Sigma \), and in the second line, we used the fact that the type \((a: |A|) \times (p: a = \textrm{pt}_A)\) is contractible with centre of contraction \((\textrm{pt}_A, \textsf{refl}_{\textrm{pt}_A})\). Again using this fact, we have \(((a: |A|) \rightarrow (a = \textrm{pt}_A) \rightarrow (F\, a = \textrm{pt}_B)) \simeq (F\, \textrm{pt}_A = \textrm{pt}_B)\). Thus it suffices to show that if h corresponds to \(\textrm{pt}_F\) under this equivalence, then \(D(h\,\textrm{pt}_A, \textsf{refl}_{\textrm{pt}_A}) = \Omega (F,\textrm{pt}_F)\). This holds essentially by definition of D and of the action of \(\Omega \) on maps, using that if h corresponds to \(\textrm{pt}_F\). \(\square \)

Corollary 10

Suppose |A| is n-connected and |B| is \((2n+m+2)\)-truncated, where \(n \ge 0\) and \(m \ge -2\). Then \(\Omega ^{-1}f\) is m-truncated.

Proof

Since truncated types are closed under products, it suffices to show that for any a : |A|, the type \((b: |B|) \times C\, a\, b\) is m-truncated. Since to be truncated is a proposition and |A| is at least 0-connected, it suffices to consider the case where a is \(\textrm{pt}_A\). In this case we have

$$\begin{aligned} (b : |B|) \times C\, \textrm{pt}_A\, b&\simeq (b : |B|) \times ((h, t) : C\, \textrm{pt}_A\, b) \times (q : b = \textrm{pt}_B) \times (h\, \textsf{refl}_{\textrm{pt}_A} = q)\\&\simeq ((h,t) : C\, \textrm{pt}_A\, \textrm{pt}_B) \times (h\, \textsf{refl}_{\textrm{pt}_A} = \textsf{refl}_{\textrm{pt}_B}) \\&\simeq (h : \Omega A \rightarrow _\textrm{pt}\Omega B) \times (p : \textrm{pt}_A = \textrm{pt}_A) \rightarrow (f = D(|h|, p)), \end{aligned}$$

by first adding two redundant singleton fields, and then contracting away the pair of singleton fields b, q. One can prove \(E(h): h = D(|h|, \textsf{refl}_{\textrm{pt}_A})\) using unit laws, so we further have

by first adding two redundant singleton fields, then contracting away the pair of singleton fields h, q, and finally using that is equivalent to \(t\, \textsf{refl}_{\textrm{pt}_A} = E(f)\). We have now described \((b: |B|) \times C\, \textrm{pt}_A\, b\) as the type of pointed sections of a pointed type family over \(\textrm{pt}_A = \textrm{pt}_A\). The fibres are identity types in \(\Omega A \rightarrow _\textrm{pt}\Omega B\), which is \((n+m+1)\)-truncated by Corollary 5. Since the fibres are \((n+m)\)-truncated and the base \(\textrm{pt}_A = \textrm{pt}_A\) is \((n-1)\)-connected, the type of pointed sections is m-truncated by Lemma 4, as claimed. \(\square \)

Corollary 11

If |A| is n-connected and |B| is 2n-truncated, then \(\Omega \) is an equivalence

$$\begin{aligned} (A \rightarrow _\textrm{pt}B) \simeq (\Omega A \rightarrow _\textrm{pt}\Omega B). \end{aligned}$$

This is part of the stabilisation theorem: \(\Omega \) is fully faithful when restricted to spaces that are n-connected and 2n-truncated. Given \(f: \Omega A \rightarrow _\textrm{pt}\Omega B\) where A and B are n-connected and 2n-truncated, it is natural to ask for a concrete description of the delooping \(F: A \rightarrow _\textrm{pt}B\) of f. Our construction does not describe F directly, but rather its graph. By the proof of Lemma 9, we have \(C\, a\, (F\, a)\) for all a : |A|. Since \((b: B) \times C\, a\, b\) is contractible by the proof of Corollary 10, this means that \(F\, a = b\) is equivalent to \(C\, a\, b\), using the fundamental theorem of identity types.

Corollary 12

If |A| is n-connected and |B| is \((2n+1)\)-truncated, then \(\Omega \) identifies \(A \rightarrow _\textrm{pt}B\) with the subtype of \(\Omega A \rightarrow _\textrm{pt}\Omega B\) consisting of \(f: \Omega A \rightarrow _\textrm{pt}\Omega B\) such that \((b: |B|) \times C\, \textrm{pt}_A\, b\), which is logically equivalent to \(C\, \textrm{pt}_A\, \textrm{pt}_B\), and hence to .

4 Applications

In homotopy type theory, we define the ordinary cohomology group \(H^n(X; G)\) of a type X with coefficients in a an abelian group G as the set-truncation \(\Vert X \rightarrow \textrm{K}(G, n)\Vert _0\), where \(\textrm{K}(G, n)\) is an Eilenberg–MacLane space. The algebraic structure of these cohomology groups comes from various operations at the level of Eilenberg–MacLane spaces, which we now discuss.

4.1 \(\varvec{\textrm{K}(G,n)}\)

Let G be a group, so that in particular G is a 0-truncated type. One can define a 0-connected pointed type \(\textrm{K}(G, 1): \mathcal {U}_\textrm{pt}\) with \(\Omega \textrm{K}(G, 1) \simeq _\textrm{grp}G\) as a type of torsors [2]. This is similar to but not exactly the same as our TX: K(G, 1) is equivalent to the type of \((Y,h,\mu ): TG\) such that the action \(\mu \) satisfies an associativity condition \(\mu (y,g \cdot g') = \mu (\mu (y,g),g')\). We will explain this phenomenon in greater generality in later work. Note that \(\textrm{K}(G, 1)\) is necessarily 1-truncated. By Corollary 12, we have that if B is 1-truncated, then \({(\textrm{K}(G, 1) \rightarrow _\textrm{pt}B) \simeq (G \rightarrow _\textrm{grp}\Omega B)}\); we think of this as an elimination principle for \(\textrm{K}(G, 1)\). From this elimination principle, it follows that if \(X: \mathcal {U}_\textrm{pt}\) is another 0-connected, 1-truncated pointed type, then \((\textrm{K}(G, 1) \simeq _\textrm{pt}X) \simeq (G \simeq _\textrm{grp}\Omega X)\).

When can we find \(\textrm{K}(G, 2): \mathcal {U}_\textrm{pt}\) with \(\Omega \textrm{K}(G, 2) \simeq _\textrm{pt}\textrm{K}(G, 1)\)? By Corollary 8, this is equivalent to

$$\begin{aligned}(\mu : (x: |\textrm{K}(G, 1)|) \rightarrow \textrm{K}(G, 1) \simeq _\textrm{pt}(|\textrm{K}(G, 1)|, x)) \times (\mu \, \textrm{pt}= \textsf{id}),\end{aligned}$$

or equivalently

$$\begin{aligned}(\mu : (x: |\textrm{K}(G, 1)|) \rightarrow G \cong _\textrm{grp}(x = x)) \times (\mu \, \textrm{pt}= \textsf{id}).\end{aligned}$$

Given a dependent elimination principle for \(\textrm{K}(G, 1)\), we could analyse this type of pointed sections directly. Alternatively, we can think of pointed sections as pointed maps into a \(\Sigma \)-type with extra structure, and apply our non-dependent elimination principle. The loop space of the \(\Sigma \)-type (\(x: |\textrm{K}(G, 1)|) \times G \cong _\textrm{grp}(x = x)\) is the centre \(\textrm{Z}(G)\) of G, and so we are left to ask when the inclusion \(\textrm{Z}(G) \rightarrow _\textrm{grp}G\) has a section. This happens precisely when G is abelian. So \(\textrm{K}(G, 1)\) has a delooping if and only if G is abelian, in which case the delooping is unique. As soon as we have \(\textrm{K}(G, 2)\), Corollary 7 gives \(\textrm{K}(G, n): \mathcal {U}_\textrm{pt}\) for every n with \(\Omega \textrm{K}(G, n+1) \simeq _\textrm{pt}\textrm{K}(G, n)\). We also get an elimination principle by repeated application of Corollary 11: for any \(n \ge 1\) and any n-truncated type B, we have \((\textrm{K}(G, n) \rightarrow _\textrm{pt}B) \simeq (G \rightarrow _\textrm{grp}\Omega ^n B)\). Moreover, for \(n \ge 0\) we have the following explicit description of \(K(G,n+2)\):

$$\begin{aligned} \textrm{K}(G, n+2) \simeq (Y: \mathcal {U}) \times n\mathsf {-connected}(Y) \times (y: Y) \rightarrow G \cong _\textrm{grp}\Omega ^{n+1}(Y, y). \end{aligned}$$

To see this, first note that

$$\begin{aligned} K(G,n+2) \simeq TK(G,n+1) \simeq (Y: \mathcal {U}) \times \Vert Y\Vert \times (y: Y) \rightarrow K(G,n+1) \simeq _\textrm{pt}(Y,y). \end{aligned}$$

For any y : Y, if \(K(G,n+1) \simeq _\textrm{pt}(Y,y)\) then in particular Y is n-connected. If Y is n-connected, then \(K(G,n+1) \simeq _\textrm{pt}(Y,y)\) is equivalent to \(G \cong _\textrm{grp}\Omega ^{n+1}(Y,y)\) (which in particular means that Y is \((n+1)\)-truncated), using the elimination principle of \(K(G,n+1)\).

4.2 \(\varvec{\pi _n(S^n)}\)

While we have systematically avoided talking about higher inductive types, we can still say something about them. Recall that the n-sphere \(S^n: \mathcal {U}_\textrm{pt}\) is defined as a pointed type with \((S^n \rightarrow _\textrm{pt}B) \simeq \Omega ^n B\). If B is n-truncated for \(n \ge 1\), we have \(\Omega ^n B \simeq (\mathbb {Z}\rightarrow _\textrm{grp}\Omega ^n B)\), since \(\mathbb {Z}\) is the free group on one generator, which as we have seen is equivalent to \(\textrm{K}(\mathbb {Z}, n) \rightarrow _\textrm{pt}B\). Thus \((S^n \rightarrow _\textrm{pt}B) \simeq (K(\mathbb {Z},n) \rightarrow _\textrm{pt}B)\) for any n-truncated B. It is direct to see that this equivalence is natural in B, in the naive sense that for any map \(B \rightarrow B'\) one has a commuting naturality square. It follows that the equivalence is given by precomposing with the map \(S^n \rightarrow _\textrm{pt}K(\mathbb {Z},n)\) corresponding to the identity \(K(\mathbb {Z},n) \rightarrow _\textrm{pt}K(\mathbb {Z},n)\).Footnote 3 Thus \(K(\mathbb {Z},n)\) has the universal property of the n-truncation of \(S^n\). In particular, \(\pi _n(S^n) \simeq _\textrm{grp}\Omega ^n(\Vert S^n\Vert _n) \simeq _\textrm{grp}\Omega ^n(\textrm{K}(\mathbb {Z},n)) \simeq _\textrm{grp}\mathbb {Z}\), and \(\pi _k(S^n) = 0\) for \(k < n\).

More generally, this argument shows that \(\Vert A\Vert _{2n} \simeq _\textrm{pt}\Vert \Sigma \Omega A\Vert _{2n}\) when A is n-connected. To see this, note that for B be an arbitrary 2n-truncated type, \(\Sigma \Omega A \rightarrow _\textrm{pt}B\) is equivalent to \(\Omega A \rightarrow _\textrm{pt}\Omega B\) by the \(\Sigma \dashv \Omega \) adjunction, which is in turn equivalent to \(A \rightarrow _\textrm{pt}B\) by Corollary 11, and this is all natural in B. If moreover A is 2n-truncated, then we can apply the same fact to the delooping TA of A, to see that \(TA \simeq _\textrm{pt}\Vert \Sigma A\Vert _{2n+1}\). Taking loop spaces of both sides, we get \(A \simeq _\textrm{pt}\Vert \Omega \Sigma A\Vert _{2n}\). Dropping the assumption that A is 2n-truncated, we still have \(\Vert \Sigma A\Vert _{2n+1} \simeq _\textrm{pt}\Vert \Sigma \Vert A\Vert _{2n}\Vert _{2n+1}\), by a direct Yoneda-style argument, so that

$$\begin{aligned}\Vert \Omega \Sigma A\Vert _{2n} \simeq _\textrm{pt}\Omega \Vert \Sigma A\Vert _{2n+1} \simeq _\textrm{pt}\Omega \Vert \Sigma \Vert A\Vert _{2n}\Vert _{2n+1} \simeq _\textrm{pt}\Vert \Omega \Sigma \Vert A\Vert _{2n}\Vert _{2n} \simeq _\textrm{pt}\Vert A\Vert _{2n}. \end{aligned}$$

This is part of the Freudenthal suspension theorem.

4.3 The cup product

Corollaries 11 and 12 can be used to understand cohomology operations. As an example, we consider cup products. Given a bilinear map \(L \rightarrow _\textrm{grp}M \rightarrow _\textrm{grp}N\), we define a cup productFootnote 4

$$\begin{aligned} \smile \,: \textrm{K}(L, n) \rightarrow _\textrm{pt}\textrm{K}(M, m) \rightarrow _\textrm{pt}\textrm{K}(N, n+m), \end{aligned}$$

similar to the definition in [3] and [5, Definition 2.26]. Note that we ask for the cup product to be bi-pointed, corresponding to \(0 \smile y = x \smile 0 = 0\); without this extra piece of specification, the definition would not work. Indeed, \(\textrm{K}(M, m) \rightarrow _\textrm{pt}\textrm{K}(N, n+m)\) is n-truncated by Corollary 5, so the elimination principle of K(Ln) appliesFootnote 5:

$$\begin{aligned} \textrm{K}(L,n) \rightarrow _\textrm{pt}\textrm{K}(M, m) \rightarrow _\textrm{pt}\textrm{K}(N, n+m)&\simeq L \rightarrow _\textrm{grp}\Omega ^n (\textrm{K}(M, m) \rightarrow _\textrm{pt}\textrm{K}(N, n+m))\\&\simeq L \rightarrow _\textrm{grp}\textrm{K}(M, m) \rightarrow _\textrm{pt}\Omega ^n \textrm{K}(N, n+m)\\&\simeq L \rightarrow _\textrm{grp}\textrm{K}(M, m) \rightarrow _\textrm{pt}\textrm{K}(N, m)\\&\simeq L \rightarrow _\textrm{grp}M \rightarrow _\textrm{grp}N. \end{aligned}$$

The forward maps in this composite are given explicitly by iterated looping, so we arrive at a definition of the cup product as the unique bi-pointed map whose looping gives back the bilinear map we started with.

With this characterisation, algebraic properties of the cup product follow from analogous properties of looping. Consider for example graded commutativity of the cup product. For any pointed types X, Y, Z, we have an equivalence

$$\begin{aligned}(X \rightarrow _\textrm{pt}Y \rightarrow _\textrm{pt}Z) \simeq (Y \rightarrow _\textrm{pt}X \rightarrow _\textrm{pt}Z), \end{aligned}$$

which informally flips the first two arguments. Similarly, for a bilinear map \(\mu : L \rightarrow _\textrm{grp}M \rightarrow _\textrm{grp}N\), we can flip it to obtain a bilinear map \(\mu ': M \rightarrow _\textrm{grp}L \rightarrow _\textrm{grp}N\). We would like to know that the corresponding cup products \(K(L,n) \rightarrow _\textrm{pt}K(M,m) \rightarrow _\textrm{pt}K(N,n+m)\) and \(K(M,m) \rightarrow _\textrm{pt}K(L,n) \rightarrow _\textrm{pt}K(N,n+m)\) are flips of each other, up to a sign change of \((-1)^{nm}\). This then recovers the usual graded commutativity of the cup product over a commutative ring, since if R is a commutative ring then the multiplication map \(R \rightarrow _\textrm{grp}R \rightarrow _\textrm{grp}R\) is invariant under flipping the first two arguments.

Instead of working with the cup product directly, we work with looping. It can be seen using Eckmann–Hilton that the looping maps used to define the cup product commute with the natural negation operations on \(K(L,n) \rightarrow _\textrm{pt}K(M,m) \rightarrow _\textrm{pt}K(N,n+m)\) and \(L \rightarrow _\textrm{grp}M \rightarrow _\textrm{grp}N\). Thus in order to prove graded commutativity it suffices to show that the composite rectangle in the following diagram commutes up to a sign change of \((-1)^{nm}\), where the vertical maps are given by looping and the horizontal equivalences are given by flipping arguments.

It is direct to see that the following diagram commutes. The difference with the above diagram is the order in which the arguments are looped in the right vertical arrows.

It remains to verify that the square

commutes up to a sign change of \((-1)^{nm}\). The difference between the two composites in the square is the order in which the arguments are looped: either loop the first argument m times and then the second n times, or loop the second n times and then the first m times. This can be understood as a composite of nm transpositions, so it suffices to show that for any pointed types X, Y, Z, the following square anticommutes.

In this square, the top map is given by looping \((X \rightarrow _\textrm{pt}Y \rightarrow _\textrm{pt}Z) \rightarrow (\Omega X \rightarrow _\textrm{pt}\Omega (Y \rightarrow _\textrm{pt}Z))\) followed by the equivalence \(\Omega (Y \rightarrow _\textrm{pt}Z) \simeq _\textrm{pt}(Y \rightarrow _\textrm{pt}\Omega Z)\), and the others are defined similarly. All that is left now is to construct, given \(f: X \rightarrow _\textrm{pt}Y \rightarrow _\textrm{pt}Z\), an identification between a certain pair of bi-pointed maps \(\Omega X \rightarrow _\textrm{pt}\Omega Y \rightarrow _\textrm{pt}\Omega ^2 Z\). Applying a result of Evan Cavallo [4, Lemma 2.7] twice, it is enough to construct for any pair of loops \(p: \Omega X\), \(q: \Omega Y\) an identification between a certain pair of elements in \(\Omega ^2 Z\). Chasing definitions, it can be seen that these two elements are given by the following commutative squares, together with the fact that the boundaries are trivial by bi-pointedness of f.

We write \(f(p,\textrm{pt}_Y)\) for \(\textrm{ap}_{f(-,\textrm{pt}_Y)} p\) and similarly with \(f(\textrm{pt}_X, q)\). The commutativity of the above square in turn comes from the general commutativity of the following squares for \(p: x = x'\), \(q: y = y'\).

The commutativity of the above squares is direct by path induction. Similarly it is direct by path induction that these commutativity proofs are inverse as paths , . This is essentially what had to be shown.

5 Concluding remarks

Our Lemma 9 can be compared with the construction of functors out of a Rezk completion in [12, Theorem 9.9.4] and the construction of maps \(\textrm{K}(G, 1) \rightarrow _\textrm{pt}\textrm{K}(H, 1)\) in [2, Lemma 4.10.1], due to Thierry Coquand. Variants of the relation \(C\, a\, b\) are used in all cases. The idea can be understood as a type-theoretic analogue of the arguments in [6, Sections 5.2\(-\)5.3].

The arguments in this note are well-suited to formalisation. Indeed, many parts have already been formalised twice: first by Louise Leclerc [7], and later by Axel Ljungström in order to develop the theory of Steenrod squares.

In upcoming work, we take the ideas of this note much further to give an exact, infinitary description of higher groups—as well as higher equivalence relations more generally—and morphisms between them. In fact the description of morphisms is in a precise sense obtained mechanically from the descriptions of objects, explaining the similarity between the second and third sections of this note (compare for example Corollaries 6, 7, 8 with Corollaries 10, 11, 12).