THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE...

113
THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH ANDREAS FRANZ THESIS SUPERVISOR: DR. IOSIF PETRAKIS Abstract. Martin-Löf’s intensional type theory (ITT) can be extended with higher inductive types (HITs), which generalize inductive types, since, in addition to point constructors, constructors that output (higher) paths are allowed. We focus on a specific class of HITs, the so-called pushout types, which define important types from the geometric point of view. In order to show that pushouts are invariant under homotopy, and thus feasible in the framework of homotopy type theory, we develop a tool-set to induce the right morphisms between them. We elaborate two fundamental examples of pushout types, the wedge sum and the smash product of pointed types. Using our tool-set we show that these two pushouts correspond to the coproduct and tensor product, respectively, in the subcategory of pointed types and base-point preserving functions. Contents 1. Introduction 2 2. Intensional type theory 4 2.1. Function types 6 2.2. Dependent function types 7 2.3. Inductive types 8 2.3.1. Identity types 9 2.3.2. Empty type 15 2.3.3. Unit type 15 Date : August 25, 2017. 1

Transcript of THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE...

Page 1: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

THE WEDGE SUM AND THE SMASH PRODUCT INHOMOTOPY TYPE THEORY

MASTER THESISMATHEMATICAL INSTITUTE

LMU MUNICH

ANDREAS FRANZTHESIS SUPERVISOR: DR. IOSIF PETRAKIS

Abstract. Martin-Löf’s intensional type theory (ITT) can be extendedwith higher inductive types (HITs), which generalize inductive types,since, in addition to point constructors, constructors that output (higher)paths are allowed. We focus on a specific class of HITs, the so-calledpushout types, which define important types from the geometric point ofview. In order to show that pushouts are invariant under homotopy, andthus feasible in the framework of homotopy type theory, we develop atool-set to induce the right morphisms between them. We elaborate twofundamental examples of pushout types, the wedge sum and the smashproduct of pointed types. Using our tool-set we show that these twopushouts correspond to the coproduct and tensor product, respectively,in the subcategory of pointed types and base-point preserving functions.

Contents

1. Introduction 22. Intensional type theory 42.1. Function types 62.2. Dependent function types 72.3. Inductive types 82.3.1. Identity types 92.3.2. Empty type 152.3.3. Unit type 15

Date: August 25, 2017.1

Page 2: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

2 ANDREAS FRANZ

2.3.4. Pair types 162.3.5. Dependent pair types 182.3.6. Coproduct types 222.4. Propositions as types 233. The homotopy interpretation 233.1. Basic behavior of functions and identifications 233.2. Homotopies and equivalences 304. Pushouts 444.1. Basics 444.2. Pushout functions 604.3. Homotopy invariance of pushout types 725. The wedge sum 766. The smash product 867. Conclusion 111References 112

1. Introduction

In this thesis we study an extension of intensional type theory (ITT) byhigher inductive types (HITs). ITT was originally proposed by Per Martin Löfin the 1970s [9] as a formal system for doing constructive mathematics, e.g. inthe sense of Bishop [2]. In section 2 we give an elementary introduction to thistheory. In particular, we include several standard examples of inductive types.Roughly speaking, an inductive type is defined by giving its constructors(constructors can be seen as functions that generate terms of the type beingdefined) and specifying an induction principle, which expresses that theinductive type is “freely generated” by this constructors. The identity typeof two terms x, y of type A, written x =A y, is an example of an inductivetype that will be of particular interest to us. It has just one constructorrefla : a =A a expressing that every term is equal to itself. Similar to sets,types can have inhabitants and one might think of identity types x =A y assets with at most one element, depending on weather x equals y or not. Thisidea that any two inhabitants of some identity type are equal is also called theprinciple of uniqueness of identity proofs (UIP) and ITT becomes extensional,

Page 3: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

3

when we add such a principle. This approach has some disadvantages, inparticular type checking is not algorithmically decidable, whereas in ITT it is.The first hint that it is reasonable to refute UIP was provided by Hofmannand Streicher [7], who gave a model of ITT in which the interpretation ofidentity types has indeed multiple elements. The novel point of view taken inhomotopy type theory is to think of types A not as sets, but as spaces andin section 3 we present basic results that support this nomenclature. Underthe types as spaces interpretation the terms a : A become points and theinhabitants of the identity types x =A y become paths between x and y in thespace A. What is more, this interpretation can be extended in a natural waywhen forming identity types recursively, i.e. from x, y : A we can form thetype x =A y of identifications or paths between x and y, from p, q : x =A y wecan form the type p =x=Ay q of identifications between those identificationsor homotopies and so on. Under the types as spaces interpretation it is notdesirable anymore to assume that identity types are inhabited by a single term,since there may be several paths between two points that are not homotopicto each other. In section 4 we present pushout-types, a specific class of higherinductive types (HITs) that generalize inductive types, since constructorsthat generate identifications (that may now be unequal to reflexivity) areallowed. Pushout is a type former, where from three types A,B and C

together with two functions f : C → A and g : C → B we may form thepushout-type A tC B. The reason we restrict ourselves to pushout-types isthat, at the present moment, a general theory of higher inductive types is stillmissing. Still, pushout-types provide a general enough framework to formallyrepresent and thus reason about a large class of spaces in type theory thathave non trivial homotopy, such as the circle or the interval, without havingto consider point set topology first. Additionally they are interesting alsofrom a purely type theoretic point of view. As an example we include theproof of function extensionality (see lemma 4.6). In section 4.3 we show, thatthe pushout of types is invariant under homotopy in the sense that if wehave equivalences α : A→ A′, β : B → B′ and γ−1 : C ′ → C, the pushoutsAtCB of (A,B,C, f, g) and A′tC′B′ of (A′, B′, C ′, α◦f ◦γ−1, β◦g◦γ−1) areequivalent. To this end we develop a tool-set to induce the right morphismsbetween pushout types. In the last two sections of this work we restrict our

Page 4: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

4 ANDREAS FRANZ

attention to pointed types and base-point preserving maps, i.e. every type Acomes together with a specified base-point ∗A : A and every map f : A→ B

comes together with a proof pf : ∗B =B f(∗A). We present several examplesof important pushouts in this setting, in particular the appropriate notionsfor a (binary) coproduct called “wedge sum” and a tensor product, calledthe “smash product” of pointed types. We note that related work has beendone by Guillaume Brunerie [3], Evan Cavallo [5] and Robert Graham [6]and parts of their work have been formalized in Agda (see [4]).

Acknowledgements. I want to thank my thesis supervisor Dr. Iosif Pe-trakis, as well as Dr. Chuangjie Xu, for their guidance and support throughoutthis project. They suggested countless improvements to this work and greatlyhelped me to develop my understanding of homotopy type theory. Withoutthe many hours they took to read and discuss my ideas, I would not havecome as far. I also want to express my appreciation to Prof. Schuster, whogave me the possibility to work on homotopy type theory during a researchinternship at the university of Verona and invited me to a conference, where Ipresented some of my results. None of this would have been possible withoutmy supervisor Dr. Petrakis, who introduced us and could not have been moreencouraging to me.

2. Intensional type theory

Before we present the basic types of ITT, we briefly discuss some of theunderlying ideas of the theory. We refer to chapter one of the HoTT book [10]for a more detailed description. In ITT there is a primitive notion forcollection, called a type and we call the elements of types terms, inhabitantsor points. Membership of a term a to a type A, written a : A, and judgmentalequality between two terms a : A and a′ : A, written a ≡ a′, are the two basicjudgments of type theory. We note that judgments bind more loosely thananything else. The basic rules of ITT stipulate certain constructions on typesand terms that we are allowed to perform. We will make use of a universe type,denoted by U , whose inhabitants are itself types. For consistency reasonsU can not inhabit itself, thus formally we have to work inside an infinitehierarchy of universes U0 : U1 : U2 : ..., but since we will never leave the scopeof a particular universe, we will just omit the subscript. It is important to

Page 5: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

5

understand that the rules of a specific type theory are not formulated insidesome meta-theory, but instead have to be specified separately, whenever weintroduce a new type, thus ITT is really a collection of concrete types, eachcoming with its own set of rules. The general pattern to define a new type isas follows. We need to give:

(i) A formation rule, explaining how to form new types, that is, howto infer judgments of the form A : U that A is a type. We can forexample introduce the type of functions A→ B : U if we are giventwo types A : U and B : U .

(ii) Introduction rules, explaining how to introduce new terms of a type.The introduction rules for the type of natural numbers N say that0 : N , i.e. zero is a natural number and, given some number n : N,also its successor is a natural number, that is, succ(n) : N.

(iii) Elimination rules, also called induction principles, explaining howto use inhabitants of a type. For example, the elimination rule forfunction types expresses that we can apply a function f : A→ B toan inhabitant a of A in the domain of the function and this yields aninhabitant f(a) of B in the codomain.

(iv) Computation rules, explaining the procedural behavior of eliminatorsacting on points. For instance, if we are given some b : B, wecan introduce the constant function bA : A → B with the obviouscomputation rule bA(a) ≡ b.

(v) Optionally a uniqueness principle for maps into or out of the type.

We can interpret first order logic directly in ITT by assigning the quantifiersand logical connectives appropriate formation rules in such a way that theintroduction and elimination rules correspond precisely to the rules of logicalinference. In other words, propositions are special types and proving a propo-sition means to construct an inhabitant of the corresponding type (we mayeven speak of a proof-term in this situation). For instance, logical implicationis naturally interpreted in function types and proving an implication is iden-tified with the act of constructing a function of appropriate type. This is alsocalled the propositions as types interpretation or Curry-Howard isomorphism(see [8] for Howard’s original paper). To give a complete presentation of this

Page 6: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

6 ANDREAS FRANZ

interpretation, but also for convenience reasons, we introduce types for eachof the logical connectives, even though some could be introduced as specialcases of others.

Lastly we note that in the setting of type theory, terms can not be in-troduced in isolation of their type, but the type of a term is a part of itsintrinsic nature. Consequently it does not make sense to ask if a term a hastype A. This sort of question would be sensible in the setting of set theory,where a ∈ A is a proposition which has to be proven inside the superstructureof first order logic. Under the propositions as types interpretation a : A isnot a proposition but is expressing the judgment that a is a proof of theproposition A.

2.1. Function types. Given two types A and B, we may form the type offunctions A→ B. When forming function types, we associate to the right,i.e. A → B → C is to be read as A → (B → C). The most basic way toconstruct elements of a function type is by λ-abstraction. Given some termΦ : B, possibly involving a free occurrence of the variable x : A, we can set:

λx.Φ : A→ B

The computation rule, also called β-reduction, for this function says that inorder to evaluate it at some given point a : A, we need to substitute a for xin the expression Φ. We write this as:

(λx.Φ)(a) :≡ Φ[x/a]

If not specified otherwise by using brackets, the scope of a λ-abstractionis the entire expression after “λx.”. Alternatively, we can name a functionby giving a defining equation. For instance, in the above context, we canintroduce a function f : A→ B by

f(x) :≡ Φ,

which evaluates for a given a : A as:

f(a) :≡ Φ[x/a]

Page 7: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

7

Of course it should not matter, if we define a function by λ−abstraction orby giving it a name and therefore we add a rule:

f ≡ λx.f(x)

This rule is also called η−conversion and it expresses that functions aredetermined by their values, i.e. it is a uniqueness principle for functions.Under the propositions as types interpretation functions correspond to proofsof implications. We note that indeed we can read the introduction andelimination rules as “given that B is true, then A→ B is true” and “if A→ B

is true and A is true, then B is true”.

Remark 2.1. Sometimes we will also use the notation x 7→ Φ instead of λx.Φ,to denote a function of type A→ B, where x : A and the expression Φ : B

possibly involves a free occurrence of the variable x.

2.2. Dependent function types. Dependent functions are a generalizationof ordinary functions for which the type of the codomain may vary dependingon points in the domain. We model this by using type families P over A,which are inhabitants of the type A→ U , that is, P represents a function thatgives a type P (a) : U for every given a : A. Given a type A : U and a typefamily P : A→ U we can form the type of dependent functions

∏(x:A) P (x).

If not specified otherwise by using brackets, the scope of such an expression iseverything after “

∏(x:A)”. Assume we are given some term Φ : P (x), possibly

involving a free occurrence of the variable x. As in the non-dependent case,to introduce a dependent function, we can use λ-abstraction

λx.Φ :∏x:A

P (x)

or specify a name F by giving a defining equation

F(x) :≡ Φ.

As above we formulate a uniqueness principle

F ≡ λx.F(x)

and an obvious computation rule

F(a) :≡ Φ[x/a].

Page 8: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

8 ANDREAS FRANZ

Under the proposition as types interpretation dependent functions correspondto universal quantification and applying a dependent function to an inhabitanta of A gives a proof F(a) : P (a) that a has property P . We note that the typeof functions A→ B is just a special case, when the type family P is constantB. An important class of dependent functions are polymorphic functions,which take as one of their inputs a type. This can be seen as a generic way todefine functions. A basic example is given by the class of identity functions

id :∏A:U

A→ A,

which is defined byλA.λx.x.

We write idA : A→ A for id(A), the identity function on A. Another exampleare constant functions, where we assume we are given types A,B : U andsome fixed b : B. We can then define:

λA.λB.λx.b :∏A,B:U

A→ B

We also write bA for the function (λA.λB.λx.b)(A)(B).

2.3. Inductive types. The idea of inductive types is to specify a set ofconstructors, that is, functions whose codomain is allowed to be the typeunder definition, together with an induction principle stating that in orderto show a property for all elements of the inductive type, it suffices toestablish the property for all those elements that can be reached by applyingthe constructors repeatedly. We say that the type is freely generated byits constructors. Recall that in ITT, predicates on inhabitants x of A aremodeled by type families P : A→ U and to proof that P holds for all x : A

means to construct an inhabitant of∏

(x:A) P (x). We mentioned that if thetype family is constant, i.e. P (x) ≡ B for some type B, the type

∏(x:A) P (x)

is the type A → B of ordinary functions and then we speak of recursioninstead of induction.

Example 2.2. A standard example of an inductive type is the type N ofnatural numbers. It is generated by two constructors

0 : N

Page 9: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

9

andsucc : N.

In order to establish some property P : N→ U for all n : N, we need to givea proof

p0 : P (0)

that 0 has property P and additionally provide an inhabitant

ps :∏n:N

P (n)→ P(succ(n)

)and then, from a proof

q : P (n)

that n has property P , we get a proof

ps(n)(q) : P(succ(n)

)that succ(n) has property P .

2.3.1. Identity types. One example of an inductive type that is particularlyimportant to us is the type of identifications.

Definition 2.3 (Identity types). For every type A : U and every two termsx, y : A we can form the type of identifications x =A y. For every x : A wehave a canonical proof

reflx : x =A x

that x is equal to itself. The induction principle says that if we are given atype family

C :∏x,y:A

(x =A y)→ U

and a functionc :∏x:A

C(x, x, reflx),

then there is a dependent function

F :∏x,y:A

∏p:x=Ay

C(x, y, p),

such thatF(x, x, reflx) :≡ c(x)

Page 10: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

10 ANDREAS FRANZ

for every x : A.

Remark 2.4. Often the type A : U in x =A y will be clear from the contextand in this case we may also write x = y for the type of identificationsbetween x and y.

Let us take a closer look at the induction principle. Put in simpler termsit says that, in order to establish some property C(x, y, p) for x, y : A andp : x =A y, it suffices to consider the case where x ≡ y and p ≡ reflx.Therefore, in order to establish a property C for all triplets (x, y, p), itsuffices to show it on the triplets of the form (x, x, reflx). Using the inductionprinciple, we now present several properties of identity types. We will do theproofs in this section in more detail and later on switch to terminology asnoted above.

Lemma 2.5. Identity is a symmetric relation, i.e. for every type A andevery x, y : A there is a function

(x =A y)→ (y =A x)

denoted by λp.p−1, such that for every x : A

reflx−1 ≡ reflx.

We call p−1 the inverse of p.

Proof. We consider the type family

C :∏x,y:A

(x =A y)→ U ,

defined by the equation

C(x, y, p) :≡ (y =A x).

Then, for every x : A, we have that

C(x, x, reflx) ≡ (x =A x)

and thereforereflx : C(x, x, reflx).

Page 11: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

11

We conclude thatλx.reflx :

∏x:A

C(x, x, reflx).

By the induction principle for identity types, there is a dependent function

λx.λy.λp.p−1 :∏x,y:A

∏p:x=Ay

C(x, y, p),

such thatreflx

−1 ≡ reflx.

Lemma 2.6. Identity is a transitive relation, i.e. for every type A and everyx, y, z : A there is a function

(x =A y)→ (y =A z)→ (x =A z)

denoted by λp.λq.p � q, such that, for every x : A

reflx � reflx ≡ reflx.

We call p � q the concatenation of p and q.

Proof. We consider the type family

C :∏x,y:A

(x =A y)→ U ,

defined by the equation

C(x, y, p) :≡∏z:A

(y =A z)→ (x =A z).

We aim to inhabit the type

(1)∏x:A

C(x, x, reflx).

Since for every x : A, we have that

C(x, x, reflx) ≡∏z:a

(x =A z)→ (x =A z),

this means to inhabit ∏x,z:A

(x =A z)→ (x =A z).

Page 12: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

12 ANDREAS FRANZ

Again, we can use the induction principle for identity types, where we considerthe type family

D :∏x,z:A

(x =A z)→ U ,

defined by the equation

D(x, z, q) :≡ (x =A z).

Then, for every x : A, we have that

D(x, x, reflx) ≡ (x =A x)

and thereforeλx.reflx :

∏x:A

D(x, x, reflx).

By the induction principle for identity types, there is a dependent function

F :∏x,z:A

∏q:x=Az

D(x, z, q),

such thatF(x, x, reflx) ≡ reflx.

As noted above, we have∏x:A

C(x, x, reflx) ≡∏x:A

∏z:A

(x =A z)→ (x =A z) ≡

≡∏x,z:A

∏q:x=Az

D(x, z, q),

therefore F inhabits (1). By the induction principle for identity types, thereis a function

G :∏x,y:A

∏p:x=Ay

C(x, y, p),

such thatG(x, x, reflx) ≡ F(x).

Lastly, we note that

H :≡ λx.λy.λz.λp.λq.G(x, y, p)(z, q)

Page 13: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

13

has type ∏x,y,z:A

∏p:x=Ay

∏q:y=Az

x =A z

and therefore, given x, y, z : A, p : x =A y and q : y =A z, we suppress x, yand z and define

(p � q) :≡ H(x, y, z, p, q)

and then

(reflx � reflx) ≡ H(x, x, x, reflx, reflx) ≡

≡ G(x, x, reflx)(x, reflx) ≡ F(x, x, reflx) ≡ reflx.

Lastly we prove that equal terms can be substituted for one another: ifx = y, then any property P : A→ U that we can establish for x must holdalso for y.

Lemma 2.7 (Indiscernability of identicals). Assume we are given a typefamily P : A→ U , two terms x, y : A and a path p : x =A y. Then there is afunction

transportP (p) : P (x)→ P (y),

such that for every x : A we have

transportP (reflx) ≡ idP (x).

Proof. We consider the type family

C :∏x,y:A

(x =A y)→ U ,

defined by the equation

C(x, y, p) :≡ P (x)→ P (y).

Then we have thatC(x, x, reflx) ≡ P (x)→ P (x)

and we can inhabit this type by idP (x). But then

λx.idP (x) :∏x:A

C(x, x, reflx)

Page 14: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

14 ANDREAS FRANZ

and by the induction principle for identity types, there is a dependent function

F :∏x,y:A

∏p:x=Ay

C(x, y, p),

such thatF(x, x, reflx) ≡ idP (x).

Therefore, for any given x, y : A and p : x =A y, we suppress x and y anddefine

transportP (p) :≡ F(x, y, p).

Then it holds that

transportP (reflx) ≡ F(x, x, reflx) ≡ idP (x).

The following lemma covers the case where the type family P in lemma2.7 is constant.

