2.1 Types are higher groupoids

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

.

For every type

A

and every

x

,

y

:

A

there is a

function

(

x

=

y

)

→

(

y

=

x

)

denoted

p

↦

p

-

1

, such that

refl

x

-

1

≡

refl

x

for each

x

:

A

.
We call

p

-

1

the

inverse

of

p

.

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

∏

(

A

:

𝒰

)

∏

(

x

,

y

:

A

)

(

x

=

y

)

→

(

y

=

x

)

.

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

f

:

∏

(

A

:

𝒰

)

∏

(

x

,

y

:

A

)

(

x

=

y

)

→

(

y

=

x

)

for some

f

.
We then introduce the notation

(

–

)

-

1

for this

element

f

, in which the

arguments

A

,

x

, and

y

are omitted and inferred from

context

.
(As remarked in §1.1 (

http://planetmath.org/11typetheoryversussettheory

), the secondary statement “

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

for each

x

:

A

” should be regarded as a separate judgment.)

First proof.

Assume given

A

:

𝒰

, and
let

D

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family defined by

D

(

x

,

y

,

p

)

:

≡

(

y

=

x

)

.
In other words,

D

is a function assigning to any

x

,

y

:

A

and

p

:

x

=

y

a type, namely the type

y

=

x

.
Then we have an element

d

:

≡

λ

x

.

𝗋𝖾𝖿𝗅

x

:

∏

x

:

A

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

.

Thus, the induction principle for identity types gives us an element

𝗂𝗇𝖽

=

A

(

D

,

d

,

x

,

y

,

p

)

:

(

y

=

x

)

for each

p

:

(

x

=

y

)

.
We can now define the desired function

(

–

)

-

1

to be

λ

⁢

p

.

𝗂𝗇𝖽

=

A

⁢

(

D

,

d

,

x

,

y

,

p

)

, i.e. we set

p

-

1

:

≡

𝗂𝗇𝖽

=

A

(

D

,

d

,

x

,

y

,

p

)

.
The conversion rule (2.0.1) (

http://planetmath.org/2homotopytypetheory#S0.E1

) gives

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

, 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

λ

A

.

λ

x

.

λ

y

.

λ

p

.

𝗂𝗇𝖽

=

A

(

(

λ

x

.

λ

y

.

λ

p

.

(

y

=

x

)

)

,

(

λ

x

.

𝗋𝖾𝖿𝗅

x

)

,

x

,

y

,

p

)

:

∏

(

A

:

𝒰

)

∏

(

x

,

y

:

A

)

(

x

=

y

)

→

(

y

=

x

)

