Informal cubical type theory Bruno Bentzen Carnegie Mellon - - PowerPoint PPT Presentation

informal cubical type theory
SMART_READER_LITE
LIVE PREVIEW

Informal cubical type theory Bruno Bentzen Carnegie Mellon - - PowerPoint PPT Presentation

Outline Informal type theory Cubical type theory Proofs Informal cubical type theory Bruno Bentzen Carnegie Mellon University, USA bbentzen@andrew.cmu.edu August 16, 2019 Bruno Bentzen Informal cubical type theory 1 / 58 Outline


slide-1
SLIDE 1

Outline Informal type theory Cubical type theory Proofs

Informal cubical type theory

Bruno Bentzen

Carnegie Mellon University, USA bbentzen@andrew.cmu.edu

August 16, 2019

Bruno Bentzen Informal cubical type theory 1 / 58

slide-2
SLIDE 2

Outline Informal type theory Cubical type theory Proofs

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 2 / 58

slide-3
SLIDE 3

Outline Informal type theory Cubical type theory Proofs Motivation

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 3 / 58

slide-4
SLIDE 4

Outline Informal type theory Cubical type theory Proofs Motivation

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 4 / 58

slide-5
SLIDE 5

Outline Informal type theory Cubical type theory Proofs Motivation

What is informal type theory? the study of conventions for doing everyday mathematics in natural language assuming type theory as the underlying foundation.

Bruno Bentzen Informal cubical type theory 5 / 58

slide-6
SLIDE 6

Outline Informal type theory Cubical type theory Proofs Motivation

What is informal type theory? the study of conventions for doing everyday mathematics in natural language assuming type theory as the underlying foundation. For homotopy type theory: the project was carried out in the HoTT book.

Bruno Bentzen Informal cubical type theory 5 / 58

slide-7
SLIDE 7

Outline Informal type theory Cubical type theory Proofs Motivation

What is informal type theory? the study of conventions for doing everyday mathematics in natural language assuming type theory as the underlying foundation. For homotopy type theory: the project was carried out in the HoTT book. Cubical type theory is more amenable to constructive interpretations, but it can be a challenge to understand for the uninitiated. the informal type theory project is a nice way to remedy the situation.

Bruno Bentzen Informal cubical type theory 5 / 58

slide-8
SLIDE 8

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 6 / 58

slide-9
SLIDE 9

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

In this talk, “cubical type theory” means “cartesian cubical type theory” [ABC+17]

Bruno Bentzen Informal cubical type theory 7 / 58

slide-10
SLIDE 10

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

In this talk, “cubical type theory” means “cartesian cubical type theory” [ABC+17] Cubical type theory is based on the same basic homotopical perspective as homotopy type theory [AW09, Voe06] in which we regard a type A as a space; a term a : A as a point of the space A; a function f : A → B as a continuous map; a path p : pathA(a, b) as a path from point a to b in the space A; a type family P : A → U as a fibration; p : pathU(A, B) as a homotopy equivalence between spaces A and B

Bruno Bentzen Informal cubical type theory 7 / 58

slide-11
SLIDE 11

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

By the homotopy hypothesis, homotopy types can be modelled by higher groupoids. Higher groupoids can in turn be defined in terms of simplicial sets, or, as an alternative presentation, cubical sets.

Bruno Bentzen Informal cubical type theory 8 / 58

slide-12
SLIDE 12

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

By the homotopy hypothesis, homotopy types can be modelled by higher groupoids. Higher groupoids can in turn be defined in terms of simplicial sets, or, as an alternative presentation, cubical sets. The main view that we take in this talk can be stated as: types in cubical type theory are cubical ∞-groupoids

Bruno Bentzen Informal cubical type theory 8 / 58

slide-13
SLIDE 13

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 9 / 58

slide-14
SLIDE 14

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

We start by considering an abstraction of the unit interval in the real line, a space consisting of two points, 0 and 1, the interval type, I.

Bruno Bentzen Informal cubical type theory 10 / 58

slide-15
SLIDE 15

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

We start by considering an abstraction of the unit interval in the real line, a space consisting of two points, 0 and 1, the interval type, I. We visualize a closed term a : A as a point (0-cell). · a

Bruno Bentzen Informal cubical type theory 10 / 58

slide-16
SLIDE 16

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

