Internalizing representation independence with univalence
Carlo Angiuli, Evan Cavallo, Anders Mörtberg, Max Zeuner
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 97e23fe5-59a5-4d6e-92f6-7d22f422f1daCited by top-tier papers4
- Proof repair across type equivalencesTalia Ringer, RanDair Porter, Nathaniel Yazdani, John Leo et al.PLDI 2021 · 20 citations
- Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languagesVikraman Choudhury, Jacek Karwowski, Amr SabryPOPL 2022 · 10 citations
- Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type TheoryHarrison Grodin, Runming Li, Robert HarperPOPL 2026 · 2 citations
- Proof Repair across Quotient Type EquivalencesCosmo Viola, Max Fan, Talia RingerOOPSLA 2025 · 1 citation
Builds on1
Related papers
- Internal and Observational Parametricity for Cubical AgdaAntoine Van Muylder, Andreas Nuyts, Dominique DevriesePOPL 2024 · 2 citations
- Extensible Metatheory Mechanization via Family PolymorphismEnde Jin, Nada Amin, Yizhou ZhangPLDI 2023 · 10 citations
- All Your Base Are Belong to Us: Sort Polymorphism for Proof AssistantsJosselin Poiret, Gaëtan Gilbert, Kenji Maillard, Pierre-Marie Pédrot et al.POPL 2025 · 6 citations
- Normalization for Cubical Type TheoryJonathan Sterling, Carlo AngiuliLICS 2021 · 28 citations
- Consistency of a Dependent Calculus of IndistinguishabilityYiyun Liu, Jonathan Chan, Stephanie WeirichPOPL 2025 · 3 citations
