Reference. Free Commutative Monoids in Homotopy Type Theory

We develop a constructive theory of finite multisets in Homotopy Type Theory, defining them as free commutative monoids. After recalling basic structural properties of the free commutative-monoid construction, we formalise and establish the categorical universal property of two, necessarily equivalent, algebraic presentations of free commutative monoids using 1-HITs. These presentations correspond to two different equational theories invariably including commutation axioms. In this setting, we prove important structural combinatorial properties of finite multisets. These properties are established in full generality without assuming decidable equality on the carrier set. As an application, we present a constructive formalisation of the relational model of classical linear logic and its differential structure. This leads to constructively establishing that free commutative monoids are conical refinement monoids. Thereon we obtain a characterisation of the equality type of finite multisets and a new presentation of the free commutative-monoid construction as a set-quotient of the list construction. These developments crucially rely on the commutation relation of creation/annihilation operators associated with the free commutative-monoid construction seen as a combinatorial Fock space.

Cite

Cite as @choudhury-2023-free (helia, typst) · \cite{choudhury-2023-free} (LaTeX)
BibTeX
bibtex · 1 line
@article{choudhury-2023-free, title={Free Commutative Monoids in Homotopy Type Theory}, volume={1}, ISSN={2969-2431}, url={http://dx.doi.org/10.46298/entics.10492}, DOI={10.46298/entics.10492}, journal={Electronic Notes in Theoretical Informatics and Computer Science}, publisher={Centre pour la Communication Scientifique Directe (CCSD)}, author={Choudhury, Vikraman and Fiore, Marcelo}, year={2023}, month=Feb }
hayagriva YAML (typst)
yaml · 16 lines
choudhury-2023-free:
  type: article
  title: Free Commutative Monoids in Homotopy Type Theory
  author:
  - Choudhury, Vikraman
  - Fiore, Marcelo
  date: 2023-02
  url: http://dx.doi.org/10.46298/entics.10492
  serial-number:
    doi: 10.46298/entics.10492
    issn: 2969-2431
  parent:
    type: periodical
    title: Electronic Notes in Theoretical Informatics and Computer Science
    publisher: Centre pour la Communication Scientifique Directe (CCSD)
    volume: 1
Cited by (3)

Intrinsically Correct Sorting in Cubical Agda alexandruIntrinsicallyCorrectSorting2025

The paper “Sorting with Bialgebras and Distributive Laws” by Hinze et al. uses the framework of bialgebraic semantics to define sorting algorithms. From distributive laws between functors they construct pairs of sorting algorithms using both folds and unfolds. Pairs of sorting algorithms arising this way include insertion/selection sort and quick/tree sort. We extend this work to define intrinsically correct variants in cubical Agda. Our key idea is to index our data types by multisets, which concisely captures that a sorting algorithm terminates with an ordered permutation of its input list. By lifting bialgebraic semantics to the indexed setting, we obtain the correctness of sorting algorithms purely from the distributive law.
PDF · DOI · arXiv · pldb

Displayed Monoidal Categories for the Semantics of Linear Logic ahrens-2024-displayed

PDF · DOI · pldb

What’s in a Bag?: An “Application Proving Interface” for Finite Bags and its Implementation dinges-2023-what

DOI
Cites 51 works (7 here)
With notes (7)

An axiomatics and a combinatorial model of creation/annihilation operators fiore-2025-an

A categorical axiomatic theory of creation/annihilation operators on symmetric Fock space is introduced, and the combinatorial model that motivated it is presented. Commutation relations and coherent states are considered in both frameworks.
DOI

Quotients, inductive types, and quotient inductive types fiore-2022-quotients

This paper introduces an expressive class of indexed quotient-inductive types, called QWI types, within the framework of constructive type theory. They are initial algebras for indexed families of equational theories with possibly infinitary operators and equations. We prove that QWI types can be derived from quotient types and inductive types in the type theory of toposes with natural number object and universes, provided those universes satisfy the Weakly Initial Set of Covers (WISC) axiom. We do so by constructing QWI types as colimits of a family of approximations to them defined by well-founded recursion over a suitable notion of size, whose definition involves the WISC axiom. We developed the proof and checked it using the Agda theorem prover.
DOI · arXiv

Internalizing representation independence with univalence angiuli-2021-internalizing

In their usual form, representation independence metatheorems provide an external guarantee that two implementations of an abstract interface are interchangeable when they are related by an operation-preserving correspondence. If our programming language is dependently-typed, however, we would like to appeal to such invariance results within the language itself, in order to obtain correctness theorems for complex implementations by transferring them from simpler, related implementations. Recent work in proof assistants has shown that Voevodsky’s univalence principle allows transferring theorems between isomorphic types, but many instances of representation independence in programming involve non-isomorphic representations. In this paper, we develop techniques for establishing internal relational representation independence results in dependent type theory, by using higher inductive types to simultaneously quotient two related implementation types by a heterogeneous correspondence between them. The correspondence becomes an isomorphism between the quotiented types, thereby allowing us to obtain an equality of implementations by univalence. We illustrate our techniques by considering applications to matrices, queues, and finite multisets. Our results are all formalized in Cubical Agda, a recent extension of Agda which supports univalence and higher inductive types in a computationally well-behaved way.
PDF · DOI · pldb

Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types VezzosiMortbergAbel2019

Proof assistants based on dependent type theory provide expressive languages for both programming and proving within the same system. However, all of the major implementations lack powerful extensionality principles for reasoning about equality, such as function and propositional extensionality. These principles are typically added axiomatically which disrupts the constructive properties of these systems. Cubical type theory provides a solution by giving computational meaning to Homotopy Type Theory and Univalent Foundations, in particular to the univalence axiom and higher inductive types. This paper describes an extension of the dependently typed functional programming language Agda with cubical primitives, making it into a full-blown proof assistant with native support for univalence and a general schema of higher inductive types. These new primitives make function and propositional extensionality as well as quotient types directly definable with computational content. Additionally, thanks also to copatterns, bisimilarity is equivalent to equality for coinductive types. This extends Agda with support for a wide range of extensionality principles, without sacrificing type checking and constructivity.
PDF · DOI · pldb

Homotopy Type Theory: Univalent Foundations of Mathematics hottbook

Web · arXiv

Glueing and orthogonality for models of linear logic hyland_glueing_2003

We present the general theory of the method of glueing and associated technique of orthogonality for constructing categorical models of all the structure of linear logic: in particular we treat the exponentials in detail. We indicate simple applications of the methods and show that they cover familiar examples.
DOI

Linear logic, *-autonomous categories and cofree coalgebras seely89

DOI
External (44)
choudhury-2023-free reference entries/refs/choudhury-2023-free/choudhury-2023-free.hel