A Fresh Look at Commutativity: Free Algebraic Structures via Fresh Lists
Venue: APLAS 2023
APLAS 2023 Best Paper Award
Clemens Kupke, Fredrik Nordvall Forsberg, Sean Watters
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.