We start by considering an abstraction of the unit interval in the real line, a space consisting of two points, 0 and 1, the interval type, I. We visualize a closed term a : A as a point (0-cell). · a We think of an open term p : A depending on i : I as a path (1-cell) p[0/i] p[1/i]

p i

with initial point p[0/i] and terminal point p[1/i].

Bruno Bentzen Informal cubical type theory 10 / 58

slide-17
SLIDE 17

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

An open term h : A depending on i, j : I is a “homotopy of paths” (2-cell) h[1, 0/j, i] h[1, 1/j, i] h[0, 0/j, i] h[0, 1/j, i]

h[1/j]

h

i j h[0/j] h[0/i] h[1/i]

where paths are allowed to have free (but path-connected) endpoints.

Bruno Bentzen Informal cubical type theory 11 / 58

slide-18
SLIDE 18

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

An open term α : A depending on i, j, k : I is a path over a path homotopy with free endpoints (3-cell)

· · · · · · · ·

α[0, 0/j, i] α[1, 0/k, j] α[1, 0/k, i] α[1, 1/k, i] α[1, 1/k, j] i k j α[0, 0/k, j] α[0, 0/k, i] α[0, 1/j, i] α[0, 1/k, i] α[1, 0/j, i] α[0, 1/k, j] α[1, 1/j, i]

Bruno Bentzen Informal cubical type theory 12 / 58

slide-19
SLIDE 19

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

An open term α : A depending on i, j, k : I is a path over a path homotopy with free endpoints (3-cell)

· · · · · · · ·

α[0, 0/j, i] α[1, 0/k, j] α[1, 0/k, i] α[1, 1/k, i] α[1, 1/k, j] i k j α[0, 0/k, j] α[0, 0/k, i] α[0, 1/j, i] α[0, 1/k, i] α[1, 0/j, i] α[0, 1/k, j] α[1, 1/j, i]

It is hard enough to visualize higher dimensions of space, but, most certainly, you can guess what comes next: we think of higher-order open terms as higher-dimensional free path homotopies, and we picture them as hypercubes.

Bruno Bentzen Informal cubical type theory 12 / 58

slide-20
SLIDE 20

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 13 / 58

slide-21
SLIDE 21

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

It is useful to have a type that internalizes higher cubes. Obvious choice: the type of functions from the interval, I → A (line type).

Bruno Bentzen Informal cubical type theory 14 / 58

slide-22
SLIDE 22

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

It is useful to have a type that internalizes higher cubes. Obvious choice: the type of functions from the interval, I → A (line type). Given any type A : U and terms a, b : A we can construct the type of paths from a to b in A, which we call their path type, denoted pathA(a, b). We explain the path type by prescribing: how to construct paths: abstraction (ip) how can we use paths: application (p@i) what equalities they induce: α, β, η and, for p : pathA(a, b), p@0 ≡ a : A p@1 ≡ b : A (This is sometimes called the non-dependent path type)

Bruno Bentzen Informal cubical type theory 14 / 58

slide-23
SLIDE 23

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 15 / 58

slide-24
SLIDE 24

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

  • Coercion. This is a generalization of transport [The13, Lem 2.3.1].

Given i, j : I, a path between types A : I → U and a term a : A(i), there exists term of type A(j), called the coercion of a from i to j over A, and denoted by aij

A

: A(j). a01

A

: A(1) : a : A(0)

j a0j

A

A

We also require that static coercions have no effect, i.e. aii

A

≡ a.

Bruno Bentzen Informal cubical type theory 16 / 58

slide-25
SLIDE 25

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

  • Composition. This ensures that any open box can be filled.

q(1) r(1) q(0) ≡ p(0) p(1) ≡ r(0)

i j q(j) p(i) r(j)

This square is the filler of the composition and, for i, j : I, it is denoted by p(i)0j

A

[(i = 0) → j.q(j), (i = 1) → j.r(j)] : A we insist that static compositions be ineffective, i.e. p(i)kk

A

[(i = 0) → j.q(j), (i = 1) → j.r(j)] ≡ p(i)

Bruno Bentzen Informal cubical type theory 17 / 58

slide-26
SLIDE 26

Outline Informal type theory Cubical type theory Proofs Higher cubes The path type Kan operations

  • Composition. This ensures that any open box can be filled.

q(1) r(1) q(0) ≡ p(0) p(1) ≡ r(0)

i j q(j) p(i) r(j) s@i

This square is the filler of the composition and, for i, j : I, it is denoted by p(i)0j

A