(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

x

,

y

:

A

and

p

:

x

=

y

, an element

p

-

1

:

y

=

x

.
By induction, it suffices to do this in the case when

y

is

x

and

p

is

𝗋𝖾𝖿𝗅

x

.
But in this case, the type

x

=

y

of

p

and the type

y

=

x

in which we are trying to construct

p

-

1

are both simply

x

=

x

.
Thus, in the “

reflexivity

case”, we can define

𝗋𝖾𝖿𝗅

x

-

1

to be simply

𝗋𝖾𝖿𝗅

x

.
The general case then follows by the induction principle, and the conversion rule

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

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

A

and every

x

,

y

,

z

:

A

there is a function

(

x

=

y

)

→

(

y

=

z

)

→

(

x

=

z

)

written

p

↦

q

↦

p

⁢

\centerdot

⁢

q

, such that

refl

x

⁢

\centerdot

⁢

refl

x

≡

refl

x

for any

x

:

A

.
We call

p

⁢

\centerdot

⁢

q

the

concatenation

or

composite

of

p

and

q

.

First proof.

Let

D

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family

D

(

x

,

y

,

p

)

:

≡

∏

(

z

:

A

)

∏

(

q

:

y

=

z

)

(

x

=

z

)

.

Note that

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

≡

∏

(

z

:

A

)

∏

(

q

:

x

=

z

)

(

x

=

z

)

.
Thus, in order to apply the induction principle for identity types to this

D

, we need a function of type

∏

x

:

A

D

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

(2.1.3)

which is to say, of type

∏

(

x

,

z

:

A

)

∏

(

q

:

x

=

z

)

(

x

=

z

)

.

Now let

E

:

∏

(

x

,

z

:

A

)

∏

(

q

:

x

=

z

)

𝒰

be the type family

E

(

x

,

z

,

q

)

:

≡

(

x

=

z

)

.
Note that

E

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

≡

(

x

=

x

)

.
Thus, we have the function

e

(

x

)

:

≡

𝗋𝖾𝖿𝗅

x

:

E

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

.

By the induction principle for identity types applied to

E

, we obtain a function

d

⁢

(

x

,

z

,

q

)

:

∏

(

x

,

z

:

A

)

∏

(

q

:

x

=

z

)

E

⁢

(

x

,

z

,

q

)

.

But

E

(

x

,

z

,

q

)

≡

(

x

=

z

)

, so this is (

2.1.3

).
Thus, we can use this function

d

and apply the induction principle for identity types to

D

, to obtain our desired function of type

∏

(

x

,

y

,

z

:

A

)

∏

(

q

:

y

=

z

)

∏

(

p

:

x

=

y

)

(

x

=

z

)

.

The conversion rules for the two induction principles give us

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

for any

x

:

A

.
∎

Second proof.

We want to construct, for every

x

,

y

,

z

:

A

and every

p

:

x

=

y

and

q

:

y

=

z

, an element of

x

=

z

.
By induction on

p

, it suffices to assume that

y

is

x

and

p

is

𝗋𝖾𝖿𝗅

x

.
In this case, the type

y

=

z

of

q

is

x

=

z

.
Now by induction on

q

, it suffices to assume also that

z

is

x

and

q

is

𝗋𝖾𝖿𝗅

x

.
But in this case,

x

=

z

is

x

=

x

, and we have

𝗋𝖾𝖿𝗅

x

:

(

x

=

x

)

.
∎

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

p

, since at that point what we want to produce is an equality

x

=

z

, and we already have such an equality, namely

q

.
Why do we go on to do another induction on

q

?

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

p

, induction over

q

, 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/87632

Exercise 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

p

, then we would end up with a computation rule of the form

𝗋𝖾𝖿𝗅

y

⁢

\centerdot

⁢

q

≡

q

.
If we proved it with a single induction over

q

, we would have instead

p

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

p

, while proving it with a double induction (as we did) gives only

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

.

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

a

=

b

=

c

=

d

.
If the intermediate expressions are long, or we want to specify the witness of each equality, we may write

a

=

b

(by

p

)

=

c

(by

q

)

=

d

(by

r

)

.

In either case, the notation indicates construction of the element

(

p

\centerdot

q

)

\centerdot

r

:

(

a

=

d

)

.
(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

b

and

c

, say, are judgmentally equal, then we may write

a

=

b

(by

p

)

≡

c

=

d

(by

r

)

to indicate construction of

p

\centerdot

r

:

(

a

=

d

)

.

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

A

:

U

, that

x

,

y

,

z

,

w

:

A

and that

p

:

x

=

y

and

q

:

y

=

z

and

r

:

z

=

w

.
We have the following:

1.

p

=

p

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

y

and

p

=

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

p

.

2.

p

-

1

⁢

\centerdot

⁢

p

=

𝗋𝖾𝖿𝗅

y

and

p

⁢

\centerdot

⁢

p

-

1

=

𝗋𝖾𝖿𝗅

x

.

3.

(

p

-

1

)

-

1

=

p

.

4.

p

⁢

\centerdot

⁢

(

q

⁢

\centerdot

⁢

r

)

=

(

p

⁢

\centerdot

⁢

q

)

⁢

\centerdot

⁢

r

.

Note, in particular, that

1

–

4

are themselves propositional equalities, living in the identity types

of

identity types, such as

p

=

x

=

y

q

for

p

,

q

:

x

=

y

.
Topologically, they are

paths of paths

, i.e. homotopies.
It is a familiar fact in

topology

that when we concatenate a path

p

with the reversed path

p

-

1

, 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

p

⁢

\centerdot

⁢

p

-

1

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

D

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family given by

D

(

x

,

y

,

p

)

:

≡

(

p

=

p

\centerdot

𝗋𝖾𝖿𝗅

y

)

.

Then

D

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

.
Since

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

, it follows that

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

≡

(

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

)

.
Thus, there is a function

d

:

≡

λ

x

.

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

x

:

∏

x

:

A

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

.

Now the induction principle for identity types gives an element

𝗂𝗇𝖽

=

A

(

D

,

d

,

p

)

:

(

p

=

p

\centerdot

𝗋𝖾𝖿𝗅

y

)

for each

p

:

x

=

y

.
The other equality is proven similarly.

Second proof:

by induction on

p

, it suffices to assume that

y

is

x

and that

p

is

𝗋𝖾𝖿𝗅

x

.
But in this case, we have

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

.

2.

First proof:

let

D

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family given by

D

(

x

,

y

,

p

)

:

≡

(

p

-

1

\centerdot

p

=

𝗋𝖾𝖿𝗅

y

)

.

Then

D

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is

𝗋𝖾𝖿𝗅

x

-

1

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

.
Since

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

and

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

, we get that

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

≡

(

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

)

.
Hence we find the function

d

:

≡

λ

x

.

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

x

:

∏

x

:

A

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

.

Now path induction gives an element

𝗂𝗇𝖽

=

A

⁢

(

D

,

d

,

p

)

:

p

-

1

⁢

\centerdot

⁢

p

=

𝗋𝖾𝖿𝗅

y

for each

p

:

x

=

y

in

A

.
The other equality is similar.

Second proof

By induction, it suffices to assume

p

is

𝗋𝖾𝖿𝗅

x

.
But in this case, we have

p

-

1

⁢

\centerdot

⁢

p

≡

𝗋𝖾𝖿𝗅

x

-

1

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

𝗋𝖾𝖿𝗅

x

.

3.

First proof:

let

D

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family given by

D

(

x

,

y

,

p

)

:

≡

(

p

-

1

-

1

=

p

)

.

Then

D

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is the type

(

𝗋𝖾𝖿𝗅

x

-

1

-

1

=

𝗋𝖾𝖿𝗅

x

)

.
But since

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

for each

x

:

A

, we have

𝗋𝖾𝖿𝗅

x

-

1

-

1

≡

𝗋𝖾𝖿𝗅

x

-

1

≡

𝗋𝖾𝖿𝗅

x

, and thus

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

≡

(

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

)

.
Hence we find the function

d

:

≡

λ

x

.

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

x

:

∏

x

:

A

D

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

.

Now path induction gives an element

𝗂𝗇𝖽

=

A

⁢

(

D

,

d

,

p

)

:

p

-

1

-

1

=

p

for each

p

:

x

=

y

.

Second proof:

by induction, it suffices to assume

p

is

𝗋𝖾𝖿𝗅

x

.
But in this case, we have

p

-

1

-

1

≡

𝗋𝖾𝖿𝗅

x

-

1

-

1

≡

𝗋𝖾𝖿𝗅

x

.

4.

First proof:

let

D

1

:

∏

(

x

,

y

:

A

)

∏

(

p

:

x

=

y

)

𝒰

be the type family given by

D

1

(

x

,

y

,

p

)

:

≡

∏

(

z

,

w

:

A

)

∏

(

q

:

y

=

z

)

∏

(

r

:

z

=

w

)

(

p

\centerdot

(

q

\centerdot

r

)

=

(

p

\centerdot

q

)

\centerdot

r

)

.

Then

D

1

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is

∏

(

z

,

w

:

A

)

∏

(

q

:

x

=

z

)

∏

(

r

:

z

=

w

)

(

𝗋𝖾𝖿𝗅

x

\centerdot

(

q

\centerdot

r

)

=

(

𝗋𝖾𝖿𝗅

x

\centerdot

q

)

\centerdot

r

)

.

To construct an element of this type, let

D

2

:

∏

(

x

,

z

:

A

)

∏

(

q

:

x

=

z

)

𝒰

be the type family

D

2

(

x

,

z

,

q

)

:

≡

∏

(

w

:

A

)

∏

(

r

:

z

=

w

)

(

𝗋𝖾𝖿𝗅

x

\centerdot

(

q

\centerdot

r

)

=

(

𝗋𝖾𝖿𝗅

x

\centerdot

q

)

\centerdot

r

)

.

Then

D

2

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is

∏

(

w

:

A

)

∏

(

r

:

x

=

w

)

(

𝗋𝖾𝖿𝗅

x

\centerdot

(

𝗋𝖾𝖿𝗅

x

\centerdot

r

)

=

(

𝗋𝖾𝖿𝗅

x

\centerdot

𝗋𝖾𝖿𝗅

x

)

\centerdot

r

)

.

To construct an element of

this

type, let

D

3

:

∏

(

x

,

w

:

A

)

∏

(

r

:

x

=

w

)

𝒰

be the type family

D

3

(

x

,

w

,

r

)

:

≡

(

𝗋𝖾𝖿𝗅

x

\centerdot

(

𝗋𝖾𝖿𝗅

x

\centerdot

r

)

=

(

𝗋𝖾𝖿𝗅

x

\centerdot

𝗋𝖾𝖿𝗅

x

)

\centerdot

r

)

.

Then

D

3

⁢

(

x

,

x

,

𝗋𝖾𝖿𝗅

x

)

is

(

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

(

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

)

=

(

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

)

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

)

which is definitionally equal to the type

(

𝗋𝖾𝖿𝗅

x

=

𝗋𝖾𝖿𝗅

x

)

, and is therefore inhabited by

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

x

.
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

p

,

q

, and

r

are all

𝗋𝖾𝖿𝗅

x

.
But in this case, we have

p

⁢

\centerdot

⁢

(

q

⁢

\centerdot

⁢

r

)

≡

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

(

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

)

≡

𝗋𝖾𝖿𝗅

x

≡

(

𝗋𝖾𝖿𝗅

x

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

)

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

x

≡

(

p

⁢

\centerdot

⁢

q

)

⁢

\centerdot

⁢

r

.

Thus, we have

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

x

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

p

⁢

\centerdot

⁢

q

⁢

\centerdot

⁢

r

for

(

p

⁢

\centerdot

⁢

q

)

⁢

\centerdot

⁢

r

, and similarly

p

⁢

\centerdot

⁢

q

⁢

\centerdot

⁢

r

⁢

\centerdot

⁢

s

for

(

(

p

⁢

\centerdot

⁢

q

)

⁢

\centerdot

⁢

r

)

⁢

\centerdot

⁢

s

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

p

=

x

=

A

y

q

), 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

r

=

p

=

x

=

A

y

q

s

), which we call

