,
Thorsten Altenkirch
,
Axel Ljungström
Creative Commons Attribution 4.0 International license
Containers capture the concept of strictly positive data types in programming. The original development of containers is done in the internal language of locally cartesian closed categories (LCCCs) with disjoint coproducts and W-types, and uniqueness of identity proofs (UIP) is implicitly assumed throughout. Although it is claimed that these developments can also be interpreted in extensional Martin-Löf type theory, this interpretation is not made explicit. In this paper, we present a formalisation of the results that "containers preserve least and greatest fixed points" in Cubical Agda, thereby giving a formulation in intensional type theory. Our proofs do not make use of UIP and thereby generalise the original results from talking about container functors on Set to container functors on the wild category of types. Our main incentive for using Cubical Agda is that its path type restores the equivalence between bisimulation and coinductive equality. Thus, besides developing container theory in a more general setting, we also demonstrate the usefulness of Cubical Agda’s path type to coinductive proofs.
@InProceedings{damato_et_al:LIPIcs.ITP.2025.17,
author = {Damato, Stefania and Altenkirch, Thorsten and Ljungstr\"{o}m, Axel},
title = {{Formalising Inductive and Coinductive Containers}},
booktitle = {16th International Conference on Interactive Theorem Proving (ITP 2025)},
pages = {17:1--17:20},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-396-6},
ISSN = {1868-8969},
year = {2025},
volume = {352},
editor = {Forster, Yannick and Keller, Chantal},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.17},
URN = {urn:nbn:de:0030-drops-246151},
doi = {10.4230/LIPIcs.ITP.2025.17},
annote = {Keywords: type theory, container, initial algebra, terminal coalgebra, Cubical Agda}
}
archived version
archived version