🤖 AI Summary
This work addresses the challenge of uniformly characterizing partially composable effects in mixed semantic models involving both pure and effectful computations. It proposes a monoidal category framework graded by partial commutative monoids (PCMs), introducing for the first time the notion of PCM-graded monoidal categories. Within this framework, effect categories are identified as a core reflective subcategory and reinterpreted as monoidal objects through the lens of thin pro-monoidal categories. By synthesizing tools from category theory—including pro-structures, PCMs, Cartesian structures, and Freyd categories—the paper constructs a unified semantic model that subsumes both traditional monoidal categories and effect categories. This model effectively supports formal reasoning about computational scenarios exhibiting resource sensitivity and non-interfering parallelism.
📝 Abstract
Effectful categories have two classes of morphisms: pure morphisms, which form a monoidal category; and effectful morphisms, which can only be combined monoidally with central morphisms (such as the pure ones), forming a premonoidal category. This suggests seeing morphisms of an effectful category as carrying a grade that combines under the monoidal product in a partially defined manner. We axiomatize this idea with the notion of monoidal category graded by a partial commutative monoid (PCM). Monoidal categories arise as the special case of grading by the singleton PCM, and effectful categories arise from grading by a two-element PCM. Further examples include grading by powerset PCMs, modelling non-interfering parallelism for programs accessing shared resources, and grading by intervals, modelling bounded resource usage. We show that effectful categories form a coreflective subcategory of PCM-graded monoidal categories; introduce cartesian structure, recovering Freyd categories; and describe PCM-graded monoidal categories as monoids by viewing a PCM as a thin promonoidal category.