Higher Inductive Types in Homotopy Type Theory Steve Awodey - - PowerPoint PPT Presentation
Higher Inductive Types in Homotopy Type Theory Steve Awodey - - PowerPoint PPT Presentation
Higher Inductive Types in Homotopy Type Theory Steve Awodey Institute for Advanced Study and Carnegie Mellon University TYPES 2013 Toulouse, April 2013 Introduction A new connection has come to light between Logic and Topology in the form
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
◮ Homotopy can be used to construct models of systems of
constructive logic.
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
◮ Homotopy can be used to construct models of systems of
constructive logic.
◮ Constructive type theory can be used as a formal calculus to
reason about homotopy.
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
◮ Homotopy can be used to construct models of systems of
constructive logic.
◮ Constructive type theory can be used as a formal calculus to
reason about homotopy.
◮ The computational implementation of type theory allows
computer verified proofs in homotopy theory, and elsewhere.
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
◮ Homotopy can be used to construct models of systems of
constructive logic.
◮ Constructive type theory can be used as a formal calculus to
reason about homotopy.
◮ The computational implementation of type theory allows
computer verified proofs in homotopy theory, and elsewhere.
◮ The homotopical interpretation suggests some new logical
constructions and axioms.
Introduction
A new connection has come to light between Logic and Topology in the form of an interpretation of intensional Martin-L¨
- f type
theory into homotopy theory.
◮ Homotopy can be used to construct models of systems of
constructive logic.
◮ Constructive type theory can be used as a formal calculus to
reason about homotopy.
◮ The computational implementation of type theory allows
computer verified proofs in homotopy theory, and elsewhere.
◮ The homotopical interpretation suggests some new logical
constructions and axioms. Univalent Foundations combines these into a new program for foundations of mathematics.
Type theory
Martin-L¨
- f constructive type theory consists of:
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . .
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . .
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . . ◮ Dependent Types: x : A ⊢ B(x)
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . . ◮ Dependent Types: x : A ⊢ B(x)
◮
x:A B(x)
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . . ◮ Dependent Types: x : A ⊢ B(x)
◮
x:A B(x)
◮
x:A B(x)
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . . ◮ Dependent Types: x : A ⊢ B(x)
◮
x:A B(x)
◮
x:A B(x)
◮ Equations s = t : A
Type theory
Martin-L¨
- f constructive type theory consists of:
◮ Types: X, Y , . . . , A × B, A → B, . . . ◮ Terms: x : A, b : B, a, b, λx.b(x), . . . ◮ Dependent Types: x : A ⊢ B(x)
◮
x:A B(x)
◮
x:A B(x)
◮ Equations s = t : A
Intended as a foundation for constructive mathematics.
Propositions as Types
The system has a dual interpretation:
◮ once as mathematical objects: types are “sets” and their
terms are “elements”, which are being constructed,
Propositions as Types
The system has a dual interpretation:
◮ once as mathematical objects: types are “sets” and their
terms are “elements”, which are being constructed,
◮ once as logical objects: types are “propositions” and their
terms are “proofs”, which are being derived.
Propositions as Types
The system has a dual interpretation:
◮ once as mathematical objects: types are “sets” and their
terms are “elements”, which are being constructed,
◮ once as logical objects: types are “propositions” and their
terms are “proofs”, which are being derived. This is also known as the Curry-Howard correspondence: 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)
Propositions as Types
The system has a dual interpretation:
◮ once as mathematical objects: types are “sets” and their
terms are “elements”, which are being constructed,
◮ once as logical objects: types are “propositions” and their
terms are “proofs”, which are being derived. This is also known as the Curry-Howard correspondence: 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.
Identity types
According to the logical interpretation we have:
◮ propositional logic: A + B, A × B, A → B, ◮ predicate logic: B(x), C(x, y), with quantifiers and .
Identity types
According to the logical interpretation we have:
◮ propositional logic: A + B, A × B, A → B, ◮ predicate logic: B(x), C(x, y), with quantifiers and .
So it’s natural to add a primitive relation of identity between any terms of the same type: x, y : A ⊢ IdA(x, y) This type represents the logical proposition “x is identical to y”.
Identity types
According to the logical interpretation we have:
◮ propositional logic: A + B, A × B, A → B, ◮ predicate logic: B(x), C(x, y), with quantifiers and .
So it’s natural to add a primitive relation of identity between any terms 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 newly discovered “geometric” interpretation.
Rules for identity types
The introduction rule says that a : A is always identical to itself: r(a) : IdA(a, a)
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)
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) ”
The homotopy interpretation
Suppose we have terms of ascending identity types: a, b : A p, q : IdA(a, b) α, β : IdIdA(a,b)(p, q) . . . : IdIdId...(. . .)
The homotopy interpretation
Suppose 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 ⇛ q
. . .
The homotopy interpretation: Type dependency
We still need to interpret dependent types x : A ⊢ B(x).
The homotopy interpretation: Type dependency
We still need to interpret dependent types x : A ⊢ B(x). The identity rules imply the following:
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′)
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′)”.
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′
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.
The homotopy interpretation: Type dependency
Thus we continue the homotopy interpretation as follows: Dependent types x : A ⊢ B(x)
- Fibrations
B
- A
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.
The homotopy interpretation: Identity types
To interpret the identity type x, y : A ⊢ IdA(x, y), we thus require a fibration over A × A.
The homotopy interpretation: Identity types
To interpret the identity type x, y : A ⊢ IdA(x, y), we thus require a 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 homotopy interpretation: Identity types
To interpret the identity type x, y : A ⊢ IdA(x, y), we thus require a 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 of paths from a to b in A. IdA(a, b)
- AI
- 1
(a,b)
A × A.
The homotopy interpretation: Identity types
The path space AI classifies homotopies ϑ : f ⇒ g between maps f , g : X → A, AI
- X
ϑ
- (f ,g)
A × A.
The homotopy interpretation: Identity types
The path space AI classifies homotopies ϑ : f ⇒ g between maps f , g : X → A, AI
- X
ϑ
- (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.
The homotopy interpretation: Summary
- 1. There is a topological interpretation of the λ-calculus:
types spaces terms continuous functions . . . computability continuity
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,
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
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,
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 be path spaces,
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 be path spaces, and terms of Id-types to be homotopies.
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
◮ Gives a wide range of different models.
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
◮ Gives a wide range of different models. ◮ Includes classical homotopy of spaces and simplicial sets.
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
◮ Gives a wide range of different models. ◮ Includes classical homotopy of spaces and simplicial sets. ◮ Allows the use of standard methods from categorical logic.
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
◮ Gives a wide range of different models. ◮ Includes classical homotopy of spaces and simplicial sets. ◮ Allows the use of standard methods from categorical logic.
Theorem (Awodey & Warren 2006)
“Martin-L¨
- f type theory has a sound interpretation into abstract
homotopy theory.”
The homotopy interpretation: First theorems
Instead of concrete spaces and homotopies, we use the axiomatic description provided by Quillen model categories.
◮ Gives a wide range of different models. ◮ Includes classical homotopy of spaces and simplicial sets. ◮ Allows the use of standard methods from categorical logic.
Theorem (Awodey & Warren 2006)
“Martin-L¨
- f type theory has a sound interpretation into abstract
homotopy theory.”
Theorem (Gambino & Garner 2008)
“The homotopy interpretation of Martin-L¨
- f type theory is also
complete.”
- 1. The homotopy interpretation: Conclusion
Type theory provides a “logic of homotopy”.
- 2. Homotopy type theory
How expressive is constructive type theory as a formal language for homotopy theory?
- 2. Homotopy type theory
How expressive is constructive type theory as a formal language for homotopy theory? What facts, properties, and constructions from homotopy theory are logically expressible?
- 2. Homotopy type theory
How expressive is constructive type theory as a formal language for homotopy theory? What facts, properties, and constructions from homotopy theory are logically expressible? One example: the fundamental group and its higher-dimensional analogues are logical constructions.
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...(α, β)
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
- α
- α
- β
- ϑ
- a
- b
p
- q
Fundamental groupoids
As in topology, the terms of order 0 and 1, (“points” and “paths”),
- a
- b
- p
bear the structure of a groupoid.
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
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 a model of intensional type theory using groupoids as types.
Fundamental groupoids
But also just as in topology, the groupoid equations of associativity, inverse, and unit: p · (q · r) = (p · q) · r p−1 · p = 1 = p · p−1 1 · p = p = p · 1 do not hold strictly, but only “up to homotopy”.
Fundamental groupoids
But also just as in topology, the groupoid equations of associativity, inverse, and unit: p · (q · r) = (p · q) · r p−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
p
- p−1
- 1
- ϑ
Fundamental groupoids
The entire system of identity terms of all orders forms an infinite-dimensional graph, or “globular set”: A ⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . .
Fundamental groupoids
The entire system of identity terms of all orders forms an infinite-dimensional graph, or “globular set”: A ⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . . It has the structure of a (weak), infinite-dimensional, groupoid, as already occurring homotopy theory:
Theorem (Lumsdaine, Garner & van den Berg, 2009)
The system of identity terms of all orders over any fixed type is a weak ∞-groupoid.
Fundamental groupoids
The entire system of identity terms of all orders forms an infinite-dimensional graph, or “globular set”: A ⇔ IdA ⇔ IdIdA ⇔ IdIdIdA ⇔ . . . It has the structure of a (weak), infinite-dimensional, groupoid, as already occurring homotopy theory:
Theorem (Lumsdaine, Garner & van den Berg, 2009)
The system of identity terms of all orders over any fixed type is a weak ∞-groupoid. Every type has a fundamental weak ∞-groupoid.
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified by “homotopical dimension”.
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified by “homotopical dimension”. A type X is called: contractible iff
x:X
- y:X IdX(x, y) is inhabited,
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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,
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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,
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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,
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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.
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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.
Homotopy n-types
Voevodsky has discovered that the universe of all types is naturally stratified 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.
Machine implementation
Now one can combine the following:
Machine implementation
Now one can combine the following:
◮ the representation of homotopy theory in constructive type
theory
Machine implementation
Now one can combine the following:
◮ the representation of homotopy theory in constructive type
theory
◮ the well-developed implementations of type theory in
computational proof assistants like Coq.
Machine implementation
Now one can combine the following:
◮ the representation of homotopy theory in constructive type
theory
◮ the well-developed implementations of type theory in
computational proof assistants like Coq. Allows computer verified proofs in homotopy theory and related fields, in addition to constructive mathematics.
Machine implementation
Now one can combine the following:
◮ the representation of homotopy theory in constructive type
theory
◮ the well-developed implementations of type theory in
computational proof assistants like Coq. Allows computer verified proofs in homotopy theory and related fields, in addition to constructive mathematics. This aspect is being very actively pursued right now in the Univalent Foundations Program.
A computational example
A classical result states that the higher homotopy groups of a space are always abelian.
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
◮ the fundamental group π1(X, b) of a type X at basepoint
b : X consists of terms of type IdX(b, b).
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
◮ the fundamental group π1(X, b) of a type X at basepoint
b : X consists of terms of type IdX(b, b).
◮ the second homotopy group π2(X, b) consists of terms of type
IdIdX (b,b)(r(b), r(b)).
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
◮ the fundamental group π1(X, b) of a type X at basepoint
b : X consists of terms of type IdX(b, b).
◮ the second homotopy group π2(X, b) consists of terms of type
IdIdX (b,b)(r(b), r(b)).
◮ Each of these types has a group structure, and so the second
- ne has two group structures that are compatible.
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
◮ the fundamental group π1(X, b) of a type X at basepoint
b : X consists of terms of type IdX(b, b).
◮ the second homotopy group π2(X, b) consists of terms of type
IdIdX (b,b)(r(b), r(b)).
◮ Each of these types has a group structure, and so the second
- ne has two group structures that are compatible.
◮ Now the Eckmann-Hilton argument shows that the two
structures on π2(X, b) agree, and are abelian.
A computational example
A classical result states that the higher homotopy groups of a space are always abelian. We can formalize this in type theory:
◮ the fundamental group π1(X, b) of a type X at basepoint
b : X consists of terms of type IdX(b, b).
◮ the second homotopy group π2(X, b) consists of terms of type
IdIdX (b,b)(r(b), r(b)).
◮ Each of these types has a group structure, and so the second
- ne has two group structures that are compatible.
◮ Now the Eckmann-Hilton argument shows that the two
structures 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 verify proofs in homotopy theory.
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.
(** 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.
(** 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.
(** 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).
- 2. Homotopy type theory: Conclusion
◮ Type theory provides a logic of homotopy.
- 2. Homotopy type theory: Conclusion
◮ Type theory provides a logic of homotopy. ◮ Logical methods can in principle capture a lot of homotopy
theory: e.g. the fundamental ∞-groupoid of a space is a logical construction, and the notion of n-type is logically definable.
- 2. Homotopy type theory: Conclusion
◮ Type theory provides a logic of homotopy. ◮ Logical methods can in principle capture a lot of homotopy
theory: e.g. the fundamental ∞-groupoid of a space is a logical construction, and the notion of n-type is logically definable.
◮ Many results have already been formalized: homotopy groups
- f spheres, Freudenthal suspension theorem, Postnokov
towers, Eilenberg–Mac Lane spaces, ...
◮ Other areas are also being developed:
◮ Elementary mathematics: basic algebra, real numbers, cardinal
arithmetic, ...
- 2. Homotopy type theory: Conclusion
◮ Type theory provides a logic of homotopy. ◮ Logical methods can in principle capture a lot of homotopy
theory: e.g. the fundamental ∞-groupoid of a space is a logical construction, and the notion of n-type is logically definable.
◮ Many results have already been formalized: homotopy groups
- f spheres, Freudenthal suspension theorem, Postnokov
towers, Eilenberg–Mac Lane spaces, ...
◮ Other areas are also being developed:
◮ Elementary mathematics: basic algebra, real numbers, cardinal
arithmetic, ...
◮ Foundations: quotient types, inductive types, cumulative
hierarchy of sets, ...
- 2. Homotopy type theory: Conclusion
◮ Type theory provides a logic of homotopy. ◮ Logical methods can in principle capture a lot of homotopy
theory: e.g. the fundamental ∞-groupoid of a space is a logical construction, and the notion of n-type is logically definable.
◮ Many results have already been formalized: homotopy groups
- f spheres, Freudenthal suspension theorem, Postnokov
towers, Eilenberg–Mac Lane spaces, ...
◮ Other areas are also being developed:
◮ Elementary mathematics: basic algebra, real numbers, cardinal
arithmetic, ...
◮ Foundations: quotient types, inductive types, cumulative
hierarchy of sets, ...
◮ Some new logical ideas are suggested by the homotopy
interpretation: Higher inductive types, Univalence axiom.
- 3. Higher-dimensional inductive types
(Due to Lumsdaine & Shulman, but very much work in progress.)
- 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 an inductively defined structure of type:
- : N
s : N → N
- 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 an inductively defined structure of type:
- : N
s : N → N The recursion property is captured by an elimination rule: a : X f : X → X rec(a, f ) : N → X
- 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 an inductively defined structure of type:
- : N
s : N → N The recursion property is captured by an elimination rule: a : X f : X → X rec(a, f ) : N → X such that: rec(a, f )(o) = a rec(a, f )(sn) = f (rec(a, f )(n))
Higher-dimensional inductive types
This says just that (N, o, s) is the free structure of this type: 1
- a
- N
s
- rec
X
f
Higher-dimensional inductive types
This says just that (N, o, s) is the free structure of this type: 1
- a
- N
s
- rec
X
f
- The map rec(a, f ) : N → X is unique with this property.
Higher-dimensional inductive types: The circle S1
The homotopical circle S = S1 can also be given as an inductive type, now involving a higher-dimensional generator: base : S loop : base base Here we have written loop : base base for the “loop” loop : IdS(base, base).
Higher-dimensional inductive types: The circle S1
There is an associated recursion property, captured again by an elimination rule: a : X q : a a rec(a, q) : S → X
Higher-dimensional inductive types: The circle S1
There is an associated recursion property, captured again by an elimination 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.
Higher-dimensional inductive types: The circle S1
This says that (S, base, loop) is the free structure of this (higher) type: 1
base
- a
- base
loop
- S
rec
X
a
q
Higher-dimensional inductive types: The circle S1
This says that (S, base, loop) is the free structure of this (higher) type: 1
base
- a
- base
loop
- S
rec
X
a
q
- The map rec(a, q) : S → X is then unique up to homotopy.
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 = 1.
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 = 1. The proof has been formalized in Coq. It combines classical homotopy theory with methods from constructive type theory, and uses Voevodsky’s Univalence Axiom.
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 = 1. The proof has been formalized in Coq. It combines classical homotopy theory with methods from constructive type theory, and uses Voevodsky’s Univalence Axiom.
Corollary
There are homotopy 1-types.
Higher-dimensional inductive types: The interval I
The unit interval I = [0, 1] is also an inductive type, on the data: 0, 1 : I p : 0 1 Again writing p : 0 1 for the path p : IdI(0, 1).
Higher-dimensional inductive types: The interval I
The unit interval I = [0, 1] is also an inductive type, on the data: 0, 1 : I p : 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 to define the notion of a path.
Higher-dimensional inductive types: The interval I
The unit interval I = [0, 1] is also an inductive type, on the data: 0, 1 : I p : 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 to define the notion of a path. In HoTT, we start with the notion of a path, and use it to define the interval.
- 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.
- 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.
- 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 the transformations αX :
- (A → X) × (B → X)
- X
are natural in X.
- 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)
- 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.
- 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
- 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 required
naturality condition includes a further coherence condition.
- 3. Higher-dimensional inductive types: Conclusion
Many basic spaces and constructions can be introduced as HITs:
◮ higher spheres Sn, cylinders, tori, cell complexes, . . . , ◮ suspensions ΣA, ◮ homotopy pullbacks, pushouts, etc., ◮ truncations, such as connected components π0(A) and
“bracket” types,
◮ quotients by equivalence relations, ◮ higher homotopy groups, ◮ Quillen model structure.
- 3. Higher-dimensional inductive types: Conclusion
Many basic spaces and constructions can be introduced as HITs:
◮ higher spheres Sn, cylinders, tori, cell complexes, . . . , ◮ suspensions ΣA, ◮ homotopy pullbacks, pushouts, etc., ◮ truncations, such as connected components π0(A) and
“bracket” types,
◮ quotients by equivalence relations, ◮ higher homotopy groups, ◮ Quillen model structure.
Some of these have impredicative constructions, some do not. A general theory is the topic of current research.
- 4. Univalence
Voevodsky has proposed a new foundational axiom to be added to HoTT: the Univalence Axiom.
- 4. Univalence
Voevodsky has proposed a new foundational axiom to be added to HoTT: the Univalence Axiom.
◮ It captures the informal mathematical practice of identifying
isomorphic objects.
- 4. Univalence
Voevodsky has proposed a new foundational axiom to be added to HoTT: the Univalence Axiom.
◮ It captures the informal mathematical practice of identifying
isomorphic objects.
◮ It is formally incompatible with conventional foundations.
- 4. Univalence
Voevodsky has proposed a new foundational axiom to be added to HoTT: the Univalence Axiom.
◮ It captures the informal mathematical practice of identifying
isomorphic objects.
◮ It is formally incompatible with conventional foundations. ◮ It is formally consistent with homotopy type theory. ◮ It has has powerful consequences, especially when combined
with HITs.
Isomorphism
In type theory, the notion of type isomorphism A ∼ = B is definable as usual: A ∼ = B ⇔ there are f : A → B and g : B → A such that gfx = x and fgy = y.
Isomorphism
In type theory, the notion of type isomorphism A ∼ = B is definable as usual: A ∼ = B ⇔ there are f : A → B and g : B → A such 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)
Isomorphism
In type theory, the notion of type isomorphism A ∼ = B is definable as usual: A ∼ = B ⇔ there are f : A → B and g : B → A such 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.
Isomorphism: Remarks
Iso(A, B) :=
- f :A→B
- g:B→A
x:A
IdA(gfx, x) ×
- y:B
IdB(fgy, y)
- ◮ It is convenient to add a “coherence” condition relating the
proofs of gfx = x and fgy = y.
Isomorphism: Remarks
Iso(A, B) :=
- f :A→B
- g:B→A
x:A
IdA(gfx, x) ×
- y:B
IdB(fgy, y)
- ◮ It is convenient to add a “coherence” condition relating the
proofs of gfx = x and fgy = y.
◮ Under the homotopy interpretation, this then becomes the
type of homotopy equivalences.
Isomorphism: Remarks
Iso(A, B) :=
- f :A→B
- g:B→A
x:A
IdA(gfx, x) ×
- y:B
IdB(fgy, y)
- ◮ It is convenient to add a “coherence” condition relating the
proofs of gfx = x and fgy = y.
◮ Under the homotopy interpretation, this then becomes the
type of homotopy equivalences.
◮ The same notion also subsumes logical equivalence,
isomorphism of sets, and categorical equivalence.
Invariance
One can show that in type theory without universes, all definable properties P(X) of types X respect type isomorphism, in the sense that the following inference holds: A ∼ = B P(A) P(B)
Invariance
One can show that in type theory without universes, all definable properties P(X) of types X respect type isomorphism, in the sense that the following inference holds: A ∼ = B P(A) P(B) In this sense, all definable properties are invariant.
Invariance
One can show that in type theory without universes, all definable properties P(X) of types X respect type isomorphism, in the sense that 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
Invariance
One can show that in type theory without universes, all definable properties P(X) of types X respect type isomorphism, in the sense that 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 in a system with universes?
Universes
In order to reason directly about identity of types, we need a universe U, which then has an identity type: IdU(A, B)
Universes
In order to reason directly about identity of types, we need a universe 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).
Universes
In order to reason directly about identity of types, we need a universe 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.
The Univalence Axiom
Voevodsky’s Univalence Axiom asserts that this comparison map is itself an isomorphism: IdU(A, B)
∼
− → Iso(A, B) (UA)
The Univalence Axiom
Voevodsky’s Univalence Axiom asserts that this comparison map is itself an isomorphism: IdU(A, B)
∼
− → Iso(A, B) (UA) So UA can be stated: “Identity is isomorphic to isomorphism.”
The Univalence Axiom: How it works
R S1 cov
base 1 2
Definition (Universal Cover of S1)
Define a dependent type cov : S
U by circle-recursion, with
cov(base) := Z cov(loop) := ua(succ).
The Univalence Axiom: How it works
To define a dependent type on S1, cov : S1 − → U we need the following data:
◮ a point A : U ◮ a loop p : A A
The Univalence Axiom: How it works
To define a dependent type on S1, cov : S1 − → U we need the following data:
◮ a point A : U ◮ a loop p : A A
For the point A we take the integers Z.
The Univalence Axiom: How it works
To define a dependent type on S1, cov : S1 − → U we need the following data:
◮ a point A : U ◮ 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 an isomorphism Z ∼ = Z, for which we choose the successor function succ : Z ∼ = Z.
The Univalence Axiom: How it works
To define a dependent type on S1, cov : S1 − → U we need the following data:
◮ a point A : U ◮ 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 an isomorphism Z ∼ = Z, for which we choose the successor function succ : Z ∼ = Z. Now we can set: cov(base) := Z cov(loop) := ua(succ).
The Univalence Axiom: Remarks
◮ Since UA is an iso, there is a map coming back:
IdU(A, B) ← − Iso(A, B) So isomorphic objects are identical.
The Univalence Axiom: Remarks
◮ Since UA is an iso, there is a map coming back:
IdU(A, B) ← − Iso(A, B) So isomorphic objects are identical.
◮ 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.
The Univalence Axiom: Remarks
◮ Since UA is an iso, there is a map coming back:
IdU(A, B) ← − Iso(A, B) So isomorphic objects are identical.
◮ 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.
◮ Incompatible with conventional foundations in set theory, but
consistent with HoTT: Voevodsky has a model in SSets.
The Univalence Axiom: Remarks
◮ Since UA is an iso, there is a map coming back:
IdU(A, B) ← − Iso(A, B) So isomorphic objects are identical.
◮ 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.
◮ Incompatible with conventional foundations in set theory, but
consistent with HoTT: Voevodsky has a model in SSets.
◮ Conjecture (Voevodsky): UA preserves the computational
character of the total system.
Conclusion
Homotopy Type Theory is a topological interpretation of constructive type theory that allows purely formal reasoning in homotopy theory.
Conclusion
Homotopy Type Theory is a topological interpretation of constructive type theory that allows purely formal reasoning in homotopy theory. Univalent Foundations is a new approach to the foundations of mathematics based on Homotopy Type Theory, with both intrinsic geometric content and a computational implementation.
Conclusion
Homotopy Type Theory is a topological interpretation of constructive type theory that allows purely formal reasoning in homotopy theory. Univalent Foundations is a new approach to the foundations of mathematics based on Homotopy Type Theory, with both intrinsic geometric content and a computational implementation. The Univalence Axiom is a powerful new principle of reasoning that is incompatible with conventional foundations, and yet (conjecture!) computationally admissible.
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
Homotopy Type Theory
UNIVALENT FOUNDATIONS OF MATHEMATICS
The Univalent Foundations Program Institute for Advanced Study