Lemma 2.8. If P : A → U is a constant type family, i.e. P (x) :≡ B forsome fixed B : U , then for every x, y : A, p : x = y and fixed b : B there is apath

transportconstBp (b) : transportP (p, b) = b

such thattransportconstBreflx(b) ≡ reflb.

Proof. We consider the type family

C :∏x,y

(x =A y)→ U ,

defined by the equation

C(x, y, p) :≡ transportP (p, b) = b.

Since by lemma 2.7

transportP (reflx) ≡ idP (x) ≡ idB,

we have for every x : A that

C(x, x, reflx) ≡ b =B b

Page 15: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

15

and thereforereflb : C(x, x, reflx).

We conclude thatλx.reflb :

∏x:A

C(x, x, reflx).

By the induction principle for identity types, there is a dependent function

F :∏x,y:A

∏p:x=Ay

C(x, y, p),

such thatF(x, x, reflx) ≡ reflb.

For any given x, y : A and p : x =A y, we suppress x and y and define

transportconstBp (b) :≡ F(x, y, p)

and thentransportconstBreflx(b) ≡ F(x, x, reflx) ≡ reflb.

2.3.2. Empty type. The type 0 with no inhabitants is defined by no construc-tors. Assume we are given a type family P : 0→ U , then there is a dependentfunction

F :∏x:0

P (x),

with no computation rules. Under the proposition as types interpretation theempty type corresponds to falsity.

2.3.3. Unit type. The unit type 1 is the inductive type freely generated byjust one point constructor:

? : 1

Assume we are given a type family P : 1→ U together with a term t : P (?),then there is a dependent function

F :∏x:1

P (x),

such thatF(?) ≡ t.

Page 16: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

16 ANDREAS FRANZ

The elimination rule for identity types allows us to formulate a propositionaluniqueness principle for the unit type.

Lemma 2.9. The unit type has only one inhabitant, that is:∏x:1

x =1 ?

Proof. We consider the type family

P : 1→ U ,

defined by the equationP (x) :≡ x =1 ?

and aim to inhabit the type ∏x:1

P (x).

By the induction principle of the unit type, it suffices to give a proof for

P (?) ≡ ? = ?

and in this case we can use refl?. �

2.3.4. Pair types. We note that the following results will be generalized in thenext section, where we will introduce dependent pairs. We primarily presentthe simpler versions here for the reader not yet familiar with the subject. So,assume we are given two types A,B : U , then we can form the type of pairsor product type A×B, which can be interpreted as logical conjunction. Thepair type is freely generated by one constructor:

(_,_) : A→ B → A×B

This means that for every inhabitant x : A and every inhabitant y : B, wecan introduce an inhabitant

(x, y) : A×B.

If we are given a type family P : A × B → U together with a dependentfunction

G :∏x:A

∏y:B

P((x, y)

),

Page 17: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

17

we can introduce a dependent function

F :∏

z:A×BP (z),

with the obvious computation rule:

F((x, y)

):≡ G(x)(y)

The induction principle for pair types gives the projection functions, sincewe can define

λx.λy.x : A→ B → A,

which, by the induction principle of pair types, gives a function

π1 : A×B → A,

such that for every x : and y : B

π1

((x, y)

)≡ x

andλx.λy.y : A→ B → B,

which gives a functionπ2 : A×B → B

such that for every x : A and y : B

π2

((x, y)

)≡ y.

Using the projection functions we can express a propositional uniquenessprinciple, as we did for the unit type.

Lemma 2.10. Assume we are given two types A,B : U . The inhabitants ofthe pair type A×B are the pairs of terms in A and B, that is:∏

z:A×Bz =

(π1(z), π2(z)

)Proof. We consider the type family

P : A×B → U ,

defined by the equation

P (z) :≡ z =(π1(z), π2(z)

)

Page 18: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

18 ANDREAS FRANZ

and we aim to inhabit the type ∏z:A×B

P (z).

Since by the computation rules of the projection functions we have for everyx : A and y : B that

π1

((x, y)

)≡ x

andπ2

((x, y)

)≡ y,

we get thatP((x, y)

)≡((x, y) = (x, y)

).

Therefore we can define a dependent function

G :∏x:A

∏y:B

P((x, y)

),

by the defining equation

G(x)(y) :≡ refl(x,y).

Then, by the induction principle for pairs, there is a dependent function

F :∏

z:A×Bz =

(π1(z), π2(z)

),

such thatF((x, y)

)≡ refl(x,y).

Remark 2.11. Assume we are given two functions f : A→ A′ and g : B → B′.We can define

λx.λy.(f(x), g(y)

): A→ B → A′ ×B′

and then, by the recursion principle of the product, there is a function

(f, g) : A×B → A′ ×B′,

such that(f, g)

((x, y)

)≡(f(x), g(y)

).

2.3.5. Dependent pair types. Similar to the case of dependent functions, wecan generalize the notion of a product in such a way that the type of the

Page 19: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

19

second coordinate may vary along the points in the first coordinate. Assumewe are given a type A : U together with a type family P : A→ U , then wecan introduce the dependent pair type

∑x:A P (x). If not specified otherwise

by using brackets, the scope of such an expression is everything after “∑

x:A”.The dependent pair types are freely generated by one constructor:

(_,_) :∏x:A

(P (x)→

∑x:A

P (x)),

This means that for every inhabitant x : A and every proof t : P (a), we canintroduce an inhabitant

(a, t) :∑x:A

P (x).

If we are given a type A : U , a type family

P : A→ U ,

a type familyC :

(∑x:A

P (x))→ U

and a dependent function

G :∏x:A

∏t:P (x)

C((x, t)

),

then there is a dependent function

F :∏

s:∑x:A P (x)

C(s),

such that for every x : A and t : P (x)

F((x, t)

)≡ G(x)(t).

We note that pair types are just a special case of dependent pair types, wherethe type family P is constant, that is, if P ≡ λx.B for some fixed B : U , wehave that ∑

x:A

P (x) ≡ A×B.

We can generalize the projection functions to dependent pairs, but since thesituation is more involved, we state this in a lemma.

Page 20: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

20 ANDREAS FRANZ

Lemma 2.12. Assume we are given a type A : U together with a type familyP : A→ U . Then there is a function

π1 :(∑x:A

P (x))→ A

and there is a dependent function

π2 :∏

s:∑x:A P (x)

P(π1(s)

),

such that for every x : A and t : P (x) we have that

π1

((x, t)

)≡ x

andπ2

((x, t)

)≡ t.

Proof. To define the first projection, we consider the constant type family

C :(∑x:A

P (x))→ U ,

defined by the equationC(s) :≡ A

and we aim to inhabit ∏s:∑x:A P (x)

C(s) ≡(∑x:A

P (x))→ A.

To this end we define an inhabitant

G :∏x:A

∏t:P (x)

A

by the defining equationG(x, t) :≡ x

and then, by the recursion principle for dependent pairs, there is a function

π1 :(∑x:A

P (x))→ A,

such thatπ1

((x, t)

):≡ x.

Page 21: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

21

For the second projection we note that the type of the codomain may nowvary, i.e. the second projection has to be a dependent function of type:

π2 :∏

s:∑x:A P (x)

P(π1(s)

).

We use the induction principle for dependent pairs, where we consider thetype family

C :(∑x:A

P (x))→ U ,

defined by the equationC(s) :≡ P

(π1(s)

)and aim to inhabit the type ∏

s:∑x:A P (x)

C(s).

We can define a function

G :∏x:A

∏t:P (x)

C((x, t)

)by the defining equation

G(x)(t) :≡ p

and then, by the induction principle for dependent pairs, there is a dependentfunction

π2 :∏

s:∑x:A P (x)

P(π1(s)

)such that

π2

((x, t)

)≡ t.

Remark 2.13. If we are given a dependent function F :∏

(s:∑x:A P (x))C(s),

we may write F(x, t) instead of F((x, t)

)for simplicity.

Under the propositions as types interpretation, dependent pairs correspondto existential quantification. We note that our notion of existence is indeedconstructive, since for every s :

∑x:A P (x) the projection to the first coordi-

nate π1(y) : A gives an inhabitant of A and the fact that this inhabitant hasproperty P is proven by π2(y) : P

(π1(y)

). As we did before for pair types,

Page 22: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

22 ANDREAS FRANZ

we can prove that the inhabitants of the dependent pair types are indeed thepairs of terms x of A and t of P (x).

Lemma 2.14. Assume we are given a type A : U together with a type familyP : A→ U , then we have: ∏

s:∑x:A P (x)

y =(π1(s), π2(s)

)Proof. Since by definition of the projection functions

π1(x, t) ≡ x

andπ2(x, t) ≡ t,

We can define a dependent function

G :∏x:A

∏t:P (x)

(x, t) =(π1(x, t), π2(x, t)

),

by the defining equation

G(x)(t) :≡ refl(x,t).

By the induction principle for dependent pairs, there is a dependent function

F :∏

s:∑x:A P (x)

s =(π1(s), π2(s)

),

such thatF(x, t) ≡ refl(x,t).

2.3.6. Coproduct types. Assume we are given two types A,B : U , then wecan form the coproduct or sum type A+B, which can be thought of as thedisjoint union of the two types or as logical disjunction under the propositionas types interpretation. The coproduct of A and B is the inductive type,freely generated by the constructors

inl : A→ A+B

andinr : B → A+B.

Page 23: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

23

If we are given a type family P : A+B → U and two dependent functions

Gl :∏x:A

P(inl(x)

)and

Gr :∏y:B

P(inr(b)

),

then there is a dependent function

F :∏

w:A+B

P (w),

such thatF(inl(a)

):≡ Gl(a)

andF(inr(b)

):≡ Gr(b).

2.4. Propositions as types. In the preceding sections we presented thepropositions as types interpretation, by assigning the quantifiers and logicalconnectives appropriate formation rules. We will frequently use terminologyin accordance to this and therefore summarize it in the following table:

type theory first order logic0 ⊥1 >

A→ B A→ B

A×B A ∧BA+B A ∨B∏

(x:A) P (x) ∀xP (x)∑x:A P (x) ∃xP (x)

For the purpose of this work, another point of view will be more importantand is the content of the following section.

3. The homotopy interpretation

3.1. Basic behavior of functions and identifications. Based on workof Hofmann and Streicher (see [7]), who gave a model of ITT in which iden-tity types are inhabited by more then one element, Awodey, Warren andVoevodsky (see [1], [11]) proposed the point of view that inhabitants of the

Page 24: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

24 ANDREAS FRANZ

identity type x =A y better ought to be thought of as paths between x and yin a space A and equalities of the form p =x=y q ought to be thought of ashomotopies between the paths p, q : x = y in A and so on and this we callthe homotopy- or types as spaces interpretation. Under this interpretation itis not desirable anymore that there is only one way to inhabit identity types.To get a better grasp on this, let us consider again the induction principlefor identity types, which from now on, to further stress the point of viewthat types are spaces and equalities are paths, will be called path induction.In a homotopic reading it states that in order to establish a property forevery path p : x = y, with two distinct endpoints, it suffices to show it forthe constant path reflx. This is reasonable, when we think of properties inour theory as being those that are invariant under homotopy, since everypath with one free endpoint can be continuously deformed to the constantpath. The same can not be said for loops l : x = x, for instance, it is wellknown that not all loops of the circle are homotopic to each other. Therefore,adding a principle such as UIP to ITT is not reasonable under the homotopyinterpretation anymore.

The analogy between identity types and path spaces in topology is verystrong and we will present the most basic results that show this in the restof this section. In fact we have already defined operations on identity typesthat correspond to inversion and concatenation of paths in lemma 2.5 andlemma 2.6 respectively. The next lemma now justifies this nomenclature, byshowing that these operations behave appropriately.

Lemma 3.1. Assume we are given a type A : U , points x, y, z, w : A andpaths p : x = y, q : y = z and r : z = w. Then we have the following:

(i) p = p � refly and p = reflx � p.

(ii) p−1 � p = refly and p � p−1 = reflx.

(iii) (p−1)−1

= p.

(iv) p � (q � r) = (p � q) � r.

Proof. We can proof all four points by path induction. For (i) it sufficesto consider the case where x ≡ y and p ≡ reflx and since by lemma 2.6reflx � reflx ≡ reflx, in this case we can proof both claims by reflreflx .

Page 25: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

25

For (ii) it suffices to consider the case where x ≡ y and p ≡ reflx and sinceby lemma 2.5 reflx

−1 ≡ reflx and by lemma 2.6 reflx � reflx ≡ reflx, in this casewe can proof both claims by reflreflx .For (iii) it suffices to consider the case where x ≡ y and p ≡ reflx and sinceusing lemma 2.5 twice gives reflx

−1−1 ≡ reflx−1 ≡ reflx, in this case we can

proof the claim by reflreflx .For (iv) it suffices to consider the case where x ≡ y ≡ z ≡ w and p ≡ q ≡r ≡ reflx. By using lemma 2.6 twice, we have that

reflx � (reflx � reflx) ≡ reflx � reflx ≡ reflx

and similarly(reflx � reflx) � reflx ≡ reflx � reflx ≡ reflx.

Hence, in this case, we can proof the claim by reflreflx . �

Next we want to establish that functions respect equalities. Under thehomotopy interpretation this says that all functions preserve paths.

Lemma 3.2. Assume we are given two types A,B : U together with a functionf : A→ B. Then, for every x, y : A, there is a function

apf : (x =A y)→ (f(x) =B f(y)),

such that for every x : A we have

apf (reflx) ≡ reflf(x).

Proof. It suffices to consider the case where x ≡ y and p ≡ reflx and then weneed to inhabit the type f(x) =B f(x). We can do so by reflf(x). �

Later on we will also need the following.

Lemma 3.3. Assume we are given two types A,B : U together with a functionf : A→ B. Then we have that for every x, y : A there is a function

ap2f :

∏p,q:x=y

(p = q)→ apf (p) = apf (q),

such thatap2f (reflp) ≡ reflapf (p).

Page 26: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

26 ANDREAS FRANZ

Proof. By path induction it suffices to consider the case where p ≡ q andr ≡ reflp and then we need to inhabit the type apf (p) = apf (p). We can doso by reflapf (p). �

Lemma 3.4. Assume we are given three types A,B,C : U together withfunctions f : A → B and g : B → C and paths p : x =A y and q : y =A z.Then we have:

(i) apf (p � q) = apf (p) � apf (q).

(ii) apf (p−1) = apf (p)−1.

(iii) apg(apf (p)

)= apg◦f (p).

(iv) apidA(p) = p.

Proof. All claims can be proven by path induction. For (i) it suffices toconsider the case where x ≡ y ≡ z and p ≡ q ≡ reflx and since by lemma 2.6

reflx � reflx = reflx

and by lemma 3.2apf (reflx) ≡ reflf(x),

this means we need to show

reflf(x) = reflf(x),

which we can do by reflreflf(x).

For (ii) it suffices to consider the case where x ≡ y and p ≡ reflx and sinceby lemma 2.5

reflx−1 ≡ reflx,

in this case we need to show

apf (reflx) = apf (reflx)−1.

Since by lemma 3.2apf (reflx) ≡ reflf(x)

and using again lemma 2.5 gives

reflf(x)−1 ≡ reflf(x),

Page 27: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

27

we can further simplify this to

reflf(x) = reflf(x),

which we can inhabit by reflreflf(x).

For (iii) it suffices to consider the case where x ≡ y and p ≡ reflx and sinceby lemma 3.2 for any h : A→ C it holds that

aph(reflx) ≡ reflh(x),

proofing the claim means to show that

reflg(f(x)) = reflg(f(x))

and we can do so by reflg(f(x)).For (iv) it suffices to consider the case where x ≡ y and p ≡ reflx and sinceby lemma 3.2 we have that

apidA(reflx) ≡ reflidA(x),

andidA(x) ≡ x,

in this case we need to show

reflx = reflx

and we can do so by reflreflx . �

Remark 3.5 (Application of a constant function). Assume we are given twotypes A,B : U , some fixed b : B and let us consider the constant function:

bA :≡ λx.b : A→ B

Then we have that: ∏x,y:A

∏p:x=y

apbA(p) = reflb

Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx, but since bA(x) ≡ b and applying the computation rule from lemma3.2, we can use reflreflb in this case. �

We note that we can not say the same thing for functions that are onlypropositionally constant, i.e. functions f : A→ B, such that f = bA, because

Page 28: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

28 ANDREAS FRANZ

we have for every x, y : A and every p : x = y that

apf (p) : f(x) = f(y)

andreflb : b = b.

But this means thatapf (p) = reflb

is generally not well typed.

Remark 3.6 (Application of identity is identity). Assume we are given a typeA : U and let us consider the identity function

idA :≡ λx.x.

Then we have that: ∏x,y:A

∏p:x=y

apidA(p) = p

Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx, but since idA(x) ≡ x and applying the computation rule fromlemma 3.2, we can use reflreflx in this case. �

There is also a dependent version of lemma 3.2 that we want to considernext. However we need to be careful, because for every dependent map

F :∏x:A

P (x)

and every pathp : x =A y,

the expression F(x) = F(y) is generally not well typed, since F(x) : P (x) andF(y) : P (y). The solution is to use transport from lemma 2.7.

Lemma 3.7 (Dependent application). Assume we are given a type A : U , atype family P : A→ U and a dependent function F :

∏(x:A) P (x). Then, for

every x, y : A, there is a dependent function

apdF :∏p:x=y

(transportP (p,F(x)) = F(y)

),

Page 29: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

29

such that for every x : A we have

apdF(reflx) ≡ reflF(x).

Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx and in this case we need to show that

transportP (reflx,F(x)) = F(x).

By lemma 2.7 we have that

transportP (reflx) ≡ idP (x)

and hence our goal simplifies to

F(x) = F(x),

which can be proven by reflF(x). �

We recall that function types are just a special case of dependent functiontypes, where the type family is constant, i.e

A→ B ≡∏x:A

B.

Therefore it makes sense to consider for every function f : A→ B and everypath p : x =A y application

apf (p) : f(x) = f(y),

as well as dependent application

apdf (p) : transportB(p, f(x)) = f(y)

of f to p and we want to relate the two in the next lemma.

Lemma 3.8. Assume we are given two types A,B : U , a function f : A→ B,two points x, y : A and a path p : x =A y, then we have:

apdf (p) = transportconstBp (f(x)) � apf (p)

Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx. By lemma 3.7 the left hand side of the equality simplifies

apdf (reflx) ≡ reflf(x).

Page 30: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

30 ANDREAS FRANZ

By lemma 2.8 we have

transportconstBreflx(f(x)) ≡ reflf(x)

and by lemma 3.2 we have

apf (reflx) ≡ reflf(x).

Together with the computation rule from lemma 2.6, we get that also theright hand side of the equality is judgmentally equal to reflf(x). Therefore, inthis case, we can proof the claim by reflreflf(x)

. �

3.2. Homotopies and equivalences. In this section we transfer more ideasfrom homotopy theory to ITT and present appropriate notions for homotopybetween two functions and equivalence of spaces.

Definition 3.9 (Homotopies). Assume we are given two types A,B : Utogether with two maps f : A→ B and g : A→ B. A homotopy from f tog is a dependent function of type

(f ∼ g) :≡∏x:A

(f(x) = g(x)

).

Thus, a homotopy between functions f and g is a proof that these functionsare pointwise equal. Next we present a proof, that equality f = g betweenfunctions implies pointwise equality, i.e. equivalence.

Lemma 3.10. Assume we are given two types A,B : U together with twofunctions f, g : A→ B. Then there is a function

happly : (f = g)→ (f ∼ g),

such that, if f ≡ g, we have

happly(reflf ) ≡ λx.reflf(x).

Proof. We consider the type family

C :∏

f,g:A→B(f = g)→ U

defined by the equation

C(f, g, p) :≡ (f ∼ g).

Page 31: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

31

Then, for every f : A→ B, we have that

C(f, f, reflf ) ≡ (f ∼ f)

and thereforeλx.reflf(x) : C(f, f, reflf ).

