Syntax and semantics of focalisation with relative monads and comonads
2026-06-12 • Logic in Computer Science
Logic in Computer ScienceProgramming Languages
AI summaryⓘ
The authors explore how certain logical rules called focalisation and polarisation help design syntax for representing computations that have effects, like resource usage. They focus on two important structures, called exponential comonads and strong monads, which model how resources and effects behave in programming languages. The key insight is that to fully understand these structures, they need to be viewed as relative (co)monads connected to special functors called positive and negative shifts. The authors also link their syntax-based approach with recent categorical ideas, showing how these connections clarify the modeling of effects in a call-by-push-value framework.
focalisationpolarisationsequent calculusexponential comonadstrong monadrelative (co)monadcall-by-push-valueadjunctionnon-associative categorieseffectful computation
Authors
Éléonore Mangel, Paul-André Melliès, Guillaume Munch-Maccagnoni
Abstract
The logical principles of focalisation and polarisation can be used to design well-behaved term syntaxes for sequent calculus, which play a role as meta-languages for describing effectful computation. On the semantics side, this corresponds to an axiomatic and polarised notion of model of computation stated in terms of adjunctions over non-associative categories. In this paper, we study the special and delicate cases of resource and effect modalities in a general intuitionistic and linear setting: an exponential comonad $!$ (refining $\square$) and a strong monad $\lozenge$. The starting point of our contribution is noticing that the completeness for a polarised syntax for $!$ and $\lozenge$ with respect to (co)monads in linear call-by-push-value models can be achieved if we move to relative (co)monads: more precisely, comonads relative to $\downarrow$ (the positive shift functor) for $!$ and monads relative to $\uparrow$ (the negative shift functor) for $\lozenge$. These specialisations of the concept of relative (co)monad to call-by-push-value adjunctions recently appeared. Yet the syntax we present arose from proof-theoretic consideration, without the link with relative (co)monads being noticed at the time. Our first remark is thus that (co)monads relative to a call-by-push-value adjunction have been motivated previously from a proof-theoretic perspective in the context of focalisation, which also provides a meta-language for these concepts in an effectful setting. We carry out the study of these modalities from the axiomatic, non-associative point of view. We recall the notion of adjunction over non-associative categories, and establish correspondence results between this notion of adjunction and that of relative adjunction. This correspondence is then extended to linear-non-linear and strong versions of adjunctions as needed to model $!$ and $\lozenge$.