Cubical Indexed Induc ve Types Evan Cavallo Carnegie Mellon - - PowerPoint PPT Presentation

cubical indexed induc ve types
SMART_READER_LITE
LIVE PREVIEW

Cubical Indexed Induc ve Types Evan Cavallo Carnegie Mellon - - PowerPoint PPT Presentation

Cubical Indexed Induc ve Types Evan Cavallo Carnegie Mellon University jww Robert Harper HoTT-UF 2019 0 Higher induc ve types HoTT-UF 2019 1 Higher induc ve types roll quo ents and induc ve types into one HoTT-UF 2019 1


slide-1
SLIDE 1

HoTT-UF 2019

Cubical Indexed Inducve Types

Evan Cavallo

Carnegie Mellon University jww Robert Harper

slide-2
SLIDE 2

HoTT-UF 2019 1

Higher inducve types

slide-3
SLIDE 3

HoTT-UF 2019 1

Higher inducve types

roll quoents and inducve types into one

slide-4
SLIDE 4

HoTT-UF 2019 1

Higher inducve types

roll quoents and inducve types into one

slide-5
SLIDE 5

HoTT-UF 2019 1

Higher inducve types

roll quoents and inducve types into one Useful generality beyond ordinary quoents

slide-6
SLIDE 6

HoTT-UF 2019 1

Higher inducve types

roll quoents and inducve types into one Useful generality beyond ordinary quoents In ordinary TT: Cauchy reals, QIITs, . . .

slide-7
SLIDE 7

HoTT-UF 2019 1

Higher inducve types

roll quoents and inducve types into one Useful generality beyond ordinary quoents In ordinary TT: Cauchy reals, QIITs, . . . In higher-d TT: truncaons, . . .

slide-8
SLIDE 8

HoTT-UF 2019 2

Higher inducve types: what are they?

slide-9
SLIDE 9

HoTT-UF 2019 2

Higher inducve types: what are they?

HoTT: idea, many examples circles, pushouts, . . . ("ordinary" quoents) truncaons, localizaons (higher inducve types) Cauchy reals (higher inducve-inducve types)

slide-10
SLIDE 10

HoTT-UF 2019 2

Higher inducve types: what are they?

HoTT: idea, many examples circles, pushouts, . . . ("ordinary" quoents) truncaons, localizaons (higher inducve types) Cauchy reals (higher inducve-inducve types) no precise syntacc schema what forms can constructors take? deriving eliminators

slide-11
SLIDE 11

HoTT-UF 2019 2

Higher inducve types: what are they?

HoTT: idea, many examples circles, pushouts, . . . ("ordinary" quoents) truncaons, localizaons (higher inducve types) Cauchy reals (higher inducve-inducve types) no precise syntacc schema what forms can constructors take? deriving eliminators missing semancs for many how do programs with HITs compute? which HITs exist in denotaonal models? (pushouts?)

slide-12
SLIDE 12

HoTT-UF 2019 3

Higher inducve types: what are they?

advances in syntax Sojakova 2014: W-suspensions Basold, Geuvers, & van der Weide 2017: 1-d HITs Dybjer & Moeneclaey 2017: 2-d HITs Kaposi & Kovács 2018: n-d HIITs

slide-13
SLIDE 13

HoTT-UF 2019 4

Higher inducve types: what are they?

advances in semancs Lumsdaine & Shulman 2017: simplicial model cats syntax? HITs with parameters? Dybjer & Moeneclaey 2017: groupoid model Altenkirch, Kaposi, & Kovács 2019: w/ UIP

slide-14
SLIDE 14

HoTT-UF 2019 4

Higher inducve types: what are they?

advances in semancs Lumsdaine & Shulman 2017: simplicial model cats syntax? HITs with parameters? Dybjer & Moeneclaey 2017: groupoid model Altenkirch, Kaposi, & Kovács 2019: w/ UIP the "edge of understanding": syntax + semancs DM, AKK (truncated) cubical type theories

slide-15
SLIDE 15

HoTT-UF 2019 5

Cubical type theories

slide-16
SLIDE 16

HoTT-UF 2019 5

Cubical type theories

Move: higher type theories w/ computaonal meaning

slide-17
SLIDE 17

HoTT-UF 2019 5

Cubical type theories

