Saved in:
Bibliographic Details
Main Author: Perticone, Lorenzo
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.22208
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908561119903744
author Perticone, Lorenzo
author_facet Perticone, Lorenzo
contents Monads play an important role in both the syntax and semantics of modern functional programming languages. The problem of combining them has been of profound interest at least since the 90s, and different approaches have been employed to tackle it: currently, the most prevalent notion is that of monad transformers. We provide a novel abstract framework to describe such "compositions" which we call parametric distributive laws. Our description of this framework hinges on the theory of 2-categories and relies strongly on the construction of a left (1-) adjoint to the construction of monads internal to a 2-category: since distributive laws are monads in monads, we obtain a semi-strict "walking distributive law" by Gray-tensoring the walking monad with itself. By Gray-tensoring again, we can then construct a parametric variant thereof. We demonstrate the applicability of such a framework by providing two concrete examples (involving the Writer and Either monads), explicitly describing morphisms of such parametric distributive laws, and showing how (an iterated version of) our construction can be employed to describe (parametric) iterated distributive laws, motivating the appearance of the Yang-Baxter equations as coherences between the distributive laws involved.
format Preprint
id arxiv_https___arxiv_org_abs_2509_22208
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Parametric Distributive Laws: uniform monad composition
Perticone, Lorenzo
Category Theory
18C15, 18C20, 18N10, 18N15
Monads play an important role in both the syntax and semantics of modern functional programming languages. The problem of combining them has been of profound interest at least since the 90s, and different approaches have been employed to tackle it: currently, the most prevalent notion is that of monad transformers. We provide a novel abstract framework to describe such "compositions" which we call parametric distributive laws. Our description of this framework hinges on the theory of 2-categories and relies strongly on the construction of a left (1-) adjoint to the construction of monads internal to a 2-category: since distributive laws are monads in monads, we obtain a semi-strict "walking distributive law" by Gray-tensoring the walking monad with itself. By Gray-tensoring again, we can then construct a parametric variant thereof. We demonstrate the applicability of such a framework by providing two concrete examples (involving the Writer and Either monads), explicitly describing morphisms of such parametric distributive laws, and showing how (an iterated version of) our construction can be employed to describe (parametric) iterated distributive laws, motivating the appearance of the Yang-Baxter equations as coherences between the distributive laws involved.
title Parametric Distributive Laws: uniform monad composition
topic Category Theory
18C15, 18C20, 18N10, 18N15
url https://arxiv.org/abs/2509.22208