3-paths

or

3-dimensional paths

.
It is possible to define a general notion of

n

-dimensional path

(see

http://planetmath.org/node/87635

Exercise 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

a

=

a

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

A

with a point

a

:

A

, we define its

loop space

Ω

⁢

(

A

,

a

)

to be the type

a

=

A

a

.
We may sometimes write simply

Ω

⁢

A

if the point

a

is understood from context.

Since any two elements of

Ω

⁢

A

are paths with the same start and end points, they can be concatenated;
thus we have an operation

Ω

⁢

A

×

Ω

⁢

A

→

Ω

⁢

A

.
More generally, the higher groupoid structure of

A

gives

Ω

⁢

A

the analogous structure of a “higher group”.

It can also be useful to consider the loop space

of

the loop space of

A

, which is the space of 2-dimensional loops on the identity loop at

a

.
This is written

Ω

2

⁢

(

A

,

a

)

and represented in type theory by the type

𝗋𝖾𝖿𝗅

a

=

(

a

=

A

a

)

𝗋𝖾𝖿𝗅

a

.
While

Ω

2

⁢

(

A

,

a

)

, 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).

The composition operation on the second loop space

Ω

2

⁢

(

A

)

×

Ω

2

⁢

(

A

)

→

Ω

2

⁢

(

A

)