Move: higher type theories w/ computaonal meaning Several variees: De Morgan cubes Cohen, Coquand, Huber, & Mörtberg 2015 Cartesian cubes Angiuli, Favonia, & Harper 2018 Angiuli, Brunerie, Coquand, Favonia, Licata, & Harper 2019 Substructural cubes Bezem, Coquand, & Huber 2013&2017

slide-18
SLIDE 18

HoTT-UF 2019 6

Move: higher type theories w/ computaonal meaning

Cubical type theories

slide-19
SLIDE 19

HoTT-UF 2019 6

Move: higher type theories w/ computaonal meaning

Cubical type theories

slide-20
SLIDE 20

HoTT-UF 2019 7

Cubical type theories

Move: higher type theories w/ computaonal meaning

slide-21
SLIDE 21

HoTT-UF 2019 8

Cubical type theories: why?

slide-22
SLIDE 22

HoTT-UF 2019 8

Cubical type theories: why?

Developed to give computaonal meaning to HoTT

slide-23
SLIDE 23

HoTT-UF 2019 8

Cubical type theories: why?

Developed to give computaonal meaning to HoTT also: construcve denotaonal models

slide-24
SLIDE 24

HoTT-UF 2019 8

Cubical type theories: why?

Developed to give computaonal meaning to HoTT also: construcve denotaonal models also: any models for many HITs

slide-25
SLIDE 25

HoTT-UF 2019 8

Cubical type theories: why?

Developed to give computaonal meaning to HoTT also: construcve denotaonal models also: any models for many HITs Useful for praccal formalizaon early movaon: Licata & Brunerie 2015

slide-26
SLIDE 26

HoTT-UF 2019 8

Cubical type theories: why?

Developed to give computaonal meaning to HoTT also: construcve denotaonal models also: any models for many HITs Useful for praccal formalizaon early movaon: Licata & Brunerie 2015 For HoTT purists: laboratory of higher ideas

slide-27
SLIDE 27

HoTT-UF 2019 9

Cubical inducve types: syntax

slide-28
SLIDE 28

HoTT-UF 2019 9

Cubical inducve types: syntax

Higher constructors via dimension arguments

slide-29
SLIDE 29

HoTT-UF 2019 9

Cubical inducve types: syntax

Higher constructors via dimension arguments Path constructors live in the inducve type

slide-30
SLIDE 30

HoTT-UF 2019 9

Cubical inducve types: syntax

Higher constructors via dimension arguments Path constructors live in the inducve type Scales well to >1-d (spheres, torus, . . .)

slide-31
SLIDE 31

HoTT-UF 2019 10

Cubical inducve types: syntax

Eliminaon: paern matching + coherence reqs

slide-32
SLIDE 32

HoTT-UF 2019 10

Cubical inducve types: syntax

Eliminaon: paern matching + coherence reqs

slide-33
SLIDE 33

HoTT-UF 2019 10

Cubical inducve types: syntax

