coherence for cartesian closed bicategories via
play

Coherence for cartesian closed bicategories, via - PowerPoint PPT Presentation

Coherence for cartesian closed bicategories, via normalisation-by-evaluation Marcelo Fiore : and Philip Saville* : University of Cambridge Department of Computer Science and Technology *University of Edinburgh School of Informatics 1 / 41


  1. The internal language for cc-bicategories, Λ ˆ , Ñ ps Judgements c.f. Hilken, Hirschowitz Terms Γ $ t : A (1-cells) Γ $ τ : t ñ t 1 : A Rewrites (2-cells) Γ $ τ ” τ 1 : t ñ t 1 : A Equations Features - Weak composition enforced by explicit substitution - Usual STLC operations on terms and rewrites - STLC embeds as explicit-substitution free fragment - Free property for syntactic model ù A logic of program transformations (modulo equations) there exists a rewrite t ñ t 1 t “ βη t 1 iff 12 / 41

  2. The internal language for cc-bicategories, Λ ˆ , Ñ ps Judgements c.f. Hilken, Hirschowitz Terms Γ $ t : A (1-cells) Γ $ τ : t ñ t 1 : A Rewrites (2-cells) Γ $ τ ” τ 1 : t ñ t 1 : A Equations Features - Weak composition enforced by explicit substitution - Usual STLC operations on terms and rewrites - STLC embeds as explicit-substitution free fragment - Free property for syntactic model ù A logic of program transformations (modulo equations) there exists a rewrite t ñ t 1 t “ βη t 1 iff 12 / 41

  3. The internal language for cc-bicategories, Λ ˆ , Ñ ps Judgements c.f. Hilken, Hirschowitz Terms Γ $ t : A (1-cells) Γ $ τ : t ñ t 1 : A Rewrites (2-cells) Γ $ τ ” τ 1 : t ñ t 1 : A Equations Features - Weak composition enforced by explicit substitution - Usual STLC operations on terms and rewrites - STLC embeds as explicit-substitution free fragment - Free property for syntactic model ù A logic of program transformations (modulo equations) there exists a rewrite t ñ t 1 t “ βη t 1 iff ù coherence of cc-bicategories = coherence property of 2-cells 12 / 41

  4. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . 13 / 41

  5. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . Corollary For any f , f 1 : X Ñ Y in the free cc-bicategory on a graph, there exists at most one 2-cell τ : f ñ f 1 . 13 / 41

  6. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . Corollary For any f , f 1 : X Ñ Y in the free cc-bicategory on a graph, there exists at most one 2-cell τ : f ñ f 1 . ù can use STLC for constructions in cc-bicategories! 13 / 41

  7. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . Corollary For any f , f 1 : X Ñ Y in the free cc-bicategory on a graph, there exists at most one 2-cell τ : f ñ f 1 . ù can use STLC for constructions in cc-bicategories! 1. prove result in STLC 13 / 41

  8. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . Corollary For any f , f 1 : X Ñ Y in the free cc-bicategory on a graph, there exists at most one 2-cell τ : f ñ f 1 . ù can use STLC for constructions in cc-bicategories! 1. prove result in STLC 2. βη -equalities ù 2-cells 13 / 41

  9. Theorem (Coherence) For any t and t 1 in Λ ˆ , Ñ , there exists at most one rewrite τ such ps that Γ $ τ : t ñ t 1 : A . Corollary For any f , f 1 : X Ñ Y in the free cc-bicategory on a graph, there exists at most one 2-cell τ : f ñ f 1 . ù can use STLC for constructions in cc-bicategories! 1. prove result in STLC 2. βη -equalities ù 2-cells 3. coherence guaranteed 13 / 41

  10. Normalisation-by-evaluation 14 / 41

  11. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote Normal terms nf p t q “ quote p � t � q “ . . . (long- βη ) 15 / 41

  12. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q Normal terms nf p t q “ quote p � t � q “ . . . (long- βη ) 15 / 41

  13. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) defined by mutual induction 15 / 41

  14. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) For $ λ x . t : A “ ⊲ B , get � t � : � A � Ñ � B � . 15 / 41

  15. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) For $ λ x . t : A “ ⊲ B , get � t � : � A � Ñ � B � . For fresh x : unquote p x q : � A � 15 / 41

  16. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) For $ λ x . t : A “ ⊲ B , get � t � : � A � Ñ � B � . For fresh x : � t � p unquote p x qq : � B � 15 / 41

  17. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) For $ λ x . t : A “ ⊲ B , get � t � : � A � Ñ � B � . For fresh x : quote p � t � p unquote p x qqq : B 15 / 41

  18. Normalisation-by-evaluation Aim: find canonical representatives within each βη -equivalence class Strategy: � ´ � Semantics Syntax βη -equivalent terms t , t 1 , t 2 , . . . � t � “ � t 1 � “ � t 2 � “ . . . quote nf p´q unquote Normal terms Neutral terms nf p t q “ quote p � t � q “ . . . includes variables (long- βη ) For $ λ x . t : A “ ⊲ B , get � t � : � A � Ñ � B � . For fresh x : nf p λ x . t q : “ λ x . quote p � t � p unquote p x qqq : A “ ⊲ B 15 / 41

  19. Normalisation-by-evaluation, categorically 16 / 41

  20. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u 17 / 41

  21. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations 17 / 41

  22. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; 17 / 41

  23. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; s � ´ � : neuts A ñ C p s � ´ � , s � A � q C any CCC s � ´ � : norms A ñ C p s � ´ � , s � A � q 17 / 41

  24. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; s � ´ � : neuts A ñ C p s � ´ � , s � A � q C any CCC s � ´ � : norms A ñ C p s � ´ � , s � A � q Strategy: 17 / 41

  25. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; s � ´ � : neuts A ñ C p s � ´ � , s � A � q C any CCC s � ´ � : norms A ñ C p s � ´ � , s � A � q Strategy: 1. define a glueing category G 17 / 41

  26. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; s � ´ � : neuts A ñ C p s � ´ � , s � A � q C any CCC s � ´ � : norms A ñ C p s � ´ � , s � A � q Strategy: 1. define a glueing category G 2. pick an interpretation e � ´ � in G 17 / 41

  27. Normalisation-by-evaluation, categorically (Fiore) Syntax as indexed presheaves over a category of contexts Con : + neuts A : Γ ÞÑ t neutral terms t such that Γ $ t : A u : Con Ñ Set norms A : Γ ÞÑ t normal terms t such that Γ $ t : A u syntax glued to semantics by natural transformations p Γ $ t : A q ÞÑ s � Γ $ t : A � s any interpretation of base types; s � ´ � : neuts A ñ C p s � ´ � , s � A � q C any CCC s � ´ � : norms A ñ C p s � ´ � , s � A � q Strategy: 1. define a glueing category G 2. pick an interpretation e � ´ � in G 3. define quote and unquote as maps in this category 17 / 41

  28. The glued category G p C , s q nat. trans Objects functor p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, P C s : BaseTypes Ñ Ob C 18 / 41

  29. The glued category G p C , s q nat. trans Objects functor p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, P C s : BaseTypes Ñ Ob C Morphisms nat. trans P ñ P 1 κ P 1 P p p 1 C p s � ´ � , X 1 q C p s � ´ � , X q k ˝ p´q arrow X Ñ X 1 18 / 41

  30. The glued category G p C , s q nat. trans Objects functor p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, P C s : BaseTypes Ñ Ob C Morphisms nat. trans P ñ P 1 κ P 1 "syntax" P p p 1 "interpretation" C p s � ´ � , X 1 q C p s � ´ � , X q "semantics" k ˝ p´q arrow X Ñ X 1 18 / 41

  31. The category G p C , s q nat. trans functor Objects p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, s : BaseTypes Ñ Ob C P C Morphisms "syntax" κ P 1 P "interpretation" p p 1 C p s � ´ � , X 1 q C p s � ´ � , X q "semantics" k ˝ p´q 19 / 41

  32. The category G p C , s q nat. trans functor Objects p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, s : BaseTypes Ñ Ob C P C Morphisms "syntax" κ P 1 P "interpretation" p p 1 C p s � ´ � , X 1 q C p s � ´ � , X q "semantics" k ˝ p´q ù Cartesian closed, with a strict CCC-functor G p C , s q Ñ C 19 / 41

  33. The category G p C , s q nat. trans functor Objects p Con Ñ Set P ù ñ C p s � ´ � , X q C ccc, s : BaseTypes Ñ Ob C P C Morphisms "syntax" κ P 1 P "interpretation" p p 1 C p s � ´ � , X 1 q C p s � ´ � , X q "semantics" k ˝ p´q ù Cartesian closed, with a strict CCC-functor G p C , s q Ñ C ù for every type A , , s � ´ � neuts A ù ù ù ñ C p s � ´ � , s � A � q . - P G p C , s q s � ´ � norms A ù ù ù ñ C p s � ´ � , s � A � q 19 / 41

  34. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β 20 / 41

  35. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β ν A ` ˘ e � A � : “ e � A � ù ñ C p s � ´ � , s � A � q by strict preservation 20 / 41

  36. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β e � A � ν A ` ˘ s � ´ � , s � A � q C 20 / 41

  37. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β e � Γ $ t : A � e � Γ � e � A � ν Γ ν A ` ˘ ` ˘ C s � ´ � , s � Γ � C s � ´ � , s � A � s � Γ $ t : A � ˝p´q 20 / 41

  38. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β e � Γ $ t : A � e � Γ � e � A � ν Γ ν A ` ˘ ` ˘ C s � ´ � , s � Γ � C s � ´ � , s � A � s � Γ $ t : A � ˝p´q quote A neuts A e � A � s � ´ � ν A ` ˘ ` ˘ C s � ´ � , s � A � C s � ´ � , s � A � preserves βη 20 / 41

  39. Interpretation in the glued category G p C , s q C any ccc s : BaseTypes Ñ Ob C e : BaseTypes Ñ Ob p G p C , s qq s � ´ � ` ˘ β ÞÑ ù ù ù ñ C p s � ´ � , s � β � q neuts β e � Γ $ t : A � e � Γ � e � A � ν Γ ν A ` ˘ ` ˘ C s � ´ � , s � Γ � C s � ´ � , s � A � s � Γ $ t : A � ˝p´q quote A unquote A neuts A e � A � e � A � norms A s � ´ � ν A ν A s � ´ � ` ˘ ` ˘ ` ˘ ` ˘ C s � ´ � , s � A � C s � ´ � , s � A � C s � ´ � , s � A � C s � ´ � , s � A � preserves βη preserves βη 20 / 41

  40. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i unquote Γ e � Γ $ t : A � quote A neuts Γ norms A e � Γ � e � A � s � ´ � ν Γ ν A s � ´ � C p s � ´ � , s � Γ � q C p s � ´ � , s � Γ � q C p s � ´ � , s � A � q C p s � ´ � , s � A � q s � Γ $ t : A � ˝ p´q 21 / 41

  41. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i unquote Γ e � Γ $ t : A � quote A neuts Γ norms A e � Γ � e � A � s � ´ � ν Γ ν A s � ´ � C p s � ´ � , s � Γ � q C p s � ´ � , s � Γ � q C p s � ´ � , s � A � q C p s � ´ � , s � A � q s � Γ $ t : A � ˝ p´q ù recall nf p λ x . t q : “ λ x . quote p � t � p unquote p x qqq 21 / 41

  42. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm t unquote Γ e � Γ $ t : A � quote A neuts Γ norms A e � Γ � e � A � s � ´ � ν Γ ν A s � ´ � C p s � ´ � , s � Γ � q C p s � ´ � , s � Γ � q C p s � ´ � , s � A � q C p s � ´ � , s � A � q s � Γ $ t : A � ˝ p´q ù recall nf p λ x . t q : “ λ x . quote p � t � p unquote p x qqq 21 / 41

  43. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � 22 / 41

  44. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  45. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  46. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  47. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  48. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  49. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  50. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . 22 / 41

  51. Normalising p Γ $ t : A q neuts Γ : “ Π p x i : A i qP Γ neuts A i unquote Γ : “ Π p x i : A i qP Γ unquote A i norm Γ t p x i : A i q i p x i : A i q i nf p t q unquote Γ e � Γ $ t : A � quote A neuts Γ p Γ q e � Γ � p Γ q e � A � p Γ q norms A p Γ q ν Γ ν A s � ´ � C p s � Γ � , s � Γ � q C p s � Γ � , s � A � q s � ´ � s � Γ $ t : A � ˝ p´q id s � Γ � s � Γ $ t : A � s � Γ $ t : A � Define nf p t q : “ norm Γ t pp Γ $ x i : A i q i “ 1 ,..., n q . Since s � Γ $ nf p t q : A � “ s � Γ $ t : A � in every model, nf p t q “ βη t . 22 / 41

  52. Normalisation-by-evaluation for Λ ˆ , Ñ ps 23 / 41

  53. Strategy 1. define a glueing bicategory G 2. pick an interpretation e � ´ � in G 3. define quote and unquote as maps in this bicategory 24 / 41

  54. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) 25 / 41

  55. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps inside Λ ˆ , Ñ A : “ neuts STLC + A ps : Con Ñ Set norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms 25 / 41

  56. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps inside Λ ˆ , Ñ A : “ neuts STLC + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories 25 / 41

  57. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps inside Λ ˆ , Ñ A : “ neuts STLC + A ps : Con Ñ Cat norms ps inside Λ ˆ , Ñ A : “ norms STLC A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù s � t � s � nf p t q � 25 / 41

  58. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù depends on t – s � t � s � nf p t q � 25 / 41

  59. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù depends on t – s � t � s � nf p t q � s � t 1 � s � nf p t 1 q � – depends on t 1 25 / 41

  60. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù depends on t – s � t � s � nf p t q � s � τ � s � t 1 � s � nf p t 1 q � – depends on t 1 25 / 41

  61. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù depends on t – s � t � s � nf p t q � s � τ � s � t 1 � s � nf p t 1 q � – depends on t 1 25 / 41

  62. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù depends on t – nf p t q t τ t 1 nf p t 1 q – depends on t 1 25 / 41

  63. Strategy ù re-use universal properties (quote, unquote, G p C , s q ,. . . bicategorically) ù use embedding of STLC into Λ ˆ , Ñ ps neuts ps A : “ neuts STLC inside Λ ˆ , Ñ + A ps : Con Ñ Cat norms ps A : “ norms STLC inside Λ ˆ , Ñ A ps neuts ps A p Γ q , norms ps A p Γ q sets of terms as discrete categories ù If τ exists, it’s unique depends on t – nf p t q t τ t 1 nf p t 1 q – depends on t 1 25 / 41

  64. The glued cc-bicategory G p B , s q B any cc-bicat s any interpretation of base types Want: for every type A , s � ´ � , neuts ps ù ù ù ñ B p s � ´ � , s � A � q . A - P G p B , s q s � ´ � norms ps ù ù ù ñ B p s � ´ � , s � A � q A 26 / 41

  65. The glued cc-bicategory G p B , s q pseudo nat. trans. Objects pseudofunctor p p , p q Con Ñ Cat P ù ù ù ñ B p s � ´ � , X q B cc-bicat, P B s : BaseTypes Ñ Ob B 27 / 41

  66. The glued cc-bicategory G p B , s q pseudo nat. trans. Objects pseudofunctor p p , p q Con Ñ Cat P ù ù ù ñ B p s � ´ � , X q B cc-bicat, P B s : BaseTypes Ñ Ob B pseudo nat. trans. P ñ P 1 1-cells κ P 1 P w k p – p 1 B p s � ´ � , X 1 q B p s � ´ � , X q k ˝ p´q arrow X Ñ X 1 27 / 41

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