154
Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013 Toulouse, April 2013

Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher Inductive Types inHomotopy Type Theory

Steve Awodey

Institute for Advanced Studyand

Carnegie Mellon University

TYPES 2013Toulouse, April 2013

Page 2: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 3: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 4: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 5: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 6: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 7: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Introduction

A new connection has come to light between Logic and Topologyin the form of an interpretation of intensional Martin-Lof typetheory into homotopy theory.

I Homotopy can be used to construct models of systems ofconstructive logic.

I Constructive type theory can be used as a formal calculus toreason about homotopy.

I The computational implementation of type theory allowscomputer verified proofs in homotopy theory, and elsewhere.

I The homotopical interpretation suggests some new logicalconstructions and axioms.

Univalent Foundations combines these into a new program forfoundations of mathematics.

Page 8: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 9: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 10: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .

I Dependent Types: x : A ` B(x)I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 11: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 12: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)

I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 13: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 14: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 15: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Type theory

Martin-Lof constructive type theory consists of:

I Types: X ,Y , . . . ,A× B, A→ B, . . .

I Terms: x : A, b : B, 〈a, b〉, λx .b(x), . . .I Dependent Types: x : A ` B(x)

I∑

x :A B(x)I∏

x :A B(x)

I Equations s = t : A

Intended as a foundation for constructive mathematics.

Page 16: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Propositions as Types

The system has a dual interpretation:

I once as mathematical objects: types are “sets” and theirterms are “elements”, which are being constructed,

I once as logical objects: types are “propositions” and theirterms are “proofs”, which are being derived.

This is also known as the Curry-Howard correspondence:

0 1 A + B A× B A→ B∑

x :A B(x)∏

x :A B(x)

⊥ T A ∨ B A ∧ B A⇒ B ∃x :AB(x) ∀x :AB(x)

Gives the system its constructive character.

Page 17: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Propositions as Types

The system has a dual interpretation:

I once as mathematical objects: types are “sets” and theirterms are “elements”, which are being constructed,

I once as logical objects: types are “propositions” and theirterms are “proofs”, which are being derived.

This is also known as the Curry-Howard correspondence:

0 1 A + B A× B A→ B∑

x :A B(x)∏

x :A B(x)

⊥ T A ∨ B A ∧ B A⇒ B ∃x :AB(x) ∀x :AB(x)

Gives the system its constructive character.

Page 18: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Propositions as Types

The system has a dual interpretation:

I once as mathematical objects: types are “sets” and theirterms are “elements”, which are being constructed,

I once as logical objects: types are “propositions” and theirterms are “proofs”, which are being derived.

This is also known as the Curry-Howard correspondence:

0 1 A + B A× B A→ B∑

x :A B(x)∏

x :A B(x)

⊥ T A ∨ B A ∧ B A⇒ B ∃x :AB(x) ∀x :AB(x)

Gives the system its constructive character.

Page 19: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Propositions as Types

The system has a dual interpretation:

I once as mathematical objects: types are “sets” and theirterms are “elements”, which are being constructed,

I once as logical objects: types are “propositions” and theirterms are “proofs”, which are being derived.

This is also known as the Curry-Howard correspondence:

0 1 A + B A× B A→ B∑

x :A B(x)∏

x :A B(x)

⊥ T A ∨ B A ∧ B A⇒ B ∃x :AB(x) ∀x :AB(x)

Gives the system its constructive character.

Page 20: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Identity types

According to the logical interpretation we have:

I propositional logic: A + B, A× B, A→ B,

I predicate logic: B(x),C (x , y), with quantifiers∏

and∑

.

So it’s natural to add a primitive relation of identity between anyterms of the same type:

x , y : A ` IdA(x , y)

This type represents the logical proposition “x is identical to y”.

On the mathematical side, the identity type admits a newlydiscovered “geometric” interpretation.

Page 21: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Identity types

According to the logical interpretation we have:

I propositional logic: A + B, A× B, A→ B,

I predicate logic: B(x),C (x , y), with quantifiers∏

and∑

.

So it’s natural to add a primitive relation of identity between anyterms of the same type:

x , y : A ` IdA(x , y)

This type represents the logical proposition “x is identical to y”.

On the mathematical side, the identity type admits a newlydiscovered “geometric” interpretation.

Page 22: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Identity types

According to the logical interpretation we have:

I propositional logic: A + B, A× B, A→ B,

I predicate logic: B(x),C (x , y), with quantifiers∏

and∑

.

So it’s natural to add a primitive relation of identity between anyterms of the same type:

x , y : A ` IdA(x , y)

This type represents the logical proposition “x is identical to y”.

On the mathematical side, the identity type admits a newlydiscovered “geometric” interpretation.

Page 23: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Rules for identity types

The introduction rule says that a : A is always identical to itself:

r(a) : IdA(a, a)

The elimination rule is a form of Leibniz’s law:

c : IdA(a, b) x : A ` d(x) : R(x , x , r(x)

)Jd(a, b, c) : R(a, b, c)

Schematically:

“ a = b & R(x , x) ⇒ R(a, b) ”

Page 24: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Rules for identity types

The introduction rule says that a : A is always identical to itself:

r(a) : IdA(a, a)

The elimination rule is a form of Leibniz’s law:

c : IdA(a, b) x : A ` d(x) : R(x , x , r(x)

)Jd(a, b, c) : R(a, b, c)

Schematically:

“ a = b & R(x , x) ⇒ R(a, b) ”

Page 25: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Rules for identity types

The introduction rule says that a : A is always identical to itself:

r(a) : IdA(a, a)

The elimination rule is a form of Leibniz’s law:

c : IdA(a, b) x : A ` d(x) : R(x , x , r(x)

)Jd(a, b, c) : R(a, b, c)

Schematically:

“ a = b & R(x , x) ⇒ R(a, b) ”

Page 26: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretationSuppose we have terms of ascending identity types:

a, b : A

p, q : IdA(a, b)

α, β : IdIdA(a,b)(p, q)

. . . : IdIdId... (. . .)

Consider the following interpretation:

Types Spaces

Terms Maps

a : A Points a : 1→ A

p : IdA(a, b) Paths p : a⇒ b

