cartesian cubical computational type
play

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

2018.07.24 Cartesian Cubical Computational Type Carlo Angiuli Theory Evan Cavallo (*) Favonia Robert Harper Jonathan Sterling Todd Wilson 1 Cubical features of homotopy type theory univalence, higher inductive types + Computational


  1. 2018.07.24 Cartesian Cubical Computational Type Carlo Angiuli Theory Evan Cavallo (*) Favonia Robert Harper Jonathan Sterling Todd Wilson 1

  2. Cubical features of homotopy type theory univalence, higher inductive types + Computational features of Nuprl and PVS strict equality, strict quotients, predicative subtypes... 2

  3. Cartesian Cubical features of homotopy type theory univalence, higher inductive types + Computational features of Nuprl and PVS strict equality, strict quotients, predicative subtypes... 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 ≈ bool 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 ≈ bool 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 ≈ bool 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 ≈ bool A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' bool ≐ bool type if(true,bool,bool) ≐ bool type ⇓ bool 6

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

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

  21. A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality ≈ bool: {true, false} with syntactic equality ≈ bool 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

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

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

  24. 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 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 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 9

  26. Variables Nuprl/... Coq/Agda/... Vars range over Vars are indet. closed terms Defined by Defined by transition b/w conversion b/w closed terms open terms 10

  27. Open-endedness Proof theory/tactics/editors Computational type theory Programming language 11

  28. Open-endedness Proof theory/tactics/editors Computational type theory Programming language Canonicity always holds 11

  29. Homotopy Type Theory github.com/HoTT/book 12

  30. Homotopy Type Theory b a points 13

  31. Homotopy Type Theory b p:a=b paths a q:a=b points 13

  32. Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 13

  33. ⋮ Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 13

  34. Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M 14

  35. Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M If A ≡ B and M : A then M : B 14

  36. Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M If A ≡ B and M : A then M : B Paths (=) Visible in theory If P : A=B and M : A then transport(M,P) : B 14

  37. 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 15

  38. Features of HoTT Univalence If E is an equivalence between types A and B , then ua(E):A=B Higher Inductive Types circle sphere torus 16

  39. Canonicity? Canonicity broken by new features stated as axioms! 17

  40. Canonicity? Canonicity broken by new features stated as axioms! Canonicity For any M : bool , either M ≡ true : bool or M ≡ false : bool 17

  41. Canonicity? Canonicity broken by new features stated as axioms! Canonicity For any M : bool , either M ≡ true : bool or M ≡ false : bool ua(not) : bool = bool transport(ua(not),true) ≢ false 17

  42. Canonicity for All Canonicity for bool means canonicity for everyone 18

  43. Canonicity for All Canonicity for bool means canonicity for everyone M : bool × A fst(M) ≡ ??? : bool 18

  44. Canonicity for All Canonicity for bool means canonicity for everyone M : bool × A fst(M) ≡ ??? : bool Wants M ≡ ⟨ P,Q ⟩ and then fst(M) ≡ fst ⟨ P,Q ⟩ ≡ P ≡ true or false 18

  45. Canonicity for Paths? M : A refl(M) : M = A M 19

  46. Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) 19

  47. Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) a:A ⊦ R : C(a,a,refl(a)) M : A path-ind[C](a.R,refl(M)) ≡ R[M/a] : C(M,M,refl(M)) 19

  48. Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) a:A ⊦ R : C(a,a,refl(a)) M : A path-ind[C](a.R,refl(M)) ≡ R[M/a] : C(M,M,refl(M)) path-ind[C](a.R,ua(E)) ≡ ??? 19

  49. Restore Canonicity Can we have a new TT with canonicity + univalence? Yes with De Morgan cubes [CCHM 2016] Yes with Cartesian cubes [AFH 2017] ... and higher inductive types? Examples with De Morgan cubes [CHM 2018] Yes with Cartesian cubes [CH 2018] 20

  50. Restore Canonicity Idea: each type manages its own paths 21

  51. Restore Canonicity Idea: each type manages its own paths base : S1 base loop 21

  52. Restore Canonicity Idea: each type manages its own paths base : S1 loop : base = base base loop 21

  53. Restore Canonicity Idea: each type manages its own paths base : S1 loop : base = base base loop 21

Recommend


More recommend