当前位置: X-MOL 学术J. ACM › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
The Marriage of Univalence and Parametricity
Journal of the ACM ( IF 2.3 ) Pub Date : 2021-01-15 , DOI: 10.1145/3429979
Nicolas Tabareau 1 , Éric Tanter 2 , Matthieu Sozeau 1
Affiliation  

Reasoning modulo equivalences is natural for everyone, including mathematicians. Unfortunately, in proof assistants based on type theory, which are frequently used to mechanize mathematical results and carry out program verification efforts, equality is appallingly syntactic, and as a result, exploiting equivalences is cumbersome at best. Parametricity and univalence are two major concepts that have been explored in the literature to transport programs and proofs across type equivalences, but they fall short of achieving seamless, automatic transport. This work first clarifies the limitations of these two concepts when considered in isolation and then devises a fruitful marriage between both. The resulting concept, called univalent parametricity , is an extension of parametricity strengthened with univalence that fully realizes programming and proving modulo equivalences. Our approach handles both type and term dependency, as well as type-level computation. In addition to the theory of univalent parametricity, we present a lightweight framework implemented in the Coq proof assistant that allows the user to transparently transfer definitions and theorems for a type to an equivalent one, as if they were equal. For instance, this makes it possible to conveniently switch between an easy-to-reason-about representation and a computationally efficient representation as soon as they are proven equivalent. The combination of parametricity and univalence supports transport à la carte : basic univalent transport, which stems from a type equivalence, can be complemented with additional proofs of equivalences between functions over these types, in order to be able to transport more programs and proofs, as well as to yield more efficient terms. We illustrate the use of univalent parametricity on several examples, including a recent integration of native integers in Coq. This work paves the way to easier-to-use proof assistants by supporting seamless programming and proving modulo equivalences.

中文翻译:

单价与参数化的结合

推理模等价对每个人来说都是很自然的,包括数学家。不幸的是,在基于类型论的证明助手中,经常被用来机械化数学结果和进行程序验证工作,相等的语法令人震惊,因此,利用等价充其量是麻烦的。参数性和单价性是文献中探索的两个主要概念,用于跨类型等价传输程序和证明,但它们未能实现无缝、自动传输。这项工作首先阐明了这两个概念在孤立考虑时的局限性,然后设计了两者之间富有成效的结合。由此产生的概念,称为单价参数, 是用单价加强的参数化的扩展,它完全实现了编程和证明模等价。我们的方法处理类型和术语依赖,以及类型级计算。除了单价参数理论之外,我们还展示了一个在 Coq 证明助手中实现的轻量级框架,它允许用户透明地将类型的定义和定理转移到等价的类型,就好像它们是相等的一样。例如,一旦它们被证明是等效的,这使得可以方便地在易于推理的表示和计算高效的表示之间进行切换。参数性和单价性的结合支持运输单点: 源于类型等价的基本单价传输可以补充这些类型的函数之间的等价证明,以便能够传输更多程序和证明,并产生更有效的术语。我们在几个例子中说明了单价参数的使用,包括最近在 Coq 中集成原生整数。这项工作通过支持无缝编程和证明模等价,为更易于使用的证明助手铺平了道路。
更新日期:2021-01-15
down
wechat
bug