α : IdIdA(a,b)(p, q) Homotopies α : p V q

...

Page 27: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretationSuppose we have terms of ascending identity types:

a, b : A

p, q : IdA(a, b)

α, β : IdIdA(a,b)(p, q)

. . . : IdIdId... (. . .)

Consider the following interpretation:

Types Spaces

Terms Maps

a : A Points a : 1→ A

p : IdA(a, b) Paths p : a⇒ b

α : IdIdA(a,b)(p, q) Homotopies α : p V q

...

Page 28: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).

The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 29: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 30: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 31: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 32: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 33: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

We still need to interpret dependent types x : A ` B(x).The identity rules imply the following:

p : IdA(a, a′) b : B(a)

p∗b : B(a′)

Logically, this just says “a = a′ & B(a)⇒ B(a′)”.

But topologically, it is a familiar lifting property:

B

b // p∗b

A a p// a′

This is the notion of a “fibration” of spaces.

Page 34: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

Thus we continue the homotopy interpretation as follows:

Dependent types x : A ` B(x) Fibrations B

A

The type B(a) is the fiber of B → A over the point a : A

B(a)

// B

1 a

// A.

Page 35: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Type dependency

Thus we continue the homotopy interpretation as follows:

Dependent types x : A ` B(x) Fibrations B

A

The type B(a) is the fiber of B → A over the point a : A

B(a)

// B

1 a

// A.

Page 36: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Identity types

To interpret the identity type x , y : A ` IdA(x , y), we thus requirea fibration over A× A.

Take the space AI of all paths in A:

Identity type x , y : A ` IdA(x , y) Path space AI

A× A

The fiber IdA(a, b) over a point (a, b) ∈ A× A is the space ofpaths from a to b in A.

IdA(a, b)

// AI

1

(a,b)// A× A.

Page 37: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Identity types

To interpret the identity type x , y : A ` IdA(x , y), we thus requirea fibration over A× A.Take the space AI of all paths in A:

Identity type x , y : A ` IdA(x , y) Path space AI

A× A

The fiber IdA(a, b) over a point (a, b) ∈ A× A is the space ofpaths from a to b in A.

IdA(a, b)

// AI

1

(a,b)// A× A.

Page 38: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Identity types

To interpret the identity type x , y : A ` IdA(x , y), we thus requirea fibration over A× A.Take the space AI of all paths in A:

Identity type x , y : A ` IdA(x , y) Path space AI

A× A

The fiber IdA(a, b) over a point (a, b) ∈ A× A is the space ofpaths from a to b in A.

IdA(a, b)

// AI

1

(a,b)// A× A.

Page 39: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Identity types

The path space AI classifies homotopies ϑ : f ⇒ g between mapsf , g : X → A,

AI

X

ϑ

77

(f ,g)// A× A.

So given any terms x : X ` f , g : A, an identity term

x : X ` ϑ : IdA(f , g)

is interpreted as a homotopy between f and g .

Page 40: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Identity types

The path space AI classifies homotopies ϑ : f ⇒ g between mapsf , g : X → A,

AI

X

ϑ

77

(f ,g)// A× A.

So given any terms x : X ` f , g : A, an identity term

