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
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.
Displayed Monoidal Categories for the Semantics of Linear Logic ahrens-2024-displayed
What’s in a Bag?: An “Application Proving Interface” for Finite Bags and its Implementation dinges-2023-what
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.
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.
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.
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.
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.
External (44)
- Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languages (2022)
- Genuine pairs and the trouble with triples in homotopy type theory (TYPES 2021 talk) (2021)
- Artifact for Symmetries in Reversible Programming (2021)
- Coherence for Monoidal and Symmetric Monoidal Groupoids in Homotopy Type Theory (PhD thesis) (2021)
- The Integers as a Higher Inductive Type (2020)
- Multisets in type theory (2020)
- Differential Categories Revisited (2019)
- Computational Semantics of Cartesian Cubical Type Theory (PhD thesis) (2019)
- The finite-multiset construction in HoTT (HoTT 2019 slides) (2019)
- Coherence for symmetric monoidal groupoids in HoTT/UF (TYPES 2019 abstract) (2019)
- Higher Groups in Homotopy Type Theory (2018)
- Finite sets in homotopy type theory (2018)
- Free higher groups in homotopy type theory (2018)
- From Reversible Programs to Univalent Universes and Back (2018)
- An introduction to differential linear logic: proof-nets, models and antiderivatives (2017)
- Relative pseudomonads, Kleisli bicategories, and substitution monoidal structures (2017)
- Quantitative semantics of the lambda calculus: Some generalisations of the relational model (2017)
- Higher Inductive Types in Programming (2017)
- The HoTT library: a formalization of homotopy type theory in Coq (2016)
- Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom (2015)
- Quotient types in type theory (2015)
- Elements of a theory of algebraic theories (2014)
- Weighted Relational Models of Typed Lambda-Calculi (2013)
- Bag Equivalence via a Proof-Relevant Membership Relation (2012)
- The Scott model of linear logic is the extensional collapse of its relational model (2011)
- Resizing Rules - their use and semantic justification (2011)
- Monads Need Not Be Endofunctors (2010)
- Some reasons for generalising domain theory (2010)
- Differential Structure in Models of Multiplicative Biadditive Intuitionistic Linear Logic (2007)
- Not Enough Points Is Enough (2007)
- Differential categories (2006)
- Tensor products of structures with interpolation (1996)
- Linear lambda-calculus and categorical models revisited (1993)
- The linear abstract machine (1988)
- Refinement monoids, Vaught monoids, and Boolean algebras (1983)
- Coherence for compact closed categories (1980)
- Note on compact closed categories (1977)
- Metric spaces, generalized logic, and closed categories (1973)
- On closed categories of functors (1970)
- Monads on symmetric monoidal closed categories (1970)
- Definable Quotients in Type Theory
- Homotopy type theory in Agda (HoTT-Agda library)
- A standard library for Cubical Agda
- UniMath - a computer-checked library of univalent mathematics