an authoritarian approach to presheaves
play

An Authoritarian Approach to Presheaves Pierre-Marie Pdrot INRIA - PowerPoint PPT Presentation

An Authoritarian Approach to Presheaves Pierre-Marie Pdrot INRIA Birmingham CS Seminar 5th June 2020 P.-M. Pdrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 1 / 63 CIC, a very fancy intuitionistic logical system . CIC, a


  1. A to B B is given by A p and f p x All Your Base Category Are Belong to Us A p 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) B q f q A q B B p A f p A “ f is compatible with restriction” x f q B q p which is natural, i.e. given x B p A p -index functions f p A family of Morphisms: A morphism from A 7 / 63 What is Psh ( P ) ?

  2. All Your Base Category Are Belong to Us B p 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) B q f q A q B A f p A p “ f is compatible with restriction” 7 / 63 What is Psh ( P ) ? Morphisms: A morphism from ( A , θ A ) to ( B , θ B ) is given by A family of P -index functions f p : A p → B p which is natural, i.e. given x ∈ A p and α ∈ P ( q , p ) θ B α ( f p x ) ≡ f q ( θ A α x )

  3. All Your Base Category Are Belong to Us B p 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) f q A q � � � f p A p “ f is compatible with restriction” 7 / 63 What is Psh ( P ) ? Morphisms: A morphism from ( A , θ A ) to ( B , θ B ) is given by A family of P -index functions f p : A p → B p which is natural, i.e. given x ∈ A p and α ∈ P ( q , p ) θ B α ( f p x ) ≡ f q ( θ A α x ) θ A α θ B α � B q

  4. The Wise Speak Only of What They Know “Speak, friend, and pullback.” Merely a categorical curse word For our purposes, that means that Psh is some kind of type theory ... in particular, it contains the simply-typed -calculus P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 8 / 63 Psh ( P ) is a topos .

  5. The Wise Speak Only of What They Know “Speak, friend, and pullback.” Merely a categorical curse word For our purposes, that means that Psh is some kind of type theory ... in particular, it contains the simply-typed -calculus P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 8 / 63 Psh ( P ) is a topos .

  6. The Wise Speak Only of What They Know “Speak, friend, and pullback.” Merely a categorical curse word For our purposes, that means that P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 8 / 63 Psh ( P ) is a topos . Psh ( P ) is some kind of type theory ... in particular, it contains the simply-typed λ -calculus

  7. Presheaves, Presheaves Everywhere A 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) model! - Yet another I won’t give further details here. One remark though. Nat Who cares about topoi? M A M Psh A A As usual: Presheaves actually form a model of CIC. 9 / 63

  8. Presheaves, Presheaves Everywhere A 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) model! - Yet another I won’t give further details here. One remark though. Nat Who cares about topoi? M A M Psh A A As usual: Presheaves actually form a model of CIC. 9 / 63

  9. Presheaves, Presheaves Everywhere Who cares about topoi? 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) model! - Yet another I won’t give further details here. One remark though. 9 / 63 Presheaves actually form a model of CIC. As usual: ⊢ A : □ [ [ A ] ] ∈ Psh ( P ) ⇝ ⊢ M : A [ M ] ∈ Nat (1 , [ [ A ] ]) ⇝

  10. Presheaves, Presheaves Everywhere Who cares about topoi? 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) I won’t give further details here. One remark though. 9 / 63 As usual: Presheaves actually form a model of CIC. ⊢ A : □ [ [ A ] ] ∈ Psh ( P ) ⇝ ⊢ M : A [ M ] ∈ Nat (1 , [ [ A ] ]) ⇝ Yet another set - theoretical model!

  11. Consistency There is no proof of False . ☺ S O 😖 Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Cantor’s Hell Let’s have a look at the good properties we long for. S M “ C ZF-implies” M Canonicity Closed integers are integers... are they? 10 / 63

  12. ☺ S O 😖 Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Cantor’s Hell Let’s have a look at the good properties we long for. S M “ C ZF-implies” M Canonicity Closed integers are integers... are they? Consistency There is no proof of False . 10 / 63

  13. S O 😖 Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Cantor’s Hell Let’s have a look at the good properties we long for. S M “ C ZF-implies” M Canonicity Closed integers are integers... are they? 10 / 63 Consistency There is no proof of False . ☺

  14. 😖 Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Cantor’s Hell Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? 10 / 63 Consistency There is no proof of False . ☺ ⊢ M : N “ ( C ) ZF-implies” M ≡ S . . . S O

  15. ☹ Reduction Never heard of that. What’s syntax already? 😲 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Cantor’s Hell Let’s have a look at the good properties we long for. Implementability Type-checking is not decidable. Canonicity Closed integers are integers... are they? 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies”

  16. Reduction Never heard of that. What’s syntax already? 😲 Cantor’s Hell Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? Exeunt Normalization and Subject reduction . Phenomenological Law Set-theoretical models suck. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies” Implementability Type-checking is not decidable. ☹

  17. 😲 Cantor’s Hell 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Set-theoretical models suck. Phenomenological Law Exeunt Normalization and Subject reduction . Reduction Never heard of that. What’s syntax already? Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies” Implementability Type-checking is not decidable. ☹

  18. Cantor’s Hell Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? Exeunt Normalization and Subject reduction . Phenomenological Law Set-theoretical models suck. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies” Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲

  19. Cantor’s Hell Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? Phenomenological Law Set-theoretical models suck. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies” Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 ⇝ Exeunt Normalization and Subject reduction .

  20. Cantor’s Hell Let’s have a look at the good properties we long for. Canonicity Closed integers are integers... are they? Phenomenological Law Set-theoretical models suck. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 10 / 63 Consistency There is no proof of False . ☺ M ≡ S . . . S O 😖 ⊢ M : N “ ( C ) ZF-implies” Implementability Type-checking is not decidable. ☹ Reduction Never heard of that. What’s syntax already? 😲 ⇝ Exeunt Normalization and Subject reduction .

  21. Down With Semantics Syntactic Models P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 11 / 63

  22. Stepping Back What is a model? Takes syntax as input. Interprets it into some low-level language. Must preserve the meaning of the source. Refjnes the behaviour of under-specifjed structures. This looks suspiciously familiar... “By Jove, this is a compiler !” This is a folklore in the Curry-Howard community. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 12 / 63

  23. Stepping Back What is a model? Takes syntax as input. Interprets it into some low-level language. Must preserve the meaning of the source. Refjnes the behaviour of under-specifjed structures. This looks suspiciously familiar... “By Jove, this is a compiler !” This is a folklore in the Curry-Howard community. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 12 / 63

  24. Stepping Back What is a model? Takes syntax as input. Interprets it into some low-level language. Must preserve the meaning of the source. Refjnes the behaviour of under-specifjed structures. This looks suspiciously familiar... “By Jove, this is a compiler !” This is a folklore in the Curry-Howard community. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 12 / 63

  25. Stepping Back What is a model? Takes syntax as input. Interprets it into some low-level language. Must preserve the meaning of the source. Refjnes the behaviour of under-specifjed structures. This looks suspiciously familiar... “By Jove, this is a compiler !” This is a folklore in the Curry-Howard community. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 12 / 63

  26. On Curry-Howard Poetry languages 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Example: NbE, external realizability. meta Usual models are more like interpreters . 13 / 63 target vs. meta No separation between { implementation } { host } ⊢ S A − → ⊨ M A Notably, ⊨ M lives in the semantical world.

  27. On Curry-Howard Poetry Syntactic models are proper compilers . 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) are type theories. We will be interested in instances where Example: CPS translation, internal realizability. 14 / 63 meta Target and meta languages are clearly distinct . ⊢ S A − → ⊢ T [ [ A ] ] Now ⊢ T is pure syntax, only soundness lives in the meta!

  28. On Curry-Howard Poetry Syntactic models are proper compilers . 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Example: CPS translation, internal realizability. 14 / 63 Target and meta languages are clearly distinct . meta ⊢ S A − → ⊢ T [ [ A ] ] Now ⊢ T is pure syntax, only soundness lives in the meta! We will be interested in instances where S , T are type theories.

  29. Syntactic Models, Details M 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) translation. implementing new terms through the assembly language , by going down to the Step 3: Expand A M A Step 2: Flip views and actually pose Proving this is the one appeal to a (weak) meta. A M implies A M from it s.t. and derive on the syntax of Step 1: Defjne Typically both theories are CIC. 15 / 63 Step 0: Pick two type theories, a source S and a target T .

  30. Syntactic Models, Details A 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) translation. implementing new terms through the assembly language , by going down to the Step 3: Expand A M M Step 2: Flip views and actually pose Proving this is the one appeal to a (weak) meta. implies Typically both theories are CIC. 15 / 63 Step 0: Pick two type theories, a source S and a target T . Step 1: Defjne [ · ] on the syntax of S and derive [ [ · ] ] from it s.t. ⊢ S M : A ⊢ T [ M ] : [ [ A ] ]

  31. Syntactic Models, Details Step 2: Flip views and actually pose 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) translation. implementing new terms through the assembly language , by going down to the Step 3: Expand 15 / 63 Proving this is the one appeal to a (weak) meta. implies Typically both theories are CIC. Step 0: Pick two type theories, a source S and a target T . Step 1: Defjne [ · ] on the syntax of S and derive [ [ · ] ] from it s.t. ⊢ S M : A ⊢ T [ M ] : [ [ A ] ] ⊢ S M : A := ⊢ T [ M ] : [ [ A ] ]

  32. Syntactic Models, Details implies 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Proving this is the one appeal to a (weak) meta. Step 2: Flip views and actually pose 15 / 63 Typically both theories are CIC. Step 0: Pick two type theories, a source S and a target T . Step 1: Defjne [ · ] on the syntax of S and derive [ [ · ] ] from it s.t. ⊢ S M : A ⊢ T [ M ] : [ [ A ] ] ⊢ S M : A := ⊢ T [ M ] : [ [ A ] ] Step 3: Expand S by going down to the T assembly language , implementing new terms through the [ · ] translation.

  33. Why Syntactic Models? Obviously, that’s subtle. In particular, it must preserve conversion (even worse) Yet, a lot of nice consequences. Does not require non-type-theoretical foundations ( monism ) Can be implemented in Coq ( software monism ) Easy to show (relative) consistency, look at False Inherit properties from CIC: computationality, decidability, implementation ... P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 16 / 63 The translation [ · ] must preserve typing (not easy)

  34. Why Syntactic Models? Obviously, that’s subtle. In particular, it must preserve conversion (even worse) Yet, a lot of nice consequences. Does not require non-type-theoretical foundations ( monism ) Can be implemented in Coq ( software monism ) Inherit properties from CIC: computationality, decidability, implementation ... P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 16 / 63 The translation [ · ] must preserve typing (not easy) Easy to show (relative) consistency, look at [ [ False ] ]

  35. On Syntactic Models They were fjrst introduced by Martin Hofmann in his PhD (1997). ... then somewhat neglected. At Gallinette, we have been using them successfully in the recent years For efgectful type theories mostly But the one model that originally sparked our interest was... Presheaves ! P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 17 / 63

  36. On Syntactic Models They were fjrst introduced by Martin Hofmann in his PhD (1997). ... then somewhat neglected. At Gallinette, we have been using them successfully in the recent years For efgectful type theories mostly But the one model that originally sparked our interest was... Presheaves ! P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 17 / 63

  37. On Syntactic Models They were fjrst introduced by Martin Hofmann in his PhD (1997). ... then somewhat neglected. At Gallinette, we have been using them successfully in the recent years For efgectful type theories mostly But the one model that originally sparked our interest was... Presheaves ! P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 17 / 63

  38. “Is it possible to see the presheaf construction as a syntactic model?” P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 18 / 63 Sheaf French Coat of Arms

  39. Persevere Diabolicum Why the hell am I talking about syntactic presheaves today? fi It is the journey, not the destination P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 19 / 63

  40. Persevere Diabolicum Why the hell am I talking about syntactic presheaves today? 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) It is the journey, not the destination 19 / 63 2012 2016 2020 Extending Type The De fi nitional Russian Constructivism Theory with Side of the Forcing in a Prefascist Theory Forcing (LICS, Jaber, (LICS, Pédrot) Lewertowski, Pédrot, (LICS, Jaber, Tabareau, Sozeau) Tabareau, Sozeau) FAIL FAIL YAY?

  41. Persevere Diabolicum Why the hell am I talking about syntactic presheaves today? 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) It is the journey, not the destination 19 / 63 2012 2016 2020 Extending Type The De fi nitional Russian Constructivism Theory with Side of the Forcing in a Prefascist Theory Forcing (LICS, Jaber, (LICS, Pédrot) Lewertowski, Pédrot, (LICS, Jaber, Tabareau, Sozeau) Tabareau, Sozeau) FAIL FAIL YAY?

  42. (We were warned.) P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 20 / 63

  43. Syntactic Presheaves, 2012 Edition “Hold my beer!” Replace Set everywhere with CIC. What could possibly go wrong? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 21 / 63 “A presheaf is just a functor P op → Set .”

  44. Syntactic Presheaves, 2012 Edition “Hold my beer!” Replace Set everywhere with CIC. What could possibly go wrong? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 21 / 63 “A presheaf is just a functor P op → Set .”

  45. Syntactic Presheaves, 2012 Edition “Hold my beer!” Replace Set everywhere with CIC. What could possibly go wrong? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 21 / 63 “A presheaf is just a functor P op → Set .”

  46. Syntactic Presheaves, 2012 Edition “Hold my beer!” Replace Set everywhere with CIC. What could possibly go wrong? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 21 / 63 “A presheaf is just a functor P op → Set .”

  47. A e Close Encounters of the Third Type q 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) And voilá, the Great Typifjcation is an utter success! eqn A p p el El A eqn A q A p p p q Replace Set everywhere with CIC. A A Psh eqn r p r q q p q r p p p p id Cat 22 / 63

  48. Close Encounters of the Third Type Replace Set everywhere with CIC. 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) And voilá, the Great Typifjcation is an utter success! 22 / 63   P : □     ≤ : P → P → □       Cat : □ := id : Π p . p ≤ p ◦ : Π p q r . p ≤ q → q ≤ r → p ≤ r         eqn : . . . ;     A : P → □   Psh : □ := θ A : Π( p q : P ) ( α : q ≤ p ) . A p → A q eqn : . . . ;   { el : Π( p : P ) . A p } El ( A , θ A , e ) : □ := eqn : . . . ;

  49. Close Encounters of the Third Type Replace Set everywhere with CIC. 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) And voilá, the Great Typifjcation is an utter success! 22 / 63   P : □     ≤ : P → P → □       Cat : □ := id : Π p . p ≤ p ◦ : Π p q r . p ≤ q → q ≤ r → p ≤ r         eqn : . . . ;     A : P → □   Psh : □ := θ A : Π( p q : P ) ( α : q ≤ p ) . A p → A q eqn : . . . ;   { el : Π( p : P ) . A p } El ( A , θ A , e ) : □ := eqn : . . . ;

  50. A e CIC M CIC M 😲 😲 😲 😲 Equality is Too Serious a Matter N 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Thus the target theory must be EXTENSIONAL “The Coherence Hell” You need to introduce rewriting everywhere N M e This almost works... N M N eqn A p p el El A ... except that equations are propositional !!! 23 / 63

  51. 😲 😲 😲 😲 Equality is Too Serious a Matter This almost works... 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Thus the target theory must be EXTENSIONAL “The Coherence Hell” You need to introduce rewriting everywhere 23 / 63 ... except that equations are propositional !!! { el : Π( p : P ) . A p } El ( A , θ A , e ) : □ := eqn : . . . ; ⊢ CIC M ≡ N �− → ⊢ [ M ] ≡ [ N ] ⊢ CIC M ≡ N − → ⊢ e : [ M ] = [ N ]

  52. 😲 😲 Equality is Too Serious a Matter This almost works... 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Thus the target theory must be EXTENSIONAL “The Coherence Hell” You need to introduce rewriting everywhere 23 / 63 ... except that equations are propositional !!! { el : Π( p : P ) . A p } El ( A , θ A , e ) : □ := eqn : . . . ; ⊢ CIC M ≡ N �− → ⊢ [ M ] ≡ [ N ] ⊢ CIC M ≡ N − → ⊢ e : [ M ] = [ N ] 😲 😲

  53. Equality is Too Serious a Matter This almost works... 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Thus the target theory must be EXTENSIONAL “The Coherence Hell” You need to introduce rewriting everywhere 23 / 63 ... except that equations are propositional !!! { el : Π( p : P ) . A p } El ( A , θ A , e ) : □ := eqn : . . . ; ⊢ CIC M ≡ N �− → ⊢ [ M ] ≡ [ N ] ⊢ CIC M ≡ N − → ⊢ e : [ M ] = [ N ] 😲 😲 😲 😲

  54. That Was Not My Intension Extensional Type Theory (ETT) is defjned by Santa Claus conversion . Arguably better than ZFC (“constructive”) ... but undecidable type checking ... no computation, e.g. -reduction is undecidable See Théo Winterhalter’s soon to be defended PhD for more horrors No True Scotsman Syntactic models into ETT are not really syntactic models . To be more precise, I believe that ETT is not really a type theory. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 24 / 63 Γ ⊢ e : M = N Γ ⊢ M ≡ N

  55. That Was Not My Intension Extensional Type Theory (ETT) is defjned by Santa Claus conversion . Arguably better than ZFC (“constructive”) ... but undecidable type checking ... no computation, e.g. -reduction is undecidable See Théo Winterhalter’s soon to be defended PhD for more horrors No True Scotsman Syntactic models into ETT are not really syntactic models . To be more precise, I believe that ETT is not really a type theory. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 24 / 63 Γ ⊢ e : M = N Γ ⊢ M ≡ N

  56. That Was Not My Intension Extensional Type Theory (ETT) is defjned by Santa Claus conversion . Arguably better than ZFC (“constructive”) ... but undecidable type checking See Théo Winterhalter’s soon to be defended PhD for more horrors No True Scotsman Syntactic models into ETT are not really syntactic models . To be more precise, I believe that ETT is not really a type theory. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 24 / 63 Γ ⊢ e : M = N Γ ⊢ M ≡ N ... no computation, e.g. β -reduction is undecidable

  57. That Was Not My Intension Extensional Type Theory (ETT) is defjned by Santa Claus conversion . Arguably better than ZFC (“constructive”) ... but undecidable type checking See Théo Winterhalter’s soon to be defended PhD for more horrors No True Scotsman To be more precise, I believe that ETT is not really a type theory. P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 24 / 63 Γ ⊢ e : M = N Γ ⊢ M ≡ N ... no computation, e.g. β -reduction is undecidable Syntactic models into ETT are not really syntactic models † .

  58. That Was Not My Intension Extensional Type Theory (ETT) is defjned by Santa Claus conversion . Arguably better than ZFC (“constructive”) ... but undecidable type checking See Théo Winterhalter’s soon to be defended PhD for more horrors No True Scotsman P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 24 / 63 Γ ⊢ e : M = N Γ ⊢ M ≡ N ... no computation, e.g. β -reduction is undecidable Syntactic models into ETT are not really syntactic models † . ( † ) To be more precise, I believe that ETT is not really a type theory.

  59. (Make conversion great again, and break everything else.) P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 25 / 63

  60. Squaring the Circle (Me to Guilhem, Nicolas and Matthieu, some time before defending PhD.) — You people are doing it wrong. It cannot work! — Why? — Because presheaves are call-by-value ! ... and you’re trying to intepret a call-by-name language! — What on earth does that even mean? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 26 / 63

  61. Squaring the Circle (Me to Guilhem, Nicolas and Matthieu, some time before defending PhD.) — You people are doing it wrong. It cannot work! — Why? — Because presheaves are call-by-value ! ... and you’re trying to intepret a call-by-name language! — What on earth does that even mean? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 26 / 63

  62. Squaring the Circle (Me to Guilhem, Nicolas and Matthieu, some time before defending PhD.) — You people are doing it wrong. It cannot work! — Why? — Because presheaves are call-by-value ! ... and you’re trying to intepret a call-by-name language! — What on earth does that even mean? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 26 / 63

  63. Squaring the Circle (Me to Guilhem, Nicolas and Matthieu, some time before defending PhD.) — You people are doing it wrong. It cannot work! — Why? — Because presheaves are call-by-value ! ... and you’re trying to intepret a call-by-name language! — What on earth does that even mean? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 26 / 63

  64. Squaring the Circle (Me to Guilhem, Nicolas and Matthieu, some time before defending PhD.) — You people are doing it wrong. It cannot work! — Why? — Because presheaves are call-by-value ! ... and you’re trying to intepret a call-by-name language! — What on earth does that even mean? P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 26 / 63

  65. X c A v op Set X c A v X c A c A v X v X c X v X v p q 05/06/2020 (free functoriality) An Authoritarian Approach to Presheaves r r q x r p x q q p P.-M. Pédrot (INRIA) This is the Left Adjoint, Right? q value type Yet I won’t present it here because it’s Birmingham. Theorem (Somewhere inside PBL’s humongous PhD) Kripke models factorize through CBPV . X computation type Set A Fun p A p p p p CBPV is a nice framework to study efgects. p 27 / 63

  66. X c A v op Set X c A v X c A c A v X v X c X v X v p q 05/06/2020 (free functoriality) An Authoritarian Approach to Presheaves r r q x r p x q q p P.-M. Pédrot (INRIA) This is the Left Adjoint, Right? q value type Yet I won’t present it here because it’s Birmingham. Theorem (Somewhere inside PBL’s humongous PhD) Kripke models factorize through CBPV . X computation type Set A Fun p A p p p p CBPV is a nice framework to study efgects. p 27 / 63

  67. X c A v op Set X c A v X c A c A v X v X c X v X v p q 05/06/2020 (free functoriality) An Authoritarian Approach to Presheaves r r q x r p x q q p P.-M. Pédrot (INRIA) This is the Left Adjoint, Right? q value type Yet I won’t present it here because it’s Birmingham. Theorem (Somewhere inside PBL’s humongous PhD) Kripke models factorize through CBPV . X computation type Set A Fun p A p p p p CBPV is a nice framework to study efgects. p 27 / 63

  68. This is the Left Adjoint, Right? p 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) (free functoriality) q p p CBPV is a nice framework to study efgects. p 27 / 63 value type A X Kripke models factorize through CBPV . Theorem (Somewhere inside PBL’s humongous PhD) Yet I won’t present it here because it’s Birmingham. computation type ] c : | P | → Set �→ [ [ X ] ] v : Fun ( P op , Set ) �→ [ [ A ] [ [ A → X ] ] c := [ [ A ] ] v p → [ [ X ] ] c [ [ F A ] ] c := | [ [ A ] ] v p | [ [ U X ] ] v := Π( q : P )( α : q ≤ p ) . [ [ X ] ] c ] v ( α : q ≤ p )( x : [ [ U X ] ] v p ) := λ ( r : P )( β : r ≤ q ) . x r ( α ◦ β ) θ [ [ U X ]

  69. More Than One Way to Do It V v 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) This is the presheaf interpretation of arrows! (up to naturality) q V v q V v p q q p Thus, composing the CBV embedding with the “Kripke” interpretation: Theorem (a value type) CBV (a computation type) CBN Kripke models factorize through CBPV . 28 / 63 Canonical embeddings of λ -calculus into CBPV: U σ N → τ N ( σ → τ ) N := U ( σ V → F τ V ) ( σ → τ ) V :=

  70. More Than One Way to Do It (a value type) 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) This is the presheaf interpretation of arrows! (up to naturality) q Theorem Thus, composing the CBV embedding with the “Kripke” interpretation: 28 / 63 CBV (a computation type) Kripke models factorize through CBPV . CBN Canonical embeddings of λ -calculus into CBPV: U σ N → τ N ( σ → τ ) N := U ( σ V → F τ V ) ( σ → τ ) V := [ [( σ → τ ) V ] ] v p := Π( q : P )( α : q ≤ p ) . [ [ σ V ] ] v q → [ [ τ V ] ] v

  71. More Than One Way to Do It (a value type) 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) q Theorem Thus, composing the CBV embedding with the “Kripke” interpretation: 28 / 63 CBV (a computation type) Kripke models factorize through CBPV . CBN Canonical embeddings of λ -calculus into CBPV: U σ N → τ N ( σ → τ ) N := U ( σ V → F τ V ) ( σ → τ ) V := [ [( σ → τ ) V ] ] v p := Π( q : P )( α : q ≤ p ) . [ [ σ V ] ] v q → [ [ τ V ] ] v This is the presheaf interpretation of arrows! (up to naturality) ∗∗

  72. x t V v t x t V p u V p v u CBPV u V Le Clash B 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Call-by-name is not call-by-value! Folklore A M (Conv) Type theory is call-by-name ! A B M Presheaves are call-by-value ! t V t because V In particular, they only satisfy the CBV equational theory generated by 29 / 63

  73. Le Clash B 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Call-by-name is not call-by-value! Folklore A M (Conv) B A M Presheaves are call-by-value ! Type theory is call-by-name ! because In particular, they only satisfy the CBV equational theory generated by 29 / 63 ( λ x . t ) V ≡ β v t { x := V } t V ≡ CBPV u V t ≡ β v u − → − → [ t V ] p ≡ T [ u V ] p

  74. Le Clash B 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Call-by-name is not call-by-value! Folklore A M (Conv) B A M Presheaves are call-by-value ! Type theory is call-by-name ! because In particular, they only satisfy the CBV equational theory generated by 29 / 63 ( λ x . t ) V ≡ β v t { x := V } t V ≡ CBPV u V t ≡ β v u − → − → [ t V ] p ≡ T [ u V ] p

  75. Le Clash Presheaves are call-by-value ! 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Call-by-name is not call-by-value! Folklore (Conv) Type theory is call-by-name ! 29 / 63 because In particular, they only satisfy the CBV equational theory generated by ( λ x . t ) V ≡ β v t { x := V } t V ≡ CBPV u V t ≡ β v u − → − → [ t V ] p ≡ T [ u V ] p Γ ⊢ M : B Γ ⊢ A ≡ β B Γ ⊢ M : A

  76. Le Clash Presheaves are call-by-value ! 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Call-by-name is not call-by-value! Folklore (Conv) Type theory is call-by-name ! 29 / 63 because In particular, they only satisfy the CBV equational theory generated by ( λ x . t ) V ≡ β v t { x := V } t V ≡ CBPV u V t ≡ β v u − → − → [ t V ] p ≡ T [ u V ] p Γ ⊢ M : B Γ ⊢ A ≡ β B Γ ⊢ M : A

  77. CIC A p CIC M p A p p id p CIC M p N p If There is No Solution, There is No Problem q p CC M A p CC M N p P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 q p Easy solution! Pick the CBN decomposition instead. Theorem (Jaber & al. 2016) A p This adapts straightforwardly to the dependently-typed setting. 30 / 63 There is a syntactic presheaf model of CC into CIC . where CC is CIC without inductive types. CC [ [( σ → τ ) N ] ] c p := (Π( q : P )( α : q ≤ p ) . [ [ σ N ] ] c q ) → [ [ τ N ] ] c

  78. CIC A p CIC M p A p p id p CIC M p N p If There is No Solution, There is No Problem q p CC M A p CC M N p P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 q p Easy solution! Pick the CBN decomposition instead. Theorem (Jaber & al. 2016) A p This adapts straightforwardly to the dependently-typed setting. 30 / 63 There is a syntactic presheaf model of CC into CIC . where CC is CIC without inductive types. CC [ [( σ → τ ) N ] ] c p := (Π( q : P )( α : q ≤ p ) . [ [ σ N ] ] c q ) → [ [ τ N ] ] c

  79. CIC A p CIC M p A p p id p CIC M p N p p CC M A p M CC q N p P.-M. Pédrot (INRIA) An Authoritarian Approach to Presheaves 05/06/2020 q If There is No Solution, There is No Problem Easy solution! Pick the CBN decomposition instead. Theorem (Jaber & al. 2016) p p This adapts straightforwardly to the dependently-typed setting. 30 / 63 CC A [ [( σ → τ ) N ] ] c p := (Π( q : P )( α : q ≤ p ) . [ [ σ N ] ] c q ) → [ [ τ N ] ] c There is a syntactic presheaf model of CC ω into CIC . where CC ω is CIC without inductive types.

  80. If There is No Solution, There is No Problem p 05/06/2020 An Authoritarian Approach to Presheaves P.-M. Pédrot (INRIA) Easy solution! Pick the CBN decomposition instead. Theorem (Jaber & al. 2016) This adapts straightforwardly to the dependently-typed setting. 30 / 63 [ [( σ → τ ) N ] ] c p := (Π( q : P )( α : q ≤ p ) . [ [ σ N ] ] c q ) → [ [ τ N ] ] c There is a syntactic presheaf model of CC ω into CIC . where CC ω is CIC without inductive types. ⊢ CC ω A : □ − → p : P ⊢ CIC [ A ] p : Π( q : P )( α : q ≤ p ) . □ ⊢ CC ω M : A − → p : P ⊢ CIC [ M ] p : [ A ] p p id p ⊢ CC ω M ≡ N − → p : P ⊢ CIC [ M ] p ≡ [ N ] p

Recommend


More recommend