is

commutative

:

α

⁢

\centerdot

⁢

β

=

β

⁢

\centerdot

⁢

α

, for any

α

,

β

:

Ω

2

⁢

(

A

)

.

Proof.

First, observe that the composition of

1

-loops

Ω

⁢

A

×

Ω

⁢

A

→

Ω

⁢

A

induces an operation

⋆

:

Ω

2

(

A

)

×

Ω

2

(

A

)

→

Ω

2

(

A

)

as follows: consider elements

a

,

b

,

c

:

A

and 1- and 2-paths,

p

:

a

=

b

,

r

:

b

=

c

q

:

a

=

b

,

s

:

b

=

c

α

:

p

=

q

,

β

:

r

=

s

as depicted in the following

diagram

(with paths drawn as arrows).

\includegraphics

HoTT_fig_2.1.1.png

Composing the upper and lower 1-paths, respectively, we get two paths

p

⁢

\centerdot

⁢

r

,

q

⁢

\centerdot

⁢

s

:

a

=

c

, and there is then a “

horizontal composition

”

α

⋆

β

:

p

⁢

\centerdot

⁢

r

=

q

⁢

\centerdot

⁢

s

between them, defined as follows.
First, we define

\centerdot

r

⁡

α

r

:

p

⁢

\centerdot

