一句话:提出用高阶归纳类型与 univalence 在依赖类型论中内化关系式表示独立性,并在 Cubical Agda 形式化验证。
传统表示独立性元定理仅提供外部保证:两个抽象接口实现若由保持操作的对应关系关联则可互换。本文希望在依赖类型语言内部获得这种不变性,并处理表示之间非同构的情况。方法利用高阶归纳类型同时商去两个相关实现类型,其关联关系在商类型间成为同构,再通过 Voevodsky 的 univalence 原则得到实现类型相等,从而把正确性定理从简单实现转移到复杂实现。作者以矩阵、队列和有限多重集为例展示技术,所有结果均在支持 univalence 与高阶归纳类型的 Cubical Agda 中机器化验证。
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.
@article{paperbot1160,
title = {Internalizing representation independence with univalence},
author = {Carlo Angiuli and Evan Cavallo and Anders Mörtberg and Max Zeuner},
journal = {Proceedings of the ACM on Programming Languages},
volume = {5},
number = {POPL},
year = {2021},
doi = {10.1145/3434293}
}