The Marriage of Univalence and Parametricity

Nicolas Tabareau, É. Tanter, Matthieu Sozeau
{"title":"The Marriage of Univalence and Parametricity","authors":"Nicolas Tabareau, É. Tanter, Matthieu Sozeau","doi":"10.1145/3429979","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":17199,"journal":{"name":"Journal of the ACM (JACM)","volume":"47 1","pages":"1 - 44"},"PeriodicalIF":0.0000,"publicationDate":"2019-09-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"18","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of the ACM (JACM)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3429979","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 18

Abstract

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
一元性与参数性的结合
推理模等价对每个人来说都是很自然的,包括数学家。不幸的是,在基于类型论的证明辅助程序中(经常用于机械化数学结果和执行程序验证工作),相等性是令人震惊的语法性,因此,利用相等性最多是麻烦的。参数性和一元性是文献中探讨的两个主要概念,用于跨类型等价的传输程序和证明,但它们无法实现无缝、自动传输。这项工作首先澄清了这两个概念在孤立考虑时的局限性,然后设计了两者之间富有成效的结合。由此产生的概念,称为单价参数,是参数的推广,加强了单价,充分实现规划和证明模等价。我们的方法处理类型和术语依赖关系,以及类型级计算。除了单值参数理论之外,我们还提供了一个在Coq证明助手中实现的轻量级框架,该框架允许用户透明地将类型的定义和定理转换为等效的类型,就好像它们是相等的一样。例如,这使得一旦证明它们是等价的,就可以方便地在易于推理的表示和计算效率高的表示之间切换。参数性和一价性的组合支持任意传输:源于类型等价的基本一价传输可以用这些类型上函数之间等价的附加证明来补充,以便能够传输更多的程序和证明,以及产生更有效的项。我们在几个例子上说明了单价参数的使用,包括最近在Coq中对原生整数的积分。这项工作通过支持无缝编程和证明模等价,为更易于使用的证明助手铺平了道路。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Synchronization Strings: Codes for Insertions and Deletions Approaching the Singleton Bound The Reachability Problem for Two-Dimensional Vector Addition Systems with States Invited Articles Foreword On Nonconvex Optimization for Machine Learning Exploiting Spontaneous Transmissions for Broadcasting and Leader Election in Radio Networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1