We conclude that

λf.λx.reflf(x) :∏

f :A→BC(f, f, reflf )

and then, by path induction, there is a dependent function

F :∏

f,g:A→B

∏p:f=A→Bg

C(f, g, p),

such thatF(f, f, reflf ) ≡ λx.reflf(x).

Lastly, given two functions f, g : A→ B, we suppress f and g and define

happly(p) :≡ F(f, g, p).

Lemma 3.11. We let eval : A→ (A→ B)→ B be function evaluation at a,i.e. for every function f : A→ B we define eval(a, f) :≡ f(a). Then we havefor every two functions f, g : A→ B, such that p : f = g and for every x : A:

apeval(x)(p) = happly(p)(x)

Proof. By path induction, it suffices to consider the case where f ≡ g andp ≡ reflf . Since by the computation rule of happly, given in lemma 3.10, wehave

happly(reflf )(x) ≡ reflf(x)

andapeval(x)(reflf ) ≡ refleval(x,f) ≡ reflf(x),

we can use reflreflf(x)in this case. �

Next we present the notion of an equivalence. For our purposes, thefollowing definition, which is due to Voevodsky, will suffice. There are

Page 32: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

32 ANDREAS FRANZ

multiple other ways to define equivalences, we refer to chapter four of theHoTT book [10] for a detailed discussion.

Definition 3.12 (Equivalences). We say that a function f : A → B is anequivalence, if it has a left and a right inverse, that is:

isequiv(f) :≡( ∑g:B→A

(f ◦ g ∼ idB))×( ∑h:B→A

(h ◦ f ∼ idA)).

We say the type A : U is equivalent to the type B : U , if there is an equivalencebetween the two types:

(A ' B) :≡∑

f :A→Bisequiv(f)

Next we present a proof that transport from lemma 2.7 is always anequivalence.

Lemma 3.13. Assume we are given a type A : U together with a type familyP : A→ U . Then we have that:∏

x,y:A

∏p:x=y

isequiv(transportP (p)

)Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx. By the computation rule from lemma 2.7 we have that

transportP (reflx) ≡ idP (x),

which is obviously an equivalence, since it is its own quasi inverse. �

Remark 3.14. Assume we are given two types A,B : U and functions f : A→B and g : B → A. If we have

ql : f ◦ g ∼ idB,

andqr : g ◦ f ∼ idA

we can inhabit isequiv(f) by ((g, ql), (g, qr)

).

In this situation we may also say that f and g are quasi-inverse ormutuallyinverse.

Page 33: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

33

Lemma 3.15. Assume we are given two types A,B : U and a functionf : A→ B, such that isequiv(f). Then there is a function f ′ : B → A that isquasi inverse to f .

Proof. Assume we are given((g,G), (h,H)

): isequiv(f), that is:

• g : B → A

• G :∏

(y:B)

(f ◦ g(y) =B y

)• h : B → A

• H :∏

(x:A)

(h ◦ f(x) =A x

)Then we can define terms

H ◦ g :∏y:B

(h ◦ f ◦ g(y) = g(y)

)and

λy.aph(G(y)

):∏y:B

(h ◦ f ◦ g(y) = h(y)

)and, using these two terms, we can inhabit g ∼ h by

I(y) :≡(H ◦ g(y)

)−1 � aph(G(y)

).

Next, we note thatI ◦ f :

∏x:A

g ◦ f(x) = h ◦ f(x)

and hence we can inhabitg ◦ f ∼ idA

byJ(x) :≡ I

(f(x)

)� H(x).

Since we already have G, which proves that f ◦ g ∼ idB, at hand, this showsthat f and g are mutually inverse. �

With the notion of an equivalence at hand, we can present an alternativedescription of paths in dependent pair types.

Theorem 3.16. Assume we are given a type A : U together with a typefamily P : A→ U and let w,w′ :

∑(x:A) P (x). Then there is an equivalence

(w = w′) '∑

p:π1(w)=π1(w′)

transportP(p, π2(w)

)= π2(w′).

Page 34: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

34 ANDREAS FRANZ

Proof. Step 1: Firstly, we want to define for every w,w′ :∑

(x:A) P (x) afunction of type

(w = w′)→∑

p:π1(w)=π1(w′)

transportP(p, π2(w)

)= π2(w′).

To this end, we consider the type family

C :∏

w,w′:∑x:A P (x)

(w =∑x:A P (x) w

′)→ U ,

defined by the equation

C(w,w′, q) :≡∑

p:π1(w)=π1(w′)

transportP (p, π2(w)) = π2(w′).

By path induction, it suffices to consider the case where w ≡ w′ and q ≡ reflw

and then we have that

C(w,w, reflw) ≡∑

p:π1(w)=π1(w)

transportP(p, π2(w)

)= π2(w).

Now, since firstlyreflπ1(w) : π1(w) = π1(w)

and secondly, by lemma 2.7

transportP (reflπ1(w)) ≡ idP (π1(w)),

we can inhabit C(w,w, reflw) by the pair

(reflπ1(w), reflπ2(w)).

Therefore

λw.(reflπ1(w), reflπ2(w)) :∏

w:∑x:A P (x)

C(w,w, reflw)

and then, by the path induction, there is a dependent function

Φ :∏

w,w′:∑x:A P (x)

∏q:w=w′

C(w,w′, q),

such thatΦ(w,w, reflw) ≡ (reflπ1(w), reflπ2(w)).

Page 35: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

35

Step 2: Next, we want to define a function in the other direction, i.e. wewant to inhabit the type:∏w,w′:

∑x:A P (x)

( ∑p:π1(w)=π1(w′)

transportP (p, π2(w)) = π2(w′))→ (w = w′)

We start by using induction on the terms

w,w′ :∑x:A

P (x)

andr :

∑p:π1(w)=π1(w′)

transportP (p, π2(w)) = π2(w′),

which splits them into pairs (w1, w2), (w′1, w′2) and (r1, r2) respectively, where

• w1, w′1 : A,

• w2 : P (w1),• w′2 : P (w′1),• r1 : w1 = w′1 and• r2 : transportP (r1, w2) = w′2.

So, we consider the type family

E :∏

w1,w′1:A

(w1 = w′1)→ U

defined by the equation

E(w1, w′1, r1) :≡

∏w2:P (w1)

∏w′2:P (w′1)

∏r2:transportP (r1,w2)=w′2

(w1, w2) = (w′1, w′2)

and aim to inhabit the type∏w1,w′1:A

∏r1:w1=w′1

E(w1, w′1, r1).

By path induction it suffices to consider the case where w1 ≡ w′1 and r1 ≡reflw1 and then we have that w2 and w′2 are both of type P (w1). Since bythe computation rule from lemma 2.7 it holds that

transportP (reflw1) ≡ idP (w1),

we get thattransportP (reflw1 , w2) ≡ w2.

Page 36: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

36 ANDREAS FRANZ

But this means that we need to inhabit

E(w1, w1, reflw1) ≡∏

w2,w′2:P (w1)

∏r2:w2=w′2

((w1, w2) = (w1, w

′2)).

We use path induction again, where we consider the type family

Q :∏

w2,w′2:P (w1)

(w2 = w′2)→ U ,

defined by the equation

Q(w2, w′2, r2) :≡

((w1, w2) = (w1, w

′2))

and we aim to inhabit the type∏w2,w′2:P (w1)

∏r2:w2=w′2

Q(w2, w′2, r2).

Then it suffices to consider the case where w2 ≡ w′2 and r2 ≡ reflw2 , but inthis case we can proof the claim by refl(w1,w2). Therefore, for every w1 : A,there is a dependent function

Gw1 :∏

w2,w′2:P (w1)

∏r2:w2=w′2

Q(w2, w′2, r2),

such thatGw1(w2, w2, reflw2) ≡ refl(w1,w2).

But as noted above, we have that

E(w1, w1, reflw1) ≡∏

r2:w2=w′2

Q(w2, w′2, r2)

and hence Gw1 inhabits E(w1, w1, reflw1). This, in turn, gives a dependentfunction

J :∏

w1,w′1:A

∏r1:w1=w′1

E(w1, w′1, r1),

such thatJ(w1, w1, reflw1) ≡ Gw1 .

Page 37: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

37

This finishes the induction on w, w′ and r and therefore gives a dependentfunction

Ψ :∏

w,w′:∑x:A P (x)

( ∑p:π1(w)=π1(w′)

transportP (p, π2(w)) = π2(w′))→ (w = w′),

such that

Ψ((w1, w2), (w′1, w

′2), (r1, r2)

)≡ J(w1, w

′1, r1)(w2, w

′2, r2).

Step 3: Next we want to show that for every w,w′ :∑

x:A P (x), the functionsΦ(w,w′) and Ψ(w,w′) are mutually inverse. For readability we omit theoccurrences of w and w′. We start by showing that for every

r :∑

p:π1(w)=π1(w′)

transportP (p, π2(w))

it holds thatΦ(Ψ(r)

)= r.

As before, we use induction on

w,w′ :∑x:A

P (x)

andr :

∑p:π1(w)=π1(w′)

transportP (p, π2(w)) = π2(w′),

which splits them into pairs (w1, w2), (w′1, w′2) and (r1, r2) respectively, where

• w1, w′1 : A,

• w2 : P (w1),• w′2 : P (w′1),• r1 : w1 = w′1 and• r2 : transportP (r1, w2) = w′2.

Then we consider the type family

R :∏

w1,w′1:A

(w1 = w′1)→ U

defined by the equation

R(w1, w′1, r1) :≡

∏w2:P (w1)

∏w′2:P (w′1)

∏r2:transportP (r1,w2)=w′2

Φ(Ψ(r)

)= r

Page 38: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

38 ANDREAS FRANZ

and we aim to inhabit the type∏w1,w′1:A

∏r1:w1=w′1

R(w1, w′1, r1).

By path induction it suffices to consider the case where w1 ≡ w′1 and r1 ≡reflw1 and since by the computation rule from lemma 2.7 it holds that

transportP (reflw1) ≡ idP (w1)

and both w2 and w′2 are of the same tpe P (w1), we get

R(w1, w1, reflw1) ≡∏

w2,w′2:P (w1)

∏r2:w2=w′2

Φ(

Ψ((reflw1 , r2)

))= (reflw1 , r2).

Using path induction again, it suffices to consider the case where w2 ≡ w′2and r2 ≡ reflw2 and we are left to proof

(2) Φ(

Ψ((reflw1 , reflw2)

))= (reflw1 , reflw2).

In this case we compute

Ψ((w1, w2), (w1, w2), (reflw1 , reflw2)

)≡

≡ J(w1, w1, reflw1)(w2, w2, reflw2) ≡

≡ Gw1(w2, w2, reflw2) ≡ refl(w1,w2)

and thenΦ((w1, w2), (w1, w2), refl(w1,w2)) ≡ (reflw1 , reflw2)

and therefore, in this case, we can proof (2) by refl(reflw1 ,reflw2 ).Step 4: Similarly we want to show that for every w,w′ :

∑x:A P (x) and every

q : w = w′, we have that:

(3) Ψ(Φ(q)

)= q

As in step 1, we firstly use path induction on q, by which it suffices to considerthe case where w ≡ w′ and q ≡ reflw and then we have

Φ(w,w, reflw) ≡ (reflπ1(w), reflπ2(w)).

Secondly we use induction on w, which splits the term into (w1, w2) and thenwe can proceed as in step 3 and compute

Ψ((w1, w2), (w1, w2), (reflw1 , reflw2)

)≡ refl(w1,w2).

Page 39: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

39

Therefore, in this case we can proof (3) by reflrefl(w1,w2). �

Theorem 3.16 gives an alternative way to infer uniqueness for dependentpairs from lemma 2.14.

Corollary 3.17. Assume we are given a type A : U and a type familyP : A→ U , then we have: ∏

y:∑x:A P (x)

y =(π1(y), π2(y)

)Proof. Assume we are given y :

∑x:A P (x). By theorem 3.16 it suffices to

show thattransportP (reflπ1(y), π2(y)) = π2(y)

and since by lemma 2.7 we have

transportP(reflπ1(y)

)≡ idP (π1(y)),

we can proof this claim by reflπ2(y). �

For the special case of a non dependent product, theorem 3.16 tells us thatthe paths in a product space are pairs of paths.

Corollary 3.18. Assume we are given two types A,B : U and two pointsr, s : A×B, then we have:

(r = s) '((π1(r) = π1(s)

)×(π2(r) = π2(s)

))Proof. We let P : A→ U be the constant type family, defined by the equationP (x) :≡ B. By theorem 3.16 we have that

(r = s) '∑

p:(π1(r)=π1(s))

transportP(p, π2(r)

)= π2(s).

Next we note that(transportP

(p, π2(r)

)= π2(s)

)'(π2(r) = π2(s)

),

since by lemma 2.8 we have a path

transportconstBp (b) : transportP (p, π2(r)) = π2(r)

and hence, if we are given some

p : transportP(p, π2(r)

)= π2(s),

Page 40: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

40 ANDREAS FRANZ

we can define

transportconstBp (b) � p : transportP (p, π2(r)) = π2(r)

and if we are given some

q : transportP (p, π2(r)) = π2(r),

we can define (transportconstBp (b)

)−1 � q : π2(r) = π2(r).

This defines an equivalence by lemma 2.6 and therefore

(r = s) '(π1(r) = π1(s)

)×(π2(r) = π2(s)

).

Definition 3.19. We denote by

pair= :((π1(r) = π1(s)

)×(π2(r) = π2(s)

))→ (r = s)

the equivalence from corollary 3.18. In particular we have that

pair=(reflx, refly) ≡ refl(x,y).

The next lemma characterizes inversion and concatenation of paths in aproduct space component-wise.

Lemma 3.20. Assume we are given two types A,B : U together with pointsx, y, z : A and x′, y′, z′ : B, paths p : x = y and q : y = z and paths r : x′ = y′

and s : y′ = z′. Then we have:

(i) pair=(p−1, r−1) = pair=(p, r)−1

(ii) pair=(p, r) � pair=(q, s) = pair=(p � q, r � s)

Proof. We can proof both claims by path induction. For (i) it suffices toconsider the case where x ≡ y, x′ ≡ y′, p ≡ reflx and r ≡ reflx′ . By definition3.19, we have that

pair=(reflx, reflx′) ≡ refl(x,x′)

and since by lemma 2.5 we have that

refl−1(x,x′) ≡ refl(x,x′),

Page 41: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

41

in this case we can proof the claim by reflexivity. Similarly for (ii) it sufficesto consider the case where x ≡ y ≡ z, x′ ≡ y′ ≡ z′, p ≡ q ≡ reflx andr ≡ s ≡ reflx′ . Using again definition 3.19 and lemma 2.6, by which we havethat

refl(x,x′)� refl(x,x′) ≡ refl(x,x′),

we can proof the claim by reflexivity in this case. �

Lemma 3.21. Assume we are given four types A,A′, B,B′ : U together withtwo functions f : A→ A′ and g : B → B′, then it holds that∏

z,z′:A×B

∏p:z=z′

ap(f,g)(p) = pair=(apf◦π1

(p), apg◦π2(p))

Proof. We use induction on z and z′, which splits them into pairs. Bypath induction it suffices to consider the case where (x, y) ≡ (x′, y′) andp ≡ refl(x,y) but since pair=(reflf(x), reflg(x)) ≡ refl(f(x),g(x)), in this case wecan use reflrefl(f(x),g(x))

. �

Lemma 3.22. Assume we are given three types A,B,C : U together with afunction f : A×B → C. For every x : A, we define

fx(y) :≡ f(x, y)

and for every y : B, we define

fy(x) :≡ f(x, y).

Then it holds ∏y:B

∏x,x′:A

∏p:x=x′

apf(pair=(p, refly)

)= apfy(p)

and ∏x:A

∏y,y′:B

∏q:y=y′

apf(pair=(reflx, q)

)= apfx(q).

Proof. We check that the above expressions are well typed. For every y : B,x, x′ : A and p : x = x′ we have that

pair=(p, refly) : (x, y) = (x′, y)

and thereforeapf(pair=(p, refly)

): f(x, y) = f(x′, y).

Page 42: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

42 ANDREAS FRANZ

But we also have that

apfy(p) : fy(x) = fy(x′)

and by definitionfy(x) ≡ f(x, y)

andfy(x

′) ≡ f(x′, y).

The second case is similar. Now, for the first claim, we assume that we aregiven some y : B and then, by path induction it suffices to consider the casewhere x ≡ x′ and p ≡ reflx. Since by definition 3.19 we have that

pair=(reflx, refly) ≡ refl(x,y)

and by lemma 3.2 we have that

apfy(reflx) ≡ reflfy(x) ≡ reflf(x,y),

in this case we are left to proof that

reflf(x,y) = reflf(x,y)

and we can use reflreflf(x,y). The second claim follows in a completely analogue

way. �

Definition 3.23 (Contractability). We say that a type A : U is contractible,if there exists an inhabitant

(a,F) :∑x:A

∏y:A

x = y :≡ isContr(A)

and we call a the center of contraction.

Another useful lemma is the following. It states that paths for which oneof the end-points is allowed to vary and the other one is fixed are homotopicto the constant path in the total space.

Lemma 3.24. Assume we are given some type A : U together with somefixed a : A, then the following type is inhabited:

isContr(∑x:A

x = a)

The center of contraction is given by (a, refla).

Page 43: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

43

Proof. We aim to inhabit the type∏s:∑x:A x=a

s = (a, refla)

We use induction on s, which splits it into s1 : A and s2 : s1 = a. Next wenote that by theorem 3.26 we have that

transportx 7→x=a(s2, s2) = s−12

� s2

and by lemma 3.1 we have that

s−12

� s2 = refla.

The claim therefore follows from the characterization of paths in a∑

-space,theorem 3.16. �

Lemma 3.25. Assume we are given two types A,B : U together with terms

F : isContr(A)

andG : isContr(B),

then we have thatA ' B.

Proof. From F and G we get points π1(F) : A and π1(G) : B, hence we candefine (

π1(G))A

: A→ B

and (π1(F)

)B

: B → A.

We compute that (π1(F)

)B◦(π1(G)

)A

(x) ≡ π1(F)

and (π1(G)

)A◦(π1(F)

)B

(y) ≡ π1(G)

and therefore we have that

π2(F) :(π1(F)

)B◦(π1(G)

)A∼ idA

Page 44: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

44 ANDREAS FRANZ

andπ2(G) :

(π1(G)

)A◦(π1(F)

)B∼ idB.

The following theorem characterizes transport, when the type family statesa pointwise equality between functions. We will frequently use it, whenconstructing equivalences.

Theorem 3.26. Assume we are given two functions f, g : A→ B, two pointsx, y : A, a path p : x =A y and a path q : f(x) =B g(x). We let P : A → Ube the type family defined by the equation

P (x) :≡ f(x) =B g(x).

Then we have:

transportP (p, q) =f(a′)=g(a′)

(apf (p)

)−1 � q � apg(p).

Proof. By path induction it suffices to consider the case where x ≡ y andp ≡ reflx. Since by lemma 2.7 we have that

transportP (reflx) ≡ idP (x)

and by the computation rules from lemmas 3.2 and 2.5 that(apf (p)

)−1 ≡ reflf(x)

andapg(reflx) ≡ reflg(x),

in this case we can use lemma 3.1 and proof the claim by reflq. �

4. Pushouts

4.1. Basics. In section 2.3 we encountered inductive types. The idea was tospecify a set of constructors that generate points in the type under definition.This idea is generalized by allowing constructors to additionally generatepaths. We call these types higher inductive types (HITs). There is no generaltheory for HITs yet, so we will focus instead on a specific class, so calledpushout types, which provide a general enough framework to define manyimportant examples of types with non-trivial homotopy, such as the interval,n-spheres and many more.

Page 45: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

45

Definition 4.1. Assume we are given three types A,B,C : U together withtwo functions f : C → A and g : C → B. The pushout of (A,B,C, f, g) isthe higher inductive type A tC B generated by