[(i = 0) → j.q(j), (i = 1) → j.r(j)] : A we insist that static compositions be ineffective, i.e. p(i)kk

A

[(i = 0) → j.q(j), (i = 1) → j.r(j)] ≡ p(i)

Bruno Bentzen Informal cubical type theory 18 / 58

slide-27
SLIDE 27

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 19 / 58

slide-28
SLIDE 28

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 20 / 58

slide-29
SLIDE 29

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

What is a proof? Without being too philosophical about it: a proof is a sufficient argument for the truth of a proposition.

Bruno Bentzen Informal cubical type theory 21 / 58

slide-30
SLIDE 30

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

What is a proof? Without being too philosophical about it: a proof is a sufficient argument for the truth of a proposition. Just as in category theory, we consider diagram chasing as a sufficient argument in (informal) cubical type theory. a b c d

f

H

i j g f ′ g ′

Except that we understand commutative diagrams homotopically!

Bruno Bentzen Informal cubical type theory 21 / 58

slide-31
SLIDE 31

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Let us start with identity, composition and inversion of morphisms:

Lemma (Reflexivity)

For every type A and every a : A, there exists a path pathA(a, a) called the reflexivity path of a and denoted refla.

Bruno Bentzen Informal cubical type theory 22 / 58

slide-32
SLIDE 32

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Let us start with identity, composition and inversion of morphisms:

Lemma (Reflexivity)

For every type A and every a : A, there exists a path pathA(a, a) called the reflexivity path of a and denoted refla.

Proof.

Suppose that i : I is a fresh interval point. Since a does not depend on i, meaning that a[ǫ/i] ≡ a, for ǫ = 0, 1, we have a degenerate line in the i “direction” from a to a in A, and ia gives us the required path.

Bruno Bentzen Informal cubical type theory 22 / 58

slide-33
SLIDE 33

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Path inversion)

For every type A and every a, b : A, there is a function pathA(a, b) → pathA(b, a) called the inverse function and denoted p → p−1.

Bruno Bentzen Informal cubical type theory 23 / 58

slide-34
SLIDE 34

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

Note that p : pathA(a, b) gives a “j-line” p@j from a to b in A. We have an open box (where degeneracy is indicated using double bars): b a a a

a01

A

[(i = 0) → j.p@j, (i = 1) → j.a] i j a p@j a

By composition, it must have a lid, so, by path abstraction on the resulting (dotted) i-line, we have a path from b to a in A.

Bruno Bentzen Informal cubical type theory 24 / 58

slide-35
SLIDE 35

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Path concatenation)

For every type A and every a, b, c : A, there is a function pathA(a, b) → pathA(b, c) → pathA(a, c) denoted p → q → p q. We call p q the concatenation of p and q.

Bruno Bentzen Informal cubical type theory 25 / 58

slide-36
SLIDE 36

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

Given paths p : pathA(a, b) and q : pathA(b, c), we can construct an i-line p@i from a to b and a j-line q@j from b to c. We have an open square: a c a b

p@i01

A

[(i = 0) → j.a, (i = 1) → j.q@j] i j p@i a q@j

We obtain the required path from a to c in A by path abstraction on the line obtained by composition.

Bruno Bentzen Informal cubical type theory 26 / 58

slide-37
SLIDE 37

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

The basic intuition: a d b c

p−1 (p q)@i i j q@i p−1@j r@j

Composition generalizes path inversion and concatenation!

Bruno Bentzen Informal cubical type theory 27 / 58

slide-38
SLIDE 38

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 28 / 58

slide-39
SLIDE 39

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Meet)

Suppose A : U, a, b : A and p : pathA(a, b). There is an operation p(− ∧ −) : I → I → A such that, for any i, j : I, the following holds: a b a a

p@i

p(i ∧ j)

i j p@j

Bruno Bentzen Informal cubical type theory 29 / 58

slide-40
SLIDE 40

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

Given p : pathA(a, b), we are to find a (i, j)-square whose top face is p@i, right face is p@j, left and bottom faces are a. First, by composition, we

  • btain a “halfway” connection

a b a a

p∗ :≡ a01

A

[(i = 0) → j.a, (i = 1) → j.p@j]

p(i ∧∗ j)

i j p@j

and we use it to perform a two-extent composition

Bruno Bentzen Informal cubical type theory 30 / 58

slide-41
SLIDE 41

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

attaching it to the back and right faces of open cube a a a b a a a a

