...
首页> 外文期刊>LIPIcs : Leibniz International Proceedings in Informatics >Type Theory Unchained: Extending Agda with User-Defined Rewrite Rules
【24h】

Type Theory Unchained: Extending Agda with User-Defined Rewrite Rules

机译:键入理论未保留:使用用户定义的重写规则扩展AGDA

获取原文

摘要

Dependently typed languages such as Coq and Agda can statically guarantee the correctness of our proofs and programs. To provide this guarantee, they restrict users to certain schemes - such as strictly positive datatypes, complete case analysis, and well-founded induction - that are known to be safe. However, these restrictions can be too strict, making programs and proofs harder to write than necessary. On a higher level, they also prevent us from imagining the different ways the language could be extended. In this paper I show how to extend a dependently typed language with user-defined higher-order non-linear rewrite rules. Rewrite rules are a form of equality reflection that is applied automatically by the typechecker. I have implemented rewrite rules as an extension to Agda, and I give six examples how to use them both to make proofs easier and to experiment with extensions of type theory. I also show how to make rewrite rules interact well with other features of Agda such as ?·-equality, implicit arguments, data and record types, irrelevance, and universe level polymorphism. Thus rewrite rules break the chains on computation and put its power back into the hands of its rightful owner: yours.
机译:依赖于COQ和AGDA等类型的语言可以静态保证我们证明和程序的正确性。为了提供此保证,他们将用户限制到某些方案 - 例如严格的正数据类型,完整的案例分析和良好的诱导 - 已知安全。但是,这些限制可能太严格,使程序和证明更难以写入,而不是必要的。在更高的水平上,他们还防止我们想象语言可以扩展的不同方式。在本文中,我展示了如何使用用户定义的高阶非线性重写规则扩展依赖性类型的语言。重写规则是由TypeChecker自动应用的平等反射的一种形式。我已经实现了重写规则作为AGDA的扩展,我提供了六种示例如何使用它们来更轻松地进行证明和实验类型理论的扩展。我还展示了如何使重写规则与AGDA的其他功能相互作用,例如 - Quality,隐含参数,数据和记录类型,无关紧要和宇宙级多态性。因此,重写规则在计算上打破链条,并将其权力放回合法的所有者的手中:您的权力。

著录项

获取原文

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号