yet another cartesian cubical type theory
play

Yet Another Cartesian Cubical Type Theory Anders M ortberg - PowerPoint PPT Presentation

Yet Another Cartesian Cubical Type Theory Anders M ortberg Carnegie Mellon University and University of Gothenburg Types, Homotopy Type theory, and Verification HIM Bonn June 6, 2018 June 6, 2018 1 / 40 Anders M ortberg Cubes, cubes,


  1. Yet Another Cartesian Cubical Type Theory Anders M¨ ortberg Carnegie Mellon University and University of Gothenburg Types, Homotopy Type theory, and Verification HIM Bonn June 6, 2018 June 6, 2018 1 / 40 Anders M¨ ortberg

  2. Cubes, cubes, cubes... I will talk about my attempts to understand the new and exciting developments on Cartesian cubical type theories: Computational Higher Type Theory III: Univalent Universes and Exact Equality (Angiuli, Favonia, Harper - AFH) Cartesian Cubical Type Theory (Angiuli, Brunerie, Coquand, Favonia, Harper, Licata - ABCFHL) These provide us with new constructive models of Univalent Foundations and higher inductive types Introduction June 6, 2018 2 / 40 Anders M¨ ortberg

  3. yacctt Slogan: the best way to understand type theory is to implement it! Together with Carlo Angiuli I have adapted the code-base of cubicaltt to implement a Cartesian cubical type theory: yacctt : yet another cartesian cubical type theory 1 https://github.com/mortberg/yacctt/ Inspired by Cubical Type Theory: a constructive interpretation of the univalence axiom (Cohen, Coquand, Huber, M. - CCHM) 1 https://en.wikipedia.org/wiki/Yacc Introduction June 6, 2018 3 / 40 Anders M¨ ortberg

  4. yacctt In this talk I will present this syntactically, however everything I say can be done internally in a topos extended with suitable axioms following: Axioms for Modelling Cubical Type Theory in a Topos (Orton, Pitts) Internal Universes in Models of Homotopy Type Theory (Licata, Orton, Pitts, Spitters) This is the approach taken in ABCFHL Introduction June 6, 2018 4 / 40 Anders M¨ ortberg

  5. yacctt My main motivation for implementing another cubical type theory is to explore the following: 1 How convenient is it to formalize mathematics in this new system with its new primitives? 2 Does this compute more efficiently than cubicaltt? (Can we compute the Brunerie number?) Introduction June 6, 2018 5 / 40 Anders M¨ ortberg

  6. yacctt yacctt extends dependent type theory (with eta for Π and Σ) with: Path types based on a Cartesian interval Diagonal context restrictions (generating cofibrations) Generalized Kan operations (transport of structures 2 ) V-types (special case of Glue-types that suffices for univalence) Fibrant universes Some higher inductive types 2 cf. Bourbaki: Theory of sets, 1968 Introduction June 6, 2018 6 / 40 Anders M¨ ortberg

  7. Cartesian interval Formal representation of the interval, I : r , s ::= 0 | 1 | i i , j , k ... formal symbols/names representing directions/dimensions Contexts can contain variables in the interval: Γ ⊢ Γ , i : I ⊢ Cartesian interval June 6, 2018 7 / 40 Anders M¨ ortberg

  8. Cartesian interval i : I ⊢ A corresponds to a line: A A (0 / i ) A (1 / i ) i : I , j : I ⊢ A corresponds to a square: A (1 / j ) A (0 / i )(1 / j ) A (1 / i )(1 / j ) j A ( j / i ) A (0 / i ) A (1 / i ) i A (0 / i )(0 / j ) A (1 / i )(0 / j ) A (0 / j ) Diagonal substitutions are allowed (no linearity constraint as in BCH) Cartesian interval June 6, 2018 8 / 40 Anders M¨ ortberg

  9. Path types The Path types are modelled as: Path ( A ) := A I Path A ( a , b ) := { p ∈ Path ( A ) | p 0 = a ∧ p 1 = b } In the syntax we write Path A a b for the Path types and � i � u for Path abstraction These types are defined by the same rules as in CCHM and provide a convenient syntax for directly reasoning about (higher) equality types We can directly prove that these satisfy function extensionality (CCHM) Cartesian interval June 6, 2018 9 / 40 Anders M¨ ortberg

  10. Composition operations We want to be able to compose paths: p q a b b c We do this by computing the dashed line in: a c q a a b p In general this corresponds to computing the missing sides of n-dimensional cubes Context restrictions June 6, 2018 10 / 40 Anders M¨ ortberg

  11. Composition operations Box principle : any open box has a lid Cubical version of the Kan condition for simplicial sets: “Any horn can be filled” First formulated by Daniel Kan in “Abstract Homotopy I” (1955) for cubical complexes Context restrictions June 6, 2018 11 / 40 Anders M¨ ortberg

  12. Context restrictions To formulate this we need syntax for representing partially specified n-dimensional cubes We add context restrictions Γ , ϕ where ϕ is a “face formula” representing a subset of the faces of a cube ϕ, ψ ::= 0 F | 1 F | ( i = 0) | ( i = 1) | ( i = j ) | ϕ ∧ ψ | ϕ ∨ ψ Key new idea is to allow ( i = j ) as context restrictions! (AFH) Context restrictions June 6, 2018 12 / 40 Anders M¨ ortberg

  13. Partial elements Any judgment valid in a context Γ is also valid in a restriction Γ , ϕ Γ ⊢ A Γ , ϕ ⊢ A If Γ ⊢ A and Γ , ϕ ⊢ a : A then a is a partial element of A of extent ϕ We write Γ ⊢ b : A [ ϕ �→ a ] for Γ ⊢ b : A Γ , ϕ ⊢ a : A Γ , ϕ ⊢ a = b : A Context restrictions June 6, 2018 13 / 40 Anders M¨ ortberg

  14. Box principle in CCHM In CCHM we formulated the box principle as: Γ , i : I ⊢ A Γ , ϕ, i : I ⊢ u : A Γ ⊢ u 0 : A (0 / i )[ ϕ �→ u (0 / i )] Γ ⊢ comp i A [ ϕ �→ u ] u 0 : A (1 / i )[ ϕ �→ u (1 / i )] u 0 is the bottom u is the sides comp i A [ ϕ �→ u ] u 0 is the lid Semantically this is a structure (and not a property) of a type. A type is called fibrant if it can be equipped with this structure Kan operations June 6, 2018 14 / 40 Anders M¨ ortberg

  15. Composition operations: example With composition we can justify transitivity of path types: Γ ⊢ p : Path A a b Γ ⊢ q : Path A b c Γ ⊢ � i � comp j A [( i = 0) �→ a , ( i = 1) �→ q j ] ( p i ) : Path A a c a c j q j a i a b p i Kan operations June 6, 2018 15 / 40 Anders M¨ ortberg

  16. Transport as composition in CCHM Composition for ϕ = 0 F corresponds to transport: Γ , i : I ⊢ A Γ ⊢ u 0 : A ( i / 0) Γ ⊢ transport i A u 0 = comp i A [] u 0 : A ( i / 1) • transport i A u 0 u 0 • A A (0 / i ) A (1 / i ) i Kan operations June 6, 2018 16 / 40 Anders M¨ ortberg

  17. Kan filling from composition A key observation in CCHM is that we can compute the filler of a cube using composition and connections In yacctt we don’t have any connections... What can we do? Kan operations June 6, 2018 17 / 40 Anders M¨ ortberg

  18. Kan filling from composition A key observation in CCHM is that we can compute the filler of a cube using composition and connections In yacctt we don’t have any connections... What can we do? Solution : strengthen the composition operation! Kan operations June 6, 2018 17 / 40 Anders M¨ ortberg

  19. Strengthened composition Compose from r to s : Γ , i : I ⊢ A Γ ⊢ r : I Γ ⊢ s : I Γ ⊢ ϕ : F Γ , ϕ, i : I ⊢ u : A Γ ⊢ u 0 : A ( r / i )[ ϕ �→ u ( r / i )] Γ ⊢ com r → s A [ ϕ �→ u ] u 0 : A ( s / i )[ ϕ �→ u ( s / i ) , r = s �→ u 0 ] i We recover comp when r = 0 and s = 1 We get the filler when r = 0 and s is a dimension variable j : I Kan operations June 6, 2018 18 / 40 Anders M¨ ortberg

  20. Strengthened composition We can now define com by cases on the type A just like in CCHM, however in order to also be able to support HITs we first decompose the operation into homogeneous composition and coercion : Γ ⊢ A Γ ⊢ r : I Γ ⊢ s : I Γ ⊢ ϕ : F Γ , ϕ, i : I ⊢ u : A Γ ⊢ u 0 : A [ ϕ �→ u ( r / i )] Γ ⊢ hcom r → s A [ ϕ �→ u ] u 0 : A [ ϕ �→ u ( s / i ) , r = s �→ u 0 ] i Γ , i : I ⊢ A Γ ⊢ r : I Γ ⊢ s : I Γ ⊢ u : A ( r / i ) Γ ⊢ coe r → s A u : A ( s / i )[ r = s �→ u ] i Kan operations June 6, 2018 19 / 40 Anders M¨ ortberg

  21. Coercion examples Given i : I ⊢ u : A we get: u (1 / i ) u u (0 / i ) A (0 / i ) A (1 / i ) A Kan operations June 6, 2018 20 / 40 Anders M¨ ortberg

  22. Coercion examples Given i : I ⊢ u : A we get: u (1 / i ) u coe 0 → 1 u (0 / i ) A u (0 / i ) i A (0 / i ) A (1 / i ) A Kan operations June 6, 2018 20 / 40 Anders M¨ ortberg

  23. Coercion examples Given i : I ⊢ u : A we get: u (1 / i ) u coe 0 → 1 u (0 / i ) A u (0 / i ) i coe 0 → i A u (0 / i ) i A (0 / i ) A (1 / i ) A Kan operations June 6, 2018 20 / 40 Anders M¨ ortberg

  24. Coercion examples Given i : I ⊢ u : A we get: u (1 / i ) u coe i → 1 A u i coe 0 → 1 u (0 / i ) A u (0 / i ) i coe 0 → i A u (0 / i ) i A (0 / i ) A (1 / i ) A Kan operations June 6, 2018 20 / 40 Anders M¨ ortberg

  25. Reversals Given p : Path A a b we can define p − 1 : Path A b a as p − 1 := � i � hcom 0 → 1 A [( i = 0) �→ p j , ( i = 1) �→ a ] a j This corresponds to the dashed line in: p − 1 a b p a a a a Kan operations June 6, 2018 21 / 40 Anders M¨ ortberg

  26. Connections Given p : Path A a b we can define: � i j � hcom 0 → 1 A [( i = 0) �→ hcom 1 → 0 A [( k = 0) �→ a , ( k = 1) �→ p l ] ( p k ) k l , ( i = 1) �→ hcom 1 → j A [( k = 0) �→ a , ( k = 1) �→ p l ] ( p k ) l , ( j = 0) �→ hcom 1 → 0 A [( k = 0) �→ a , ( k = 1) �→ p l ] ( p k ) l , ( j = 1) �→ hcom 1 → i A [( k = 0) �→ a , ( k = 1) �→ p l ] ( p k )] a l p This has boundary: a b a p a a a Kan operations June 6, 2018 22 / 40 Anders M¨ ortberg

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