Proof-relevant unification: Dependent pattern matching with only the axioms of your type theory

Author:

COCKX JESPER,DEVRIESE DOMINIQUE

Abstract

AbstractDependently typed languages such as Agda, Coq, and Idris use a syntactic first-order unification algorithm to check definitions by dependent pattern matching. However, standard unification algorithms implicitly rely on principles such asuniqueness of identity proofsandinjectivity of type constructors. These principles are inadmissible in many type theories, particularly in the new and promising branch known as homotopy type theory. As a result, programs and proofs in these new theories cannot make use of dependent pattern matching or other techniques relying on unification, and are as a result much harder to write, modify, and understand. This paper proposes a proof-relevant framework for reasoning formally about unification in a dependently typed setting. In this framework, unification rules compute not just a unifier but also a corresponding soundness proof in the form of anequivalencebetween two sets of equations. By rephrasing the standard unification rules in a proof-relevant manner, they are guaranteed to preserve soundness of the theory. In addition, it enables us to safely add new rules that can exploit the dependencies between the types of equations, such as rules for eta-equality of record types and higher dimensional unification rules for solving equations between equality proofs. Using our framework, we implemented a complete overhaul of the unification algorithm used by Agda. As a result, we were able to replace previousad-hocrestrictions with formally verified unification rules, fixing a substantial number of bugs in the process. In the future, we may also want to integrate new principles with pattern matching, for example, the higher inductive types introduced by homotopy type theory. Our framework also provides a solid basis for such extensions to be built on.

Publisher

Cambridge University Press (CUP)

Subject

Software

Reference54 articles.

1. Vezzosi A. (2015) Heterogeneous equality incompatible with univalence even –without-k. Accessed April 17, 2017. Available at: https://github.com/agda/agda/issues/1408 (on the Agda bug tracker).

2. Streicher T. (1993) Investigations into intensional type theory. Habilitation thesis, Ludwig Maximilian University of Munich.

3. Equations: A Dependent Pattern-Matching Compiler

4. Sicard-Ramírez A. (2016) The –without-K option generates unsolved metas. Accessed April 17, 2017. Available at: https://github.com/agda/agda/issues/1775 (on the Agda bug tracker).

5. Reed J. (2009) Higher-order constraint simplification in dependent type theory. In Proceedings of the 4th International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice. ACM, pp. 49–56.

Cited by 7 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Homotopy Type Theory for Sewn Quilts;Proceedings of the 11th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling, and Design;2023-08-30

2. Practical generic programming over a universe of native datatypes;Proceedings of the ACM on Programming Languages;2022-08-29

3. A novice-friendly induction tactic for lean;Proceedings of the 10th ACM SIGPLAN International Conference on Certified Programs and Proofs;2021-01-17

4. Cubical Agda: A dependently typed programming language with univalence and higher inductive types;Journal of Functional Programming;2021

5. Equations reloaded: high-level dependently-typed functional programming and proving in Coq;Proceedings of the ACM on Programming Languages;2019-07-26

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3