首页> 外文会议>International Conference on Mathematics of Program Construction >Shallow Embedding of Type Theory is Morally Correct
【24h】

Shallow Embedding of Type Theory is Morally Correct

机译:类型理论的浅埋在道德上是正确的

获取原文

摘要

There are multiple ways to formalise the metatheory of type theory. For some purposes, it is enough to consider specific models of a type theory, but sometimes it is necessary to refer to the syntax, for example in proofs of canonicity and normalisation. One option is to embed the syntax deeply, by using inductive definitions in a proof assistant. However, in this case the handling of definitional equalities becomes technically challenging. Alternatively, we can reuse conversion checking in the metatheory by shallowly embedding the object theory. In this paper, we consider the standard model of a type theoretic object theory in Agda. This model has the property that all of its equalities hold definitionally, and we can use it as a shallow embedding by building expressions from the components of this model. However, if we are to reason soundly about the syntax with this setup, we must ensure that distinguishable syntactic constructs do not become provably equal when shallowly embedded. First, we prove that shallow embedding is injective up to definitional equality, by modelling the embedding as a syntactic translation targeting the metatheory. Second, we use an implementation hiding trick to disallow illegal propositional equality proofs and constructions which do not come from the syntax. We showcase our technique with very short formalisations of canonicity and parametricity for Martin-Lof type theory. Our technique only requires features which are available in all major proof assistants based on dependent type theory.
机译:有多种方法可以正形地形化类型理论的联系。出于某些目的,它足以考虑类型理论的特定模型,但有时有必要引用语法,例如在Cononicity和归一化的证明中。一种选择是通过在校对助手中使用归纳定义来深入地嵌入语法。但是,在这种情况下,定义等分的处理变得挑战。或者,我们可以通过浅地嵌入对象理论来重用转换检查。在本文中,我们考虑了AGDA中型理论对象理论的标准模型。此模型具有定义所有相等性的属性,并且我们可以通过从本模型的组件构建表达式来使用它作为浅嵌入。但是,如果我们要使用此设置良好地说明语法,我们必须确保在浅埋嵌入时,可区分的句法构造不会被证明不相等。首先,通过将嵌入作为定位定位的句法翻译来建立嵌入作为定义平等,我们证明了浅嵌入是重定位平等的。其次,我们使用实施隐藏技巧来禁止非法主张平等证据和不来自语法的结构。我们为Martin-Lof类型理论的Canonicity和参数的单独进行了很短的正规来展示我们的技术。我们的技术仅需要基于依赖类型理论的所有主要校样助手提供的功能。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号