The formal theory of monads, as developed in the context of univalent foundations, provides a robust framework for understanding various computational effects and structures in categorical semantics. In particular, monads can be utilized to model the semantics of linear logic, which emphasizes resource management and the controlled use of resources. The connection between monads and linear logic arises from the fact that linear logic can be interpreted in terms of certain types of monads that encapsulate the notion of resource consumption.
For instance, in the categorical semantics of linear logic, one can define a monad that captures the behavior of linear transformations, where the unit of the monad corresponds to the introduction of resources and the multiplication corresponds to the combination of resources. The formal theory of monads allows for the systematic study of these transformations within a bicategorical framework, enabling the exploration of various properties such as coherence and adjunctions.
Similarly, in the enriched effect calculus, which deals with effects in programming languages, the formal theory of monads can be employed to represent different computational effects such as state, exceptions, or non-determinism. By defining appropriate bicategories that encapsulate these effects, one can leverage the univalent foundations to reason about the relationships between different types of monads and their corresponding effects. This approach not only provides a unified perspective on various computational phenomena but also facilitates the formalization of these concepts in proof assistants like Coq, enhancing the rigor and reliability of the semantics.