cartesian cubical computational type theory
play

Cartesian Cubical Computational Type Theory Favonia Inst for Adv - PowerPoint PPT Presentation

Cartesian Cubical Computational Type Theory Favonia Inst for Adv Study U of Minnesota Joint work with Carlo Angiuli, Evan Cavallo, Daniel R. Grayson, Robert Harper and Jonathan Sterling (a shameless rip-o ff of Carlo's previous talks)


  1. Cartesian Cubical Computational Type Theory Favonia Inst for Adv Study ↦ U of Minnesota Joint work with Carlo Angiuli, Evan Cavallo, Daniel R. Grayson, Robert Harper and Jonathan Sterling (a shameless rip-o ff of Carlo's previous talks) Bonn, Germany, 2018/6/5 1

  2. Some History Coquand's notes BL 14 AHW 2016: CHTT Part I Cartesian cubical + computational AH 2017: CHTT Part II Dependent types AFH 2017: CHTT Part III Univalent Kan universes CH 2018: CHTT Part IV Higher inductive types Identi � ication types 2

  3. Some History Coquand's notes BL 14 AHW 2016: CHTT Part I Cartesian cubical + computational AH 2017: CHTT Part II Dependent types AFH 2017: CHTT Part III Univalent Kan universes ABCFHL 2017: CCTT Cartesian cubical CH 2018: CHTT Part IV Higher inductive types Identi � ication types 2

  4. Some History Coquand's notes BL 14 AHW 2016: CHTT Part I Cartesian cubical + computational AH 2017: CHTT Part II Dependent types AFH 2017: CHTT Part III Univalent Kan universes ABCFHL 2017: CCTT Cartesian cubical CH 2018: CHTT Part IV Higher inductive types Identi � ication types 2

  5. New Features of HoTT Univalence if e is an equivalence between types A and B, then ua(E):A=B Higher Inductive Types inductive types with path generators circle sphere torus 3

  6. Equality and Paths De � initional Equality Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M 4

  7. Equality and Paths De � initional Equality Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M If A ≡ B and M : A then M : B 4

  8. Equality and Paths De � initional 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 : Path(A, B) and M : A then transport(M,P) : B 4

  9. Not Math Equality! De � initional Equality Issue #1 Not very extensional x : ℕ , y : ℕ ⊦ x + y ≢ y + x : ℕ (various reasonable trade-o � s) 5

  10. ℤ Not Math Equality! De � initional Equality Issue #2 winding π 1 (S1) winding(loop) ≢ any numeral 6

  11. ℤ Not Math Equality! De � initional Equality Issue #2 winding π 1 (S1) winding(loop) ≢ any numeral Canonicity For any M : ℕ , there is a numeral N* such that ⊦ M ≡ N* : ℕ 6

  12. Restore Canonicity Canonicity for ℕ means canonicity for every type 7

  13. Restore Canonicity Canonicity for ℕ means canonicity for every type M : ℕ × A fst(M) ≡ ??? : ℕ 7

  14. Restore Canonicity Canonicity for ℕ means canonicity for every type M : ℕ × A fst(M) ≡ ??? : ℕ By canonicity of pair types, M ≡ ⟨ P,Q ⟩ and fst(M) ≡ fst ⟨ P,Q ⟩ ≡ P ≡ some numeral (by i.h.) (rule) (by i.h.) 7

  15. Restore Canonicity But canonicity fails for paths! re � l(M) : Path(M,M) Path-elim[p.C](M, x.N) : C[M/p] Path-elim(re � l(M), x.N) ≡ N[M/x] : C[re � l(M)/p] 8

  16. Restore Canonicity But canonicity fails for paths! re � l(M) : Path(M,M) Path-elim[p.C](M, x.N) : C[M/p] Path-elim(re � l(M), x.N) ≡ N[M/x] : C[re � l(M)/p] Path-elim(ua(E), x.N) ≡ ??? Path-elim(loop, x.N) ≡ ??? 8

  17. Restore Canonicity Can we have canonicity + univalence? Yes with De Morgan cubes (CCHM) Yes with Cartesian cubes (Part III by AFH) And higher inductive types? Important examples with De Morgan cubes (CHM) Yes with cartesian cubes (Part IV by CH) 9

  18. Cubes Idea: each type manages its own paths 10

  19. Cubes Idea: each type manages its own paths loop : base = base 10

  20. Cubes Idea: each type manages its own paths loop : base = base loop x : a genuine constructor of the circle x: 𝕁 ⊦ loop x : S1 loop 0 ≡ base : S1 loop 1 ≡ base : S1 10

  21. Cartesian Cubes Introducing 𝕁 the formal interval 11

  22. Cartesian Cubes Introducing 𝕁 the formal interval Γ ⊦ 0: 𝕁 Γ ⊦ 1: 𝕁 Γ , x: 𝕁 , Γ ' ⊦ x: 𝕁 11

  23. Cartesian Cubes Introducing 𝕁 the formal interval Γ ⊦ 0: 𝕁 Γ ⊦ 1: 𝕁 Γ , x: 𝕁 , Γ ' ⊦ x: 𝕁 x 1 : 𝕁 , x 2 : 𝕁 , ..., x n : 𝕁 ⊦ M : A ⬄ M is an n-cube in A 11

  24. Cartesian Cubes Introducing 𝕁 the formal interval Γ ⊦ 0: 𝕁 Γ ⊦ 1: 𝕁 Γ , x: 𝕁 , Γ ' ⊦ x: 𝕁 Cartesian: works as normal contexts M ⟨ 0/x ⟩ M ⟨ 1/x ⟩ M ⟨ y/x ⟩ 12

  25. Ordinary Types Ordinary typing rules hold uniformly Γ , a:A ⊦ M : B Γ ⊦ λ a.M : (a:A) → B with any number of 𝕁 in the Γ 13

  26. Ordinary Types Ordinary typing rules hold uniformly Γ , a:A ⊦ M : B Γ ⊦ λ a.M : (a:A) → B with any number of 𝕁 in the Γ ap F (M) F(M x ) F(M x ⟨ 0/x ⟩ ) F(M x ⟨ 1/x ⟩ ) 13

  27. New Path Types Dimension abstraction x: 𝕁 ⊦ M : A ⟨ x ⟩ M : Path x.A (M ⟨ 0/x ⟩ ,M ⟨ 1/x ⟩ ) x: 𝕁 ⊦ M : A P : Path x.A (N 0 ,N 1 ) P@r : A ⟨ r/x ⟩ ( ⟨ x ⟩ M)@r ≡ M ⟨ r/x ⟩ : A ⟨ r/x ⟩ P : Path x.A (N 0 ,N 1 ) P : Path x.A (N 0 ,N 1 ) P@0 ≡ N 0 : A ⟨ 0/x ⟩ P@1 ≡ N 1 : A ⟨ 1/x ⟩ 14

  28. Kan 1/2: Coercion M : A ⟨ r/x ⟩ coe x.A [r ↝ r'](M) : A ⟨ r'/x ⟩ 15

  29. Kan 1/2: Coercion M : A ⟨ r/x ⟩ coe x.A [r ↝ r'](M) : A ⟨ r'/x ⟩ M A ⟨ 0/x ⟩ A ⟨ 1/x ⟩ 15

  30. Kan 1/2: Coercion M : A ⟨ r/x ⟩ coe x.A [r ↝ r'](M) : A ⟨ r'/x ⟩ coe x.A [0 ↝ 1](M) M A ⟨ 0/x ⟩ A ⟨ 1/x ⟩ 15

  31. Kan 1/2: Coercion M : A ⟨ r/x ⟩ coe x.A [r ↝ r'](M) : A ⟨ r'/x ⟩ coe x.A [0 ↝ x](M) coe x.A [0 ↝ 1](M) M A ⟨ 0/x ⟩ A ⟨ 1/x ⟩ 15

  32. Kan 1/2: Coercion M : A ⟨ r/x ⟩ coe x.A [r ↝ r'](M) : A ⟨ r'/x ⟩ coe x.A [0 ↝ x](M) coe x.A [0 ↝ 1](M) M A ⟨ 0/x ⟩ A ⟨ 1/x ⟩ coe x.A [r ↝ r](M) ≡ M : A ⟨ r/x ⟩ 15

  33. Kan 2/2: Homogeneous Comp N 0 N 1 y x M 16

  34. Kan 2/2: Homogeneous Comp hcom A [0 ↝ 1](M; x=0 ↪ y.N 0 , x=1 ↪ y.N 1 ] N 0 N 1 y x M 16

  35. Kan 2/2: Homogeneous Comp hcom A [0 ↝ 1](M; x=0 ↪ y.N 0 , x=1 ↪ y.N 1 ] N 0 N 1 y x M hcom A [r ↝ r](M; ...) ≡ M : A hcom A [r ↝ r'](M; ..., r i =r i ↪ y.N i , ...) ≡ N i ⟨ r'/y ⟩ : A 16

  36. Kan 2/2: Homogeneous Comp 17

  37. Fibrant Replacement (the cubical, syntactical way) S1: hcom as the third constructor 18

  38. Fibrant Replacement (the cubical, syntactical way) S1: hcom as the third constructor add only homogeneous ones ⇨ compat with base changes ⇨ no size blow-up! (category-theoretic argument for sizes mostly learnt from Dan Grayson) 18

  39. Univalent Kan Universes 0. V x (A,B,E) type A line between A ⟨ 0/x ⟩ and B ⟨ 1/x ⟩ witnessed by the equivalence E 1. hcom U [r ↝ r'](A; ...) type Make the universes Kan 19

  40. Oh, Diagonals! coe x.hcom[s ↝ s'](A; ...) [r ↝ r'](M) 20

  41. Oh, Diagonals! coe x.hcom[s ↝ s'](A; ...) [r ↝ r'](M) s=s' ↦ coe x.A [r ↝ r'](M) r=r' ↦ M 20

  42. Oh, Diagonals! coe x.hcom[s ↝ s'](A; ...) [r ↝ r'](M) s=s' ↦ coe x.A [r ↝ r'](M) r=r' ↦ M hcom...[s ↝ s'](..., r=r' ↪ ...) diagonals for coherence conditions 20

  43. Computational Semantics A computation system for closed terms 21

  44. Computational Semantics A computation system for closed terms ( λ a.M)N ↦ M[N/a] ( ⟨ x ⟩ M)@r ↦ M ⟨ r/x ⟩ coe x.A [r ↝ r'](M) ↦ coe x.A' [r ↝ r'](M) 21

  45. Computational Semantics A computation system for closed terms ( λ a.M)N ↦ M[N/a] ( ⟨ x ⟩ M)@r ↦ M ⟨ r/x ⟩ coe x.A [r ↝ r'](M) ↦ coe x.A' [r ↝ r'](M) Computational semantics: values Canonicity as a corollary 21

  46. Computational Semantics Directly usable as a type theory x : ℕ , y : ℕ ⪢ x + y ≐ y + x ∈ ℕ with all the extensionalities See our Part III paper for details 22

  47. Implementations RedPRL Our � irst try, in PRL (Nuprl) style redprl.org yacc � (stay tuned for Anders' talk!) red � (work in progress) 23

  48. Summary of Cartesian Cubes Canonicity + univalence? Yes! (Part III by AFH) And higher inductive types? Yes! (Part IV by CH) And the full HoTT? Yes! (Parts III & IV) 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend