Monoid Structures on Indexed Containers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: De Pascalis, Michele, Uustalu, Tarmo, Veltrì, Niccolò
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915524566319104
author De Pascalis, Michele
Uustalu, Tarmo
Veltrì, Niccolò
author_facet De Pascalis, Michele
Uustalu, Tarmo
Veltrì, Niccolò
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_25879
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Monoid Structures on Indexed Containers
De Pascalis, Michele
Uustalu, Tarmo
Veltrì, Niccolò
Logic in Computer Science
Programming Languages
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.
title Monoid Structures on Indexed Containers
topic Logic in Computer Science
Programming Languages
url https://arxiv.org/abs/2509.25879