2.1 Types are higher groupoids
We now derive from the induction principle the beginnings of the structure of a higher groupoid. We begin with symmetry of equality, which, in topological language, means that “paths can be reversed”.
Lemma 2.1.1.
Since this is our first time stating something as a “Lemma” or “Theorem”, let us pause to consider what that means. Recall that propositions (statements susceptible to proof) are identified with types, whereas lemmas and theorems (statements that have been proven) are identified with inhabited types. Thus, the statement of a lemma or theorem should be translated into a type, as in §1.11 (http://planetmath.org/111propositionsastypes), and its proof translated into an inhabitant of that type. According to the interpretation of the universal quantifier “for every”, the type corresponding to Lemma 2.1.1 (http://planetmath.org/21typesarehighergroupoids#Thmprelem1) is
The proof of Lemma 2.1.1 (http://planetmath.org/21typesarehighergroupoids#Thmprelem1) will consist of constructing an element of this type, i.e. deriving the judgment for some . We then introduce the notation for this element , in which the arguments , , and are omitted and inferred from context. (As remarked in §1.1 (http://planetmath.org/11typetheoryversussettheory), the secondary statement “ for each ” should be regarded as a separate judgment.)
First proof.
Assume given , and let be the type family defined by . In other words, is a function assigning to any and a type, namely the type . Then we have an element
Thus, the induction principle for identity types gives us an element for each . We can now define the desired function to be , i.e. we set . The conversion rule (2.0.1) (http://planetmath.org/2homotopytypetheory#S0.E1) gives , as required. ∎
We have written out this proof in a very formal style, which may be helpful while the induction rule on identity types is unfamiliar. To be even more formal, we could say that Lemma 2.1.1 (http://planetmath.org/21typesarehighergroupoids#Thmprelem1) and its proof together consist of the judgment
(along with an additional equality judgment). However, eventually we prefer to use more natural language, such as in the following equivalent proof.
Second proof.
We want to construct, for each and , an element . By induction, it suffices to do this in the case when is and is . But in this case, the type of and the type in which we are trying to construct are both simply . Thus, in the “reflexivity case”, we can define to be simply . The general case then follows by the induction principle, and the conversion rule is precisely the proof in the reflexivity case that we gave. ∎
We will write out the next few proofs in both styles, to help the reader become accustomed to the latter one. Next we prove the transitivity of equality, or equivalently we “concatenate paths”.
Lemma 2.1.2.
For every type and every there is a function
written , such that for any . We call the concatenation or composite of and .
First proof.
Let be the type family
Note that . Thus, in order to apply the induction principle for identity types to this , we need a function of type
(2.1.3) |
which is to say, of type
Now let be the type family . Note that . Thus, we have the function
By the induction principle for identity types applied to , we obtain a function
But , so this is (2.1.3). Thus, we can use this function and apply the induction principle for identity types to , to obtain our desired function of type
The conversion rules for the two induction principles give us for any . ∎
Second proof.
We want to construct, for every and every and , an element of . By induction on , it suffices to assume that is and is . In this case, the type of is . Now by induction on , it suffices to assume also that is and is . But in this case, is , and we have . ∎
The reader may well feel that we have given an overly convoluted proof of this lemma. In fact, we could stop after the induction on , since at that point what we want to produce is an equality , and we already have such an equality, namely . Why do we go on to do another induction on ?
The answer is that, as described in the introduction, we are doing proof-relevant mathematics. When we prove a lemma, we are defining an inhabitant of some type, and it can matter what specific element we defined in the course of the proof, not merely the type inhabited by that element (that is, the statement of the lemma). Lemma 2.1.2 (http://planetmath.org/21typesarehighergroupoids#Thmprelem2) has three obvious proofs: we could do induction over , induction over , or induction over both of them. If we proved it three different ways, we would have three different elements of the same type. It’s not hard to show that these three elements are equal (see http://planetmath.org/node/87632Exercise 2.1), but as they are not definitionally equal, there can still be reasons to prefer one over another.
In the case of Lemma 2.1.2 (http://planetmath.org/21typesarehighergroupoids#Thmprelem2), the difference hinges on the computation rule. If we proved the lemma using a single induction over , then we would end up with a computation rule of the form . If we proved it with a single induction over , we would have instead , while proving it with a double induction (as we did) gives only .
The asymmetrical computation rules can sometimes be convenient when doing formalized mathematics, as they allow the computer to simplify more things automatically. However, in informal mathematics, and arguably even in the formalized case, it can be confusing to have a concatenation operation which behaves asymmetrically and to have to remember which side is the “special” one. Treating both sides symmetrically makes for more robust proofs; this is why we have given the proof that we did. (However, this is admittedly a stylistic choice.)
The table below summarizes the “equality”, “homotopical”, and “higher-groupoid” points of view on what we have done so far.
Equality | Homotopy | -Groupoid |
---|---|---|
reflexivity | constant path | identity morphism |
symmetry | inversion of paths | inverse morphism |
transitivity | concatenation of paths | composition of morphisms |
In practice, transitivity is often applied to prove an equality by a chain of intermediate steps. We will use the common notation for this such as . If the intermediate expressions are long, or we want to specify the witness of each equality, we may write
(by ) | ||||
(by ) | ||||
In either case, the notation indicates construction of the element . (We choose left-associativity for concreteness, although in view of Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmprelem3)(4) below it makes litle difference.) If it should happen that and , say, are judgmentally equal, then we may write
(by ) | ||||
(by ) |
to indicate construction of .
Now, because of proof-relevance, we can’t stop after proving “symmetry” and “transitivity” of equality: we need to know that these operations on equalities are well-behaved. (This issue is invisible in set theory, where symmetry and transitivity are mere properties of equality, rather than structure on paths.) From the homotopy-theoretic point of view, concatenation and inversion are just the “first level” of higher groupoid structure — we also need coherence laws on these operations, and analogous operations at higher dimensions. For instance, we need to know that concatenation is associative, and that inversion provides inverses with respect to concatenation.
Lemma 2.1.4.
Suppose , that and that and and . We have the following:
-
1.
and .
-
2.
and .
-
3.
.
-
4.
.
Note, in particular, that 1–4 are themselves propositional equalities, living in the identity types of identity types, such as for . Topologically, they are paths of paths, i.e. homotopies. It is a familiar fact in topology that when we concatenate a path with the reversed path , we don’t literally obtain a constant path (which corresponds to the equality in type theory) — instead we have a homotopy, or higher path, from to the constant path.
Proof of Lemma 3 (http://planetmath.org/21typesarehighergroupoids#Thmlem3).
All the proofs use the induction principle for equalities.
-
1.
First proof: let be the type family given by
Then is . Since , it follows that . Thus, there is a function
Now the induction principle for identity types gives an element for each . The other equality is proven similarly.
Second proof: by induction on , it suffices to assume that is and that is . But in this case, we have .
-
2.
First proof: let be the type family given by
Then is . Since and , we get that . Hence we find the function
Now path induction gives an element for each in . The other equality is similar.
Second proof By induction, it suffices to assume is . But in this case, we have .
-
3.
First proof: let be the type family given by
Then is the type . But since for each , we have , and thus . Hence we find the function
Now path induction gives an element for each .
Second proof: by induction, it suffices to assume is . But in this case, we have .
-
4.
First proof: let be the type family given by
Then is
To construct an element of this type, let be the type family
Then is
To construct an element of this type, let be the type family
Then is
which is definitionally equal to the type , and is therefore inhabited by . Applying the path induction rule three times, therefore, we obtain an element of the overall desired type.
Second proof: by induction, it suffices to assume , , and are all . But in this case, we have
Thus, we have inhabiting this type. ∎
Remark 2.1.5.
There are other ways to define these higher paths. For instance, in Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmprelem3)(4) we might do induction only over one or two paths rather than all three. Each possibility will produce a definitionally different proof, but they will all be equal to each other. Such an equality between any two particular proofs can, again, be proven by induction, reducing all the paths in question to reflexivities and then observing that both proofs reduce themselves to reflexivities.
In view of Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmprelem3)(4), we will often write for , and similarly for and so on. We choose left-associativity for definiteness, but it makes no real difference. We generally trust the reader to insert instances of Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmprelem3)(4) to reassociate such expressions as necessary.
We are still not really done with the higher groupoid structure: the paths 1–4 must also satisfy their own higher coherence laws, which are themselves higher paths, and so on “all the way up to infinity” (this can be made precise using e.g. the notion of a globular operad). However, for most purposes it is unnecessary to make the whole infinite-dimensional structure explicit. One of the nice things about homotopy type theory is that all of this structure can be proven starting from only the inductive property of identity types, so we can make explicit as much or as little of it as we need.
In particular, in this book we will not need any of the complicated combinatorics involved in making precise notions such as “coherent structure at all higher levels”. In addition to ordinary paths, we will use paths of paths (i.e. elements of a type ), which as remarked previously we call 2-paths or 2-dimensional paths, and perhaps occasionally paths of paths of paths (i.e. elements of a type ), which we call 3-paths or 3-dimensional paths. It is possible to define a general notion of -dimensional path (see http://planetmath.org/node/87635Exercise 2.4), but we will not need it.
We will, however, use one particularly important and simple case of higher paths, which is when the start and end points are the same. In set theory, the proposition is entirely uninteresting, but in homotopy theory, paths from a point to itself are called loops and carry lots of interesting higher structure. Thus, given a type with a point , we define its loop space to be the type . We may sometimes write simply if the point is understood from context.
Since any two elements of are paths with the same start and end points, they can be concatenated; thus we have an operation . More generally, the higher groupoid structure of gives the analogous structure of a “higher group”.
It can also be useful to consider the loop space of the loop space of , which is the space of 2-dimensional loops on the identity loop at . This is written and represented in type theory by the type . While , as a loop space, is again a “higher group”, it now also has some additional structure resulting from the fact that its elements are 2-dimensional loops between 1-dimensional loops.
Theorem 2.1.6 (Eckmann–Hilton).
Proof.
First, observe that the composition of -loops induces an operation
as follows: consider elements and 1- and 2-paths,
as depicted in the following diagram (with paths drawn as arrows).
Composing the upper and lower 1-paths, respectively, we get two paths , and there is then a “horizontal composition”
between them, defined as follows. First, we define by path induction on , so that
where is the right unit law from Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmprelem3)(1). We could similarly define by induction on , or on all paths in sight, resulting in different judgmental equalities, but for present purposes the definition by induction on will make things simpler. Similarly, we define by induction on , so that
where denotes the left unit law. The operations and are called whiskering. Next, since and are composable 2-paths, we can define the horizontal composition by:
Now suppose that , so that all the 1-paths , , , and are elements of , and assume moreover that , so that and are composable in both orders. In that case, we have
(Recall that , by the computation rule for path induction.) On the other hand, we can define another horizontal composition analogously by
and we similarly learn that
But, in general, the two ways of defining horizontal composition agree, , as we can see by induction on and and then on the two remaining 1-paths, to reduce everything to reflexivity. Thus we have
The foregoing fact, which is known as the Eckmann–Hilton argument, comes from classical homotopy theory, and indeed it is used in http://planetmath.org/node/87582Chapter 8 below to show that the higher homotopy groups of a type are always abelian groups. The whiskering and horizontal composition operations defined in the proof are also a general part of the -groupoid structure of types. They satisfy their own laws (up to higher homotopy), such as
and so on. From now on, we trust the reader to apply path induction whenever needed to define further operations of this sort and verify their properties.
As this example suggests, the algebra of higher path types is much more intricate than just the groupoid-like structure at each level; the levels interact to give many further operations and laws, as in the study of iterated loop spaces in homotopy theory. Indeed, as in classical homotopy theory, we can make the following general definitions:
Definition 2.1.7.
Definition 2.1.8.
Given a pointed type , we define the loop space of to be the following pointed type:
An element of it will be called a loop at . For , the -fold iterated loop space of a pointed type is defined recursively by:
An element of it will be called an -loop or an -dimensional loop at .
We will return to iterated loop spaces in http://planetmath.org/node/87580Chapter 7,http://planetmath.org/node/87579Chapter 6,http://planetmath.org/node/87582Chapter 8.
Title | 2.1 Types are higher groupoids |
---|---|
\metatable |