Eliminaon: paern matching + coherence reqs

) (

slide-34
SLIDE 34

HoTT-UF 2019 10

Cubical inducve types: syntax

Eliminaon: paern matching + coherence reqs

) (

reduces when applied to a constructor

slide-35
SLIDE 35

HoTT-UF 2019 11

Cubical inducve types: syntax

Dealing with higher dimensions

slide-36
SLIDE 36

HoTT-UF 2019 11

Cubical inducve types: syntax

Dealing with higher dimensions HITs with >1-d constructors

slide-37
SLIDE 37

HoTT-UF 2019 11

Cubical inducve types: syntax

Dealing with higher dimensions HITs with >1-d constructors paern-matching on two HITs at once

slide-38
SLIDE 38

HoTT-UF 2019 12

Cubical inducve types: syntax

C & Harper: schema for indexed cubical HITs

slide-39
SLIDE 39

HoTT-UF 2019 12

Cubical inducve types: syntax

C & Harper: schema for indexed cubical HITs

← non-recursive ← recursive

slide-40
SLIDE 40

HoTT-UF 2019 12

Cubical inducve types: syntax

C & Harper: schema for indexed cubical HITs

← non-recursive ← recursive

slide-41
SLIDE 41

HoTT-UF 2019 12

Cubical inducve types: syntax

C & Harper: schema for indexed cubical HITs

← non-recursive ← recursive ← dimensions ← boundary

slide-42
SLIDE 42

HoTT-UF 2019 12

Cubical inducve types: syntax

C & Harper: schema for indexed cubical HITs

← non-recursive ← recursive ← dimensions ← boundary

slide-43
SLIDE 43

HoTT-UF 2019 13

Cubical inducve types: semancs

slide-44
SLIDE 44

HoTT-UF 2019 13

Cubical inducve types: semancs

Ingredients of a cubical type

slide-45
SLIDE 45

HoTT-UF 2019 13

Cubical inducve types: semancs

Ingredients of a cubical type Values

slide-46
SLIDE 46

HoTT-UF 2019 13

Cubical inducve types: semancs

Ingredients of a cubical type Values

slide-47
SLIDE 47

HoTT-UF 2019 13

Cubical inducve types: semancs

Ingredients of a cubical type Values Coercion and composion operaons

slide-48
SLIDE 48

HoTT-UF 2019 14

Interlude: semancs of cubical type theory

slide-49
SLIDE 49

HoTT-UF 2019 14

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths

slide-50
SLIDE 50

HoTT-UF 2019 14

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths

slide-51
SLIDE 51

HoTT-UF 2019 14

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths

slide-52
SLIDE 52

HoTT-UF 2019 14

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths

slide-53
SLIDE 53

HoTT-UF 2019 15

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-54
SLIDE 54

HoTT-UF 2019 15

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-55
SLIDE 55

HoTT-UF 2019 16

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-56
SLIDE 56

HoTT-UF 2019 16

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-57
SLIDE 57

HoTT-UF 2019 16

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-58
SLIDE 58

HoTT-UF 2019 16

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-59
SLIDE 59

HoTT-UF 2019 16

Interlude: semancs of cubical type theory

Coercion: all construcons respect paths Evaluate by cases on the type line

slide-60
SLIDE 60

HoTT-UF 2019 17

Interlude: semancs of cubical type theory

Composion: strengthening the inducon hypothesis

slide-61
SLIDE 61

HoTT-UF 2019 17

Interlude: semancs of cubical type theory

Composion: strengthening the inducon hypothesis add homogeneous composion

slide-62
SLIDE 62

HoTT-UF 2019 17

Interlude: semancs of cubical type theory

Composion: strengthening the inducon hypothesis add homogeneous composion

slide-63
SLIDE 63

HoTT-UF 2019 17

Interlude: semancs of cubical type theory

Composion: strengthening the inducon hypothesis add homogeneous composion

generalize coe to heterogeneous composion

( )

slide-64
SLIDE 64

HoTT-UF 2019 18

Cubical inducve types: semancs

slide-65
SLIDE 65

HoTT-UF 2019 18

Cubical inducve types: semancs

What are the values of a higher inducve type?

slide-66
SLIDE 66

HoTT-UF 2019 18

Cubical inducve types: semancs

What are the values of a higher inducve type?

slide-67
SLIDE 67

HoTT-UF 2019 18

Cubical inducve types: semancs

What are the values of a higher inducve type?

slide-68
SLIDE 68

HoTT-UF 2019 19

Cubical inducve types: semancs

What are the values of a higher inducve type?

( (

slide-69
SLIDE 69

HoTT-UF 2019 19

Cubical inducve types: semancs

What are the values of a higher inducve type?

( (

Can we implement coercion and composion?

slide-70
SLIDE 70

HoTT-UF 2019 20

Cubical inducve types: semancs

What are the values of a higher inducve type?

slide-71
SLIDE 71

HoTT-UF 2019 20

Cubical inducve types: semancs

What are the values of a higher inducve type? Unless R is symmetric and transive, ? may not exist

slide-72
SLIDE 72

HoTT-UF 2019 20

Cubical inducve types: semancs

What are the values of a higher inducve type? Unless R is symmetric and transive, ? may not exist Must revise our choice of values

slide-73
SLIDE 73

HoTT-UF 2019 21

Cubical inducve types: semancs

Idea: freely add homogeneous composion values

slide-74
SLIDE 74

HoTT-UF 2019 21

Cubical inducve types: semancs

Idea: freely add homogeneous composion values

( (

slide-75
SLIDE 75

HoTT-UF 2019 21

Cubical inducve types: semancs

Idea: freely add homogeneous composion values

( (

( + boundary reducons )

slide-76
SLIDE 76

HoTT-UF 2019 21

Cubical inducve types: semancs

Idea: freely add homogeneous composion values

( (

( + boundary reducons ) Eliminator maps hcom values to hcoms in the target

slide-77
SLIDE 77

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases

slide-78
SLIDE 78

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases

slide-79
SLIDE 79

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases

slide-80
SLIDE 80

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases

slide-81
SLIDE 81

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases Why not free coercion values?

slide-82
SLIDE 82

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases Why not free coercion values?

slide-83
SLIDE 83

HoTT-UF 2019 22

Cubical inducve types: semancs

Implement coercion by cases Why not free coercion values?

  • cf. Lumsdaine & Shulman
slide-84
SLIDE 84

HoTT-UF 2019 23

Cubical inducve types: semancs

Theorem (Canonicity). Any term in a HIT evaluates to a value.

slide-85
SLIDE 85

HoTT-UF 2019 23

Cubical inducve types: semancs

Theorem (Canonicity). Any term in a HIT evaluates to a value. Are we sasfied with our choice of values?

slide-86
SLIDE 86

HoTT-UF 2019 23

Cubical inducve types: semancs

Theorem (Canonicity). Any term in a HIT evaluates to a value. Are we sasfied with our choice of values? any int evaluates to pos, neg, seg, or hcom

slide-87
SLIDE 87

HoTT-UF 2019 23

Cubical inducve types: semancs

Theorem (Canonicity). Any term in a HIT evaluates to a value. Are we sasfied with our choice of values? any int evaluates to pos, neg, seg, or hcom Angiuli, Favonia, & Harper: zero-d composions can be excluded

slide-88
SLIDE 88

HoTT-UF 2019 23

Cubical inducve types: semancs

Theorem (Canonicity). Any term in a HIT evaluates to a value. Are we sasfied with our choice of values? any int evaluates to pos, neg, seg, or hcom Angiuli, Favonia, & Harper: zero-d composions can be excluded any zero-d int evaluates to pos or neg ✓

slide-89
SLIDE 89

HoTT-UF 2019 24

Indexed inducve types

slide-90
SLIDE 90

HoTT-UF 2019 24

Indexed inducve types

Simultaneously inducvely defined family of types

slide-91
SLIDE 91

HoTT-UF 2019 24

Indexed inducve types

Simultaneously inducvely defined family of types Vectors of a given length

slide-92
SLIDE 92

HoTT-UF 2019 24

Indexed inducve types

Simultaneously inducvely defined family of types Vectors of a given length Identy types

slide-93
SLIDE 93

HoTT-UF 2019 25

Indexed inducve types

What are the values of an indexed inducve type?

slide-94
SLIDE 94

HoTT-UF 2019 25

Indexed inducve types

What are the values of an indexed inducve type? Not only refl...

slide-95
SLIDE 95

HoTT-UF 2019 25

Indexed inducve types

What are the values of an indexed inducve type? Not only refl... Add free coercion values for coercion between indices

slide-96
SLIDE 96

HoTT-UF 2019 25

Indexed inducve types

What are the values of an indexed inducve type? Not only refl... Add free coercion values for coercion between indices Coercion in parameters sll reduces

slide-97
SLIDE 97

HoTT-UF 2019 25

Indexed inducve types

What are the values of an indexed inducve type? Not only refl... Add free coercion values for coercion between indices Coercion in parameters sll reduces Size depends on size of indices, but not parameters

slide-98
SLIDE 98

HoTT-UF 2019 26

Cubical type theory and the future of HITs

slide-99
SLIDE 99

HoTT-UF 2019 26

Cubical type theory and the future of HITs

Gracefully scaling to higher-d is essenal for pracce

slide-100
SLIDE 100

HoTT-UF 2019 26

Cubical type theory and the future of HITs

Gracefully scaling to higher-d is essenal for pracce where does cubical type theory have models?

slide-101
SLIDE 101

HoTT-UF 2019 26

Cubical type theory and the future of HITs

Gracefully scaling to higher-d is essenal for pracce where does cubical type theory have models? Going further inducve-inducve types (Hugunin 2019) implementaon ( , Cubical Agda) more flexible schemata