• a function inl : A→ A tC B,• a function inr : B → A tC B, and• for each z : C a path Glue(z) : inl

(f(z)

)= inr

(g(z)

).

The recursion principle for pushout types states that, if we are given sometype D : U together with two functions

sl : A→ D

andsr : B → D

and a dependent function

Com :∏z:C

sl ◦ f(z) = sr ◦ g(z),

then there is a functions : A tC B → D,

such that:

• s ◦ inl ≡ sl• s ◦ inr ≡ sr• aps

(Glue(z)

)= Com(z)

The induction principle states that, if we are given a type family

P : A tC B → U

together with two dependent functions

Fl :∏x:A

P(inl(x)

)and

Fr :∏y:B

P(inr(y)

)and a dependent function

G :∏z:C

transportP(

Glue(z),F(

inl(f(z)

)))= F

(inr(g(z)

)),

Page 46: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

46 ANDREAS FRANZ

then there is a dependent function

F :∏

w:AtCB

P (w),

such that:

• F ◦ inl ≡ Fl

• F ◦ inr ≡ Fr

• apdF

(Glue(z)

)= G(z)

In other words, A tC B is the disjoint union of A and B, where for everyz : C we have a path from inl

(f(z)

)to inr

(g(z)

). We depict this information

in a square:

C

Glue

g//

f

��

B

inr

��

Ainl

// A tC B

Geometrically, pushout types can be thought of as “gluing” the types A andB together along the type C and this is done by making the points of C intopaths.

Remark 4.2. Firstly we establish that gluing a type A with itself, alongitself, does not change its homotopy class. That is, we consider the followingpushout square:

A

Glue

idA//

idA

��

A

inr

��

Ainl

// A tA A

Then we have an equivalence:

A tA A ' A

Page 47: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

47

Proof. We define Φ : A tA A → A by means of the recursion principle ofA tA A as follows:

• Φ ◦ inl :≡ idA

• Φ ◦ inr :≡ idA

• apΦ

(Glue(x)

):= reflx

We want to proof, that Φ and inl are mutually inverse, that is we aim to showthat it holds for every w : A tA A that:

P (w) :≡ inl ◦ Φ(w) = w

We apply the induction principle of A tA A and set:

• reflinl(x) : P(inl(x)

)• Glue(x) : P

(inr(x)

)Then it is left to show:

transportP (Glue(x), reflinl(x)) = Glue(x)

Since firstly, by theorem 3.26 we have

transportP (Glue(x), reflinl(x)) = apinl◦Φ(Glue(x)

)−1 � Glue(x)

and secondly, by definition we have apΦ

(Glue(x)

)= refla, we can proof the

claim by reflGlue(x). Conversely, we let

Q(x) :≡ Φ ◦ inl(x) = x

and then, sinceΦ ◦ inl(x) ≡ idA(x) ≡ x,

we can define λa.refla :∏

(x:A)Q(x). �

Remark 4.3 (Sum types). The sum A+B can be defined as the pushout ofthe square:

0 //

��

B

inr

��

Ainl

// A+B

Page 48: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

48 ANDREAS FRANZ

Example 4.4 (The interval). The interval is the pushout of the square:

1

seg

//

��

1

inl

��

1inr

// I

We introduce a special notation and set:

• inl(?) :≡ 0I

• inr(?) :≡ 1I

Up to equivalence, the interval is just a point, as we present in the followinglemma and may therefore not seem very interesting at first sight.

Lemma 4.5. The interval is contractible

Proof. We claim that 0I is the center of contraction. To this end we need toinhabit the type ∏

i:I

0I = i.

We apply the induction principle of the interval, where we consider the typefamily

P : I → U ,

defined by the equationP (i) :≡ 0I = i.

Then we can userefl0I : P (0I)

andseg : P (1I),

to proof the claim over the points. Then it is left to show that

transportP (seg, refl0I ) = seg

But by theorem 3.26, this means to show that

seg = seg,

Page 49: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

49

which we can inhabit by reflseg. �

We have seen in lemma 3.10 that from an equality f = g between twofunctions, we can infer pointwise equality. Once we introduce pushouts andtherefore the interval into our theory also the converse is true. We present theproof in the next lemma. This also demonstrates that HITs are interestingfrom a purely type theoretic point of view.

Lemma 4.6 (Function extensionality). Assume we are given two types A,B :

U and two functions f, g : A→ B. Then there is a function:

functExt : (f ∼ g)→ (f = g)

Proof. Assume we are given H : f ∼ g, then we have for every x : A that

H(x) : f(x) = g(x)

and can therefore define a function Φx : I → B by the recursion principle ofthe interval, such that:

• Φx(0I) :≡ f(x)

• Φx(1I) :≡ g(x)

• apΦx(seg) := H(x)

But then we can define

Ψ :≡ λi.λx.Φx(i) : I → A→ B

and this givesapΨ(seg) : (λx.Φx(0I)) = (λx.Φx(1I)).

Lastly by definition of Φx we have that

λx.Φx(0I) ≡ f

andλx.Φx(1I) ≡ g.

Next, we prove a dependent version of the previous lemma.

Lemma 4.7 (Dependent function extensionality). Assume we are given atype A : U together with a type family P : A→ U and two dependent functions

Page 50: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

50 ANDREAS FRANZ

F,G :∏

(x:A) P (x). Then there is a dependent function:

FunctExt :(∏x:A

F(x) =P (x) G(x))→ (F = G)

Proof. Assume we are given H :∏

(x:A) F(x) =P (x) G(x), then we have forevery x : A that

H(x) : F(x) =P (x) G(x)

and can therefore define a function Φx : I → P (x) by the recursion principleof the interval, such that:

• Φx(0I) :≡ F(x)

• Φx(1I) :≡ G(x)

• apΦx(seg) := H(x)

But then we can define

Ψ :≡ λi.λx.Φx(i) : I →∏x:A

P (x)

and this gives

apΨ(seg) : λx.Φ(0I) =∏(x:A) P (x) λx.Φ(1I).

Lastly by definition of Φx we have that

λx.Φx(0I) ≡ F

andλx.Φx(1I) ≡ G.

Corollary 4.8 (Weak function extensionality). Assume that we are given atype A : U together with a type family P : A→ U and an inhabitant

H :∏x:A

isContr(P (x)

),

then it also holds thatisContr

(∏x:A

P (x)).

This is also called weak function extensionality.

Page 51: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

51

Proof. Since by assumption we are given some

H :∏x:A

isContr(P (x)

),

we have in particular for every x : A inhabitants

π1

(H(x)

): P (x)

andπ2

(H(x)

):∏y:P (x)

π1

(H(x)

)= y.

We then define for every F :∏

(x:A) P (x) an dependent function G, by thedefining equation

G(x) :≡ π2

(H(x)

)(F(x)

),

which then has type ∏x:A

π1

(H(x)

)=P (x) F(x).

Lastly we defineλx.π1

(H(x)

):∏x:A

P (x)

and then, by lemma 4.7, we have that

FunctExt(G(x)

): λx.π1

(H(x)

)= F

Since F was chosen arbitrary, this shows the claim. �

We note that from lemma 4.8, one can proof that happly is an equivalenceas has been done, e.g. in chapter 4.9 of the HoTT book [10]. For our purposes,the following lemma will suffice, which provides a direct proof that happly isleft inverse to functExt.

Lemma 4.9. The function happly from lemma 3.10 is left inverse to functExt

from lemma 4.6.

Proof. We aim to show that∏f,g:A→B

∏H:f∼g

happly(functExt(H)

)= H.

Page 52: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

52 ANDREAS FRANZ

So assume we start of with two functions f, g : A→ B together with someH : f ∼ g. Following the procedure from lemma 4.6, we get a function

Ψ :≡ λi.λx.Φx(i) : I → A→ B,

where Φ is defined by recursion on the interval, such that:

• Φx(0I) :≡ f(x)

• Φx(1I) :≡ g(x)

• apΦx(seg) := H(x)

In particular, we then have a proof that f and g are equal:

apΨ(seg) : f = g

Next, by lemma 3.11 we have for every p : f = g that∏x:A

happly(p)(x) = apeval(x)(p)

and hence, by dependent function extensionality (lemma 4.7) that

happly(apΨ(seg)

)= λx.apeval(x)

(apΨ(seg)

)= λx.apeval(x)◦Ψ(seg)

and since we can compute

λi.(eval(x) ◦Ψ(i)

)≡ λi.

(eval(x,Ψ(i))

)≡ λi.Ψ(i, x) ≡ λi.Φx(i) ≡ Φx

we get thatλx.apeval(x)◦Ψ(seg) = λx.apΦx(seg).

Lastly by definition of Φ we have

λx.apΦx(seg) ≡ H.

The interval further enforces the types as spaces interpretation. In topologya path is defined as a continuous function from the interval, in homotopytype theory we have the following lemma.

Lemma 4.10. Assume we are given a type A : U , then we have:

I → A '∑

(x,y):A×A

x = y

Page 53: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

53

Proof. Since for some given f : I → A we have

apf (seg) : f(0I) = f(1I),

we can set ((f(0I), f(1I)), apf (seg)

):

∑(x,y):A×A

x = y.

If we are given s :∑

(x,y):A×A x = y, we can define a function

f : I → A

by recursion on the interval. To this end we set:

• f(0I) :≡ π1

(π1(s)

)• f(1I) :≡ π2

(π1(s)

)• apf (seg) := π2(s)

Next we want to show that the above functions define an equivalence. Soassume we start of with f : I → A. The above method gives a term((

f(0I), f(1I)), apf (seg)

):

∑(x,y):A×A

x = y

and from this we define a function g : I → A by recursion, such that:

(i) g(0I) :≡ f(0I)

(ii) g(1I) :≡ f(1I)

(iii) apg(seg) := apf (seg)

Since we havereflf(0I) : g(0I) = f(0I)

andreflf(1I) : g(1I) = f(1I)

and lastly, since by theorem 3.26 we have that

transporti 7→f(i)=g(i)(seg, reflf(0I)) = reflf(1I)

equalsapf (seg)−1 � apg(seg) = reflf(1I),

which is proven by ((iii)), we get f ∼ g by the induction principle of theinterval. Function extensionality gives f = g and therefore shows that weend up with what we started with. Conversely assume we start of with

Page 54: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

54 ANDREAS FRANZ

s :∑

(x,y):A×A x = y. Then, firstly we get a function

f : I → A,

such that:

• f(0I) :≡ π1

(π1(s)

)• f(1I) :≡ π2

(π1(s)

)• apf (seg) := π2(s)

This function is then mapped to((f(0I), f(1I)

), apf (seg)

):

∑(x,y):A×A

x = y

and we aim to show

s =∑(x,y):A×A x=y

((f(0I), f(1I)

), apf (seg)

).

By theorem 3.16, it suffices to provide a path

p :(f(0I), f(1I)

)= π1(s),

such thattransport(x,y) 7→x=y

(p, apf (seg)

)= π2(s).

But we have by definition of f that(f(0I), f(1I)

)≡(π1

(π1(s)

), π2

(π1(s)

))and since by lemma 2.10 we have(

π1

(π1(s)

), π2

(π1(s)

))= π1(s),

we can set p :≡ reflπ1(s). Then, since

transport(x,y) 7→x=y(reflπ1(s)) ≡ idx=y,

we are left to show thatapf (seg) = π2(s),

which is inhabited by the definition of f . �

For the next examples we need the following definitions.

Page 55: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

55

Definition 4.11. We define the type of pointed types as

U∗ :≡∑A:U

A.

If we are given an inhabitant (A, ∗A) : U∗, we say the type A : U is pointed.

Remark 4.12. Usually we will just speak of a pointed type A : U and implicitlyassume that ∗A : A has been chosen.

Later on we will need also the following.

Definition 4.13. Assume we are given two pointed types (A, ∗A) : U∗ and(B, ∗B) : U∗. We define the type of pointed maps:

Map∗(A,B) :≡∑

f :A→B∗B =B f(∗A)

If we are given an inhabitant (f, pf ) : Map∗(A,B), we say that f is base-point preserving or f is a pointed function and call pf a proof that fis base-point preserving. We make Map∗(A,B) a pointed type by setting((∗B)A, refl∗B

)as its base-point.

Remark 4.14. Assume we want to show that two pointed maps

(f, pf ), (g, pg) : Map∗(A,B)

are equal. By theorem 3.16, this means that we need to give a path

q : f = g,

such thattransporth7→∗B=h(∗A)(q, pf ) = pg.

By theorem 3.26, this means to show that

pf � apeval(∗A)(q) = pg

and using lemma 3.11, this is equivalent to

pf � happly(q)(∗A) = pg.

In particular, if we aim to show that some given pointed function (f, pf ) :

Map∗(A,B) is equal to the base-point ((∗B)A, refl∗B ) in Map∗(A,B), we canconcatenate the above equation with happly(q)(∗A)−1 from the right and this

Page 56: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

56 ANDREAS FRANZ

givespf = happly(q)(∗A)−1.

In words this reads that the proof that f is base-point preserving is equalto the proof that the constant function (∗B)A is equal to f , evaluated atthe base-point. The same argumentation gives that in order to show that(f, pf ) : Map∗(A,A) is equal to (idA, refl∗A), we need a

q : f = idA,

such thatpf = happly(q)(∗A)−1.

Example 4.15 (Wedge sum). The wedge sum A ∨ B is a pushout of twopointed types A and B. It can be thought of as the sum A+B of A and B,where the base-points ∗A and ∗B are identified by a path glue.

A B

∗B∗A

glue

Remark 4.16. We write ∗A over the arrows to denote the constant functionλ ? .∗A. For functions out of the unit 1→ A to some pointed type A, if wedo not write anything over the arrows, we always mean the constant function(∗A)1.

The wedge sum A ∨B of two pointed types A and B is the pushout of thesquare:

1

Glue

∗B//

∗A

��

B

inr

��

Ainl

// A ∨B

Page 57: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

57

We make A ∨B a pointed type, by setting ∗A∨B :≡ inl(∗A).

Example 4.17 (Suspension). Te suspension is the pushout of the square:

A

merid

//

��

1

inr

��

1inl

// ΣA

We make the suspension a pointed type by choosing inl(?) as its base-point.We also introduce a special notation and set:

• N :≡ inl(?)

• S :≡ inr(?)

Definition 4.18. The type with just two points is the suspension of theempty type:

2 :≡ Σ0

We introduce a special notation and set

• 02 :≡ inl(?) and• 12 :≡ inr(?).

Definition 4.19 (The circle). The circle is the suspension of the space withtwo points:

S1 :≡ Σ2

The following lemma shows that the circle has the universal property thatwe would expect.

Lemma 4.20. Assume we a given a pointed type A : U , then it holds that

Map∗(S1, A) ' (∗A =A ∗A)

Proof. Assume that we are given a base-point preserving function

(f, pf ) : Map∗(S1, A).

Then we have in particular that

pf : ∗A = f(N),

Page 58: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

58 ANDREAS FRANZ

apf(merid(12)

): f(N) =A f(S)

andapf(merid(02)

)−1: f(S) =A f(N).

Hence we can define

pf � apf(merid(12)

)� apf

(merid(02)

)−1 � p−1f : (∗A = ∗A).

Conversely, assume we are given a loop l : (∗A = ∗A), then we can define afunction g : S1 → A by the recursion principle of the suspension. To this endwe define:

• g(N) :≡ g(S) :≡ ∗A• apg

(merid(02)

):= refl∗A

• apg(merid(12)

):= l

Then we have that g is base-point preserving by refl∗A . We want to showthat these functions are mutually inverse. So assume we start of withf : Map∗(S1, A). We have to show that the function g, defined by

• g(N) :≡ g(S) :≡ ∗A ,• apg

(merid(02)

):= refl∗A and

• apg(merid(12)

):= pf � apf

(merid(12)

)� apf

(merid(02)

)−1 � p−1f

is equal to (f, pf ). So we consider the type family

P : S1 → U ,

defined by the equation

P (s) :≡ g(s) = f(s).

If s ≡ N, we compute P (N) ≡ (∗A = f(N)) and hence we can define

pf : P (N).

If s ≡ S, we compute P (S) ≡ (∗A = f(S)) and hence we can define

pf � apf(merid(02)

): P (N).

It is left to show for every b : 2 that

transportP (merid(b), pf ) = pf � apf(merid(02)

).

Page 59: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

59

By theorem 3.26, this means to show for every b : 2 that

apg(merid(b)

)−1 � pf � apf(merid(b)

)= pf � apf

(merid(02)

).

If b ≡ 02, we use the definition of g and then we have to show that

pf � apf(merid(02)

)= pf � apf

(merid(02)

),

which is inhabited by reflreflpf � apf (merid(02)). Similarly, if b ≡ 12, we have to

show

pf � apf(merid(02)

)� apf

(merid(12)

)−1 � p−1f

� pf � apf(merid(12)

)=

= pf � apf(merid(02)

),

which, after canceling inverses, is again inhabited by reflreflpf � apf (merid(02)). By

the induction principle of the circle, this gives an inhabitant

H : g ∼ f,

such that, over the points we have:

• H(N) ≡ pf• H(S) ≡ pf � apf

(merid(02)

)Function extensionality gives:

functExt(H) : g = f

Now we use theorem 3.16 to show that

(f, pf ) =Map∗(S1,A) (g, refl∗A).

This requires us to show that

transporth7→∗A=h(N)(functExt(H), pg) = pf .

By theorem 3.26, lemma 3.11 and lemma 4.9, this means to show that

H(N) = pf ,

but since H(N) ≡ pf , we can inhabit this type by reflpf .Conversely, assume we start of with a loop l : ∗A = ∗A and define:

• g(N) :≡ g(S) :≡ ∗A• apg

(merid(02)

):= refl∗A

• apg(merid(12)

):= l

Page 60: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

60 ANDREAS FRANZ

We want to show that

l = pg � apg(merid(12)

)� apg

(merid(02)

)−1 � p−1g .

But pg ≡ refl∗A and by checking the above definitions, we see that we canuse refll to inhabit this type. �

We note that one can use suspensions to define general n-spheres Sn

for some natural number n, where, as indicated above, the type with twoinhabitants plays the role of the “0-sphere”, in accordance to what one woulddefine in topology. We can depict the situation for the first few steps. Thesuspension of the empty type 2 simply consists of two points:

•02

•12

By adding paths between those two points, we get the circle:

•N

•S

merid(12)merid(02)

Making the points of the circle into paths, we get a sphere:N

S

S1

4.2. Pushout functions. Next, we reduce the task to define a functionbetween pushout types A tC B → A′ tC′ B′ to giving functions α : A→ A′,

Page 61: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

61

β : B → B′ and γ : C → C ′. This will be done in such a way that if α, βand γ are equivalences, then so is the resulting function.

Lemma 4.21. Assume, we are given types A,B,C,A′, B′, C ′ : U , functionsf : C → A, g : C → B, f ′ : C ′ → A′, g′ : C ′ → B′ and additionallytwo commutative squares, i.e. functions α : A → A′, β : B → B′ andγ : C → C ′ together with two dependent functions Coml : (f ′ ◦ γ) ∼ (α ◦ f)

and Comr : (g′ ◦ γ) ∼ (β ◦ g), as depicted below:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A′ C ′f ′

oo

g′// B′

Then, there is a pushout function αtγ β : AtC B → A′ tC′ B′, such that:

• (α tγ β) ◦ inl ≡ inl′ ◦ α• (α tγ β) ◦ inr ≡ inr′ ◦ β• apαtγβ

(Glue(z)

)= apinl′

(Coml(z)

)−1 � Glue′(γ(z)

)� apinr′

(Comr(z)

)Proof. We apply the recursion principle of A tC B. To this end we check:

• Coml(z) : f ′ ◦ γ(z) = α ◦ f(z)

• Comr(z) : g′ ◦ γ(z) = β ◦ g(z)

• Glue′(γ(z)

): inl′ ◦ f ′ ◦ γ(z) = inr′ ◦ g′ ◦ γ(z)

This shows that

