用单值性内化表示独立性
Internalizing Representation Independence with Univalence
AI总结:
本文利用高阶归纳类型对相关实现按异构对应同时取商,将其转化为同构并借助单值性获得内部表示独立性,且在 Cubical Agda 中完成形式化。
摘要:
通常形式下,表示独立性元定理提供了一种外部保证:当一个抽象接口的两种实现由一种保持操作的对应关系关联时,它们可以互换。然而,如果我们的编程语言是依赖类型的,我们希望在语言内部援引这类不变性结果,以便通过从更简单、相关的实现迁移定理,来获得复杂实现的正确性定理。证明助手方面的近期工作已经表明,Voevodsky 的单值性原则允许在同构类型之间迁移定理,但编程中许多表示独立性情形涉及非同构表示。本文中,我们开发了在依赖类型论中建立内部关系型表示独立性结果的技术:利用高阶归纳类型,通过两个相关实现类型之间的异构对应关系同时对二者取商。该对应关系成为取商后类型之间的同构,从而使我们能够通过单值性获得实现之间的相等性。我们通过矩阵、队列和有限多重集的应用来说明这些技术。我们的所有结果均在 Cubical Agda 中形式化;Cubical Agda 是 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。