p∗ p@i i k j p@k

Moral of the story: two wrongs make a right!

Bruno Bentzen Informal cubical type theory 31 / 58

slide-42
SLIDE 42

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Note that we could also have written out this proof in a full formal style: λA.λa.λb.λp.λi.λk. a01

A

[(i = 0) → j.a, (i = 1) → j.a0k

A

[(j = 0) → k.a, (j = 1) → k.p@k], (k = 0) → j.a0i

A

[(j = 0) → i.a, (j = 1) → i.p@i], (k = 1) → j.a] :

  • (A:U)
  • (a,b:A)
  • (p:pathA(a,b))

I → I → A

Bruno Bentzen Informal cubical type theory 32 / 58

slide-43
SLIDE 43

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Also, note that the proof could can be slightly improved a b a a

p@i i j p@j p@i

by making the diagonal definitionally equal to p!

Bruno Bentzen Informal cubical type theory 33 / 58

slide-44
SLIDE 44

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Join)

Given a, b : A, for any p : pathA(a, b), there is a function p(− ∨ −) : I → I → A such that, for i, j : I, we have: b b a b p(i ∨ j)

i j p@i p@j

Bruno Bentzen Informal cubical type theory 34 / 58

slide-45
SLIDE 45

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

By composition using p(− ∧∗ −): a a b b a b a a

p∗@j p∗@j i k j p@i p@k p∗@j

Bruno Bentzen Informal cubical type theory 35 / 58

slide-46
SLIDE 46

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 36 / 58

slide-47
SLIDE 47

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Right unit law)

For every A and every a, b : A we have a path rup : pathpathA(a,b)(p, p reflb) for any p : pathA(a, b).

Bruno Bentzen Informal cubical type theory 37 / 58

slide-48
SLIDE 48

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

We need to construct a square: a b a b

p reflb@i i j p@i a b

but the filler of path concatenation already gives us this!

Bruno Bentzen Informal cubical type theory 38 / 58

slide-49
SLIDE 49

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Left unit law)

For every A and every a, b : A we have a path lup : pathpathA(a,b)(p, refla p) for any p : pathA(a, b).

Bruno Bentzen Informal cubical type theory 39 / 58

slide-50
SLIDE 50

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

By composition, we define a helper (i, j)-square that goes from p−1@i to b in the i-direction and from b to p@j in the j-direction. a a b b b a a a

p@j p@j

γ (p(¬i ∨ k))

i k j p−1@i p@k p@j

We use the filler of the path inversion of p (bottom), meet (right), degenerate lines (back) and points (left and bottom).

Bruno Bentzen Informal cubical type theory 40 / 58

slide-51
SLIDE 51

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

Forming a new open cube, we set γ at the right, the filler of refla p at the back, the filler of p−1 at the bottom, and degenerate squares at the other faces. a a a b a b a b

p@j refla p@i i k j p@i p@i p−1@k

Bruno Bentzen Informal cubical type theory 41 / 58

slide-52
SLIDE 52

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Right cancellation)

For every A and every a, b : A we have a path rcp : pathpathA(a,b)(refla, p p−1) for any p : pathA(a, b).

Bruno Bentzen Informal cubical type theory 42 / 58

slide-53
SLIDE 53

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

We fill the following open (i, j, k)-cube a b a a a a a b

p@i p−1@j i k j p p−1@i p@i p−1@j

whose back and front squares are respectively the fillers for path inversion and concatenation.

Bruno Bentzen Informal cubical type theory 43 / 58

slide-54
SLIDE 54

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Left cancellation)

For every A and every a, b : A we have a path lcp : pathpathA(b,b)(reflb, p−1 p) for any p : pathA(a, b).

Bruno Bentzen Informal cubical type theory 44 / 58

slide-55
SLIDE 55

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

By composition on the following open cube, whose back face is the γ square from the proof of Left Unit lemma. b b a a a a a b

p−1@i p@j i k j p−1 p@i p@i p@j

Bruno Bentzen Informal cubical type theory 45 / 58

slide-56
SLIDE 56

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Inversion involution)

For every A and every a, b : A, we have a path invp : pathpathA(a,b)(p, p−1−1) for any p : pathA(a, b).

Bruno Bentzen Informal cubical type theory 46 / 58

slide-57
SLIDE 57

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

The proof follows by the use of meets, joins and γ to form the composite: a a a b a b b b

p@j p@i i k j p−1−1@i p−1@j p−1@k p−1@k

