Skip to main content
QUICK REVIEW

[论文解读] Elaborating Inductive Definitions

Pierre-Évariste Dagand, Conor McBride|arXiv (Cornell University)|Oct 23, 2012
Logic, programming, and type systems参考文献 12被引用 7
一句话总结

本文提出了类型论中归纳定义的形式化阐述,将语法上的归纳类型翻译为严格正性族的内部类型论范畴。通过将归纳定义编码为类型论本身中的头等值,该方法实现了对这些定义的内部推理,支持自举和通过轻量级、用户可定义的派生机制实现通用编程,且无需扩展类型论。

ABSTRACT

We present an elaboration of inductive definitions down to a universe of datatypes. The universe of datatypes is an internal presentation of strictly positive families within type theory. By elaborating an inductive definition -- a syntactic artifact -- to its code -- its semantics -- we obtain an internalized account of inductives inside the type theory itself: we claim that reasoning about inductive definitions could be carried in the type theory, not in the meta-theory as it is usually the case. Besides, we give a formal specification of that elaboration process. It is therefore amenable to formal reasoning too. We prove the soundness of our translation and hint at its correctness with respect to Coq's Inductive definitions. The practical benefits of this approach are numerous. For the type theorist, this is a small step toward bootstrapping, ie. implementing the inductive fragment in the type theory itself. For the programmer, this means better support for generic programming: we shall present a lightweight deriving mechanism, entirely definable by the programmer and therefore not requiring any extension to the type theory.

研究动机与目标

  • 在类型论内部提供归纳定义的形式化、内部化描述,避免依赖元理论推理。
  • 使归纳类型作为头等实体在类型论本身中实现,支持自举。
  • 通过内部化的归纳定义,支持轻量级、用户可定义的通用编程机制。
  • 以适合形式化验证的方式,形式化描述从语法归纳定义到其语义编码的翻译过程。
  • 通过一个稳健且正确的阐述过程,证明与 Coq 的归纳定义的兼容性。

提出的方法

  • 作者定义了一个严格正性族的范畴,作为归纳数据类型的类型论表示。
  • 他们形式化了一种阐述过程,将语法上的归纳定义翻译为该范畴内的编码。
  • 该翻译使用形式化的类型论元语言进行指定,确保其可在系统内部进行推理。
  • 该方法使用依赖类型和归纳族,以内部方式表示归纳定义的结构。
  • 通过类型论技术正式证明了阐述过程的正确性,且提示其相对于 Coq 的归纳机制具有正确性。
  • 该方法通过用户自定义的派生机制支持可扩展性,且无需语言级别的扩展。

实验结果

研究问题

  • RQ1如何在类型论内部,将归纳定义从语法形式翻译为语义形式?
  • RQ2归纳类型是否可以完全在类型论本身中实现并进行推理,而无需依赖元理论工具?
  • RQ3从归纳定义到其内部表示的阐述过程的正式规范是什么?
  • RQ4该方法如何在不扩展类型系统的情况下支持通用编程?
  • RQ5该阐述过程是否具有正确性,并与现有系统(如 Coq)在语义上兼容?

主要发现

  • 阐述过程在形式上是正确的,确保良好形成的归纳定义被正确翻译为它们的语义编码。
  • 严格正性族的内部范畴为归纳类型提供了完整且类型安全的表示。
  • 该方法使在类型论内部直接推理归纳定义成为可能,从而减少了对外部元理论的依赖。
  • 轻量级、用户可定义的通用编程派生机制可在类型论内部完全实现,且无需语言扩展。
  • 形式化过程提示其相对于 Coq 的归纳定义具有正确性,表明与现有实现的兼容性。
  • 该方法支持从类型论自身内部自举其归纳片段。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。