Effectful Semantics in 2-Dimensional Categories: Premonoidal and Freyd Bicategories (2312.14964v1)
Abstract: Premonoidal categories and Freyd categories provide an encompassing framework for the semantics of call-by-value programming languages. Premonoidal categories are a weakening of monoidal categories in which the interchange law for the tensor product may not hold, modelling the fact that effectful programs cannot generally be re-ordered. A Freyd category is a pair of categories with the same objects: a premonoidal category of general programs, and a monoidal category of 'effect-free' programs which do admit re-ordering. Certain recent innovations in semantics, however, have produced models which are not categories but bicategories. Here we develop the theory to capture such examples by introducing premonoidal and Freyd structure in a bicategorical setting. The second dimension introduces new subtleties, so we verify our definitions with several examples and a correspondence theorem (between Freyd bicategories and certain actions of monoidal bicategories) which parallels the categorical framework.
- J. C. Baez, B. Fong & B. S. Pollard (2016): A compositional framework for Markov processes. Journal of Mathematical Physics 57(3), 10.1063/1.4941578.
- J. Bénabou (1967): Introduction to bicategories. In: Reports of the Midwest Category Seminar, Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 1–77, 10.1007/BFb0074299.
- Logical Methods in Computer Science Volume 13, Issue 3, 10.23638/LMCS-13(3:35)2017.
- Alexander S Corner (2016): Day convolution for monoidal bicategories. Ph.D. thesis, University of Sheffield.
- In: Programming Languages and Systems, 10.1007/978-3-030-99336-8_1.
- J. L. Fiadeiro & V. Schmitt (2007): Structured Co-spans: An Algebra of Interaction Protocols. In: Algebra and Coalgebra in Computer Science, pp. 194–208, 10.1007/978-3-540-73859-6_14.
- Journal of the London Mathematical Society 77(1), pp. 203–220, 10.1112/jlms/jdm096.
- M. Fiore & P. Saville (2019): A type theory for cartesian closed bicategories. In: 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 10.1109/LICS.2019.8785708.
- B. Fong, D. Spivak & R. Tuyeras (2019): Backprop as Functor: A compositional perspective on supervised learning. In: 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 10.1109/lics.2019.8785665.
- In: Programming Languages and Systems, pp. 234–263, 10.1007/978-3-030-72019-3_9.
- Z. Galal (2020): A Profunctorial Scott Semantics. In: 5th International Conference on Formal Structures for Computation and Deduction (FSCD 2020), 10.4230/LIPICS.FSCD.2020.16.
- Electronic Proceedings in Theoretical Computer Science 350, pp. 51–68, 10.4204/eptcs.350.4.
- R. Gordon, A. J. Power & R. Street (1995): Coherence for tricategories. Memoirs of the American Mathematical Society, 10.1090/memo/0558.
- N. Gurski (2013): Coherence in Three-Dimensional Category Theory. Cambridge University Press, 10.1017/CBO9781139542333.
- N. Gurski & A. Osorno (2013): Infinite loop spaces, and coherence for symmetric monoidal bicategories. Advances in Mathematics 246, pp. 1 – 32, 10.1016/j.aim.2013.06.028.
- In: 22nd Annual Conference on Mathematical Foundations of Programming Semantics (MFPS), 10.1016/j.entcs.2006.04.012.
- B. P. Hilken (1996): Towards a proof theory of rewriting: the simply typed 2λ𝜆\lambdaitalic_λ-calculus. Theoretical Computer Science 170(1), pp. 407–444, 10.1016/S0304-3975(96)80713-4.
- T. Hirschowitz (2013): Cartesian closed 2-categories and permutation equivalence in higher-order rewriting. Logical Methods in Computer Science 9, pp. 1–22, 10.2168/LMCS-9(3:10)2013.
- G. Janelidze & G. M. Kelly (2001): A note on actions of a monoidal category. Theory and Applications of Categories 9(4), pp. 61–91. Available at tac.mta.ca/tac/volumes/9/n4/n4.pdf.
- A. Jeffrey (1997): Premonoidal categories and a graphical view of programs.
- S. Katsumata (2014): Parametric effect monads and semantics of effect systems. In: 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), 10.1145/2535838.2535846.
- A. Kerinec, G. Manzonetto & F. Olimpieri (2023): Why Are Proofs Relevant in Proof-Relevant Models? Proceedings of the ACM on Programming Languages (POPL), 10.1145/3571201.
- S. Lack (2008): Icons. Applied Categorical Structures 18(3), pp. 289–307, 10.1007/s10485-008-9136-5.
- T. Leinster (2004): Higher operads, higher categories. London Mathematical Society Lecture Note Series 298, Cambridge University Press, 10.1017/CBO9780511525896.
- P. B. Levy (2003): Call-By-Push-Value: A Functional/Imperative Synthesis. Springer Netherlands, 10.1007/978-94-007-0954-6.
- P. B. Levy, J. Power & H. Thielecke (2003): Modelling environments in call-by-value programming languages. Information and Computation 185(2), pp. 182–210, 10.1016/s0890-5401(03)00088-9.
- S. Mac Lane & R. Paré (1985): Coherence for bicategories and indexed categories. Journal of Pure and Applied Algebra 37, pp. 59 – 80, 10.1016/0022-4049(85)90087-8.
- D. McDermott & T. Uustalu (2022): Flexibly Graded Monads and Graded Algebras. In: Lecture Notes in Computer Science, Springer International Publishing, pp. 102–128, 10.1007/978-3-031-16912-0_4.
- D. McDermott & T. Uustalu (2022): What Makes a Strong Monad? Electronic Proceedings in Theoretical Computer Science 360, pp. 113–133, 10.4204/eptcs.360.6.
- P.-A. Melliès (2012): Parametric monads and enriched adjunctions. Available at https://www.irif.fr/~mellies/tensorial-logic/8-parametric-monads-and-enriched-adjunctions.pdf.
- P.-A. Melliès (2021): Asynchronous Template Games and the Gray Tensor Product of 2-Categories. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 10.1109/lics52264.2021.9470758.
- E. Moggi (1989): Computational lambda-calculus and monads. In: Proceedings, Fourth Annual Symposium on Logic in Computer Science, IEEE Comput. Soc. Press, 10.1109/lics.1989.39155.
- E. Moggi (1991): Notions of computation and monads. Information and Computation 93(1), pp. 55–92, 10.1016/0890-5401(91)90052-4.
- F. Olimpieri (2021): Intersection Type Distributors. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 10.1109/lics52264.2021.9470617.
- H. Paquet & P. Saville (2023): Strong pseudomonads and premonoidal bicategories. arXiv:https://arxiv.org/abs/2304.11014.
- J. Power (2002): Premonoidal categories as categories with algebraic structure. Theoretical Computer Science 278(1-2), pp. 303–321, 10.1016/s0304-3975(00)00340-6.
- J. Power & E. Robinson (1997): Premonoidal categories and notions of computation. Mathematical Structures in Computer Science 7(5), pp. 453–468, 10.1017/s0960129597002375.
- J. Power & H. Thielecke (1997): Environments, continuation semantics and indexed categories. In: Lecture Notes in Computer Science, Springer Berlin Heidelberg, pp. 391–414, 10.1007/bfb0014560.
- M. Román (2022): Promonads and String Diagrams for Effectful Categories. CoRR abs/2205.07664, 10.48550/arXiv.2205.07664. arXiv:https://arxiv.org/abs/2205.07664.
- C. J. Schommer-Pries (2009): The Classification of Two-Dimensional Extended Topological Field Theories. Ph.D. thesis, University of California. Available at https://arxiv.org/pdf/1112.1000.pdf.
- R. A. G. Seely (1987): Modelling Computations: A 2-Categorical Framework. In: 2nd Annual IEEE Symp. on Logic in Computer Science (LICS).
- A. Slattery (2023): Pseudocommutativity and Lax Idempotency for Relative Pseudomonads. arXiv:https://arxiv.org/abs/2304.14788.
- A. L. Smirnov (2008): Graded monads and rings of polynomials. Journal of Mathematical Sciences 151(3), pp. 3032–3051, 10.1007/s10958-008-9013-7.
- S. Staton (2017): Commutative Semantics for Probabilistic Programming. In: Programming Languages and Systems, Springer Berlin Heidelberg, pp. 855–879, 10.1007/978-3-662-54434-1_32.
- M. Stay (2016): Compact Closed Bicategories. Theories and Applications of Categories 31(26), pp. 755–798. Available at http://www.tac.mta.ca/tac/volumes/31/26/31-26.pdf.
- M. Tanaka (2005): Pseudo-Distributive Laws and a Unified Framework for Variable Binding. Ph.D. thesis, University of Edinburgh. Available at https://www.lfcs.inf.ed.ac.uk/reports/04/ECS-LFCS-04-438/ECS-LFCS-04-438.pdf.
- H. Thielecke (1997): Continuation Semantics and Self-adjointness. Electronic Notes in Theoretical Computer Science 6, pp. 348–364, 10.1016/s1571-0661(05)80149-5.
- In: 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 10.1145/3209108.3209157.
- L. Wester Hansen & M. Shulman (2019): Constructing symmetric monoidal bicategories functorially. arXiv:https://arxiv.org/abs/1910.09240.