arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.05027cs.PL
收藏

一价性与参数性的联姻

The Marriage of Univalence and Parametricity

Nicolas Tabareau, Éric Tanter, Matthieu Sozeau

摘要:

模等价推理对每个人来说都是很自然的,包括数学家。不幸的是,在基于类型论的证明助手中,相等是令人震惊的语法,因此,利用等价性充其量是麻烦的。参数性和univalence是两个主要的概念,已经被探索跨类型等价传输程序和证明,但它们没有达到无缝,自动传输。这部作品首先澄清了这两个概念的局限性,然后在两者之间设计了一个富有成效的婚姻。由此产生的概念,univalent parametricity,是一个异质扩展的参数加强与univalence,充分实现编程和证明模等价。除了理论的单价参数,我们提出了一个轻量级的框架,实现Coq,允许用户透明地传输定义和定理的类型到一个等价的,如果他们是平等的。例如,这使得可以方便地在易于推理的表示和计算高效的表示之间切换,只要它们被证明是等价的。参数性和单价的结合支持了单点传输:基本的单价传输,源于类型等价,可以用这些类型上的函数之间的等价性的额外证明来补充,以便能够提升更多的程序和证明,以及产生更有效的术语。我们说明了使用的单价参数的几个例子,包括最近的集成本地整数Coq。

英文摘要:

Reasoning modulo equivalences is natural for everyone, including mathematicians. Unfortunately, in proof assistants based on type theory, 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 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 in isolation, and then devises a fruitful marriage between both. The resulting concept, univalent parametricity, is an heterogeneous extension of parametricity strengthened with univalence that fully realizes programming and proving modulo equivalences. In addition to the theory of univalent parametricity, we present a lightweight framework implemented in Coq 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 lift 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