Extensional Finite Sets and Multisets in Type Theory

Venue: TYPES 2024

Clemens Kupke, Fredrik Nordvall Forsberg, Sean Watters

extended abstract slides

Abstract: We show how types of finite sets and multisets can be constructed in ordinary dependent type theory, without the need for quotient types or working with setoids, and prove that these constructions realise finite sets and multisets as free idempotent commutative monoids and free commutative monoids, respectively. Both constructions arise as generalisations of C. Coquand’s data type of fresh lists, and we show how many other free structures also can be realised by other instantiations. All of our results have been formalised in Agda.