Eilenberg–Maclane spaces and stabilisation in homotopy type theory

In this note, we study the delooping of spaces and maps in homotopy type theory. We show that in some cases, spaces have a unique delooping, and give a simple description of the delooping in these cases. We explain why some maps, such as group homomorphisms, have a unique delooping. We discuss some applications to Eilenberg–MacLane spaces and cohomology.


Introduction
The loop space functor Ω 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 : ΩA → pt ΩB, when can we find a map A → pt B whose looping equals f ?The general answer is rather complicated, involving group operations and an infinite tower of coherences, but according to the stabilisation theorem [BDR18], 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 cohomology operations.We assume only basic familiarity with homotopy type theory, as developed in [Uni13].We will not need to assume the Freudenthal suspension theorem, nor will we make use of any higher inductive types other than propositional truncation.
Notation.As in [Uni13], we write a = b for the type of identifications between a and b, refl a : a = a for the reflexivity identification, : (a = b) → (b = c) → (a = c) for path concatenation, ap f : (a = b) → (f a = f b) for the action of a function on paths, U for a univalent universe, and A for propositional truncation.We write (a : A) → B a for the Π-type Π a:A B a, and (a : A)×B a for the Σ-type Σ a:A B a. We write U pt for the type (X : U) × X of pointed types.For A : U pt , we will write |A| : U for its underlying type, and pt A : |A| for its point.For A, B : U pt , we write A → pt B for the type (f : |A| → |B|) × (f pt A = pt B ) of pointed functions.For f : A → pt B, we write |f | : |A| → |B| for the underlying function, and pt f : |f | pt A = pt B for the proof that it is pointed.For A : U pt , we write ΩA : U pt for the loop space (pt A = pt A , refl pt A ).For f : A → pt B we write Ωf : ΩA → pt ΩB for the action on loops, p : pt 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 [Buc+23].
Definition 1.For X : U pt , the type T X of X-torsors is given by 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, µ) : T X) × Y of pointed torsors is contractible, then T X is a delooping of X.That is, we have a point pt T X : T X with an equivalence Ω(T X, pt T X ) ≃ pt X.Moreover, T X is the unique delooping of X in this case.
Proof.For the first part, we apply the fundamental theorem of identity types [Rij22, Theorem 11.2.2] to the type family over T X given by (Y, h, µ) → Y .Say (Y, h, µ) : T X and y : Y .We then point T X by pt T X := (Y, h, µ).Note that X ≃ pt (Y, y) by µ(y).The fundamental theorem tells us that (Y, h, µ) = (Y ′ , h ′ , µ ′ ) is equivalent to Y ′ for any (Y ′ , h ′ , µ ′ ) : T X, where the map from (Y, h, µ) = (Y ′ , h ′ , µ ′ ) to Y ′ is given by transporting y.That is, saying a torsor is trivial is equivalent to saying that it is pointed.In particular (pt T X = pt T X ) ≃ pt (Y, y) ≃ pt X as claimed.
We now show uniqueness.Consider another delooping Z : U pt , e : ΩZ ≃ pt X with Z connected.We first define a map f : |Z| → T X.For z : |Z|, we take the underlying type of f z to be z = pt Z .This is merely inhabited since Z is connected, and for any p : z = pt Z we have (z = pt Z , p) ≃ pt ΩZ ≃ pt X by induction on p.This finishes the definition of f .We have f pt Z = pt T X since f pt Z is pointed by refl pt Z and hence trivial.The action of f on paths (z = pt Z ) → (f z = pt T X ) must send p : z = pt Z to the proof f z = pt T X corresponding to the point p of f z, by induction p.By unfolding definitions it can be seen that the action ΩZ → pt ΩT X on loops corresponds to the identity X → pt X.In particular it is an equivalence.By Whitehead's principle [Uni13, Corollary 8.8.2], f itself is an equivalence.By univalence, the delooping (Z, e) equals the one given by T X.
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 The right-hand side is roughly the type of coherent H-space structures on X, but note that we asymmetrically require invertibility on one side.
Proof.We have In the first line, we simply unfold the definition of T X, and in the second line we do some simple rearrangement, dropping the redundant assumption Y .In the third line, we use contractibility of singletons to add two redundant fields p : X ≃ pt Z and µ pt Z = p.And in the final line, we use univalence and contractibility of singletons to remove two redundant fields Z and p.
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 [Uni13], and has a direct proof by induction.Lemma 4. If A : U pt is an n-connected 2 pointed type, B : |A| → U is a family of (n + m + 1)truncated types, and pt B : B pt A , then the type of 'pointed sections of B', Proof.The first claim is a direct consequence of Lemma 4. For the second, we have an equivalence between A ≃ pt B and the type (f : maps.This is m-truncated since m-truncated types are closed under Σ and identity types.Corollary 6.If X is n-connected and (2n + m + 2)-truncated, then the type of pointed X-torsors is m-truncated.
Corollary 7. If X is n-connected and 2n-truncated, then T X is the unique delooping of X.
A different proof that such X have unique deloopings is in [BDR18, Theorem 6].
Proof.In this case, the type of pointed X-torsors is (−2)-truncated, so Theorem 2 applies.
Corollary 8.If X is n-connected and (2n + 1)-truncated and T X is merely inhabited, then T X is the unique delooping of X.
Proof.In this case the type of pointed X-torsors is (−1)-truncated, i.e. a proposition.Since we assume T X is merely inhabited, there also merely exists a pointed X-torsor.A merely inhabited proposition is contractible, so we can again apply Theorem 2.

Delooping maps
Suppose A, B : U pt are pointed types, and f : ΩA → pt ΩB is a pointed map on loop spaces.When can we find F : A → pt B such that f = ΩF ?More precisely, we want a useful description of the type Ω −1 f := (F : A → pt B) × (f = ΩF ).For example, it is necessary that we have f (p q) = f (p) f (q).Lemma 9. We have an equivalence of types 2 While there are several equivalent definitions of connectedness, this note is most easily understood with a recursive definition: every type is (−2)-connected, and a type is (n + 1)-connected if it is merely inhabited and its identity types are n-connected.Proof.We have So it suffices to show that for F : |A| → |B|, we have Now by path induction and type-theoretic choice, we have Again by path induction, we have ((a : |A|) → (a = pt A ) → (F a = pt B )) ≃ (F pt A = pt B ).It suffices to show that if h corresponds to pt F under this equivalence, then D(h, refl pt A ) = Ω(F, pt F ).This holds essentially by definition.
Proof.It suffices to show that, for any a : |A|, the type (b : |B|) × 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 pt A .In this case we have by first adding two redundant singleton fields, and then removing another pair of singleton fields.One can prove E(h) : h = D(|h|, refl pt A ) using unit laws, so we further have This is the type of pointed sections of a pointed type family over pt A = pt A .The fibres are identity types in ΩA → pt ΩB, which is (n+m+1)-truncated.Since the fibres are (n+m)-truncated and the base pt A = pt A is (n − 1)-connected, the type of pointed sections is m-truncated as claimed.
Corollary 11.If |A| is n-connected and |B| is 2n-truncated, then Ω is an equivalence

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 X → K(G, n) 0 , where 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.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 K(G, 1) : U pt with ΩK(G, 1) ≃ grp G as a type of torsors, similar to our T X [Bez+].Note that K(G, 1) is necessarily 1-truncated.By Corollary 12, we have that if B is 1-truncated, then (K(G, 1) → pt B) ≃ (G → grp ΩB); we think of this as an elimination principle for K(G, 1).From this elimination principle, it follows that if X : U pt is another 0-connected, 1-truncated pointed type, then (K(G, 1) ≃ pt X) ≃ (G ≃ grp ΩX).
When can we find K(G, 2) : U pt with ΩK(G, 2) ≃ pt K(G, 1)?By Corollary 8, it suffices to have or equivalently (µ : (x : |K(G, 1)|) → G ∼ = grp (x = x)) × (µ pt = id).Given a dependent elimination principle for K(G, 1), we could analyse this type of pointed sections directly.Alternatively, we can think of pointed sections as pointed maps into a Σ-type with extra structure, and apply our non-dependent elimination principle.The loop space of the Σ-type and so we are left to ask when the inclusion Z(G) → grp G has a section.This happens precisely when G is abelian.So 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 K(G, 2), Corollary 7 gives K(G, n) : U pt for every n with ΩK(G, n + 1) ≃ pt K(G, n).We also get an elimination principle by repeated application of Corollary 11: for any n ≥ 1 and any n-truncated type B, we have (K(G, n) → pt B) ≃ (G → grp Ω n B).One can check, combining the definition of T X with the elimination principle for K(G, n), that for n ≥ 0 we have

π 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 : U pt is defined as a pointed type with (S n → pt B) ≃ Ω n B. If B is n-truncated for n ≥ 1, we have Ω n B ≃ (Z → grp Ω n B), since Z is the free group on one generator, which as we've seen is equivalent to K(Z, n) → pt B. By the Yoneda lemma, we get that K(Z, n) is the n-truncation of S n .In particular, π n (S n ) ≃ grp Ω n ( S n n ) ≃ grp Ω n (K(Z, n)) ≃ grp Z, and π k (S n ) = 0 for k < n.
More generally, this argument shows that A ≃ pt ΣΩA 2n when A is n-connected and 2ntruncated.Applying the same fact to the delooping T A of A, we get that T A ≃ pt ΣA 2n+1 .Taking loop spaces of both sides, we get A ≃ pt ΩΣA 2n , which is part of the Freudenthal suspension theorem.4.3.The cup product.We now give some sketches on how to define cohomology operations.Given a bilinear map L → grp M → grp N, we define a cup-product similar to the definition in [BLM22] and [CS20, Definition 2.26].Note that we ask for the cup product to respect pointing, corresponding to 0 ⌣ y = x ⌣ 0 = 0; without this extra piece of specification, the definition would not work.Indeed, K(M, m) → pt K(N, n + m) is n-truncated, so the elimination principle applies: 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, we expect that algebraic properties of the cup product follow from analogous properties of looping.For example, one can prove that the following square anti-commutes, and this corresponds to graded commutativity of the cup product.i as the cup product square x → x ⌣ x.To deloop this to Sq i i+1 , we need to show (x + y) ⌣ (x + y) = x ⌣ x + y ⌣ y, which follows from distributivity and graded commutativity since we are working mod 2. Given Sq i i+1 we can define Sq i n for all n using Corollary 11, by looping and delooping as appropriate.

Concluding remarks
Our Lemma 9 can be compared with the construction of functors out of a Rezk completion in [Uni13, Theorem 9.9.4] and the construction of maps K(G, 1) → pt K(H, 1) in [Bez+,Lemma 4. The arguments in this note are well-suited to formalisation.Indeed, many parts have already been formalised twice: first by Louise Leclerc [Lec22], 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).
and we define D(h, p) : ΩA → pt ΩB by |D(h, p)|(q) = (h p) −1 h(p q), pointed in the obvious way.We can think of C as a proof-relevant relation approximating a function F : |A| → |B|; it would be a function if only (b : |B|) × C a b were contractible for all a : |A|.
10.1].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 [Del91, Sections 5.2-5.3].
4. Steenrod squares.Let us now use Corollary 12 to construct Steenrod squares as 'stable cohomology operations' Sq i n : K(Z/2, n) → pt K(Z/2, n + i) with Sq i n corresponding to ΩSq i n+1 .We first define Sq i