Reference. What’s in a Bag?: An “Application Proving Interface” for Finite Bags and its Implementation
Cite
Cites 16 works (2 here)
With notes (2)
Free Commutative Monoids in Homotopy Type Theory choudhury-2023-free
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.
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.
External (14)
- Agda Standard Library (2023)
- The agda/cubical library (2023)
- The Coq Proof Assistant (2022)
- Quotients in Dependent Type Theory (2020)
- The finite-multiset construction in HoTT (2019)
- A tale of theories and data-structures (2018)
- Higher inductive types in programming (2017)
- Verified Functional Programming in Agda (2016)
- Bag Equivalence via a Proof-Relevant Membership Relation (2012)
- A Brief Overview of Agda – A Functional Language with Dependent Types (2009)
- ML for the Working Programmer (1996)
- Lectures on Constructive Functional Programming (1988)
- Terminating general recursion (1988)
- The complete correctness of sorting