cubical computational type
play

Cubical Computational Type Carlo Angiuli Theory Evan Cavallo - PowerPoint PPT Presentation

2018.02.23 Penn Cubical Computational Type Carlo Angiuli Theory Evan Cavallo (*) Favonia & RedPRL Bob Harper Dan Licata >> redprl.org >> Jon Sterling Todd Wilson 1 Vladimir Voevodsky 1966-2017 2 Cubical &


  1. 2018.02.23 Penn Cubical Computational Type Carlo Angiuli Theory Evan Cavallo (*) Favonia & RedPRL Bob Harper Dan Licata >> redprl.org >> Jon Sterling Todd Wilson 1

  2. Vladimir Voevodsky 1966-2017 2

  3. Cubical & Computational features of homotopy type theory (HoTT) features of computational type theory (equality types, strict quotients, ...) 3

  4. Computational Types programs/ realizers computation 4

  5. Computational Types programs/ computational <----- realizers type theory computation theory of computation 4

  6. Computational Types programs/ computational <----- realizers type theory computation theory of computation meaning Martin-Löf <---- explanation type theory pre-mathematical in M-L's work 4

  7. A Minimum Example M := a | bool | true | false | if(M,M,M) 5

  8. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M 5

  9. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language 5

  10. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language What are the types in canonical forms? {bool} 5

  11. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} 5

  12. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} How they are equal? syntactic equality 5

  13. A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} How they are equal? syntactic equality One Theory 5

  14. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality 6

  15. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' 6

  16. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' bool ≐ bool type 6

  17. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' 7

  18. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' false ≐ false ∈ bool 7

  19. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' false ≐ false ∈ bool if(true,true,bool) ≐ true ∈ if(true,bool,bool) ⇓ true ⇓ bool 7

  20. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B 8

  21. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B b:bool >> b ≐ if(b,true,false) ∈ bool? 8

  22. Variables In Nuprl and friends variables range over closed terms 9

  23. Variables In Nuprl and friends variables range over closed terms In Coq, Agda, and friends variables are not subject to inductive analysis 9

  24. Variables In Nuprl and friends variables range over closed terms In Coq, Agda, and friends variables are not subject to inductive analysis closed reduction ⇔ vars over closed terms open reduction ⇔ indeterminate vars 9

  25. A Functional Example M := a | M1 ⟶ M2 | \a.M | M1 M2 | ... (M1 ⟶ M2) val \a.M val (\a.M1)M2 ↦ M1[M2/a] Another Language 10

  26. A Functional Example M := a | M1 ⟶ M2 | \a.M | M1 M2 | ... (M1 ⟶ M2) val \a.M val (\a.M1)M2 ↦ M1[M2/a] Another Language What are the types in canonical forms? the least fixed point of S.({M ⟶ N | M ⇓ , N ⇓ in S} union ...) What are the canonical forms of the types? A ⟶ B: {\a.M} How they are equal? A1 ⟶ B1 ≈ A2 ⟶ B2 if A1 ≐ A2 and B1 ≐ B2 \a.M1 ≈ A ⟶ B \a.M2 if a:A >> M1 ≐ M2 ∈ B 10

  27. Open-endedness 11

  28. Open-endedness Open to new constructs 11

  29. Open-endedness Open to new constructs Open to new theories for the same language 11

  30. Open-endedness Open to new constructs Open to new theories for the same language Open to new proof theories (rules in proof assistants) for the same theory 11

  31. Open-endedness Open to new constructs Open to new theories for the same language Open to new proof theories (rules in proof assistants) for the same theory Canonicity always holds 11

  32. Homotopy Type Theory b a points 12

  33. Homotopy Type Theory b p:a=b paths a q:a=b points 12

  34. Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 12

  35. ⋮ Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 12

  36. Homotopy Type Theory [Awodey and Warren] [Voevodsky et al ] [van den Berg and Garner] A Type Space a : A Element Point f : A → B Function Continuous Mapping C : A → Type Dependent Type Fibration a = A b Identification Path 13

  37. Homotopy Type Theory Numerous results in homotopy theory mechanized through this. In some case new proofs were discovered and inspired new results. [Anel, Biedermann, Finster, Joyal] Extensive works in category theory and other fields. 14

  38. Key Features of HoTT 1. Identifications as paths 2. Univalence: if e is an equivalence between A and B , then ua(e):A=B 3. Higher inductive types: generalized inductive types with (higher) path generators 15

  39. Key Features of HoTT 1. Identifications as paths 2. Univalence: if e is an equivalence between A and B , then ua(e):A=B 3. Higher inductive types: generalized inductive types with (higher) path generators Problems: 1&2&3 give new identifications 15

  40. The Poor Eliminator elim-path[a.C]( refl-case , path ) can only handle reflexivity coe(p:A=B,a:A):B coe(ua(e),a) is stuck 16

  41. The Poor Eliminator elim-path[a.C]( refl-case , path ) can only handle reflexivity coe(p:A=B,a:A):B coe(ua(e),a) is stuck Solution each motive C handles paths itself 16

  42. The Happy Eliminator elim-path[a.C]( refl-case , path ) each motive handles paths itself each type has cubical Kan structure [Bezem, Coquand, Huber] [Cohen, Coquand, Huber, Mörtberg] This work: extend Nuprl by cubical Kan structures [Angiuli, Harper, Wilson] [Angiuli, Harper] [Angiuli, Favonia, Harper] [Cavallo, Harper] 17

  43. Cubical Programming dim expr r := 0 | 1 | x 0 x 1 somewhere 18

  44. Cubical Programming dim expr r := 0 | 1 | x 0 x 1 somewhere n = 18

  45. Circle base loop{x} 19

  46. Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base loop{x} 19

  47. Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base loop{x} S1 val 19

  48. Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base val base loop{x} S1 val 19

  49. Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base val base loop{x} val loop{0} ↦ base loop{x} loop{1} ↦ base S1 val 19

  50. Circle M ↦ M'  S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base loop{x} S1 val 20

  51. Circle M ↦ M'  S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base S1elim(a.A, base, B, x._) loop{x} ↦ B S1 val 20

  52. Circle M ↦ M'  S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base S1elim(a.A, base, B, x._) loop{x} ↦ B S1 val S1elim(a.A, loop{x}, _, y.L) ↦ L<x/y> 20

  53. Kan 1/2: Coercion M x ∈ x.A 21

  54. Kan 1/2: Coercion coe{0 ⟶ 1} (x.A,M) M x ∈ ∈ x.A 21

  55. Kan 1/2: Coercion coe{0 ⟶ 1} (x.A,M) M x ∈ ∈ x.A coe{r ⟶ r'}(x.A, M) ∈ A<r'/x> ∈ A<r/x> 21

  56. Kan 2/2: Homogeneous Composition N 0 N 1 y x M 22

  57. Kan 2/2: Homogeneous Composition hcom{0 ⟶ 1}(A,M) [x=0 ⟶ y.N 0 , x=1 ⟶ y.N 1 ] N 0 N 1 y x M 22

  58. Kan 2/2: Homogeneous Composition hcom{0 ⟶ 1}(A,M) [x=0 ⟶ y.N 0 , x=1 ⟶ y.N 1 ] N 0 N 1 y x M hcom{r ⟶ r'}(A, M) [..., r i =r' i ⟶ y.N i , ...] 22

Recommend


More recommend