apinl′(Coml(z)

)−1 � Glue′(γ(z)

)� apinr′

(Comr(z)

)has the appropriate type

inl′ ◦ α ◦ f(z) = inr′ ◦ β ◦ g(z)

to define a function by the recursion principle for pushout types with compu-tation rules stated in the lemma. �

Remark 4.22. When we say that two squares as in lemma 4.21 commute,we always mean that we are given types A,B,C,A′, B′, C ′ : U , functions

Page 62: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

62 ANDREAS FRANZ

f : C → A, g : C → B, f ′ : C ′ → A′, g′ : C ′ → B′, α : A → A′,β : B → B′, γ : C → C ′ Coml : (f ′ ◦ γ) ∼ (α ◦ f) and dependent functionsComl : (f ′ ◦ γ) ∼ (α ◦ f) and Comr : (g′ ◦ γ) ∼ (β ◦ g) and we will generallynot write this down explicitly.

Remark 4.23. Assume we are given types A,B,C : U and we let α be thepushout function of the commutative squares:

A

idA

��

Coml

Cf

oog

//

idC

��

Comr

B

idB

��

A Cf

oog

// B

One might guess that α ∼ idAtCB , so let us try to proof it. We define a typefamily

P : A tC B → U ,

by the equationP (w) :≡ α(w) = w.

We computeα(inl(x)

)≡ inl(x)

and thereforereflinl(x) : P

(inl(x)

)and similarly

α(inr(y)

)≡ inl(y)

and thereforereflinr(y) : P

(inr(y)

).

Then it is left for us to show that