Bruno Bentzen Informal cubical type theory 47 / 58

slide-58
SLIDE 58

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Lemma (Associativity)

For every A and every a, b, c, d : A, we have a path assocp,q,r : pathpathA(a,d)((p q) r, p (q r)) for any p : pathA(a, b), q : pathA(a, b), pathA(c, d).

Bruno Bentzen Informal cubical type theory 48 / 58

slide-59
SLIDE 59

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

The proof idea is that any two squares with definitionally equal bottom, right and left faces must have the same top up to a path.

a d a d a b a b

p (q r)@i

α

(p q) r@i

β

i j p@i q r@j p@i q r@j

where leftmost square is just the filler of path concatenation

Bruno Bentzen Informal cubical type theory 49 / 58

slide-60
SLIDE 60

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

The identification can be derived by a simple composition: a c a d a d a b

p@i q r@j p (q r)@i i k j (p q) r@i p@i q r@j

Now we just have to construct the rightmost square.

Bruno Bentzen Informal cubical type theory 50 / 58

slide-61
SLIDE 61

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

It can be obtained by composition on the filler of path concatenation. a c a d a b a b

p q@i r@j (p q) r@i i k j p@i q r@k p@i q@j

Bruno Bentzen Informal cubical type theory 51 / 58

slide-62
SLIDE 62

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

1 Informal type theory

Motivation

2 Cubical type theory

Higher cubes The path type Kan operations

3 Proofs

Groupoid operations Weak connections Groupoid laws Path induction

Bruno Bentzen Informal cubical type theory 52 / 58

slide-63
SLIDE 63

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Theorem (Based path induction)

Given A : U, a : A, and a type family C :

(x:A) pathA(a, x) → U, we have

a function pathrec :

  • (x:A)
  • (p:pathA(a,x))
  • (u:C(a,refla))

C(x, p).

Bruno Bentzen Informal cubical type theory 53 / 58

slide-64
SLIDE 64

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

We want to construct, for every x : A, p : pathA(a, x), and u : C(a, refla), a term of C(x, p). We shall use coercion on u over a type line C ′ : I → U between C ′(0) :≡ C(a, refla) and C ′(1) :≡ C(x, p).

Bruno Bentzen Informal cubical type theory 54 / 58

slide-65
SLIDE 65

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

We want to construct, for every x : A, p : pathA(a, x), and u : C(a, refla), a term of C(x, p). We shall use coercion on u over a type line C ′ : I → U between C ′(0) :≡ C(a, refla) and C ′(1) :≡ C(x, p). We use the meet square of p: a b a a

p@i

p(i ∧ j)

i j p@j

This square induces the desired type line C ′ :≡ λi.C(p@i, jp(i ∧ j)) : I → U

Bruno Bentzen Informal cubical type theory 54 / 58

slide-66
SLIDE 66

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Proof.

Because C ′ goes from C ′(0) ≡ C(p@0, jp(0 ∧ j)) ≡ C(a, ja) to C ′(1) ≡ C(p@1, jp(1 ∧ j)) ≡ C(x, j(p@j)) ≡ C(x, p) (via η-rule) Now we complete the proof by coercing u : C ′(0) from 0 to 1.

Bruno Bentzen Informal cubical type theory 55 / 58

slide-67
SLIDE 67

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

Thank you!

Bruno Bentzen Informal cubical type theory 56 / 58

slide-68
SLIDE 68

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

References I

Carlo Angiuli, Guillaume Brunerie, Thierry Coquand, Kuen-Bang Hou (Favonia), Robert Harper, and Daniel Licata. Cartesian cubical type theory. URL: https://github.com/dlicata335/cart-cube, 2 2017. Steve Awodey and Michael A Warren. Homotopy theoretic models of identity types. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 146, pages 45–55. Cambridge University Press, 2009. The Univalent Foundations Program. Homotopy type theory: Univalent foundations of mathematics, 2013.

Bruno Bentzen Informal cubical type theory 57 / 58

slide-69
SLIDE 69

Outline Informal type theory Cubical type theory Proofs Groupoid operations Weak connections Groupoid laws Path induction

References II

Vladimir Voevodsky. A very short note on the homotopy λ-calculus. URL: http: //www.math.ias.edu/vladimir/files/2006_09_Hlambda.pdf, 2006. Unpublished note.

Bruno Bentzen Informal cubical type theory 58 / 58