Monoid Structures on Indexed Containers

📅 2025-09-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work investigates monoid structures on the category of indexed containers to provide an algebraic characterization of monads on $mathbf{Set}^I$. The problem addressed is the lack of an intrinsic, compositional definition of monoids in the indexed container setting that faithfully captures monads. Methodologically, we define the tensor product as composition of the corresponding endofunctors, yielding the first internal, compositional definition of monoids in indexed containers; we rigorously prove a bijective correspondence between such monoids and monads on $mathbf{Set}^I$. Our contribution unifies classical effectful constructions—including state, writer, and free monads—within a single categorical framework, thereby establishing a foundational basis for effect modeling in dependently typed programming. The approach integrates higher-order category theory with dependent type theory, and all definitions and equivalence proofs have been fully formalized in Cubical Agda. The core innovation lies in establishing a precise, formally verified correspondence between indexed container monoids and monads, together with the first complete mechanized construction and proof.

Technology Category

Application Category

📝 Abstract
Containers represent a wide class of type constructions relevant for functional programming and (co)inductive reasoning. Indexed containers generalize this notion to better fit the scope of dependently typed programming. When interpreting types to be sets, a container describes an endofunctor on the category of sets while an I-indexed container describes an endofunctor on the category Set^I of I-indexed families of sets. We consider the monoidal structure on the category of I-indexed containers whose tensor product of containers describes the composition of the respective induced endofunctors. We then give a combinatorial characterization of monoids in this monoidal category, and we show how these monoids correspond precisely to monads on the induced endofunctors on Set^I. Lastly, we conclude by presenting some examples of monads on Set^I that fall under our characterization, including the product of two monads, indexed variants of the state and the writer monads and an example of a free monad. The technical results of this work are accompanied by a formalization in the proof assistant Cubical Agda.
Problem

Research questions and friction points this paper is trying to address.

Generalize monoidal structures for indexed containers in type theory
Characterize monoids corresponding to monads on indexed endofunctors
Provide formalized examples including state and writer monad variants
Innovation

Methods, ideas, or system contributions that make the work stand out.

Monoidal structures on indexed containers
Monoids correspond to monads on Set^I
Formalization in Cubical Agda proof assistant
🔎 Similar Papers
No similar papers found.
M
Michele De Pascalis
Tallinn University of Technology, Estonia
Tarmo Uustalu
Tarmo Uustalu
Professor, Reykjavik University / Lead research scientist, Tallinn University of Technology
logicsemanticsprogramming languagesfunctional programmingtype theory
N
Niccolò Veltrì
Tallinn University of Technology, Estonia