transportw 7→α(w)=w(Glue(z), reflinl(x)) = refl(inr(y)

and by theorem 3.26 this means to show that

apα(Glue(z)

)−1 � Glue(z) = refl(inr(y).

Page 63: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

63

Since α is a pushout function, we check the computation rules from lemma4.21, by which we have:

apα(Glue(z)

)= apinl(Coml) � Glue(z) � apinr

(Glue(z)

)Now we are stuck: to proceed, we need to know what the proofs of commu-tativity are. We see that it is generally not enough to assume that α ∼ α′,β ∼ β′ and γ ∼ γ′, to conclude that (α tγ β) ∼ (α′ tγ′ β′). We can howeverestablish sufficient conditions under which it is possible to do this and thiswill be done next. We note that we can still say something about the α fromabove, namely that it is an equivalence. We will prove this in lemma 4.28.

Lemma 4.24. Assume we are given H : α ∼ α′, Iβ ∼ β′ together withcommutative squares:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A

α′

��

Com′l

Cf

oog

//

γ

��

Com′r

B

β′

��

A′ C ′f ′

oo

g′// B′ A′ C ′

f ′oo

g′// B′

If we have additionally for every z : C proofs that

• Com′l(z) = Coml(z) � H(f(z)

)and

• Com′r(z) = Comr(z) � I(g(z)

),

then it holds for the pushout functions that

α tγ β ∼ α′ tγ β′.

Proof. We want to apply the induction principle of AtCB to proof the claim.So let us consider the type family

P : A tC B → U ,

defined by the equation

P (w) :≡ (α tγ β)(w) = (α′ tγ β′)(w).

Then we have thatapinl′

(H(x)

): P(inl(x)

)

Page 64: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

64 ANDREAS FRANZ

andapinr′

(I(y))

: P(inr(y)

)It is left for us to show:

transportP(

Glue(z), apinl′

(H(f(z)

)))= apinr′

(I(g(z)

))By theorem 3.26 this means to show:

(4) apαtγβ(Glue(z)

)−1�apinl′

(H(f(z)

))�apα′tγβ′

(Glue(z)

)= apinr′

(I(g(z)

))By definition of pushout functions, given in lemma 4.21, we have that

apαtγβ(Glue(z)

)−1= apinr′

(Comr(z)

)−1 � Glue′(γ(z)

)−1 � apinl′(Coml(z)

)and

apα′tγβ′(Glue(z)

)= apinl′

(Com′l(z)

)−1 � Glue′(γ(z)

)� apinr′

(Com′r(z)

).

By assumption we have that

• Com′l(z) = Coml(z) � H(f(z)

)and

• Com′r(z) = Comr(z) � I(g(z)

)and therefore, from lemma 3.3, we get that

apinl′(Com′l(z)

)−1

is equal to

apinl′

(H(f(z)

))−1� apinl′

(Coml(z)

)−1

andapinr′

(Com′r(z)

)is equal to

apinr′(Comr(z)

)� apinr′

(I(g(z)

)).

Therefore, we conclude that

apα′tγβ′(Glue(z)

)= apinl′

(H(f(z)

))−1� apinl′

(Coml(z)

)−1�

�Glue′(γ(z)

)� apinr′

(Comr(z)

)� apinr′

(I(g(z)

)).

Plugging everything into the left side of (4) gives:

apinr′(Comr(z)

)−1 � Glue′(γ(z)

)−1 � apinl′(Coml(z)

)�

Page 65: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

65

�apinl′

(H(f(z)

))� apinl′

(H(f(z)

))−1�

�apinl′(Coml(z)

)−1 � Glue′(γ(z)

)� apinr′

(Comr(z)

)� apinr′

(I(g(z)

))We can now cancel out inverses of apinl′

(H(f(z)

)), apinl′

(Com′l(z)

), Glue′

(γ(z)

)and apinr′

(Com′r(z)

)and this gives us that the left hand side of (4) equals

apinr′

(I(g(z)

)). �

Lemma 4.25. Assume we are given H : γ ∼ γ′ and commutative squares:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A

α

��

Com′l

Cf

oog

//

γ′

��

Com′r

B

β

��

A′ C ′f ′

oo

g′// B′ A′ C ′

f ′oo

g′// B′

If we have additionally for every z : C proofs that

• Com′l(z) = apf ′(H(z)

)−1 � Coml(z) and• Com′r(z) = apg′

(H(z)

)−1 � Comr(z) ,

then it holds for the pushout functions that

α tγ β ∼ α tγ′ β.

Proof. We want to apply the induction principle of AtCB to proof the claim.So let us consider the type family

P : A tC B → U ,

defined by the equation

P (w) :≡ (α tγ β)(w) = (α tγ′ β)(w).

Then we have thatreflinl′(α(x)) : P

(inl(x)

)and

reflinr′(β(y)) : P(inr(y)

).

It is left for us to show that:

transportP (Glue(z), reflinl′(α(x))) = reflinr′(β(y))

Page 66: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

66 ANDREAS FRANZ

By theorem 3.26 this means to show:

(5) apαtγβ(Glue(z)

)−1 � apαtγ′β(Glue(z)

)= reflinr′(β(y))

By definition of pushout functions, given in lemma 4.21 we have that

apαtγβ(Glue(z)

)−1= apinr′

(Comr(z)

)−1 � Glue′(γ(z)

)−1 � apinl′(Coml(z)

)and

apαtγ′β(Glue(z)

)= apinl′

(Com′l(z)

)−1 � Glue′(γ′(z)

)� apinr′

(Com′r(z)

)By the first assumption we have that

Com′l(z) = apf ′(H(z)

)−1 � Coml(z)

and therefore, from lemma 3.3, we get that the term apinl′(Com′l(z)

)−1 isequal to

apinl′(Coml(z)

)−1 � apinl′◦f ′(H(z)

).

By the second assumption we have that

Com′r(z) = apg′(H(z)

)−1 � Comr(z)

and therefore, from lemma 3.3, we get that the term apinr′(Com′r(z)

)is equal

toapinr′

(apg′

(H(z)

))−1� apinr′

(Comr(z)

).

Plugging everything in the left side of (5) gives:

apinr′(Comr(z)

)−1 � Glue′(γ(z)

)−1�

�apinl′(Coml(z)

)� apinl′

(Coml(z)

)−1�

�apinl′◦f ′(H(z)

)� Glue′

(γ′(z)

)� apinr′

(apg′

(H(z)

))−1� apinr′

(Comr(z)

)We can cancel out inverses of apinl′

(Com′l(z)

)and this leaves us with

(6)apinr′

(Comr(z)

)−1 � Glue′(γ(z)

)−1�

�apinl′◦f ′(H(z)

)� Glue′

(γ′(z)

)� apinr′

(apg′

(H(z)

))−1� apinr′

(Comr(z)

).

Lastly we note that

Glue′ :∏c′:C′

inl′(f ′(c′)

)= inr′

(g′(c′)

)

Page 67: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

67

and since we have for every z : C a path

H(z) : γ(z) =C′ γ′(z),

we can define a path

apdGlue′(H(z)

): apinl′◦f ′

(H(z)

)−1 �Glue′(γ(z)

)�apinr′◦g′

(H(z)

)= Glue′

(γ′(z)

),

where we used theorem 3.26. Plugging this in (6) leaves us with

apinr′(Comr(z)

)−1 � Glue′(γ(z)

)−1 � apinl′◦f ′(H(z)

)� apinl′◦f ′

(H(z)

)−1�

�Glue′(γ(z)

)� apinr′◦g′

(H(z)

)� apinr′

(apg′

(H(z)

))−1� apinr′

(Comr(z)

).

Canceling out all inverses shows that the left hand side of (5) equals reflinr′(β(y)).�

Corollary 4.26. Assume we are given H : α ∼ α′, I : β ∼ β′, J : γ ∼ γ′

together with commutative squares:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A

α′

��

Com′l

Cf

oog

//

γ′

��

Com′r

B

β′

��

A′ C ′f ′

oo

g′// B′ A′ C ′

f ′oo

g′// B′

If we have additionally for every z : C proofs that

• Com′l(z) = apf ′(J(z)

)−1 � Coml(z) � H(f(z)

)and

• Com′r(z) = apg′(J(z)

)−1 � Comr(z) � I(g(z)

),

then it holds for the induced functions

α tγ β ∼ α′ tγ′ β′

Proof. Immediate from lemma 4.24 and 4.25. �

Next we want to define a composition operation on pushout functions.

Page 68: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

68 ANDREAS FRANZ

Lemma 4.27. Assume, we are given four commutative squares:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A′

α′

��

Com′l

C ′f ′

oo

g′//

γ′

��

Com′r

B′

β′

��

A′′ C ′′f ′′

oo

g′′// B′′

We define proofs of commutativity by:

• Com′′l (z) :≡ Com′l(γ(z)

)� apα′

(Coml(z)

)• Com′′r(z) :≡ Com′r

(γ(z)

)� apβ′

(Comr(z)

)We let (α′ ◦ α tγ′◦γ β′ ◦ β) be the pushout function from the commutativesquares:

A

α′◦α

��

Com′′l

Cf

oog

//

γ′◦γ

��

Com′′r

B

β′◦β

��

A′′ C ′′f ′′

oo

g′′// B′′

Then we have:

(α′ tγ′ β′) ◦ (α tγ β) ∼ (α′ ◦ α tγ′◦γ β′ ◦ β)

Proof. We want to apply the induction principle of AtCB to proof the claim.So let us consider the type family

P : A tC B → U ,

Page 69: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

69

defined by the equation

P (w) :≡ (α′ tγ′ β′) ◦ (α tγ β)(w) = (α′ ◦ α tγ′◦γ β′ ◦ β)(w).

If w ≡ inl(x) for some x : A, we compute

(α′ tγ′ β′) ◦ (α tγ β)(inl(x)

)≡ (α′ tγ′ β′)

(inl′(α(x)

))≡ inl′′

(α′ ◦ α(x)

)and also

(α′ ◦ α tγ′◦γ β′ ◦ β)(inl(x)

)≡ inl′′

(α′ ◦ α(x)

).

Similarly, if w ≡ inr(y) for some y : B, we compute

(α′ tγ′ β′) ◦ (α tγ β)(inr(y)

)≡ (α′ tγ′ β′)

(inr′(β(y)

))≡ inr′′

(β′ ◦ β(y)

)and also

(α′ ◦ α tγ′◦γ β′ ◦ β)(inr(y)

)≡ inr′′

(β′ ◦ β(y)

).

Therefore we have that

reflinl′′(α′◦α(x)) : P(inl(x)

),

and in the same way we conclude

reflinr′′(β′◦β(y)

) : P(inr(y)

).

To finish the inductive step, we need to show for every z : C that:

(7) transportP (Glue(z), reflinl′′(α′◦α(x))) = reflinr′′(β′◦β(y)

)By theorem 3.26 this means to show:(8)

ap(α′tγ′β′)◦(αtγβ)

(Glue(z)

)−1 � ap(α′◦αtγ′◦γβ′◦β)

(Glue(z)

)= reflinr′′(β′◦β(y))

To proceed, we want to compute

(i) ap(α′tγ′β′)◦(αtγβ)

(Glue(z)

)and

(ii) ap(α′◦αtγ′◦γβ′◦β)

(Glue(z)

).

We start by checking the definition of pushout functions from lemma 4.21,which gives that ap(αtγβ)

(Glue(z)

)equals

apinl′(Coml(z)

)−1 � Glue′(γ(z)

)� apinr′

(Comr(z)

).

Page 70: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

70 ANDREAS FRANZ

Since (α′ tγ′ β′) ◦ inl′ ≡ inl′′ ◦ α′ and similarly (α′ tγ′ β′) ◦ inr′ ≡ inr′′ ◦ β′, wesee that

ap(α′tγ′β′)

(apinl′

(Coml(z)

)−1 � Glue′(γ(z)

)� apinr′

(Comr(z)

))=

= apinl′′◦α′(Coml(z)

)−1 � ap(α′tγ′β′)

(Glue′

(γ(z)

))� apinr′′◦β′

(Comr(z)

).

We use again the definition of pushout functions, by which we have that

ap(α′tγ′β′)

(Glue′

(γ(z)

))equals:

apinl′′

(inr′(β(y)

))−1� Glue′′

(γ′(γ(z)

))� apinr′′

(Com′r

(γ(z)

)).

Putting everything together, we see that (i) equals

apinl′′◦α′(Coml(z)

)−1 � apinl′′

(inr′(β(y)

))−1� Glue′′

(γ′(γ(z)

))�

�apinr′′

(Com′r

(γ(z)

))� apinr′′◦β′

(Comr(z)

)Next, we check again the definition of pushout functions from lemma 4.21,by which (ii) equals

(9) apinl′′(Com′′l (z)

)−1 � Glue′′(γ′(γ(z)

))� apinr′′

(Com′′r(z)

)and then we use the definitions of Com′′l and Com′′r , by which we have:

• apinl′′(Com′′l (z)

)≡ apinl′′

(inr′(β(y)

))� apinl′′(apα′

(Coml(z)

)• apinr′′

(Com′′r(z)

)≡ apinr′′

(Com′r

(γ(z)

))� apinr′′(apβ′

(Comr(z)

)Plugging these definitions in (9) shows that (ii) equals:

apinl′′◦α′(Coml(z)

)−1 � apinl′′

(inr′(β(y)

))−1� Glue′′

(γ′(γ(z)

))�

�apinr′′

(Com′r

(γ(z)

))� apinr′′◦β′

(Comr(z)

)We now see that (i) equals (ii) and this means that the left hand side of (8)equals a concatenation of inverse paths, which, by lemma 3.1, is equal toreflinr′′(β′◦β(y)). �

We noted above that it is generally not enough to assume that all verticalmaps of a pushout function are identity to conclude that this pushout function

Page 71: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

71

is the identity. The following lemma tells us however that such a pushoutfunction is always an equivalence.

Lemma 4.28. Assume we are given types A,B,C : U and we let α be thepushout function of the commutative squares:

A

idA

��

Coml

Cf

oog

//

idC

��

Comr

B

idB

��

A Cf

oog

// B

Then there exists a function β that is a quasi-inverse of α.

Proof. Firstly we note that we can define for every z : C proofs of commuta-tivity

Com′l(z) :≡ Coml(z)−1

andCom′r(z) :≡ Comr(z)

−1

and these proofs of commutativity also make the given squares commuteand therefore give a pushout function β. By lemma 4.27 we have that α ◦ βis equal to the induced function of a square, where the vertical maps areidentities and the proofs of commutativity are given by reflexivity. We usethe induction principle of A tC B to proof, that α ◦ β is pointwise equal tothe identity function. To this end we consider the type family

P : A tC B → U ,

defined by the equation

P (w) :≡ α ◦ β(w) = idAtCB(w).

It is obvious, that over the points, we can proof the claim by reflexivity. Thenwe need to show for every z : C that:

transportP (Glue(z), reflinl(f(z))) = reflinr(g(z))

Page 72: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

72 ANDREAS FRANZ

By theorem 3.26 this means to show:

(10) apα◦β(Glue(z)

)−1 � Glue(z) = reflinr(g(z))

But, since now the proofs of commutativity are pointwise equal to reflexivity,by definition of pushout functions, we have

apα◦β(Glue(z)

)−1= Glue(z)−1,

hence, by canceling inverse paths, we see, that the left hand side of (10)equals a concatenation of inverse paths, which, by lemma 3.1, is equal toreflinr(g(z)). The same reasoning applies to β ◦ α. �

4.3. Homotopy invariance of pushout types. We are now able to showthat pushout types are indeed invariant under homotopy.

Theorem 4.29. Assume, we are given the following squares:

A tC B

A

inl

<<

α

��

Coml

Cf

oog

//

γ

��

Comr

Glue

B

inr

bb

β

��

A′

inl′

""

C ′f ′

oo

g′//

Glue′

B′

inr′

||

A′ tC′ B′

Then, if α, β and γ are equivalences, there is also an equivalence

A tC B ' A′ tC′ B′

Page 73: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

73

Proof. Since α and β are equivalences, by lemma 3.15 there are maps α′ :

A′ → A, β′ : B′ → B and γ′ : C ′ → C together with proofs:

• H : α′ ◦ α ∼ idA

• H′ : α ◦ α′ ∼ idA′

• I : β′ ◦ β ∼ idB

• I′ : β ◦ β′ ∼ idB′

• J : γ′ ◦ γ ∼ idC

• J′ : γ ◦ γ′ ∼ idC′

We claim that from H, I and J′ we can define proofs of commutativity thatmake the following squares commute:

A′

α′

��

C ′f ′

oog′

//

γ′

��

B′

β′

��

A Cf

oog

// B

To this end, we firstly note that for every z : C we have that

apα′(Coml(z)

): α′(f ′(γ(z)

))= α′

(α(f(z)

))and

H(f(z)

): α′ ◦ α

(f(z)

)= f(z).

Therefore we can define for every z : C a path:

apα′(Coml(z)

)� H(f(z)

): α′(f ′(γ(z)

))= f(z)

Next we note that for every z′ : C ′ we have that

J′(z′) : γ ◦ γ′(z′) = c′

and therefore

apα′◦f ′(J(z′)

): α′(f ′(γ(γ′(z′))

))= α′

(f ′(z′)

).

Page 74: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

74 ANDREAS FRANZ

In particular, since for every z′ : C ′ we have that γ′(z′) : C, we can define forevery z′ : C ′ a path of type

f(γ′(z′)

)= α′

(f ′(z′)

)by

H(f(γ′(z′)

))−1� apα′

(Coml

(γ′(z′)

))−1� apα′◦f ′

(J′(z′)

).

To summarize, we can make the left square of the above diagram commuteby:

Com′l(z′) :≡ H

(f(γ′(z′)

))−1� apα′

(Coml

(γ′(z′)

))−1� apα′◦f ′

(J′(z′)

)Similarly, we have for every z : C that

apβ′(Comr(z)

): β′(g′(γ(z)

))= β′

(β(g(z)

))and

I(g(z)

): β′(β(g(z)

))= g(z).

Therefore we can define for every z : C a path:

I(g(z)

)−1 � apβ′(Comr(z)

)−1: g(z) = β′

(g′(γ(z)

))Then we use again that for every z′ : C ′ we have that

J′(z′) : γ ◦ γ′(z′) = c′

and therefore

apβ′(

apg′(J′(z′)

)): β′(g′(γ(γ′(z′))

))= β′

(g′(z′)

).

Then, since for every z′ : C ′ we have γ′(z′) : C, we can define for every z′ : C ′

a path of typeg(γ′(z′)

)= β′

(g′(z′)

)by

I(g(γ′(z′)

))−1� apβ′

(Comr

(γ′(z′)

))−1� apβ′

(apg′

(J′(z′)

)).

To summarize, we can make the right square of the above diagram commuteby:

Com′l(z′) :≡ I

(g(γ′(z′)

))−1� apβ′

(Comr

(γ′(z′)

))−1� apβ′

(apg′

(J′(z′)

))

Page 75: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

75

Putting everything together, we get the following commutative squares:

A

α

��

Coml

Cf

oog

//

γ

��

Comr

B

β

��

A′

α′

��

Com′l

C ′f ′

oo

g′//

γ′

��

Com′r

B′

β′

��

A Cf

oog

// B

By lemma 4.27, there is a proof

(α′ tγ′ β′) ◦ (α tγ β) = (α′ ◦ α) tγ′◦γ (β′ ◦ β),

where the right hand side of this equation is the pushout function of twocommutative squares, where proofs of commutativity are given by:

• Com′′l (z) :≡ Com′l(γ(z)

)� apα′

(Coml(z)

)• Com′′r(z) :≡ Com′r

(γ(z)

)� apβ′

(Comr(z)

)By Corollary 4.26, from H, I and J we get a path from (α′ ◦α)tγ′◦γ (β′ ◦β) tothe pushout function of two commutative squares, where all vertical maps areidentity. By lemma 4.28, there is a function δr, such that (α′tγ′β′)◦(αtγβ)◦δris the identity function.

By the same reasoning, where we now have to use H′, I′ and J′, we seethat also (αtγ β)◦ (α′tγ′ β′) is equal to the pushout function of commutativesquares, where all vertical maps are identity, hence by 4.28 there is a functionδl, such that δl ◦ (αtγ β) ◦ (α′ tγ′ β′) is the identity function. But this means(α tγ β) ◦ δr is right inverse to (α′ tγ′ β′) and δl ◦ (α tγ β) is left inverse to(α′ tγ′ β′). This shows, that (α′ tγ′ β′) is an equivalence. �

Page 76: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

76 ANDREAS FRANZ

5. The wedge sum

In example 4.15 we presented the wedge sum A ∨B of two pointed typesA and B. It was defined as the pushout of the square:

1

Glue

∗B//

∗A

��

B

inr

��

Ainl

// A ∨B

We made A ∨ B a pointed type, by setting ∗A∨B :≡ inl(∗A). From now onwe will shift our attention to the category of pointed maps and base-pointpreserving functions (see 4.11 and 4.13), i.e. every type A : U will come alongwith a specified base-point ∗A : A and every map f : A→ B will come alongwith a proof pf : ∗B = f(∗A) that f is base-point preserving.

Remark 5.1. In the definition of 4.15 we noted that for any two pointedtypes A,B : U also A ∨B is pointed, where we chose ∗A∨B :≡ inl(∗A) as itsbase-point. Similarly we have proofs that inlA∨B and inrA∨B are base-pointpreserving by reflinl(∗A) ≡ refl∗A∨B and glueA∨B respectively.

Remark 5.2. Assume we are given three pointed types A,B,C : U and base-point preserving functions (f, pf ) : Map∗(A,B) and (g, pg) : Map∗(B,C),then we can define a composition operation

_ ◦_ : Map∗(B,C)×Map∗(A,B)→ Map∗(A,C)

by(g, pg) ◦ (f, pf ) :≡

(g ◦ f, pg � apg(pf )

).

We check thatapg(pf ) : g(∗B) = g

(f(∗A)

)and

pg : ∗C = g(∗B)

and thereforepg � apg(pf ) : ∗C = g

(f(∗A)

)

Page 77: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

77

has appropriate type. We note that this is exactly how we defined the proofsof commutativity in lemma 4.27.

Lemma 5.3. Assume we are given two pointed types A,B : U . Then thereis an equivalence:

A ∨B ' B ∨A

Proof. Firstly, by applying the recursion principle of A ∨ B, we define afunction Φ : A ∨B → B ∨A:

• Φ(inlA∨B(x)

):≡ inrB∨A(x)

• Φ(inrA∨B(y)

):≡ inlB∨A(y)

• apΦ(glueA∨B) := glueB∨A

Similarly we define a function Ψ : B ∨A→ A ∨B:

• Φ(inlB∨A(y)

):≡ inrA∨B(y)

• Φ(inrB∨A(x)

):≡ inlA∨B(x)

• apΦ(glueB∨A) := glueA∨B

We want to show that Φ and Ψ are mutually inverse. It is obvious from thecomputation rules that

reflinlA∨B(x) : Ψ ◦ Φ(inlA∨B(x)

)= inlA∨B(x)

and thatreflinrA∨B(y) : Ψ ◦ Φ

(inrA∨B(y)

)= inrA∨B(y).

Then it is left to show that

transportw 7→Ψ◦Φ(w)=w(glueA∨B, reflinlA∨B(x)) = reflinrA∨B(y).

By theorem 3.26 this means to show:

apΨ◦Φ(glueA∨B)−1 � glueA∨B = reflinrA∨B(y).

From the computation rules it is immediate that

apΨ◦Φ(glueA∨B)−1 = glue−1A∨B

and hence the claim follow from lemma 3.1. The other direction is completelyanalogue. �

In the main result of this section we establish that the wedge sum is thecoproduct in the category of pointed types and base-point preserving maps

Page 78: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

78 ANDREAS FRANZ

(see 5.8). The coproduct of two objectsX and Y in some category is the objectX t Y together with two morphisms injl : X → X t Y and injr : Y → X t Y ,such that for any object Z in the category and any two morphisms f : X → Z

and g : Y → Z, there is a unique morphism f t g : X t Y → Z for which(f t g) ◦ injl = f and (f t g) ◦ injr = g. We continue with our discussion ofthe wedge sum by considering a special instance of pushout functions.

Lemma 5.4. Assume we are given two pointed types A,B : U together withbase-point preserving maps (α, pα) : Map∗(A,A′) and (β, pβ) : Map∗(B,B′).We let:

• inl : A→ (A ∨B)

• inr : B → (A ∨B)

• glue : inl(∗A) =(A∨B) inr(∗B)

• inl′ : A′ → (A′ ∨B′)• inr′ : B′ → (A′ ∨B′)• glue′ : inl′(∗A′) =(A′∨B′) inr(∗B′)

There is a canonical function α∨ β : A∨B → A′ ∨B′, called the wedge of αand β, such that:

• α ∨ β ◦ inl ≡ inl′ ◦ α• α ∨ β ◦ inr ≡ inr′ ◦ β• ap(α∨β)(glue) = apinl′(pα)−1 � glue′ � apinr′(pβ)

What is more, apinl′(pα) proves that α ∨ β is base-point preserving.

Proof. We define α ∨ β to be the pushout function of the two commutativesquares:

A

α

��

1∗A

oo∗B

//

��

B

β

��

A′ 1∗A′oo

∗B′// B′

This function has the appropriate computation rules by lemma 4.21. Lastlywe check that

pα : ∗A′ = α(∗A)

Page 79: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

79

and henceapinl′(pα) : inl′(∗A′) = inl′

(α(∗A)

).

Since by definition∗A′∨B′ ≡ inl′(∗A′)

and(α ∨ β)(∗A∨B) ≡ (α ∨ β)

(inl(∗A)

)≡ inl′

(α(∗A)

),

it holds indeed that apinl′(pα) proves that (α∨β) is base-point preserving. �

Next, we consider the pushout function δ : A ∨ A → A tA A of thecommutative squares:

A

idA

��

refl∗A

1∗A

oo∗A

//

∗A

��

refl∗A

A

idA

��

A AidA

oo

idA

// A

We make AtAA a pointed type by setting inl∗A as its base-point. By remark4.2 there is an equivalence Φ : A tA A→ A, which is base-point preservingby refl∗A and this gives us a function

(11) Col :≡ Φ ◦ δ

of typeA ∨A→ A,

such that:

• Col ◦ inl ≡ idA

• Col ◦ inr ≡ idA

• apCol(glue) = refl∗A

What is more, Col is base-point preserving by reflinl∗A. With this at hand, to

define a function h : A ∨B → C, it suffices to give two base-point preservingfunctions f : A → C and g : B → C, since we may wedge f and g and

Page 80: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

80 ANDREAS FRANZ

compose with Col. We introduce a special notation and set:

f ∨c g :≡ Col ◦ (f ∨ g)

Lemma 5.5. Assume we are given two pointed types A,B : U , then we candefine the left and right projections πl : A ∨ B → A and πr : A ∨ B → B,such that:

• πl(inl(x)

)≡ x

• πl(inr(y)

)≡ ∗A

• apπl(glue) = refl∗A• πr

(inl(x)

)≡ ∗B

• πr(inr(y)

)≡ y

• apπl(glue) = refl∗B

What is more πl is base-point preserving by refl∗A and πr is base-point pre-serving by refl∗B .

Proof. We can define πl as the collapsed pushout function of the commutativesquares

A

idA

��

refl∗A

1∗A

oo∗B

//

∗A

��

refl∗A

B

∗A

��

A AidA

oo

idA

// A

and πr as the collapsed pushout function of the commutative squares

A

∗B

��

refl∗B

1∗A

oo∗B

//

∗B

��

refl∗B

B

idB

��

B BidB

oo

idB

// B

Page 81: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

81

These functions have the appropriate computation rules by lemma 4.21.Lastly we compute

πl(∗A∨B) ≡ πl(inr(∗B)

)≡ ∗A

andπr(∗A∨B) ≡ πr

(inr(∗B)

)≡ ∗B,

therefore refl∗A and refl∗B proof that πl and πr are base-point preservingrespectively. �

Lemma 5.6. Assume we are given two pointed types A,B : U . We let

inlA∨B ∨c inrA∨B

be the collapsed pushout function of the commutative squares with proofs ofcommutativity given by

pinlA∨B :≡ reflinlA∨B(∗A)

andpinrA∨B :≡ glueA∨B.

Then it holds that:inlA∨B ∨c inrA∨B ∼ idA∨B

Proof. We use the induction principle of A ∨B to proof the claim. To thisend, we let:

P (w) :≡ inlA∨B ∨c inrA∨B(w) = w

We compute

(inlA∨B ∨c inrA∨B)(inlA∨B(x)

)≡ Col ◦ inl(A∨B)∨(A∨B) ◦ inlA∨B(x) ≡ inlA∨B(x)

and

(inlA∨B∨c inrA∨B)(inrA∨B(y)

)≡ Col◦ inl(A∨B)∨(A∨B) ◦ inrA∨B(y) ≡ inrA∨B(y)

Therefore we can set

reflinlA∨B(∗A) : P(inlA∨B(∗A)

)and

reflinrA∨B(∗B) : P(inrA∨B(∗B)

).

Page 82: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

82 ANDREAS FRANZ

Then, we need to show:

transportP (glueA∨B, reflinlA∨B(∗A)) = reflinrA∨B(∗B)

By theorem 3.26 this means to show:

(12) ap(inlA∨B∨cinrA∨B)(glueA∨B)−1 � glueA∨B = reflinrA∨B(∗B)

By definition, inlA∨B and inrA∨B are base-point preserving by

pinlA∨B :≡ reflinlA∨B(∗A)

andpinrA∨B :≡ glueA∨B

respectively. Therefore by the computation rules for pushout functions fromlemma 4.21, we have that apinlA∨B∨inrA∨B (glueA∨B) equals:

(13) glue(A∨B)∨(A∨B)� apinr(A∨B)∨(A∨B)

(glueA∨B)

Lastly we note that by definition of Col in 11 we have that

apCol(glue(A∨B)∨(A∨B)) = refl∗(A∨B)

and since Col ◦ inr(A∨B)∨(A∨B) is the identity function we have that

apCol◦inr(A∨B)∨(A∨B)(glueA∨B) = glueA∨B.

But this means that

apCol

(glue(A∨B)∨(A∨B)

� apinr(A∨B)∨(A∨B)(glueA∨B)

)=

= apCol

(glue(A∨B)∨(A∨B)

)� apCol

(apinr(A∨B)∨(A∨B)

(glueA∨B))

=

= refl∗(A∨B)� glueA∨B = glueA∨B,

where in the first step we used lemma 3.4 and in the last step we used lemma3.1. But this means, that the left hand side of (12) is equal to a concatenationof inverse paths and therefore equal to reflinrA∨B(∗B), again by lemma 3.1. �

Lemma 5.7. Assume we are given two pointed types A,B : U and a base-point preserving map (f, pf ) : Map∗(A,B). Then we have:

f ◦ ColA ∼ (f ∨c f)

Page 83: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

83

Proof. We aim to proof the claim by applying the induction principle forA ∨A′. So let us consider the type family

R : A ∨A′ → U

defined by the equation

R(w) :≡(f ◦ ColA(w)

)=(ColB ◦ (f ∨ f)(w)

).

By definition of Col in 11 we have that

ColA ◦ inlA∨A ≡ idA

and thereforef ◦ ColA ◦ inlA∨A ≡ f.

Similarly, by definition of (f ∨ f) in lemma 5.4, we have that

(f ∨ f) ◦ inlA∨A ≡ inlB∨B ◦ f

and using again the definition of Col in 11 that

ColB ◦ inlB∨B ≡ idB.

Putting the last equations together gives us

ColB ◦ (f ∨ f) ◦ inlA∨A ≡ ColB ◦ inlB∨B ◦ f ≡ f

and this means that for every x : A we can set

reflf(x) : R(inlA∨A(x)

)and similarly

ColB ◦ (f ∨ f) ◦ inrA∨A ≡ ColB ◦ inrB∨B ◦ f ≡ f

and this means that for every x : A we can set

reflf(x) : R(inrA∨A(x)

).

Then, what is left is to show that

transportR(glueA∨A, reflf(∗A)) = reflf(∗A).

By theorem 3.26 this means to show:

(14) apf◦ColA(glueA∨A)−1 � ap(f∨cf)(glueA∨A) = reflf(∗A)

Page 84: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

84 ANDREAS FRANZ

But the definition of Col in 11 gives

apColA(glueA∨A) = refl∗A

and hence

apf◦ColA(glueA∨A)−1 � ap(f∨cf)(glueA∨A) =

= apf (refl∗A)−1 � ap(f∨cf)(glueA∨A) =

= ap(f∨cf)(glueA∨A),

where we used lemmas 3.4 and 3.1. Lastly we check again the definition ofCol, by which we have

• Col ◦ inl ≡ idA ,• Col ◦ inr ≡ idA and• apCol(glue) = refl∗A

and then we use computation rules for the wedge of functions, provided in5.4, which gives us that

apf∨f (glueA∨A) = apinlB∨B (pf ) � glueB∨B � apinrB∨B (pf )

and therefore

ap(f∨cf)(glueA∨A) =

= apCol

(apinlB∨B (pf ) � glueB∨B � apinrB∨B (pf )

)=

= pr−1f

� prf .

This shows that the left hand side of (14) is equal to a concatenation ofinverse paths and the proof is proven by lemma 3.1. �

We can now proof that the wedge sum is the coproduct in the category ofpointed types and base-point preserving maps.

Proposition 5.8. The wedge sum is the coproduct in the category of pointedtypes and base-point preserving maps

Proof. For any two pointed maps f : A→ C and g : B → C, we have thatf ∨c g : A ∨B → C has appropriate type. It is left to show uniqueness. Soassume, we are given pointed types A,B,C : U together with base-point

Page 85: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

85

preserving functions functions (f, pf ) : Map∗(A,C), (g, pg) : Map∗(B,C) and(α, pα) : Map∗(A ∨B,C), such that:

• (α, pα) ◦ (inl, glue) =Map∗(A,C) (f, pf )

• (α, pα) ◦ (inr, refl∗A∨B ) =Map∗(B,C) (g, pg)

Now firstly we recall thatpinl ≡ refl∗A∨B

andpinr ≡ glue.

We then use 5.2, by which we have that

(α, pα) ◦ (inl, refl∗A∨B ) ≡(α ◦ inl, pα

)and

(α, pα) ◦ (inr, glue) ≡(α ◦ inr, pα � apα(glue)

).

By theorem 3.16 we get that(α ◦ inl, pα

)=Map∗(A,C) (f, pf )

is equivalent to ∑p:α◦inl=f

transporth7→∗C=h(∗A)(p, pα) = pf .

Hence we may assume that we are given an inhabitant pl : α ◦ inr = f , suchthat we have that

transporth7→h(∗A)=∗C (pl, pα) = pf .

We use theorem 3.26, lemma 3.11 and remark 3.5, by which we have

transporth7→h(∗A)=∗C (pl, pα) =

= apeval(∗A)(pl) � pα =

= happly(pl)(∗A)−1 � pα.

Therefore, we get that

(15) pα � happly(pl)(∗A) = pg.

Page 86: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

86 ANDREAS FRANZ

We note thathapply(pl) :

∏x:A

α ◦ inl(x) = f(x).

Similarly (α ◦ inr, pα � apα(glue)

)=Map∗(B,C) (g, pg)

is equivalent to∑p:α◦inr=g

transporth7→∗C=h(∗B)(p, pα � apα(glue)) = pg

and therefore we may assume that we are given pr : α ◦ inr = g, such that

transporth7→∗C=h(∗B)(pr, pα � apα(glue)) = pg.

We use again theorem 3.26, lemma 3.11 and remark 3.5, by which we have

transporth7→∗C=h(∗B)(pr, pα � apα(glue)) =

= pα � apα(glue) � apeval(∗B)(pr) =

= pα � apα(glue) � happly(pr)(∗B)

Therefore, when we abbreviate pα◦inr ≡ pα � apα(glue), we have

(16) pα◦inr� happly(pr)(∗B) = pf

and we note that

happly(pr) :∏y:B

α ◦ inr(y) = g(y).

By lemma 5.6, inl ∨c inr is the identity function and using lemma 5.7, we get:

α ∼ α ◦ (inl ∨c inr) ∼ (α ◦ inl) ∨c (α ◦ inr)

Lastly, by 4.24, equations (16) and (15) suffice to inhabit:

(α ◦ inl) ∨c (α ◦ inr) ∼ f ∨c g

Then, function extensionality shows uniqueness. �

6. The smash product

Next we consider the smash product of pointed types. The definition ofthe smash product relies on the product A×B from section 2 of two pointed

Page 87: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

87

types A and B. We make A×B a pointed type by choosing (∗A, ∗B) as itsbase-point.

Remark 6.1. We note that, if we are given base-point preserving maps(α, pα) : Map∗(A,A′) and (β, pβ) : Map∗(B,B′), then, by corollary 3.18, wehave that pair=(pα, pβ) proves that (α, β) is base-point preserving.

Definition 6.2. Assume we are given two pointed types A,B : U . We letinjl : A→ A×B be the left injection, defined by the equation

injl(x) :≡ (x, ∗B),

which is base-point preserving by refl(∗A,∗B) and similarly injr : B → A×Bthe right injection, defined by the equation

injr(y) :≡ (∗A, y),

which is base-point preserving by refl(∗A,∗B) as well. The smash product A∧Bof A and B is the pushout of the following square:

A ∨B

Glue

injl∨cinjr//

��

A×B

[_,_]

��

1inl

// A ∧B

We make A ∧B a pointed type, by setting ∗A∨B :≡ inl(?)

Proposition 6.3. Assume we are given two pointed types A,B : U . Thenthere is an equivalence

A ∧B ' B ∧A

Proof. We denote by

• injl : A→ A×B,• injr : B → A×B,• inj′l : B → B ×A and• inj′r : A→ B ×A

the respective injections, by

δ : A ∨B → B ∨A

Page 88: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

88 ANDREAS FRANZ

the equivalence from lemma 5.3 and lastly define

γ : A×B → B ×A

by the equationγ(x, y) :≡ (y, x),

which obviously is an equivalence. By theorem 4.29, in order to proof theabove proposition, it suffices to show that∏

w:A∨B(inj′l ∨c inj′r) ◦ δ(w) = γ ◦ (injl ∨c injr)(w).

We compute

(inj′l ∨c inj′r) ◦ δ ◦ inlA∨B(x) ≡ (inj′l ∨c inj′r)(inrB∨A(x)

)≡ (∗B, x),

(inj′l ∨c inj′r) ◦ δ ◦ inrA∨B(y) ≡ (inj′l ∨c inj′r)(inlB∨A(y)

)≡ (y, ∗A),

γ ◦ (injl ∨c injr)(inlA∨B(x)

)≡ γ(x, ∗B) ≡ (∗B, x),

andγ ◦ (injl ∨c injr)

(inrA∨B(y)

)≡ γ(∗A, y) ≡ (y, ∗A).

Therefore, over the points we can proof the claim by reflexivity. Then it isleft to show that

transportw 7→(inj′l∨cinj′r)◦δ(w)=γ◦(injl∨cinjr)(w)(glueA∨B, refl(∗B ,x)) = refl(y,∗A).

But since the injections are base-point preserving by reflexivity and

apδ(glueA∨B) = glueB∨A,

this follows immediately from theorem 3.26. �

Remark 6.4. The smash product can be thought of the product where allpairs for which the first coordinate is the base-point and all pairs for whichthe second coordinate is the base-point are connected by a path to an externalpoint (the base-point of the smash product). The ambiguity of this descriptionlies in the fact that, as it stands, it gives two paths when both coordinates arethe base-point. We want to establish that these paths have to be homotopicto each other. So assume we are in the situation of definition 6.2. We considerthe type family P : A ∨B → U , defined by the equation

P (w) :≡(∗A∧B = [_,_] ◦ (injl ∨c injr)(w)

).

Page 89: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

89

Then it holds thatGlue :

∏w:A∨B

P (w)

and lemma 3.7 gives us an inhabitant

apdGlue(glue) : transportP(glue,Glue

(inl(∗A)

))= Glue

(inr(∗B)

).

From theorem 3.26 we get that the left hand side of the above equality isequal to

Glue(inl(∗A)

)� ap[_,_]◦(injl∨cinjr)

(glue) = Glue(inr(∗B)

).

We recall that injl and injr are base-point preserving by reflexivity andtherefore, by the definitions of Col in 11 and the wedge of functions fromlemma 5.4, we have that

apinjl∨cinjr(glueA∨B) = refl(∗A,∗B).

But, using lemma 3.1, this means that

apdGlue(glue) : Glue(inl(∗A)

)= Glue

(inr(∗B)

)Remark 6.5. We want to take a closer look at the recursion principle forthe smash product. We recall from definition 4.1 that, in order to define afunction of type A ∧ B → C for some given type C : U , we need to give afunction

f : A×B → C

together with a dependent function

Com :∏

w:A∨B∗A∧B = f ◦ (injl ∨c injr)(w).

In other words, given some function f : A× B → C, we need to provide adependent function Com that makes the square

A ∨B

Com

injl∨cinjr//

��

A×B

f

��

1 // C

Page 90: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

90 ANDREAS FRANZ

commute. We claim that this can be done by giving the following data:

• For every x : A a proof BPP(x) : ∗C = f(x, ∗B) that the functionλy.f(x, y) is base-point preserving (in particular this means that f isbase-point preserving).• For every y : B a proof CON(y) : ∗C = f(∗A, y), i.e. a proof that theconstant function (∗C)B is pointwise equal to the function λy.f(∗A, y)

(by function extensionality this also means that the functions areequal).• A path of type BPP(∗A) = CON(∗B) between the proof that λy.f(∗A, y)

is base-point preserving and the proof that it is constant at ∗B.To see that this data really suffices, we note that the first two points are justthe proof of commutativity over the points, that is we can set

• Com(inl(x)

):≡ BPP(x) and

• Com(inr(y)

):≡ CON(y).

To finish the definition of Com, it is then left to show that

transportw 7→∗C=f◦(injl∨cinjr)(w)(glue,BPP(∗A)) = CON(∗B)

and by theorem 3.26 this means to show

(17) BPP(∗A) � apf◦(injl∨cinjr)(glue) = CON(∗B).

As in the previous remark, since injl and injr are base-point preserving byreflexivity, the definitions of Col in 11 and the wedge of functions from lemma5.4 give us that

apinjl∨cinjr(glueA∨B) = refl(∗A,∗B).

Therefore, using lemma 3.1 and the computation rule from lemma 3.2, weget that

apf◦(injl∨cinjr)(glueA∨B)−1 � BPP(∗A) = refl−1

f(∗A,∗B)� BPP(∗A) = BPP(∗A)

and hence, in order to show (17), we need to inhabit

BPP(∗A) = CON(∗B).

Page 91: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

91

This is however inhabited by assumption. To summarize, the above datasuffices to define a proof of commutativity

Com :∏

w:A∨B∗C = f ◦ (injl ∨c injr)(w)

and thereby a function f ′ : A ∧B → C, such that

• f ′(∗A∧B) ≡ ∗C• f ′([x, y]) ≡ f(x, y)

• apf ′(Glue(w)

)= Com(w)

In particular, f ′ is a pointed function, where refl∗C proves that it is base-pointpreserving.

Remark 6.6. Let us assume that we are in the same situation as in remark6.5, i.e. that we are given pointed types A,B,C : U and some functionf : A×B → C such that we have:

• For every x : A a proof BPP(x) : ∗C = f(x, ∗B) that the functionλy.f(x, y) is base-point preserving (in particular this means that f isbase-point preserving).• For every y : B a proof CON(y) : ∗C = f(∗A, y), i.e. a proof that theconstant function (∗C)B is pointwise equal to the function λy.f(∗A, y)

(by function extensionality this also means that the functions areequal).• A path of type BPP(∗A) = CON(∗B) between the proof that λy.f(∗A, y)

is base-point preserving and the proof that it is constant at ∗B.We claim that this data suffices to define an inhabitant of

Map∗(A,Map∗(B,C)

).

It is obvious that for every x : A it holds that(λy.f(x, y),BPP(x)

): Map∗(B,C).

Then, what is left is to give a proof that the pointed function λy.f(∗A, y)

(where BPP(∗A) proves that it is base-point preserving) is equal to thebase-point in Map∗(B,C). But to this end we can use remark 4.14, wherefunctExt(CON) proves that λy.f(∗A, y) is constant together with the fact that

Page 92: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

92 ANDREAS FRANZ

happly is left-inverse to functExt and then we can use the last point in theabove list.

Proposition 6.7. Assume we are given three pointed types A,B,C : U .Then there is an equivalence:

Map∗(A ∧B,C) ' Map∗(A,Map∗(B,C)

)Proof. Step 1: We firstly assume that we are given some base-point preservingmap

(f, pf ) : Map∗(A ∧B,C).

Then we can composef : A ∧B → C

with the bracket[_,_] : A×B → A ∧B

and this gives a function

f ◦ [_,_] : A×B → C.

Next we consider the type family

P : A ∨B → U ,

given by the defining equation

P (w) :≡(∗A∧B = [_,_] ◦ (injl ∨c injr)(w)

)and note that for every w : A ∨B we have an inhabitant

Glue(w) : P (w).

Additionally we have an inhabitant

pf : ∗C = f(∗A∧B)

and therefore we can define a dependent function F of type∏w:A∨B

(∗C = f ◦ [_,_] ◦ (injl ∨c injr)(w)

)by the defining equation

(18) F(w) :≡ pf � apf(Glue(w)

).

Page 93: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

93

In particular, since it holds for every x : A that

(injl ∨c injr)(inl(x)

)≡ (x, ∗B),

we have for every x : A that

F(inl(x)

): ∗C = f([x, ∗B])

proves that the functionλy.f([x, y])

is base-point preserving and this gives an inhabitant of

A→ Map∗(B,C).

Next we note that since it holds for every y : B that

(injl ∨c injr)(inr(y)

)≡ (∗A, y),

we have for every y : B that

F(inr(y)

): ∗C = f([∗A, y])

proves that the constant function (∗C)B is pointwise equal to

λy.f([∗A, y]).

Lastly we note that

apdF(glue) : transportP (glue,F(inl(∗A)

)) = F

(inr(∗B)

)and by theorem 3.26 this is equivalent to

F(inl(∗A)

)� apf◦[_,_]◦(injl∨cinjr)

(glue) = F(inr(∗B)

).

But since injl and injr are base-point preserving by reflexivity and therefore,by the definitions of Col in 11 and the wedge of functions from lemma 5.4,we have that

apinjl∨cinjr(glueA∨B) = refl(∗A,∗B),

this gives thatF(inl(∗A)

)= F

(inr(∗B)

).

Page 94: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

94 ANDREAS FRANZ

By 6.6, this shows that the function λy.f([∗A, y]) is equal to the base-pointin Map∗(B,C). Putting everything together, we showed that

f ◦ [_,_] : A×B → C

gives rise to an inhabitant of

Map∗(A,Map∗(B,C)

).

Step 2: Conversely, assume that we are given

(g, pg) : Map∗(A,Map∗(B,C)

).

We firstly note thatg : A→ Map∗(B,C),

which means that the projection to the first coordinate gives for every x : A

a functionπ1

(g(x)

): B → C

and the projection to the second coordinate proves that this function isbase-point preserving

π2

(g(x)

): ∗C = π1

(g(x)

)(∗B).

Secondly we note that

pg : g(∗A) =Map∗(B,C)

((∗C)B, refl∗C

)and by theorem 3.16, from pg we get a path

plg : π1

(g(∗A)

)= (∗C)B

such that

prg : transporth7→∗C=h(∗B)(plg, π2

(g(∗A)

)) = refl∗C .

By theorem 3.26 we have that the left side of this equality is equal to

π2

(g(∗A)

)� apeval(∗B)(p

lg)

and then we can use 3.11, which gives us that

π2

(g(∗A)

)� apeval(∗B)(p

lg) = π2

(g(∗A)

)� happly(plg)(∗B)

Page 95: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

95

Putting everything together, we get an inhabitant of

π2

(g(∗A)

)� happly(plg)(∗B) = refl∗C

and concatenating with happly(plg)(∗B)−1 on both sides gives

π2

(g(∗A)

)= happly(plg)(∗B)−1.

We summarize, what we established so far in this step.

• We have for every x : A a proof π2

(g(x)

): ∗C = π1

(g(x)

)(∗B) that

λy.π1

(g(x)

)(y) is base-point preserving.

• For every y : B a proof happly(plg)(y)−1 : ∗C = π1

(g(∗A)

)(y), i.e.

a proof that the constant function (∗C)B is pointwise equal to thefunction λy.π1

(g(∗A)

)(y).

• A path of type π2

(g(∗A)

)= happly(plg)(∗B)−1 between the proof

that λy.π1

(g(∗A)

)(y) is base-point preserving and the proof that it

is constant at ∗B.By remark 6.5 (and using the recursion principle for product types), thisgives rise to a function f ′ of type A ∧B → C.Step 3: Next we want to show that what we defined is indeed an equivalence.So let us assume that we start of with an inhabitant

(f, pf ) : Map∗(A ∧B,C),

as in the first step. There we defined

F(w) :≡ pf � apf(Glue(w)

)and then established that it holds for every x : A that

F(inl(x)

): ∗C = f([x, ∗B])

proves that the functionλy.f([x, y])

is base-point preserving and that

λy.F(inr(y)

):∏y:B

∗C = f([∗A, y])

proves that the constant function (∗C)B is pointwise equal to

λy.f([∗A, y]).

Page 96: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

96 ANDREAS FRANZ

Together with apdF(glue) this gave rise to an inhabitant of

Map∗(A,Map∗(B,C)

),

by remark 6.6. Then, in step 2, we used remark 6.5, by which the very samedata suffices to define a function f ′ : A ∧B → C by the recursion principleof the smash product, such that:

• f ′(∗A∧B)) ≡ ∗C• f ′([x, y]) ≡ f(x, y)

• apf ′(Glue(w)

)= F(w)

We want to show that this functions is the same one that we started with.So let us consider the type family

P : A ∧B → U ,

defined by the equation

P (s) :≡ f(s) = f ′(s).

We aim to inhabit the type ∏x:A∧B

P (s).

Firstly we check the definition of f ′ to compute

P (∗A∧B) ≡ f(∗A∧B) = ∗C .

Therefore we can setp−1f : P (∗A∧B).

Similarly we havef ′([x, y]) ≡ f([x, y])

and therefore we can set

reflf([x,y]) : P ([x, y]).

It is then left to show for every w : A ∨B that

transportP (Glue(w), p−1f ) = reflf([x,y]).

By theorem 3.26 this means to show that

apf(Glue(w)

)−1 � p−1f

� apf ′(Glue(w)

)= reflf([x,y]).

Page 97: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

97

But we have again by definition that

apf ′(Glue(w)

)= F(w)

andF(w) ≡ pf � apf

(Glue(w)

).

Step 4: In the converse direction we started of with

(g, pg) : Map∗(A,Map∗(B,C)

)and then derived data as in remark 6.5 to define a function f ′ : A ∧B → C.In particular we constructed a path of type δ : π2

(g(∗A)

)= happly(plg)(∗B)−1

(we did not write it down explicitly but we showed that such a path can beconstructed). Next we defined a dependent function by the equation

F′(w) :≡ pf ′ � apf ′(Glue(w)

),

but as noted in the remark, f ′ is pointed by reflexivity and therefore we havefor every w : A ∨B that

F′(w) = apf ′(Glue(w)

).

In the first step we used that composition of F′ with inl and inr gave proofsthat

f ′ ◦ [_,_] : A×B → C

is base-point preserving for every x : A and constant if x ≡ ∗A. Togetherwith apdF′(glue), remark 6.6 gave us an inhabitant of

Map∗(A,Map∗(B,C)

).

But by construction we have firstly that

apf ′(

Glue(inl(x)

))= π2

(g(x)

),

secondly thatapf ′

(Glue

(inr(y)

))= happly(plg)(y)−1

and that lastly thatapdF′(glue) = δ

Therefore this inhabitant is determined by the same data as (g, pg). �

Page 98: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

98 ANDREAS FRANZ

Lemma 6.8. Assume we are given two pointed types A,B : U together withbase-point preserving maps (α, pα) : Map∗(A,A′) and (β, pβ) : Map∗(B,B′).We let

• inl : A→ A ∨B• inr : B → A ∨B• injl : A→ A×B• injr : B → A×B• Glue :

∏(w:A∨B) ∗A∧B = (injl ∨c injr)(w)

• inl′ : A′ → A′ ∨B′

• inr′ : B′ → A′ ∨B′

• inj′l : A′ → A′ ×B′

• inj′r : B′ → A′ ×B′

• Glue′ :∏

(w′:A′∨B′) ∗A′∧B′ = (inj′l ∨c inj′r)(w′)

There is a canonical function α ∧ β : A ∧B → A′ ∧B′, called the smash ofα and β, such that

• (α ∧ β)(∗A∧B) ≡ ∗A′∧B′• (α ∧ β)([x, y]) ≡ [α(x), β(y)]

• ap(α∧β)

(Glue

(inl(x)

))= Glue′

(inl′(α(x)

))�ap[_,_]

(pair=(reflα(x), pβ)

)• ap(α∧β)

(Glue

(inr(y)

))= Glue′

(inr′(β(y)

))�ap[_,_]

(pair=(pα, reflβ(x))

)What is more, α ∧ β is base-point preserving by reflexivity.

Proof. We want to define a proof of commutativity Com for the right squarein the diagram:

1

?

��

refl?

A ∨Boo(injl∨cinjr)

//

α∨β

��

A×B

(α,β)

��

1 A′ ∨B′oo

(inj′l∨cinj′r)

// A′ ×B′

To this end we consider the type family

P : A ∨B → U ,

Page 99: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

99

defined by the equation

P (w) :≡ (inj′l ∨c inj′r) ◦ (α ∨ β)(w) = (α, β) ◦ (injl ∨c injr)(w).

We compute:

(inj′l ∨c inj′r) ◦ (α ∨ β)(inl(x)

)≡ (inj′l ∨c inj′r)

(inl′(α(x)

))≡ (α(x), ∗B′)

(inj′l ∨c inj′r) ◦ (α ∨ β)(inr(y)

)≡ (inj′l ∨c inj′r)

(inr′(β(y)

))≡(∗A′ , β(y)

)(α, β) ◦ (injl ∨c injr)

(inl(x)

)≡ (α, β)(x, ∗B) ≡

(α(x), β(∗B)

)(α, β) ◦ (injl ∨c injr)

(inr(y)

)≡ (α, β)(∗A, y) ≡

(α(∗A), β(y)

)Therefore we can define

pair=(reflα(x), pβ) : P(inl(x)

)and

pair=(pα, reflβ(y)) : P(inr(y)

).

Then it is left to show that

transportP (glue, pair=(reflα(x), pβ)) = pair=(pα, reflβ(y)).

By theorem 3.26 this means to show

(19) ap(inj′l∨cinj′r)◦(α∨β)(glue)−1 � pair=(reflα(x), pβ) = pair=(pα, reflβ(y))

and hence we need to compute

ap(inj′l∨cinj′r)◦(α∨β)(glue).

By lemma 4.27 we get that

(inj′l ∨c inj′r) ◦ (α ∨ β) ∼ (inj′l ◦ α) ∨c (inj′r ◦ β).

We then use that(inj′l ◦ α)

is base-point preserving byapinj′l

(pα)

and using the equivalence from corollary 3.18, lemma 3.21 and remark 3.5,we get

apinj′l(pα) = pair=(pα, refl∗B′ ).

Page 100: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

100 ANDREAS FRANZ

Similarly we have that(inj′r ◦ β)

is base-point preserving by

apinj′r(pβ) = pair=(refl∗A , pβ).

Checking the definition of a wedge of functions in lemma 5.4, we concludethat

ap(inj′l∨cinj′r)◦(α∨β)(glue)

is equal topair=(pα, refl∗B′ )

� pair=(refl∗A , pβ).

We use lemma 3.20, by which we have that

pair=(pα, refl∗B′ )� pair=(refl∗A , pβ) = pair=(pα, pβ)

and when we plug this in (19), we get

pair=(pα, pβ)−1 � pair=(reflα(x), pβ) = pair=(pα, reflβ(y)).

Yet again, this can be proven by lemma 3.20 and this gives us the requiredproof Com of commutativity and we define α ∧ β to be the pushout functionof the two commutative squares:

1

?

��

refl?

A ∨Boo(injl∨cinjr)

//

α∨β

��

Com

A×B

(α,β)

��

1 A′ ∨B′oo

(inj′l∨cinj′r)

// B′

Lastly we check that(α ∧ β)(∗A∧B) ≡ ∗A′∧B′ ,

hence it holds indeed that reflexivity proves that (α ∧ β) is base-point pre-serving. �

Remark 6.9. The following proof is incomplete. In step three and four wewill want to show an equality between pointed functions

f, g : Map∗(A,Map∗(B,C)),

Page 101: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

101

but we came only so far as to show that there is an

H : π1(f) = π1(g).

What is missing is to show that

π2(f) � H(∗A) = π2(g),

according to remark 4.14.

Proposition 6.10. Assume we are given two pointed types A,B and C.Then there is an equivalence:

(A ∨B) ∧ C ' (A ∧ C) ∨ (B ∧ C)

Proof. Step 1: Defining a function of type

(A ∧ C) ∨ (B ∧ C)→ (A ∨B) ∧ C

is easy, since we have at hand the pointed functions:

• inlA∨B : A→ A ∨B and• inrA∨B : B → A ∨B

and therefore we can use lemmas 6.8 and 5.4 to define

Φ :≡ (inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC),

which has appropriate type

(A ∧ C) ∨ (B ∧ C)→ (A ∨B) ∧ C.

Step 2: Next, we want to give for any z : C a base-point preserving functionfz of type:

A ∨B → (A ∧ C) ∨ (B ∧ C)

To this end, we aim to define for every z : C a pointed map f lz in

Map∗(A, (A ∧ C) ∨ (B ∧ C)

)and a pointed map f rz in

Map∗(B, (A ∧ C) ∨ (B ∧ C)

).

We start with f lz, which is defined by the equation

f lz(x) :≡ inl(A∧C)∨(B∧C)([x, z]).

Page 102: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

102 ANDREAS FRANZ

We recall that we chose

∗(A∧C)∨(B∧C) :≡ inl(A∧C)∨(B∧C)(∗A∧C)

as base-point. Now, since

GlueA∧C(inrA∨C(z)

): ∗A∧C = [∗A, z],

we get thatapinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(z)

))has type

