cartesian cubical computational type theory
play

Cartesian Cubical Computational Type Theory Favonia U of - PowerPoint PPT Presentation

Cartesian Cubical Computational Type Theory Favonia U of Minnesota Joint work with Carlo Angiuli, Evan Cavallo, Daniel R. Grayson, Robert Harper, Anders Mrtberg and Jonathan Sterling Oxford - 2018/7/8 1 Some History Coquand's notes 20??


  1. Cartesian Cubical Computational Type Theory Favonia U of Minnesota Joint work with Carlo Angiuli, Evan Cavallo, Daniel R. Grayson, Robert Harper, Anders Mörtberg and Jonathan Sterling Oxford - 2018/7/8 1

  2. Some History Coquand's notes 20?? BL 2014 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 20?? BL 2014 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 20?? BL 2014 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 circle sphere torus 3

  6. Equality and Paths De � initional Equality Silent in theory 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

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

  8. Not Math Equality! De � initional Equality Issue #2 winding : π 1 (S 1 ) → ℤ winding(loop) ≢ any numeral 6

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

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

  11. Restore Canonicity Canonicity for ℕ means canonicity for every type M : ℕ × A fst(M) ≡ ??? : ℕ Want M ≡ ⟨ P,Q ⟩ and then fst(M) ≡ fst ⟨ P,Q ⟩ ≡ P ≡ some numeral 7

  12. Restore Canonicity But canonicity fails for paths! a:A ⊦ R : C(a,a,re � l(a)) P : M = A N M : A re � l(M) : M = A M J(a.R, P) : C(M,N,P) a:A ⊦ R : C(a,a,re � l(a)) M : A J(a.R, re � l(M)) ≡ R[M/a] : C(M,M,re � l(M)) 8

  13. Restore Canonicity But canonicity fails for paths! a:A ⊦ R : C(a,a,re � l(a)) P : M = A N M : A re � l(M) : M = A M J(a.R, P) : C(M,N,P) a:A ⊦ R : C(a,a,re � l(a)) M : A J(a.R, re � l(M)) ≡ R[M/a] : C(M,M,re � l(M)) J(ua(E), x.N) ≡ ??? J(loop, x.N) ≡ ??? 8

  14. Restore Canonicity Can we have canonicity + univalence? Yes with De Morgan cubes [CCHM 2016] Yes with Cartesian cubes [AFH 2017] And higher inductive types? Important examples with De Morgan cubes [CHM 2018] Yes with Cartesian cubes [CH 2018] 9

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

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

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

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

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

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

  21. 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

  22. 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

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

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

  25. 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

  26. 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 ⟩ coe x.A [r ↝ r](M) ≡ M : A ⟨ r/x ⟩ 15

  27. 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

  28. Kan 2/2: Homogeneous Comp hcom A [r ↝ r'](M; ..., r i =r' i ↪ y.N, ...) : A 16

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

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

  31. Kan 2/2: Homogeneous Comp hcom A [r ↝ r'](M; ..., r i =r' i ↪ y.N, ...) : A 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

  32. Kan 2/2: Homogeneous Comp 17

  33. Fiberwise Fibrant Replacement (the cubical way) S1: hcom as the third constructor 18

  34. Fiberwise Fibrant Replacement (the cubical way) S1: hcom as the third constructor add only homogeneous ones ⇨ compat with base changes ⇨ no size blow-up! (known by many experts in cubical TT) 18

  35. Fiberwise Fibrant Replacement (the cubical way) If A has coercion, the replacement of raw susp(A) is Kan 19

  36. Fiberwise Fibrant Replacement (the cubical way) If A has coercion, the replacement of raw susp(A) is Kan If objects on a span have coercion, the replacement of raw pushout is Kan (Note: the raw pushout might not have coercion!) Important examples with De Morgan cubes [CHM 2018] A general schema with Cartesian cubes [CH 2018] 19

  37. Univalent Universes V x (A,B,E) type A line between A ⟨ 0/x ⟩ and B ⟨ 1/x ⟩ witnessed by the equivalence E E : A ≃ B [r=0] A type [r=0] B type V r (A,B,E) type V 0 (A,B,E) ≡ A V 1 (A,B,E) ≡ B expert only 20

  38. Univalent Kan Universes hcom U [r ↝ r'](A; ...) type Make the universes Kan Major di � iculty: Kan structure of the hcom types themselves (Good news: greatly simpli � ied a � er Part III is out) 21

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

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

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

  42. Computational Semantics Transition system for closed terms λ a.M val ( λ a.M)N ↦ M[N/a] ⟨ x ⟩ M val ( ⟨ x ⟩ M)@r ↦ M ⟨ r/x ⟩ 23

  43. Computational Semantics Transition system for closed terms (other than dim. vars) λ a.M val ( λ a.M)N ↦ M[N/a] ⟨ x ⟩ M val ( ⟨ x ⟩ M)@r ↦ M ⟨ r/x ⟩ A ↦ A' coe x.A [r ↝ r'](M) ↦ coe x.A' [r ↝ r'](M) 23

  44. Computational Semantics Transition system for closed terms (other than dim. vars) λ a.M val ( λ a.M)N ↦ M[N/a] ⟨ x ⟩ M val ( ⟨ x ⟩ M)@r ↦ M ⟨ r/x ⟩ A ↦ A' coe x.A [r ↝ r'](M) ↦ coe x.A' [r ↝ r'](M) Computational semantics: values Canonicity as a corollary 23

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

  46. Implementations RedPRL In Nuprl style redprl.org red � (work in progress) github.com/RedPRL/red � yacc � A proof of concept based on cubical � github.com/mortberg/yacc � 25

  47. Open Problems for HoTT Cubical Simplicial Standard? ??? Yes HITs? ??? Yes 26

  48. Open Problems for HoTT Cubical Simplicial Standard? ??? Yes HITs? ??? Yes HoTTopia Very general construction with HITs 26

  49. Summary of Cartesian Cubes We have everything! Univalent Kan universes Higher inductive types Identi � ication types ...and proof assistants redprl.org github.com/RedPRL/red � github.com/mortberg/yacc � 27

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