⁢

r

=

q

⁢

\centerdot

⁢

r

by path induction on

r

, so that

\centerdot

r

⁡

α

𝗋𝖾𝖿𝗅

b

≡

𝗋𝗎

p

-

1

⁢

\centerdot

⁢

α

⁢

\centerdot

⁢

𝗋𝗎

q

where

𝗋𝗎

p

:

p

=

p

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

b

is the right unit law from Lemma 2.1.4 (

http://planetmath.org/21typesarehighergroupoids#Thmprelem3

)(

1

).
We could similarly define

\centerdot

r

by induction on

α

, or on all paths in sight, resulting in different judgmental equalities, but for present purposes the definition by induction on

r

will make things simpler.
Similarly, we define

\centerdot

ℓ

⁡

q

β

:

q

⁢

\centerdot

⁢

r

=

q

⁢

\centerdot

⁢

s

by induction on

q

, so that

\centerdot

ℓ

⁡

𝗋𝖾𝖿𝗅

b

β

≡

𝗅𝗎

r

-

1

⁢

\centerdot

⁢

β

⁢

\centerdot

⁢

𝗅𝗎

s

where

𝗅𝗎

r

denotes the left unit law.
The operations

\centerdot

ℓ

and

\centerdot

r

are called

whiskering

.
Next, since

\centerdot

r

⁡

α

r

and

\centerdot

ℓ

⁡

q

β

are composable 2-paths, we can define the

horizontal composition

by:

α

⋆

β

:

≡

(

α

\centerdot

r

r

)

\centerdot

(

q

\centerdot

ℓ

β

)

.

Now suppose that

a

≡

b

≡

c

, so that all the 1-paths

p

,

q

,

r

, and

s

are elements of

Ω

⁢

(

A

,

a

)

, and assume moreover that

p

≡

q

≡

r

≡

s

≡

𝗋𝖾𝖿𝗅

a

, so that

α

:

𝗋𝖾𝖿𝗅

a

=

𝗋𝖾𝖿𝗅

a

and

β

:

𝗋𝖾𝖿𝗅

a

=

𝗋𝖾𝖿𝗅

a

are composable in both orders.
In that case, we have

α

⋆

β

≡

(

\centerdot

r

⁡

α

𝗋𝖾𝖿𝗅

a

)

⁢

\centerdot

⁢

(

\centerdot

ℓ

⁡

𝗋𝖾𝖿𝗅

a

β

)

=

𝗋𝗎

𝗋𝖾𝖿𝗅

a

-

1

⁢

\centerdot

⁢

α

⁢

\centerdot

⁢

𝗋𝗎

𝗋𝖾𝖿𝗅

a

⁢

\centerdot

⁢

𝗅𝗎

𝗋𝖾𝖿𝗅

a

-

1

⁢

\centerdot

⁢

β

⁢

\centerdot

⁢

𝗅𝗎

𝗋𝖾𝖿𝗅

a

≡

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

a

-

1

⁢

\centerdot

⁢

α

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

a

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

a

-

1

⁢

\centerdot

⁢

β

⁢

\centerdot

⁢

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

a

=

α

⁢

\centerdot

⁢

β

.

(Recall that

𝗋𝗎

𝗋𝖾𝖿𝗅

a

≡

𝗅𝗎

𝗋𝖾𝖿𝗅

a

≡

𝗋𝖾𝖿𝗅

𝗋𝖾𝖿𝗅

a

, by the computation rule for path induction.)
On the other hand, we can define another horizontal composition analogously by

α

⋆

′

β

:

≡

(

p

\centerdot

ℓ

β

)

\centerdot

(

α

\centerdot

r

s

)

.

and we similarly learn that

α

⋆

′

β

=

(

\centerdot

ℓ

⁡

𝗋𝖾𝖿𝗅

a

β

)

⁢

\centerdot

⁢

(

\centerdot

r

⁡

α

𝗋𝖾𝖿𝗅

a

)

=

β

⁢

\centerdot

⁢

α

.

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

α

⁢

\centerdot

⁢

β

=

α

⋆

β

=

α

⋆

′

β

=

β

⁢

\centerdot

⁢

α

.

∎

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/87582

Chapter 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

\centerdot

r

⁡

α

(

p

⁢

\centerdot

⁢

q

)

=

\centerdot

r

⁡

(

\centerdot

r

⁡

α

p

)

q

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

.

A

pointed type

(

A

,

a

)

is a type

A

:

U

together with a point

a

:

A

, called its

basepoint

.
We write

U

∙

:

≡

∑

(

A

:

U

)

A

for the type of pointed types in the

universe

U

.

Definition 2.1.8

.

Given a pointed type

(

A

,

a

)

, we define the

loop space

of

(

A

,

a

)

to be the following pointed type:

Ω

(

A

,

a

)

:

≡

(

(

a

=

A

a

)

,

𝗋𝖾𝖿𝗅

a

)

.

An element of it will be called a

loop

at

a

.
For

n

:

N

, the

n

-fold iterated loop space

Ω

n

⁢

(

A

,

a

)

of a pointed type

(

A

,

a

)

is defined recursively by:

Ω

0

⁢

(

A

,

a

)

:

≡

(

A

,

a

)

Ω

n

+

1

⁢

(

A

,

a

)

:

≡

Ω

n

(

Ω

(

A

,

a

)

)

.

An element of it will be called an

n

-loop

or an

n

-dimensional loop

at

a

.

We will return to iterated loop spaces in

http://planetmath.org/node/87580

Chapter 7,

http://planetmath.org/node/87579

Chapter 6,

http://planetmath.org/node/87582

Chapter 8.

Title

2.1 Types are higher groupoids

\metatable

Generated on Thu Feb 8 19:33:44 2018 by

LaTeXML