cubical computational type
play

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

2018.07.07 LFMTP Cubical Computational Type Carlo Angiuli Evan Cavallo Theory (*) Favonia Robert Harper & RedPRL Jonathan Sterling Todd Wilson >> redprl.org >> 1 Cubical features of homotopy type theory univalence,


  1. 2018.07.07 LFMTP Cubical Computational Type Carlo Angiuli Evan Cavallo Theory (*) Favonia Robert Harper & RedPRL Jonathan Sterling Todd Wilson >> redprl.org >> 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 b a points 12

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

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

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

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

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

  35. 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 13

  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 14

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

  38. Canonicity? Canonicity broken by new features stated as axioms! 16

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

  40. 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 16

  41. Canonicity for All Canonicity for bool means canonicity for everyone 17

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

  43. 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 17

  44. Canonicity for Paths? M : A refl(M) : M = A M 18

  45. 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) 18

  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) 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)) 18

  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)) path-ind[C](a.R,ua(E)) ≡ ??? 18

  48. 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] 19

  49. Restore Canonicity Idea: each type manages its own paths 20

  50. Restore Canonicity Idea: each type manages its own paths base : S1 base loop 20

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

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

Recommend


More recommend