INTRODUCTION TO HOMOTOPY TYPE THEORY
EUTypes School, Ohrid 2019
NOTES AND EXERCISES FOR LECTURE TWO
2 September 2019
[Recall Chapters 2,3. Note:
Pi(x:A). B x
is in Jesper's course (Agda) written as
(x:A) -> B x
'Type' is a (the smallest) universe, the 'type of small types'. It is also called 'U' (HoTT book) or 'Set' (Agda).
]
Chapter 4: Homotopical intuition
Hofmann-Streicher:
dependent type theory has a model in groupoids
Voevodsky (see the paper by Kapulkin-Lumsdaine):
dependent type theory has a model in infinity-groupoids (Kan simplicial sets)
Showing the whole technical construction would be too much for this course, but the intuition is as follows:
* Infinity-groupoids are essentially topological spaces.
* A type (in the empty context) is interpreted as a space.
* An element of a type is interpreted as a point in the space.
* An equality is interpreted as a path between the points.
* (Less important: a dependent type is interpreted as a fibration; see the second exercise below.)
* (All other components can also be interpreted, but they are not so important for this course.)
If something does not work in this model, it will not work in HoTT. (If it works in the model, it might still fail in HoTT, but the model still gives us a pretty good idea of what works.)
Examples:
* reflexivity is given by constant paths
* transitivity of equality becomes composition of paths
* symmetry of equality becomes reversal of paths
From now on, "equality proof" and "path" are used synonymously.
"Element" and "point" are also used synonymously.
Another example:
* if f : A -> B is a function, it maps points but also paths. This gives us
ap_f : Pi(x y : A). (x = y) -> (f x = f y)
What about the following principle UIP (uniqueness of identity proofs, where 'identity' is synonymous with 'equality')?
UIP: Pi(x y : A). Pi(p q : x=y). p=q
In the model, this would mean that we can continuously transform the path p into the path q without moving x and y; this is not always possible. It depends on the space A.
Chapter 5: Equivalences
How to say that a function f: A -> B is an equivalence?
define:
isequiv(f) :=
Sigma g: B -> A.
Sigma alpha: Pi(x:A). g(f x) = x.
Sigma beta: Pi(y:B). f(g y) = y.
Pi(x:A). ap_f(alpha x) = beta(f x)
Without the last component, this would not be well-behaved.
Chapter 6: Describing path spaces (i.e. equality types)
See exercise (3).
EXERCISES:
(1) Repetition for Chapter 2:
given
A : Type
B : A -> Type
C : Pi(x:A). B x -> Type,
what can you say about the two types
T1 := Pi(x:A). Sigma(y : B x). C x y
T2 := Sigma(k: Pi(x:A).B x). Pi(x:A). C x (k x)
?
Can you construct functions in both directions?
Revisit this exercise after we discuss univalence. What can you say about the compositions of the functions?
(2) given a type A. Show the correspondance between 'families' and 'fibrations', where a family is a 'P : A -> Type', a fibration is a type B together with a function B->A.
Concretely: construct functions
f : (A -> Type) -> (Sigma (B: Type). B->A)
g : (Sigma (B: Type). B->A) -> (A -> Type)
What can you say about the compositions f.g and g.f? (Revisit this question after we discuss univalence.)
(3) Given types A and B; given pairs (x,y) : A*B and (x',y') : A*B. Construct a function
k : ((x,y) = (x',y')) -> ((x=x')*(y=y'))
and show that it is an equivalence.
Can you do the same if B depends on A (i.e. you use Sigma(x:A).B x instead of A*B)?
SOLUTIONS:
(1) the equivalence between these types is sometimes called the "type-theoretic axiom of choice", although we should be careful since the "axiom of choice" is something else in HoTT; better to call it "Sigma-Pi-distributivity". See Theorem 2.15.7 in the HoTT book.
(2) the 'inverse image' of a function f : A -> B at a point y : B is defined as
f^(-1) y := Sigma(x:A). f x = y
The function g should be defined like this:
g (B,f) x := f^(-1) x
f should be defined like this:
f P := (Sigma(x:A).P x , proj1)
f and g are inverses (using univalence; see next lecture).
(3) see the HoTT book Theorem 2.7.2