algebraic models of dependent type theory
play

Algebraic models of dependent type theory Clive Newstead HoTT/UF - PowerPoint PPT Presentation

Algebraic models of dependent type theory Clive Newstead HoTT/UF Workshop 2018 Oxford, UK (in absentia) Saturday 7th July 2018 These slides: https://goo.gl/Ttacdq Natural models Polynomials Semantics End Natural models 1 2 Connection


  1. Natural models Polynomials Semantics End Polynomials and polynomial functors Fix a locally cartesian closed category E . f : B → A P f : E → E � X �→ � X B a a : A Call P f a polynomial endofunctor and f a polynomial . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  2. Natural models Polynomials Semantics End Polynomials and polynomial functors Fix a locally cartesian closed category E . f : B → A P f : E → E � X �→ � X B a a : A Call P f a polynomial endofunctor and f a polynomial . Officially, P f is the composite ∆ B → 1 Π f Σ A → 1 E E / B E / A E where ∆ f is pullback along f and Σ f ⊣ ∆ f ⊣ Π f . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  3. Natural models Polynomials Semantics End Cartesian morphisms of polynomials ϕ : P f ⇒ P g cartesian natural � transformation Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  4. Natural models Polynomials Semantics End Cartesian morphisms of polynomials ϕ 1 B D ϕ : P f ⇒ P g f � cartesian natural g � transformation A C ϕ 0 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  5. Natural models Polynomials Semantics End Cartesian morphisms of polynomials ϕ 1 B D ϕ : P f ⇒ P g f � cartesian natural g � transformation A C ϕ 0 Theorem (Gambino & Kock) Polynomials and cartesian morphisms are the 1- and 2-cells of a bicategory ; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  6. Natural models Polynomials Semantics End Cartesian morphisms of polynomials ϕ 1 B D ϕ : P f ⇒ P g f � cartesian natural g � transformation A C ϕ 0 Theorem (Gambino & Kock) Polynomials and cartesian morphisms are the 1- and 2-cells of a bicategory ; Polynomial functors and cartesian natural transformations are the 1- and 2-cells of a 2-category ; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  7. Natural models Polynomials Semantics End Cartesian morphisms of polynomials ϕ 1 B D ϕ : P f ⇒ P g f � cartesian natural g � transformation A C ϕ 0 Theorem (Gambino & Kock) Polynomials and cartesian morphisms are the 1- and 2-cells of a bicategory ; Polynomial functors and cartesian natural transformations are the 1- and 2-cells of a 2-category ; These are biequivalent. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  8. Natural models Polynomials Semantics End Admitting a unit type Theorem (Awodey) A natural model admits a unit type ⇔ there exist � 1 , � ⋆ as in: � � • ⋆ ⋆ y ( ⋄ ) U � p y ( ⋄ ) U � � 1 1 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  9. Natural models Polynomials Semantics End Admitting a unit type Theorem (Awodey) A natural model admits a unit type ⇔ there exist � 1 , � ⋆ as in: � � • ⋆ ⋆ y ( ⋄ ) U � p y ( ⋄ ) U � � 1 1 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  10. Natural models Polynomials Semantics End Admitting a unit type Theorem (Awodey) A natural model admits a unit type ⇔ there exist � 1 , � ⋆ as in: � � • ⋆ ⋆ y ( ⋄ ) U � p y ( ⋄ ) U � � 1 1 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  11. Natural models Polynomials Semantics End Admitting a unit type Theorem (Awodey) A natural model admits a unit type ⇔ there exist � 1 , � ⋆ as in: � � • ⋆ ⋆ y ( ⋄ ) U � p y ( ⋄ ) U � � 1 1 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  12. Natural models Polynomials Semantics End Admitting a unit type Theorem (Awodey) A natural model admits a unit type ⇔ there exist � 1 , � ⋆ as in: � � • ⋆ ⋆ y ( ⋄ ) U � p y ( ⋄ ) U � � 1 1 Corollary interpretations cartesian morphisms of � of unit types polynomials 1 ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  13. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � A : U U [ A ] U � � Σ Σ Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  14. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � U [ A ] U � � Σ Σ A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  15. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � U [ A ] U � � Σ Σ A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  16. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � U [ A ] U � � Σ Σ A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  17. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � U [ A ] U � � Σ Σ A : U Note also that P π = P p ◦ P p . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  18. Natural models Polynomials Semantics End Admitting dependent sum types Theorem (Awodey) A natural model admits a Σ -types ⇔ there exist � Σ , � pair as in: � � � � � pair pair • [ B ( a )] U A : U B : U [ A ] a :[ A ] � p π � U [ A ] U � � Σ Σ A : U Note also that P π = P p ◦ P p . Corollary interpretations cartesian morphisms of � of Σ -types polynomials p · p ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  19. Natural models Polynomials Semantics End Admitting dependent product types Theorem (Awodey) A natural model admits a Π -types ⇔ there exist � Π , � λ as in: � [ A ] � � • • λ λ U U A : U � � � p p [ A ] p [ A ] A : U A : U � A : U U [ A ] U � � Π Π Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  20. Natural models Polynomials Semantics End Admitting dependent product types Theorem (Awodey) A natural model admits a Π -types ⇔ there exist � Π , � λ as in: � [ A ] � � • • λ λ U U A : U � � � p p [ A ] p [ A ] A : U A : U � U [ A ] U � � Π Π A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  21. Natural models Polynomials Semantics End Admitting dependent product types Theorem (Awodey) A natural model admits a Π -types ⇔ there exist � Π , � λ as in: � [ A ] � � • • λ λ U U A : U � � � p p [ A ] p [ A ] A : U A : U � U [ A ] U � � Π Π A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  22. Natural models Polynomials Semantics End Admitting dependent product types Theorem (Awodey) A natural model admits a Π -types ⇔ there exist � Π , � λ as in: � [ A ] � � • • λ λ U U A : U � � � p p [ A ] p [ A ] A : U A : U � U [ A ] U � � Π Π A : U Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  23. Natural models Polynomials Semantics End Admitting dependent product types Theorem (Awodey) A natural model admits a Π -types ⇔ there exist � Π , � λ as in: � [ A ] � � • • λ λ U U A : U � � � p p [ A ] p [ A ] A : U A : U � U [ A ] U � � Π Π A : U Corollary interpretations cartesian morphisms of � of Π -types polynomials P p ( p ) ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  24. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  25. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  26. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Σ p · p ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  27. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Σ p · p ⇒ p Π P ( p ) ⇒ p Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  28. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Σ p · p ⇒ p Π P ( p ) ⇒ p This is a monad and an algebra. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  29. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Σ p · p ⇒ p Π P ( p ) ⇒ p This is almost a monad and an algebra. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  30. Natural models Polynomials Semantics End Monad and algebra? In summary: n.m. admits. . . ⇔ ∃ cartesian . . . 1 1 ⇒ p Σ p · p ⇒ p Π P ( p ) ⇒ p This is almost a monad and an algebra. Goal. Find the appropriate notion of 3-cell (morphism of morphisms of polynomials) allowing us to make this more precise. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  31. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  32. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Object of objects = A ; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  33. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Object of objects = A ; � B B a Object of morphisms = a ′ a , a ′ ∈ A Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  34. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Object of objects = A ; � 1 f over A × A . B B a 2 f ) π ∗ a ′ = ( π ∗ Object of morphisms = a , a ′ ∈ A Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  35. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Object of objects = A ; � 1 f over A × A . B B a 2 f ) π ∗ a ′ = ( π ∗ Object of morphisms = a , a ′ ∈ A Cartesian morphisms of polynomials ϕ : f ⇒ g induce full and faithful functors S ( ϕ ) : S ( f ) → S ( g ) . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  36. Natural models Polynomials Semantics End Full internal subcategories Given any morphism f : B → A in a locally cartesian closed category E , we can form the full internal subcategory S ( f ) ∈ Cat ( E ) . Object of objects = A ; � 1 f over A × A . B B a 2 f ) π ∗ a ′ = ( π ∗ Object of morphisms = a , a ′ ∈ A Cartesian morphisms of polynomials ϕ : f ⇒ g induce full and faithful functors S ( ϕ ) : S ( f ) → S ( g ) . Idea: Given cartesian morphisms ϕ, ψ : f ⇒ g , take internal natural transformations S ( ϕ ) ⇒ S ( ψ ) to be our 3-cells. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  37. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  38. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  39. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  40. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra • U → U , let U = S ( p ) ∈ Cat ( � Aside: For a natural model p : C ) . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  41. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra • U → U , let U = S ( p ) ∈ Cat ( � Aside: For a natural model p : C ) . Object of objects = U . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  42. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra • U → U , let U = S ( p ) ∈ Cat ( � Aside: For a natural model p : C ) . Object of objects = U . Object of morphisms = � A , B : U [ B ] [ A ] . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  43. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra • U → U , let U = S ( p ) ∈ Cat ( � Aside: For a natural model p : C ) . Object of objects = U . Object of morphisms = � A , B : U [ B ] [ A ] . Considered as an indexed category C op → Cat , U is equivalent to the ‘context-indexed category of types’ of Clairambault & Dybjer (2011). Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  44. Natural models Polynomials Semantics End Full internal subcategories Theorem With respect to this notion of 3 -cell: p admits 1 , Σ ⇐ ⇒ p is a pseudomonad p also admits Π ⇐ ⇒ p is a p- pseudoalgebra • U → U , let U = S ( p ) ∈ Cat ( � Aside: For a natural model p : C ) . Object of objects = U . Object of morphisms = � A , B : U [ B ] [ A ] . Considered as an indexed category C op → Cat , U is equivalent to the ‘context-indexed category of types’ of Clairambault & Dybjer (2011). Bonus: If ( C , p ) admits 1 , Σ , Π , then U is cartesian closed. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  45. Natural models Polynomials Semantics End Natural models 1 2 Connection with polynomial functors 3 Natural model semantics 4 Concluding remarks Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  46. Natural models Polynomials Semantics End Initiality of the syntax Idea (Initiality ‘conjecture’) The syntax of a dependent type theory T should itself have the structure of a natural model, which is initial amongst all natural models interpreting T . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  47. Natural models Polynomials Semantics End Initiality of the syntax Idea (Initiality ‘conjecture’) The syntax of a dependent type theory T should itself have the structure of a natural model, which is initial amongst all natural models interpreting T . Goals: Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  48. Natural models Polynomials Semantics End Initiality of the syntax Idea (Initiality ‘conjecture’) The syntax of a dependent type theory T should itself have the structure of a natural model, which is initial amongst all natural models interpreting T . Goals: Build the syntactic natural models for some basic type theories and prove that they satisfy an appropriate universal property; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  49. Natural models Polynomials Semantics End Initiality of the syntax Idea (Initiality ‘conjecture’) The syntax of a dependent type theory T should itself have the structure of a natural model, which is initial amongst all natural models interpreting T . Goals: Build the syntactic natural models for some basic type theories and prove that they satisfy an appropriate universal property; Expand to more complicated type theories by (algebraically) freely adding type theoretic structure. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  50. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  51. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  52. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  53. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  54. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − • u Presheaf of terms: U I = dom : Fin / I → Set ( A → I ) �→ A − Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  55. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − • u Presheaf of terms: U I = dom : Fin / I → Set ( A → I ) �→ A − Typing map: ( p I ) A → I = u : A → I u − Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  56. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − • u Presheaf of terms: U I = dom : Fin / I → Set ( A → I ) �→ A − Typing map: ( p I ) A → I = u : A → I u − u Representability data: given A − → I and i ∈ U I ( u ) = I , let u [ u , i ] ( A − → I ) • i = ( A + 1 − − → I ) Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  57. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − • u Presheaf of terms: U I = dom : Fin / I → Set ( A → I ) �→ A − Typing map: ( p I ) A → I = u : A → I u − u Representability data: given A − → I and i ∈ U I ( u ) = I , let u [ u , i ] ( A − → I ) • i = ( A + 1 − − → I ) p i : A ֒ → A + 1 Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  58. Natural models Polynomials Semantics End Example #1: set of basic types We’ll construct the free natural model on the theory with an I -indexed family of basic types. Definition • Define ( C I , p I : U I → U I ) as follows: Category of contexts: C I = ( Fin / I ) op u Presheaf of types: U I = cod : Fin / I → Set ( A → I ) �→ I − • u Presheaf of terms: U I = dom : Fin / I → Set ( A → I ) �→ A − Typing map: ( p I ) A → I = u : A → I u − u Representability data: given A − → I and i ∈ U I ( u ) = I , let u [ u , i ] ( A − → I ) • i = ( A + 1 − − → I ) p i : A ֒ → A + 1 q i = ⋆ Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  59. Natural models Polynomials Semantics End Example #1: set of basic types Theorem ( C I , p I ) is a natural model Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  60. Natural models Polynomials Semantics End Example #1: set of basic types Theorem • ( C I , p I ) is a natural model, and for all natural models ( C , p : U → U ) and all I-indexed families { O i } i ∈ I ⊆ U ( ⋄ ) , Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  61. Natural models Polynomials Semantics End Example #1: set of basic types Theorem • ( C I , p I ) is a natural model, and for all natural models ( C , p : U → U ) and all I-indexed families { O i } i ∈ I ⊆ U ( ⋄ ) , there is a unique F : ( C I , p I ) → ( C , p ) with F ( i ) = O i for all i ∈ I. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  62. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Goal: Given a natural model ( C , p ) , construct the ‘smallest’ natural model ( C Σ , p Σ ) which extends ( C , p ) and admits Σ -types. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  63. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees. Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  64. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  65. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A • • • • C D E A B Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  66. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A • • • • C D E A B Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  67. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A • • • • C D E A B Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  68. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A • • • • C D E A B Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  69. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types We can represent (iterated) Σ -types by binary trees.   � �   E ( x , y , z , w ) � �� x , y � , z � : C ( x , y ) w : D ( x , y , z ) � x , y � : � B ( x ) x : A • • • • C D E A B Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  70. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Definition • Define ( C Σ , p Σ : U Σ → U Σ ) as follows: Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  71. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Definition • Define ( C Σ , p Σ : U Σ → U Σ ) as follows: C Σ : Objects (contexts) are the objects of C ‘formally extended’ by trees of dependent types; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  72. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Definition • Define ( C Σ , p Σ : U Σ → U Σ ) as follows: C Σ : Objects (contexts) are the objects of C ‘formally extended’ by trees of dependent types; U Σ is the presheaf of type trees ; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  73. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Definition • Define ( C Σ , p Σ : U Σ → U Σ ) as follows: C Σ : Objects (contexts) are the objects of C ‘formally extended’ by trees of dependent types; U Σ is the presheaf of type trees ; • U Σ is the presheaf of term trees ; Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

  74. Natural models Polynomials Semantics End Example #2: freely admitting Σ -types Definition • Define ( C Σ , p Σ : U Σ → U Σ ) as follows: C Σ : Objects (contexts) are the objects of C ‘formally extended’ by trees of dependent types; U Σ is the presheaf of type trees ; • U Σ is the presheaf of term trees ; p Σ : ( tree of terms ) �→ ( tree of their types ) . Clive Newstead (cnewstead@cmu.edu) Carnegie Mellon University Algebraic models of dependent type theory These slides: https://goo.gl/Ttacdq

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