inl(A∧C)∨(B∧C)(∗A∧C) = inl(A∧C)∨(B∧C)([∗A, z])

and therefore proves that f lz ≡ λx.inl(A∧C)∨(B∧C)([x, z]) is base-point preserv-ing for every z : C. Similarly we can define a function by the equation

f rz (y) :≡ inr(A∧C)∨(B∧C)([y, z])

and then we can use that

apinr(A∧C)∨(B∧C)

(GlueB∧C(inrB∨C(z)

)has type

inr(A∧C)∨(B∧C)(∗B∧C) = inr(A∧C)∨(B∧C)([∗B, z])

and that

glue(A∧C)∨(B∧C) : inl(A∧C)∨(B∧C)(∗A∧C) = inr(A∧C)∨(B∧C)(∗B∧C)

to define a proof that f rz ≡ λy.inr(A∧C)∨(B∧C)([y, z]) is base-point preservingfor every z : C by

glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C(inrB∨C(z)

).

Now we are able to define for every z : C an inhabitant of

A ∨B →((A ∧ C) ∨ (B ∧ C)

)by

fz :≡ f lz ∨c f rz .

We note that for every z : C, by definition of fz we have

fz(∗A∨B) ≡ fz(inlA∨B(∗A)

)≡ f lz(∗A)

Page 103: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

103

and hence fz is pointed by

apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(z)

)).