x : X ` ϑ : IdA(f , g)

is interpreted as a homotopy between f and g .

Page 41: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations, Id-types to bepath spaces, and terms of Id-types to be homotopies.

Page 42: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,

using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations, Id-types to bepath spaces, and terms of Id-types to be homotopies.

Page 43: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations, Id-types to bepath spaces, and terms of Id-types to be homotopies.

Page 44: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations,

Id-types to bepath spaces, and terms of Id-types to be homotopies.

Page 45: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations, Id-types to bepath spaces,

and terms of Id-types to be homotopies.

Page 46: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: Summary

1. There is a topological interpretation of the λ-calculus:

types spaces

terms continuous functions

. . .

computability continuity

2. Extend this to dependently typed λ-calculus with Id-types,using the basic idea:

p : IdX (a, b) ⇔p is a path from point a to point b in the space X

This forces dependent types to be fibrations, Id-types to bepath spaces, and terms of Id-types to be homotopies.

Page 47: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 48: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 49: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 50: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 51: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 52: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The homotopy interpretation: First theorems

Instead of concrete spaces and homotopies, we use the axiomaticdescription provided by Quillen model categories.

I Gives a wide range of different models.

I Includes classical homotopy of spaces and simplicial sets.

I Allows the use of standard methods from categorical logic.

Theorem (Awodey & Warren 2006)

“Martin-Lof type theory has a sound interpretation into abstracthomotopy theory.”

Theorem (Gambino & Garner 2008)

“The homotopy interpretation of Martin-Lof type theory is alsocomplete.”

Page 53: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

1. The homotopy interpretation: Conclusion

Type theory provides a “logic of homotopy”.

Page 54: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory

How expressive is constructive type theory as a formal languagefor homotopy theory?

What facts, properties, and constructions from homotopy theoryare logically expressible?

One example: the fundamental group and its higher-dimensionalanalogues are logical constructions.

Page 55: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory

How expressive is constructive type theory as a formal languagefor homotopy theory?

What facts, properties, and constructions from homotopy theoryare logically expressible?

One example: the fundamental group and its higher-dimensionalanalogues are logical constructions.

Page 56: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory

How expressive is constructive type theory as a formal languagefor homotopy theory?

What facts, properties, and constructions from homotopy theoryare logically expressible?

One example: the fundamental group and its higher-dimensionalanalogues are logical constructions.

Page 57: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

Let’s return to the system of identity terms of various orders:

a, b : A

p, q : IdA(a, b)

α, β : IdIdA(a,b)(p, q)

ϑ : IdIdId... (α, β)

These can be represented suggestively as follows:

•a

•a

•b//

p•a

•b

p

##

q

;;α

!

α

β*4ϑ

•a

•b

p

q

EE

Page 58: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

Let’s return to the system of identity terms of various orders:

a, b : A

p, q : IdA(a, b)

α, β : IdIdA(a,b)(p, q)

ϑ : IdIdId... (α, β)

These can be represented suggestively as follows:

•a

•a

•b//

p•a

•b

p

##

q

;;α

!

α

β*4ϑ

•a

•b

p

q

EE

Page 59: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

As in topology, the terms of order 0 and 1, (“points” and “paths”),

•a

•b//

p

bear the structure of a groupoid.

The laws of identity correspond to the groupoid operations:

r : Id(a, a) reflexivity a→ a

s : Id(a, b)→ Id(b, a) symmetry a b

t : Id(a, b)× Id(b, c)→ Id(a, c) transitivity a→ b → c

This was first shown by Hofmann & Streicher (1998), who gave amodel of intensional type theory using groupoids as types.

Page 60: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

As in topology, the terms of order 0 and 1, (“points” and “paths”),

•a

•b//

p

bear the structure of a groupoid.

The laws of identity correspond to the groupoid operations:

r : Id(a, a) reflexivity a→ a

s : Id(a, b)→ Id(b, a) symmetry a b

t : Id(a, b)× Id(b, c)→ Id(a, c) transitivity a→ b → c

This was first shown by Hofmann & Streicher (1998), who gave amodel of intensional type theory using groupoids as types.

Page 61: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

As in topology, the terms of order 0 and 1, (“points” and “paths”),

•a

•b//

p

bear the structure of a groupoid.

The laws of identity correspond to the groupoid operations:

r : Id(a, a) reflexivity a→ a

s : Id(a, b)→ Id(b, a) symmetry a b

t : Id(a, b)× Id(b, c)→ Id(a, c) transitivity a→ b → c

This was first shown by Hofmann & Streicher (1998), who gave amodel of intensional type theory using groupoids as types.

Page 62: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoidsBut also just as in topology, the groupoid equations ofassociativity, inverse, and unit:

p · (q · r) = (p · q) · rp−1 · p = 1 = p · p−1

1 · p = p = p · 1

do not hold strictly, but only “up to homotopy”.

This means they are witnessed by terms of the next higher order:

ϑ : IdId(p−1 · p, 1

)

•a

•b

• a

p22

p−1

1

66

ϑ

Page 63: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoidsBut also just as in topology, the groupoid equations ofassociativity, inverse, and unit:

p · (q · r) = (p · q) · rp−1 · p = 1 = p · p−1

1 · p = p = p · 1

do not hold strictly, but only “up to homotopy”.

This means they are witnessed by terms of the next higher order:

ϑ : IdId(p−1 · p, 1

)

•a

•b

• a

p22

p−1

1

66

ϑ

Page 64: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

The entire system of identity terms of all orders forms aninfinite-dimensional graph, or “globular set”:

A⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . .

It has the structure of a (weak), infinite-dimensional, groupoid, asalready occurring homotopy theory:

Theorem (Lumsdaine, Garner & van den Berg, 2009)

The system of identity terms of all orders over any fixed type is aweak ∞-groupoid.

Every type has a fundamental weak ∞-groupoid.

Page 65: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

The entire system of identity terms of all orders forms aninfinite-dimensional graph, or “globular set”:

A⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . .

It has the structure of a (weak), infinite-dimensional, groupoid, asalready occurring homotopy theory:

Theorem (Lumsdaine, Garner & van den Berg, 2009)

The system of identity terms of all orders over any fixed type is aweak ∞-groupoid.

Every type has a fundamental weak ∞-groupoid.

Page 66: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Fundamental groupoids

The entire system of identity terms of all orders forms aninfinite-dimensional graph, or “globular set”:

A⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . .

It has the structure of a (weak), infinite-dimensional, groupoid, asalready occurring homotopy theory:

Theorem (Lumsdaine, Garner & van den Berg, 2009)

The system of identity terms of all orders over any fixed type is aweak ∞-groupoid.

Every type has a fundamental weak ∞-groupoid.

Page 67: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 68: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 69: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 70: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 71: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 72: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 73: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.

This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 74: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy n-types

Voevodsky has discovered that the universe of all types is naturallystratified by “homotopical dimension”.

A type X is called:

contractible iff∑

x :X

∏y :X IdX (x , y) is inhabited,

A type X is called a:

proposition iff IdX (x , y) is contractible for all x , y : X ,

set iff IdX (x , y) is a proposition for all x , y : X ,

1-type iff IdX (x , y) is a set for all x , y : X ,

(n+1)-type iff IdX (x , y) is an n-type for all x , y : X .

We then let set = 0-type, and proposition = (−1)-type.This corresponds to the homotopical notion of “truncation”:the level at which the fundamental groupoid becomes trivial.

Page 75: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Machine implementation

Now one can combine the following:

I the representation of homotopy theory in constructive typetheory

I the well-developed implementations of type theory incomputational proof assistants like Coq.

Allows computer verified proofs in homotopy theory and relatedfields, in addition to constructive mathematics.

This aspect is being very actively pursued right now in theUnivalent Foundations Program.

Page 76: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Machine implementation

Now one can combine the following:

I the representation of homotopy theory in constructive typetheory

I the well-developed implementations of type theory incomputational proof assistants like Coq.

Allows computer verified proofs in homotopy theory and relatedfields, in addition to constructive mathematics.

This aspect is being very actively pursued right now in theUnivalent Foundations Program.

Page 77: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Machine implementation

Now one can combine the following:

I the representation of homotopy theory in constructive typetheory

I the well-developed implementations of type theory incomputational proof assistants like Coq.

Allows computer verified proofs in homotopy theory and relatedfields, in addition to constructive mathematics.

This aspect is being very actively pursued right now in theUnivalent Foundations Program.

Page 78: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Machine implementation

Now one can combine the following:

I the representation of homotopy theory in constructive typetheory

I the well-developed implementations of type theory incomputational proof assistants like Coq.

Allows computer verified proofs in homotopy theory and relatedfields, in addition to constructive mathematics.

This aspect is being very actively pursued right now in theUnivalent Foundations Program.

Page 79: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Machine implementation

Now one can combine the following:

I the representation of homotopy theory in constructive typetheory

I the well-developed implementations of type theory incomputational proof assistants like Coq.

Allows computer verified proofs in homotopy theory and relatedfields, in addition to constructive mathematics.

This aspect is being very actively pursued right now in theUnivalent Foundations Program.

Page 80: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.

We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 81: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 82: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 83: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 84: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 85: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 86: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

A classical result states that the higher homotopy groups of aspace are always abelian.We can formalize this in type theory:

I the fundamental group π1(X , b) of a type X at basepointb : X consists of terms of type IdX (b, b).

I the second homotopy group π2(X , b) consists of terms of typeIdIdX (b,b)(r(b), r(b)).

I Each of these types has a group structure, and so the secondone has two group structures that are compatible.

I Now the Eckmann-Hilton argument shows that the twostructures on π2(X , b) agree, and are abelian.

This argument can be formalized in Coq and verified to be correct.In this way, we can use the homotopical interpretation to verifyproofs in homotopy theory.

Page 87: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

A computational example

(** ** The 2-dimensional groupoid structure *)

(** Horizontal composition of 2-dimensional paths. *)

Definition concat2 A x y z : A p p’ : x = y q q’ : y = z (h : p = p’) (h’ : q = q’)

: p @ q = p’ @ q’

:= match h, h’ with idpath, idpath => 1 end.

Notation ‘‘p @@ q" := (concat2 p q)

(** 2-dimensional path inversion *)

Definition inverse2 A : Type x y : A p q : x = y (h : p = q) : p^ = q^

:= match h with idpath => 1 end.

(** *** Whiskering *)

Definition whiskerL A : Type x y z : A (p : x = y) q r : y = z (h : q = r) : p @ q = p @ r

:= 1 @@ h.

Definition whiskerR A : Type x y z : A p q : x = y (h : p = q) (r : y = z) : p @ r = q @ r

:= h @@ 1.

(** *** Unwhiskering, a.k.a. cancelling. *)

Lemma cancelL A x y z : A (p : x = y) (q r : y = z) : (p @ q = p @ r) -> (q = r).

Proof.

destruct p, r. intro a. exact ((concat_1p q)^ @ a).

Defined.

Lemma cancelR A x y z : A (p q : x = y) (r : y = z) : (p @ r = q @ r) -> (p = q).

Proof.

destruct r, p. intro a. exact (a @ concat_p1 q).

Defined.

Page 88: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

(** Whiskering and identity paths. *)

Definition whiskerR_p1 A : Type x y : A p q : x = y (h : p = q) :

(concat_p1 p) ^ @ whiskerR h 1 @ concat_p1 q = h

:=

match h with idpath =>

match p with idpath =>

1

end end.

Definition whiskerR_1p A : Type x y z : A (p : x = y) (q : y = z) :

whiskerR 1 q = 1 :> (p @ q = p @ q)

:=

match q with idpath => 1 end.

Definition whiskerL_p1 A : Type x y z : A (p : x = y) (q : y = z) :

whiskerL p 1 = 1 :> (p @ q = p @ q)

:=

match q with idpath => 1 end.

Definition whiskerL_1p A : Type x y : A p q : x = y (h : p = q) :

(concat_1p p) ^ @ whiskerL 1 h @ concat_1p q = h

:=

match h with idpath =>

match p with idpath =>

1

end end.

Definition concat2_p1 A : Type x y : A p q : x = y (h : p = q) :

h @@ 1 = whiskerR h 1 :> (p @ 1 = q @ 1)

:=

match h with idpath => 1 end.

Definition concat2_1p A : Type x y : A p q : x = y (h : p = q) :

1 @@ h = whiskerL 1 h :> (1 @ p = 1 @ q)

:=

match h with idpath => 1 end.

Page 89: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

(** The interchange law for concatenation. *)

Definition concat_concat2 A : Type x y z : A p p’ p’’ : x = y q q’ q’’ : y = z

(a : p = p’) (b : p’ = p’’) (c : q = q’) (d : q’ = q’’) :

(a @@ c) @ (b @@ d) = (a @ b) @@ (c @ d).

Proof.

case d.

case c.

case b.

case a.

reflexivity.

Defined.

(** The interchange law for whiskering. Special case of [concat_concat2]. *)

Definition concat_whisker A x y z : A (p p’ : x = y) (q q’ : y = z) (a : p = p’) (b : q = q’) :

(whiskerR a q) @ (whiskerL p’ b) = (whiskerL p b) @ (whiskerR a q’)

:=

match b with

idpath =>

match a with idpath =>

(concat_1p _)^

end

end.

(** Structure corresponding to the coherence equations of a bicategory. *)

(** The "pentagonator": the 3-cell witnessing the associativity pentagon. *)

Definition pentagon A : Type v w x y z : A (p : v = w) (q : w = x) (r : x = y) (s : y = z)

: whiskerL p (concat_p_pp q r s)

@ concat_p_pp p (q@r) s

@ whiskerR (concat_p_pp p q r) s

= concat_p_pp p q (r@s) @ concat_p_pp (p@q) r s.

Proof.

case p, q, r, s. reflexivity.

Defined.

Page 90: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

(** The 3-cell witnessing the left unit triangle. *)

Definition triangulator A : Type x y z : A (p : x = y) (q : y = z)

: concat_p_pp p 1 q @ whiskerR (concat_p1 p) q

= whiskerL p (concat_1p q).

Proof.

case p, q. reflexivity.

Defined.

(** The Eckmann-Hilton argument *)

Definition eckmann_hilton A : Type x:A (p q : 1 = 1 :> (x = x)) : p @ q = q @ p :=

(whiskerR_p1 p @@ whiskerL_1p q)^

@ (concat_p1 _ @@ concat_p1 _)

@ (concat_1p _ @@ concat_1p _)

@ (concat_whisker _ _ _ _ p q)

@ (concat_1p _ @@ concat_1p _)^

@ (concat_p1 _ @@ concat_p1 _)^

@ (whiskerL_1p q @@ whiskerR_p1 p).

Page 91: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory: Conclusion

I Type theory provides a logic of homotopy.

I Logical methods can in principle capture a lot of homotopytheory: e.g. the fundamental ∞-groupoid of a space is alogical construction, and the notion of n-type is logicallydefinable.

I Many results have already been formalized: homotopy groupsof spheres, Freudenthal suspension theorem, Postnokovtowers, Eilenberg–Mac Lane spaces, ...

I Other areas are also being developed:

I Elementary mathematics: basic algebra, real numbers, cardinalarithmetic, ...

I Foundations: quotient types, inductive types, cumulativehierarchy of sets, ...

I Some new logical ideas are suggested by the homotopyinterpretation: Higher inductive types, Univalence axiom.

Page 92: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory: Conclusion

I Type theory provides a logic of homotopy.

I Logical methods can in principle capture a lot of homotopytheory: e.g. the fundamental ∞-groupoid of a space is alogical construction, and the notion of n-type is logicallydefinable.

I Many results have already been formalized: homotopy groupsof spheres, Freudenthal suspension theorem, Postnokovtowers, Eilenberg–Mac Lane spaces, ...

I Other areas are also being developed:

I Elementary mathematics: basic algebra, real numbers, cardinalarithmetic, ...

I Foundations: quotient types, inductive types, cumulativehierarchy of sets, ...

I Some new logical ideas are suggested by the homotopyinterpretation: Higher inductive types, Univalence axiom.

Page 93: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory: Conclusion

I Type theory provides a logic of homotopy.

I Logical methods can in principle capture a lot of homotopytheory: e.g. the fundamental ∞-groupoid of a space is alogical construction, and the notion of n-type is logicallydefinable.

I Many results have already been formalized: homotopy groupsof spheres, Freudenthal suspension theorem, Postnokovtowers, Eilenberg–Mac Lane spaces, ...

I Other areas are also being developed:

I Elementary mathematics: basic algebra, real numbers, cardinalarithmetic, ...

I Foundations: quotient types, inductive types, cumulativehierarchy of sets, ...

I Some new logical ideas are suggested by the homotopyinterpretation: Higher inductive types, Univalence axiom.

Page 94: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory: Conclusion

I Type theory provides a logic of homotopy.

I Logical methods can in principle capture a lot of homotopytheory: e.g. the fundamental ∞-groupoid of a space is alogical construction, and the notion of n-type is logicallydefinable.

I Many results have already been formalized: homotopy groupsof spheres, Freudenthal suspension theorem, Postnokovtowers, Eilenberg–Mac Lane spaces, ...

I Other areas are also being developed:

I Elementary mathematics: basic algebra, real numbers, cardinalarithmetic, ...

I Foundations: quotient types, inductive types, cumulativehierarchy of sets, ...

I Some new logical ideas are suggested by the homotopyinterpretation: Higher inductive types, Univalence axiom.

Page 95: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

2. Homotopy type theory: Conclusion

I Type theory provides a logic of homotopy.

I Logical methods can in principle capture a lot of homotopytheory: e.g. the fundamental ∞-groupoid of a space is alogical construction, and the notion of n-type is logicallydefinable.

I Many results have already been formalized: homotopy groupsof spheres, Freudenthal suspension theorem, Postnokovtowers, Eilenberg–Mac Lane spaces, ...

I Other areas are also being developed:

I Elementary mathematics: basic algebra, real numbers, cardinalarithmetic, ...

I Foundations: quotient types, inductive types, cumulativehierarchy of sets, ...

I Some new logical ideas are suggested by the homotopyinterpretation: Higher inductive types, Univalence axiom.

Page 96: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types

(Due to Lumsdaine & Shulman, but very much work in progress.)

The natural numbers N are implemented in type theory as aninductively defined structure of type:

o : Ns : N→ N

The recursion property is captured by an elimination rule:

a : X f : X → Xrec(a, f ) : N→ X

such that:

rec(a, f )(o) = a

rec(a, f )(sn) = f (rec(a, f )(n))

Page 97: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types

(Due to Lumsdaine & Shulman, but very much work in progress.)

The natural numbers N are implemented in type theory as aninductively defined structure of type:

o : Ns : N→ N

The recursion property is captured by an elimination rule:

a : X f : X → Xrec(a, f ) : N→ X

such that:

rec(a, f )(o) = a

rec(a, f )(sn) = f (rec(a, f )(n))

Page 98: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types

(Due to Lumsdaine & Shulman, but very much work in progress.)

The natural numbers N are implemented in type theory as aninductively defined structure of type:

o : Ns : N→ N

The recursion property is captured by an elimination rule:

a : X f : X → Xrec(a, f ) : N→ X

such that:

rec(a, f )(o) = a

rec(a, f )(sn) = f (rec(a, f )(n))

Page 99: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types

(Due to Lumsdaine & Shulman, but very much work in progress.)

The natural numbers N are implemented in type theory as aninductively defined structure of type:

o : Ns : N→ N

The recursion property is captured by an elimination rule:

a : X f : X → Xrec(a, f ) : N→ X

such that:

rec(a, f )(o) = a

rec(a, f )(sn) = f (rec(a, f )(n))

Page 100: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types

This says just that (N, o, s) is the free structure of this type:

1o

a

Ns 88 rec

// X fff

The map rec(a, f ) : N→ X is unique with this property.

Page 101: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types

This says just that (N, o, s) is the free structure of this type:

1o

a

Ns 88 rec

// X fff

The map rec(a, f ) : N→ X is unique with this property.

Page 102: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

The homotopical circle S = S1 can also be given as an inductivetype, now involving a higher-dimensional generator:

base : Sloop : base base

Here we have written loop : base base for the “loop”loop : IdS(base, base).

Page 103: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

There is an associated recursion property, captured again by anelimination rule:

a : X q : a a

rec(a, q) : S→ X

such that:

rec(a, q)(base) = a

rec(a, q)(loop) = q

The map rec(a, q) acts on paths via the Id-elimination rule.

Page 104: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

There is an associated recursion property, captured again by anelimination rule:

a : X q : a a

rec(a, q) : S→ X

such that:

rec(a, q)(base) = a

rec(a, q)(loop) = q

The map rec(a, q) acts on paths via the Id-elimination rule.

Page 105: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

This says that (S, base, loop) is the free structure of this (higher)type:

1base

a

baseloop 88 S rec

// X a qdd

The map rec(a, q) : S→ X is then unique up to homotopy.

Page 106: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

This says that (S, base, loop) is the free structure of this (higher)type:

1base

a

baseloop 88 S rec

// X a qdd

The map rec(a, q) : S→ X is then unique up to homotopy.

Page 107: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

Here is a sanity check:

Theorem (Shulmann 2011)

The type-theoretic circle S has the correct homotopy groups:

πn(S) =

Z, if n = 1,

0, if n 6= 1.

The proof has been formalized in Coq. It combines classicalhomotopy theory with methods from constructive type theory, anduses Voevodsky’s Univalence Axiom.

Corollary

There are homotopy 1-types.

Page 108: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

Here is a sanity check:

Theorem (Shulmann 2011)

The type-theoretic circle S has the correct homotopy groups:

πn(S) =

Z, if n = 1,

0, if n 6= 1.

The proof has been formalized in Coq. It combines classicalhomotopy theory with methods from constructive type theory, anduses Voevodsky’s Univalence Axiom.

Corollary

There are homotopy 1-types.

Page 109: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The circle S1

Here is a sanity check:

Theorem (Shulmann 2011)

The type-theoretic circle S has the correct homotopy groups:

πn(S) =

Z, if n = 1,

0, if n 6= 1.

The proof has been formalized in Coq. It combines classicalhomotopy theory with methods from constructive type theory, anduses Voevodsky’s Univalence Axiom.

Corollary

There are homotopy 1-types.

Page 110: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The interval I

The unit interval I = [0, 1] is also an inductive type, on the data:

0, 1 : Ip : 0 1

Again writing p : 0 1 for the path p : IdI(0, 1).

Slogan: In topology, we start with the interval and use it todefine the notion of a path.In HoTT, we start with the notion of a path, and use it to definethe interval.

Page 111: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The interval I

The unit interval I = [0, 1] is also an inductive type, on the data:

0, 1 : Ip : 0 1

Again writing p : 0 1 for the path p : IdI(0, 1).

Slogan: In topology, we start with the interval and use it todefine the notion of a path.

In HoTT, we start with the notion of a path, and use it to definethe interval.

Page 112: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Higher-dimensional inductive types: The interval I

The unit interval I = [0, 1] is also an inductive type, on the data:

0, 1 : Ip : 0 1

Again writing p : 0 1 for the path p : IdI(0, 1).

Slogan: In topology, we start with the interval and use it todefine the notion of a path.In HoTT, we start with the notion of a path, and use it to definethe interval.

Page 113: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

We can make (some) HITs by “impredicative encoding”.Recall the following examples:

p ∨ q := ∀x[(p ⇒ x) ∧ (q ⇒ x)⇒ x

]The quantifier is over all propositions x .

A + B :=∏X

[(A→ X )× (B → X )→ X

]The product is over all sets X .This really requires an additional condition saying that thetransformations

αX :((A→ X )× (B → X )

)// X

are natural in X .

Page 114: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

We can make (some) HITs by “impredicative encoding”.Recall the following examples:

p ∨ q := ∀x[(p ⇒ x) ∧ (q ⇒ x)⇒ x

]The quantifier is over all propositions x .

A + B :=∏X

[(A→ X )× (B → X )→ X

]The product is over all sets X .

This really requires an additional condition saying that thetransformations

αX :((A→ X )× (B → X )

)// X

are natural in X .

Page 115: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

We can make (some) HITs by “impredicative encoding”.Recall the following examples:

p ∨ q := ∀x[(p ⇒ x) ∧ (q ⇒ x)⇒ x

]The quantifier is over all propositions x .

A + B :=∏X

[(A→ X )× (B → X )→ X

]The product is over all sets X .This really requires an additional condition saying that thetransformations

αX :((A→ X )× (B → X )

)// X

are natural in X .

Page 116: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

The same idea can be used for the interval and the circle.For a type X , define the path space I (X ) and loop space Ω(X ) by:

I (X ) :=∑x ,y :X

IdX (x , y) Ω(X ) :=∑x :X

IdX (x , x)

Morally, I (X ) = I→ X and Ω(X ) = S→ X .So we set:

I :=∏X

[I (X )→ X

]S :=

∏X

[Ω(X )→ X

]Here the product is taken over all 1-types X , and the requirednaturality condition includes a further coherence condition.

Page 117: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

The same idea can be used for the interval and the circle.For a type X , define the path space I (X ) and loop space Ω(X ) by:

I (X ) :=∑x ,y :X

IdX (x , y) Ω(X ) :=∑x :X

IdX (x , x)

Morally, I (X ) = I→ X and Ω(X ) = S→ X .

So we set:

I :=∏X

[I (X )→ X

]S :=

∏X

[Ω(X )→ X

]Here the product is taken over all 1-types X , and the requirednaturality condition includes a further coherence condition.

Page 118: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

The same idea can be used for the interval and the circle.For a type X , define the path space I (X ) and loop space Ω(X ) by:

I (X ) :=∑x ,y :X

IdX (x , y) Ω(X ) :=∑x :X

IdX (x , x)

Morally, I (X ) = I→ X and Ω(X ) = S→ X .So we set:

I :=∏X

[I (X )→ X

]S :=

∏X

[Ω(X )→ X

]

Here the product is taken over all 1-types X , and the requirednaturality condition includes a further coherence condition.

Page 119: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. HITs: Impredicative construction

The same idea can be used for the interval and the circle.For a type X , define the path space I (X ) and loop space Ω(X ) by:

I (X ) :=∑x ,y :X

IdX (x , y) Ω(X ) :=∑x :X

IdX (x , x)

Morally, I (X ) = I→ X and Ω(X ) = S→ X .So we set:

I :=∏X

[I (X )→ X

]S :=

∏X

[Ω(X )→ X

]Here the product is taken over all 1-types X , and the requirednaturality condition includes a further coherence condition.

Page 120: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types: Conclusion

Many basic spaces and constructions can be introduced as HITs:

I higher spheres Sn, cylinders, tori, cell complexes, . . . ,

I suspensions ΣA,

I homotopy pullbacks, pushouts, etc.,

I truncations, such as connected components π0(A) and“bracket” types,

I quotients by equivalence relations,

I higher homotopy groups,

I Quillen model structure.

Some of these have impredicative constructions, some do not.A general theory is the topic of current research.

Page 121: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

3. Higher-dimensional inductive types: Conclusion

Many basic spaces and constructions can be introduced as HITs:

I higher spheres Sn, cylinders, tori, cell complexes, . . . ,

I suspensions ΣA,

I homotopy pullbacks, pushouts, etc.,

I truncations, such as connected components π0(A) and“bracket” types,

I quotients by equivalence relations,

I higher homotopy groups,

I Quillen model structure.

Some of these have impredicative constructions, some do not.A general theory is the topic of current research.

Page 122: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

4. Univalence

Voevodsky has proposed a new foundational axiom to be added toHoTT: the Univalence Axiom.

I It captures the informal mathematical practice of identifyingisomorphic objects.

I It is formally incompatible with conventional foundations.

I It is formally consistent with homotopy type theory.

I It has has powerful consequences, especially when combinedwith HITs.

Page 123: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

4. Univalence

Voevodsky has proposed a new foundational axiom to be added toHoTT: the Univalence Axiom.

I It captures the informal mathematical practice of identifyingisomorphic objects.

I It is formally incompatible with conventional foundations.

I It is formally consistent with homotopy type theory.

I It has has powerful consequences, especially when combinedwith HITs.

Page 124: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

4. Univalence

Voevodsky has proposed a new foundational axiom to be added toHoTT: the Univalence Axiom.

I It captures the informal mathematical practice of identifyingisomorphic objects.

I It is formally incompatible with conventional foundations.

I It is formally consistent with homotopy type theory.

I It has has powerful consequences, especially when combinedwith HITs.

Page 125: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

4. Univalence

Voevodsky has proposed a new foundational axiom to be added toHoTT: the Univalence Axiom.

I It captures the informal mathematical practice of identifyingisomorphic objects.

I It is formally incompatible with conventional foundations.

I It is formally consistent with homotopy type theory.

I It has has powerful consequences, especially when combinedwith HITs.

Page 126: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism

In type theory, the notion of type isomorphism A ∼= B is definableas usual:

A ∼= B ⇔ there are f : A→ B and g : B → Asuch that gfx = x and fgy = y .

Formally, there is a type of isomorphisms:

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

We say that A ∼= B if this type is “inhabited” by a closed term –which is then an isomorphism between A and B.

Page 127: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism

In type theory, the notion of type isomorphism A ∼= B is definableas usual:

A ∼= B ⇔ there are f : A→ B and g : B → Asuch that gfx = x and fgy = y .

Formally, there is a type of isomorphisms:

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

We say that A ∼= B if this type is “inhabited” by a closed term –which is then an isomorphism between A and B.

Page 128: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism

In type theory, the notion of type isomorphism A ∼= B is definableas usual:

A ∼= B ⇔ there are f : A→ B and g : B → Asuch that gfx = x and fgy = y .

Formally, there is a type of isomorphisms:

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

We say that A ∼= B if this type is “inhabited” by a closed term –which is then an isomorphism between A and B.

Page 129: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism: Remarks

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

I It is convenient to add a “coherence” condition relating theproofs of gfx = x and fgy = y .

I Under the homotopy interpretation, this then becomes thetype of homotopy equivalences.

I The same notion also subsumes logical equivalence,isomorphism of sets, and categorical equivalence.

Page 130: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism: Remarks

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

I It is convenient to add a “coherence” condition relating theproofs of gfx = x and fgy = y .

I Under the homotopy interpretation, this then becomes thetype of homotopy equivalences.

I The same notion also subsumes logical equivalence,isomorphism of sets, and categorical equivalence.

Page 131: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Isomorphism: Remarks

Iso(A,B) :=∑

f :A→B

∑g :B→A

(∏x :A

IdA(gfx , x)×∏y :B

IdB(fgy , y))

I It is convenient to add a “coherence” condition relating theproofs of gfx = x and fgy = y .

I Under the homotopy interpretation, this then becomes thetype of homotopy equivalences.

I The same notion also subsumes logical equivalence,isomorphism of sets, and categorical equivalence.

Page 132: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Invariance

One can show that in type theory without universes, all definableproperties P(X ) of types X respect type isomorphism, in the sensethat the following inference holds:

A ∼= B P(A)

P(B)

In this sense, all definable properties are invariant.

So type isomorphism A ∼= B is equivalent to indiscernability:

P(A)⇒ P(B), for all P

How are these conditions related to identity of types A and B ina system with universes?

Page 133: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Invariance

One can show that in type theory without universes, all definableproperties P(X ) of types X respect type isomorphism, in the sensethat the following inference holds:

A ∼= B P(A)

P(B)

In this sense, all definable properties are invariant.

So type isomorphism A ∼= B is equivalent to indiscernability:

P(A)⇒ P(B), for all P

How are these conditions related to identity of types A and B ina system with universes?

Page 134: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Invariance

One can show that in type theory without universes, all definableproperties P(X ) of types X respect type isomorphism, in the sensethat the following inference holds:

A ∼= B P(A)

P(B)

In this sense, all definable properties are invariant.

So type isomorphism A ∼= B is equivalent to indiscernability:

P(A)⇒ P(B), for all P

How are these conditions related to identity of types A and B ina system with universes?

Page 135: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Invariance

One can show that in type theory without universes, all definableproperties P(X ) of types X respect type isomorphism, in the sensethat the following inference holds:

A ∼= B P(A)

P(B)

In this sense, all definable properties are invariant.

So type isomorphism A ∼= B is equivalent to indiscernability:

P(A)⇒ P(B), for all P

How are these conditions related to identity of types A and B ina system with universes?

Page 136: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Universes

In order to reason directly about identity of types, we need auniverse U , which then has an identity type:

IdU (A,B)

One can then easily construct a “comparison map” of types:

IdU (A,B)→ Iso(A,B).

So, of course, identity implies isomorphism.

Page 137: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Universes

In order to reason directly about identity of types, we need auniverse U , which then has an identity type:

IdU (A,B)

One can then easily construct a “comparison map” of types:

IdU (A,B)→ Iso(A,B).

So, of course, identity implies isomorphism.

Page 138: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Universes

In order to reason directly about identity of types, we need auniverse U , which then has an identity type:

IdU (A,B)

One can then easily construct a “comparison map” of types:

IdU (A,B)→ Iso(A,B).

So, of course, identity implies isomorphism.

Page 139: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom

Voevodsky’s Univalence Axiom asserts that this comparison map isitself an isomorphism:

IdU (A,B)∼−→ Iso(A,B) (UA)

So UA can be stated: “Identity is isomorphic to isomorphism.”

Page 140: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom

Voevodsky’s Univalence Axiom asserts that this comparison map isitself an isomorphism:

IdU (A,B)∼−→ Iso(A,B) (UA)

So UA can be stated: “Identity is isomorphic to isomorphism.”

Page 141: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: How it works

R

S1

cov

base

0

1

2

Definition (Universal Cover of S1)

Define a dependent type cov : S // U by circle-recursion, with

cov(base) := Zcov(loop) := ua(succ).

Page 142: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: How it worksTo define a dependent type on S1,

cov : S1 −→ U

we need the following data:

I a point A : UI a loop p : A A

For the point A we take the integers Z.By Univalence, to give a loop p : Z Z in U , it suffices to give anisomorphism Z ∼= Z, for which we choose the successor function

succ : Z ∼= Z.

Now we can set:

cov(base) := Zcov(loop) := ua(succ).

Page 143: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: How it worksTo define a dependent type on S1,

cov : S1 −→ U

we need the following data:

I a point A : UI a loop p : A A

For the point A we take the integers Z.

By Univalence, to give a loop p : Z Z in U , it suffices to give anisomorphism Z ∼= Z, for which we choose the successor function

succ : Z ∼= Z.

Now we can set:

cov(base) := Zcov(loop) := ua(succ).

Page 144: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: How it worksTo define a dependent type on S1,

cov : S1 −→ U

we need the following data:

I a point A : UI a loop p : A A

For the point A we take the integers Z.By Univalence, to give a loop p : Z Z in U , it suffices to give anisomorphism Z ∼= Z, for which we choose the successor function

succ : Z ∼= Z.

Now we can set:

cov(base) := Zcov(loop) := ua(succ).

Page 145: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: How it worksTo define a dependent type on S1,

cov : S1 −→ U

we need the following data:

I a point A : UI a loop p : A A

For the point A we take the integers Z.By Univalence, to give a loop p : Z Z in U , it suffices to give anisomorphism Z ∼= Z, for which we choose the successor function

succ : Z ∼= Z.

Now we can set:

cov(base) := Zcov(loop) := ua(succ).

Page 146: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: Remarks

I Since UA is an iso, there is a map coming back:

IdU (A,B)←− Iso(A,B)

So isomorphic objects are identical.

I The system with UA still has the invariance property:

A ∼= B P(A)

P(B)

In the presence of a universe, UA is equivalent to invariance.

I Incompatible with conventional foundations in set theory, butconsistent with HoTT: Voevodsky has a model in SSets.

I Conjecture (Voevodsky): UA preserves the computationalcharacter of the total system.

Page 147: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: Remarks

I Since UA is an iso, there is a map coming back:

IdU (A,B)←− Iso(A,B)

So isomorphic objects are identical.

I The system with UA still has the invariance property:

A ∼= B P(A)

P(B)

In the presence of a universe, UA is equivalent to invariance.

I Incompatible with conventional foundations in set theory, butconsistent with HoTT: Voevodsky has a model in SSets.

I Conjecture (Voevodsky): UA preserves the computationalcharacter of the total system.

Page 148: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: Remarks

I Since UA is an iso, there is a map coming back:

IdU (A,B)←− Iso(A,B)

So isomorphic objects are identical.

I The system with UA still has the invariance property:

A ∼= B P(A)

P(B)

In the presence of a universe, UA is equivalent to invariance.

I Incompatible with conventional foundations in set theory, butconsistent with HoTT: Voevodsky has a model in SSets.

I Conjecture (Voevodsky): UA preserves the computationalcharacter of the total system.

Page 149: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

The Univalence Axiom: Remarks

I Since UA is an iso, there is a map coming back:

IdU (A,B)←− Iso(A,B)

So isomorphic objects are identical.

I The system with UA still has the invariance property:

A ∼= B P(A)

P(B)

In the presence of a universe, UA is equivalent to invariance.

I Incompatible with conventional foundations in set theory, butconsistent with HoTT: Voevodsky has a model in SSets.

I Conjecture (Voevodsky): UA preserves the computationalcharacter of the total system.

Page 150: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Conclusion

Homotopy Type Theory is a topological interpretation ofconstructive type theory that allows purely formal reasoning inhomotopy theory.

Univalent Foundations is a new approach to the foundations ofmathematics based on Homotopy Type Theory, with both intrinsicgeometric content and a computational implementation.

The Univalence Axiom is a powerful new principle of reasoningthat is incompatible with conventional foundations, and yet(conjecture!) computationally admissible.

Page 151: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Conclusion

Homotopy Type Theory is a topological interpretation ofconstructive type theory that allows purely formal reasoning inhomotopy theory.

Univalent Foundations is a new approach to the foundations ofmathematics based on Homotopy Type Theory, with both intrinsicgeometric content and a computational implementation.

The Univalence Axiom is a powerful new principle of reasoningthat is incompatible with conventional foundations, and yet(conjecture!) computationally admissible.

Page 152: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Conclusion

Homotopy Type Theory is a topological interpretation ofconstructive type theory that allows purely formal reasoning inhomotopy theory.

Univalent Foundations is a new approach to the foundations ofmathematics based on Homotopy Type Theory, with both intrinsicgeometric content and a computational implementation.

The Univalence Axiom is a powerful new principle of reasoningthat is incompatible with conventional foundations, and yet(conjecture!) computationally admissible.

Page 153: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

References and Further Information

General information:

www.HomotopyTypeTheory.org

Current state of the Univalent Foundations Program:

uf-ias-2012.wikispaces.com

Forthcoming book:

Homotopy type theory:Univalent foundations of mathematics

Page 154: Higher Inductive Types in Homotopy Type Theory...Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013

Homotopy Type TheoryUNIVALENT FOUNDATIONS OF MATHEMATICS

The Univalent Foundations Program

Institute for Advanced Study