首页> 外文期刊>Journal of Functional Programming >Proof-relevant unification: Dependent pattern matching with only the axioms of your type theory
【24h】

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

机译:与证明相关的统一:从属模式仅与类型理论的公理匹配

获取原文

摘要

Dependently 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 as uniqueness of identity proofs and injectivity 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 an equivalence between 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 previous ad-hoc restrictions 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.
机译:相依类型语言(例如Agda,Coq和Idris)使用语法一阶统一算法通过相依模式匹配来检查定义。但是,标准统一算法隐含地依赖诸如身份证明的唯一性和类型构造函数的注入性之类的原理。这些原则在许多类型理论中都是不可接受的,尤其是在被称为同伦类型理论的新兴分支中。结果,这些新理论中的程序和证明无法利用依赖的模式匹配或其他依赖于统一的技术,因此更加难以编写,修改和理解。本文提出了一个与证明相关的框架,用于在依赖类型的环境中正式推理统一。在此框架中,统一规则不仅计算统一者,而且以两组方程之间的等价形式计算相应的健全性证明。通过以证明相关的方式重述标准统一规则,可以保证它们保持理论的健全性。此外,它使我们能够安全地添加可以利用等式类型之间的依赖关系的新规则,例如记录类型的等式规则和用于求解等式证明之间的等式的高维统一规则。使用我们的框架,我们对Agda所使用的统一算法进行了全面检查。结果,我们能够用经过正式验证的统一规则替换以前的临时限制,从而修复了过程中的大量错误。将来,我们可能还希望将新原理与模式匹配相集成,例如,由同伦类型理论引入的更高归纳类型。我们的框架还为构建此类扩展奠定了坚实的基础。

著录项

  • 来源
    《Journal of Functional Programming》 |2018年第2018期|e12.1-e12.55|共55页
  • 作者单位

    Chalmers & Gothenburg Univ, Dept Comp Sci & Engn, Gothenburg, Sweden;

    KULeuven, Comp Sci, Heverlee, Belgium;

  • 收录信息 美国《科学引文索引》(SCI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号