Next we want to show that the constant function (∗(A∧C)∨(B∧C))A is pointwiseequal to f∗C and we do so by applying the induction principle of A ∨B. Solet us consider the type family

P : A ∨B → U ,

defined by the equation

P (w) :≡ ∗(A∧C)∨(B∧C) = f∗C (w).

We note that for every x : A we have that

apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(x)

))has type

inl(A∧C)∨(B∧C)(∗A∧C) = inl(A∧C)∨(B∧C)([x, ∗C ]),

i.e. proves that the constant function (∗(A∧C)∨(B∧C))A is pointwise equal to

f l∗C ≡ λx.inl(A∧C)∨(B∧C)([x, ∗C ]).

Similarly, for any y : B, the term

apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

))has type

inr(A∧C)∨(B∧C)(∗B∧C) = inr(A∧C)∨(B∧C)([y, ∗C ])

andglue(A∧C)∨(B∧C)

has typeinl(A∧C)∨(B∧C)(∗A∧C) = inr(A∧C)∨(B∧C)(∗B∧C).

Hence we can define for every y : B an inhabitant of type

inl(A∧C)∨(B∧C)(∗A∧C) = inr(A∧C)∨(B∧C)([y, ∗C ])

i.e. a proof that the constant function (∗(A∧C)∨(B∧C))A is pointwise equal to

f r∗C ≡ λy.inr(A∧C)∨(B∧C)([y, ∗C ])

Page 104: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

104 ANDREAS FRANZ

byglue(A∧C)∨(B∧C)

� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

)).

Then we want to show that

transportP(

glueA∨B, apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(∗A)

)))=

= glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(∗B)

)).

By theorem 3.26 this means to show that

(20)apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(∗A)

))� apf∗C

(glue(A∧C)∨(B∧C)) =

glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(∗B)

))But by definition of the wedge of functions (see lemma 5.4) we have that

apf∗C(glue(A∧C)∨(B∧C)) =

= apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(∗C)

))−1�

�glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inrB∨C(∗C)

))and by remark 6.4 that

apdGlueA∧C (glueA∨C) : GlueA∧C(inlA∨C(∗A)

)= GlueA∧C

(inrA∨C(∗C)

),

as well as

apdGlueB∧C (glueB∨C) : GlueB∧C(inlB∨C(∗B)

)= GlueB∧C

(inrB∨C(∗C)

).

Hence, after canceling inverses, we can proof (20) by

reflglue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C(inlB∨C(∗B))).

This shows that that the constant function (∗(A∧C)∨(B∧C))A is pointwiseequal to f∗C . We now put everything together. Firstly we can define

λw.λc.fz(w) : (A ∨B)→ C → (A ∧ C) ∨ (B ∧ C)

and then, by the preceding discussion, the constant function (∗(A∧C)∨(B∧C))C

is pointwise equal to λz.fz(∗A∨B). In particular, evaluated at ∗C , this isproven by

apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(∗C)

)).

Page 105: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

105

Secondly we showed that λz.fz(w) is base-point preserving for every w : A∨Band, evaluated at ∗A∨B ≡ inlA∨C(∗A), this is proven by

apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(∗A)

)).

By remark 6.4 we have that

apdGlueA∧C (glueA∨C) : GlueA∧C(inlA∨B(∗A)

)= GlueA∧C(inrA∨C(∗C)

and hence, from lemma 3.3, we get a proof

ap2inl(A∧C)∨(B∧C)

(apdGlueA∧C

(glueA∨C)

)that

apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(∗A)

))=

= apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(∗C)

)).

By remark 6.6, this data suffices to define an inhabitant of

Map∗(A ∨B,Map∗

(C, (A ∧ C) ∨ (B ∧ C)

))and by lemma 6.7, this corresponds to a function Ψ of type

Map∗((A ∨B) ∧ C, (A ∧ C) ∨ (B ∧ C)

),

such that over the points we have the following computation rules:

• Ψ(∗(A∨B)∧C)) :≡ inl(A∧C)∨(B∧C)(∗(A∧C)) ≡ ∗(A∧C)∨(B∧C)

• Ψ([w, z]) :≡ fz(w)

In particular, Ψ is base-point preserving by reflexivity. Additionally we have

apΨ

(Glue(A∨B)∧C

(inr(A∨B)∨C(z)

))= apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(z)

)),

apΨ

(Glue(A∨B)∧C

(inl(A∨B)∨C(inlA∨B(x))

))=

= apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(x)

))and lastly

apΨ

(Glue(A∨B)∧C

(inl(A∨B)∨C(inrA∨B(y))

))=

= glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

)).

Page 106: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

106 ANDREAS FRANZ

Step 3: Next, we aim to show that

Ψ ◦((inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC)

)∼ id(A∧C)∨(B∧C).

By lemma 4.27, we have:

Ψ◦((inlA∨B∧idC)∨c(inrA∨B∧idC)

)∼(Ψ◦(inlA∨B∧idC)

)∨c(Ψ◦(inrA∨B∧idC)

)By Corollary 5.6, it suffices to show that the last function is pointwise equalto:

inl(A∧C)∨(B∧C) ∨c inr(A∧C)∨(B∧C)

We compute for every x : A and z : C that

Ψ ◦ (inlA∨B ∧ idC)([x, z]) ≡ Ψ([inlA∨B(x), z]) ≡

≡ fz(inlA∨B(x)

)≡ f lz(x) ≡ inl(A∧C)∨(B∧C)([x, z]).

We want to avoid using the induction principle for the smash product, whichis why we consider the images of

Ψ ◦ (inlA∨B ∧ idC)

andΨ ◦ (inrA∨B ∧ idC)

under the equivalence of proposition 6.7 instead. We compute for every x : A

and z : C that

Ψ ◦ (inlA∨B ∧ idC)([x, z]) ≡ Ψ([inlA∨B(x), z]) ≡

≡ fz(inlA∨B(x)

)≡ f lz(x) ≡ inl(A∧C)∨(B∧C)([x, z]).

Next we use that Ψ and (inlA∨B ∧ idC) and therefore also Ψ ◦ (inlA∨B ∧ idC),as well as inl(A∧C)∨(B∧C) are base-point preserving by reflexivity and proceedas in equation 18, i.e. for every w : A ∨ C we consider the terms

Fl(w) :≡ apΨ◦(inlA∨B∧idC)

(GlueA∧C(w)

)and

Gl(w) :≡ apinl(A∧C)∨(B∧C)

(GlueA∧C(w)

).

Page 107: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

107

We check the definition of the smash of functions, lemma 6.8 and then, sinceidC is base-point preserving by reflexivity, we get for every x : A that

ap(inlA∨B∧idC)

(GlueA∧C

(inlA∨C(x)

))=

= Glue(A∨B)∧C

(inl(A∨B)∨C

(inlA∨B(x)

))and therefore

apΨ◦(inlA∨B∧idC)

(GlueA∧C

(inlA∨C(x)

))=

= apΨ

(Glue(A∨B)∧C

(inl(A∨B)∨C

(inlA∨B(x)

)))=

= apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(x)

)).

Hence we get that for every x : A it holds:

Fl(inlA∨C(x)

)= Gl

(inlA∨C(x)

)Similarly, since also inlA∨B is base-point preserving by reflexivity, we havefor every z : C that

ap(inlA∨B∧idC)(GlueA∧C(inrA∨C(z)))

=

= Glue(A∨B)∧C(inr(A∨B)∨C(z)

)and therefore

apΨ◦(inlA∨B∧idC)(GlueA∧C(inrA∨C(z)))

=

= apΨ(Glue(A∨B)∧C(inr(A∨B)∨C(z)))

=

= apinl(A∧C)∨(B∧C)(GlueA∧C(inrA∨C(z)

)).

Hence we get that also for every z : C it holds that:

Fl(inrA∨C(z)

)= Gl

(inrA∨C(z)

)Similarly for every y : B and z : C we compute

Ψ ◦ (inrA∨B ∧ idC)([y, z]) ≡ Ψ([inrA∨B(y), z]) ≡

≡ fz(inrA∨B(y)

)≡ f rz (y) ≡ inr(A∧C)∨(B∧C)([y, z]).

Then we use that Ψ and (inrA∨B ∧ idC) and therefore also Ψ ◦ (inrA∨B ∧ idC)

are base-point preserving by reflexivity and inr(A∧C)∨(B∧C) is base-point

Page 108: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

108 ANDREAS FRANZ

preserving by glue(A∧C)∨(B∧C) and proceed again as in equation 18, i.e. forevery w : B ∨ C we consider the terms

Fr(w) :≡ apΨ◦(inrA∨B∧idC)

(GlueB∧C(w)

)and

Gr(w) :≡ glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C(w)

).

We check again lemma 6.8 and then, since idC is base-point preserving byreflexivity, we get that

ap(inrA∨B∧idC)(GlueB∧C(inlB∨C(y)))

=

= Glue(A∨B)∧C(inl(A∨B)∨C(inrA∨B(y)))

and therefore

apΨ◦(inrA∨B∧idC)

(GlueA∧C

(inlB∨C(y)

))=

= apΨ

(Glue(A∨B)∧C(inl(A∨B)∨C(inrA∨B(y)

)))=

= glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

)).

Hence we get that for every y : B it holds:

Fr(inlB∨C(y)

)= Gr

(inlB∨C(y)

).

Next, using again the definition of the smash of functions (see lemma 6.8)together with the fact that inrA∨B is base-point preserving by glueA∨B, weget for every z : C that

apinrA∨B∧idC

(GlueB∧C

(inrB∨C(z)

))=

= Glue(A∨B)∧C(inr(A∨B)∨C(z)

)� ap[_,_]

(pair=(glueA∨B, reflz)

).

and therefore(21)

apΨ◦(inrA∨B∧idC)(GlueB∧C(inrA∨C(y)))

=

= apΨ

(Glue(A∨B)∧C

(inr(A∨B)∨C(z)

)� ap[_,_]

(pair=(glueA∨B, reflz)

))=

= apΨ

(Glue(A∨B)∧C

(inr(A∨B)∨C(z)

))� apΨ◦[_,_]

(pair=(glueA∨B, reflz)

).

Page 109: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

109

We use lemma 3.22, by which we have that

apΨ◦[_,_]

(pair=(glueA∨B, reflz)

)=

= apλw.Ψ([w,z])(glueA∨B).

We check the definition λw.Ψ([w, z]) ≡ fz and then

apfz(glueA∨B) =

= apinl(A∧C)∨(B∧C)(GlueA∧C(inrA∨C(z)

))−1�

�glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C(inrB∨C(z)))

and by definition of Ψ we have that

apΨ

(Glue(A∨B)∧C

(inr(A∨B)∨C(z)

))=

= apinl(A∧C)∨(B∧C)(GlueA∧C(inrA∨C(z)

)).

Hence the rightmost term of equation (21) is in turn equal to

glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inrB∨C(z)

))and this shows that for every z : C it holds:

Fr(inrB∨C(z)

)= Gr

(inrB∨C(z)

)Step 4: Next we want to show that also(

(inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC))◦Ψ ∼ id(A∨B)∧C .

As in step 3, we consider the image of((inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC)

)◦Ψ

under the equivalence from proposition 6.7 and then, for every w : A∨B andz : C we compute:(

(inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC))◦Ψ([w, z]) ≡

≡((inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC)

)◦ fz(w) ≡

≡((inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC)

)◦ (f lz ∨c f rz )(w).

Page 110: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

110 ANDREAS FRANZ

We quickly check the definitions

f lz(x) ≡ inl(A∧C)∨(B∧C)([x, z])

andf rz (y) ≡ inr(A∧C)∨(B∧C)([y, z]).

Then, using lemma 5.7, we have that:((inlA∨B ∧ idC) ∨c (inrA∨B ∧ idC)

)◦ (f l ∨c f r) ∼

∼(λx.λz.[inlA∨B(x), z]

)∨c(λy.λz.[inrA∨B(y), z]

)We note that we have for every x : A that

ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)◦Ψ

(Glue(A∨B)∧C(inl(A∨B)∨C(inlA∨B(x)

)))proves that

λz.[inlA∨B(x), z]

is base-point preserving and by definition of Ψ and the smash of functions

ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)◦Ψ

(Glue(A∨B)∧C

(inl(A∨B)∨C

(inlA∨B(x)

)))=

= ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)(apinl(A∧C)∨(B∧C)

(GlueA∧C

(inlA∨C(x)

)))=

= ap(inlA∨B∧idC)

(GlueA∧C

(inlA∨C(x)

))= Glue(A∨B)∧C

(inl(A∨B)∨C

(inlA∨B(x)

)).

Similarly for every y : B we have that

ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)◦Ψ

(Glue(A∨B)∧C(inl(A∨B)∨C(inrA∨B(y)

)))proves that

λz.[inrA∨B(y), z]

is base-point preserving and by definition of Ψ and the smash of functions

ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)◦Ψ

(Glue(A∨B)∧C(inl(A∨B)∨C(inrA∨B(y)

)))=

= ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)(glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

)))=

= ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)(apinr(A∧C)∨(B∧C)

(GlueB∧C

(inlB∨C(y)

)))=

= ap(inrA∨B∧idC)

(GlueB∧C

(inlB∨C(y)

))=

= Glue(A∨B)∧C

(inl(A∨B)∨C

(inrA∨B(y)

)).

Page 111: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

111

Next we use remark 5.2 and since inlA∨B is base-point preserving by reflexivity,we get for every z : C that

(Glue(A∨B)∧C(inr(A∨B)∨C(z)

)proves that

λz.[inlA∨B(∗A), z]

is equal to the base-point. Secondly, since inrA∨B is base-point preserving byglueA∨B we compute

ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)◦(f lz∨cfrz )

(glueA∨B) =

= ap((inlA∨B∧idC)∨c(inrA∨B∧idC)

)(apinl(A∧C)∨(B∧C)

(GlueA∧C

(inrA∨C(z)

))−1�

�glue(A∧C)∨(B∧C)� apinr(A∧C)∨(B∧C)

(GlueB∧C

(inrB∨C(z)

)))=

= Glue(A∨B)∧C

(inl(A∨B)∨C

(inlA∨B(x)

))−1�

�Glue(A∨B)∧C

(inl(A∨B)∨C

(inrA∨B(y)

))� ap[_,_]

(pair=(glueA∨B, reflz)

).

Therefore, the proof that

λz.[inrA∨B(∗B), z]

is equal to the base-point for every z : C is given by

Glue(A∨B)∧C

(inl(A∨B)∨C

(inrA∨B(y)

))� ap[_,_]

(pair=(glueA∨B, reflz)

).

7. Conclusion

We hope that the reader developed some intuition about basic concepts inhomotopy type theory and how one translates ideas from homotopy theoryto homotopy type theory, while reading this thesis. As far as the authoris aware, there was no work yet showing that pushouts are invariant underhomotopy, without adding any axioms. The most compelling and interestingtask for future work would be to implement the results in a proof assistant.

Page 112: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

112 ANDREAS FRANZ

References

[1] Steve Awodey and Michael A. Warren. Homotopy theoretic models of identity types.Mathematical Proceedings of the Cambridge Philosophical Society, 146:45–55, 2009. 23

[2] Erret Bishop. Foundations of constructive analysis. McGraw-Hill Book Co., New York,1967. 2

[3] Guillaume Brunerie. On the homotopy groups of spheres in homotopy type theory. PhDthesis, Université Nice-Sophia-Antipolis – UFR Sciences, 2016. 4

[4] Guillaume Brunerie, Kuen-Bang Hou (Favonia), Evan Cavallo, Eric Finster, JesperCockx, Christian Sattler, Chris Jeris, Michael Shulman, et al. Homotopy type theoryin Agda. https://github.com/HoTT/HoTT-Agda. 4

[5] Evan Cavallo. Synthetic cohomology in homotopy type theory. Master’s thesis, CarnegieMellon University, 2015. 4

[6] R. Graham. Synthetic Homology in Homotopy Type Theory. ArXiv e-prints, June2017. 4

[7] Martin Hofmann and Thomas Streicher. The groupoid interpretation of type theory.In Giovanni Sambin and Jan M. Smith, editors, Twenty-five years of constructivetype theory (Venice, 1995), volume 36 of Oxford Logic Guides, pages 83–111. OxfordUniversity Press, New York, 1998. 3, 23

[8] William A. Howard. The formulae-as-types notion of construction. In J. Roger Seldin,Jonathan P.; Hindley, editor, To H.B. Curry: Essays on Combinatory Logic, LambdaCalculus and Formalism, pages 479–490. Academic Press, 1980. original paper manu-script from 1969. 5

[9] Per Martin-Löf. An intuitionistic theory of types: predicative part. In H.E. Rose andJ.C. Shepherdson, editors, Logic Colloquium ’73, Proceedings of the Logic Colloquium,volume 80 of Studies in Logic and the Foundations of Mathematics, pages 73–118.North-Holland, 1975. 2

[10] The Univalent Foundations Program. Homotopy type theory: Univalent foundationsof mathematics. Technical report, Institute for Advanced Study, 2013. 4, 32, 51

[11] Vladimir Voevodsky. A very short note on the homotopy λ-calculus.http://www.math.ias.edu/~vladimir/Site3/Univalent_Foundations_files/Hlambda_short_current.pdf, 2006. 23

Page 113: THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY …petrakis/Franz.pdf · THE WEDGE SUM AND THE SMASH PRODUCT IN HOMOTOPY TYPE THEORY MASTER THESIS MATHEMATICAL INSTITUTE LMU MUNICH

113

Eidesstattliche ErklärungHiermit versichere ich an Eides statt, die vorliegende Arbeit selbstständig

verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel be-nutzt, alle Ausführungen, die anderen Schriften wörtlich oder sinngemäßentnommen wurden, kenntlich gemacht zu haben und die Arbeit in gle-icher oder ähnlicher Fassung noch nicht Bestandteil einer Studien- oderPrüfungsleistung war.

Andreas Franz, ...................................., August 2017

Betreuer: Dr. Iosif Petrakis, Mathematisches Institut der Ludwig-Maximilians-Universität München.