paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Nested Inductive Types: Justified and Usable Nested Inductive Types in Lean and Rocq

嵌套归纳类型:Lean 与 Rocq 中有依据且可用的嵌套归纳类型
PLDI 10(PLDI)2026匹配度 4/10 · 论文属于类型论与证明助手基础设施,改进 Lean/Rocq 中嵌套归纳类型的消去原理生成,与形式化验证和证明工程相关;但它不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,也不在用户当前主攻的 AI↔PL 交叉方向上。引用 0 inbox
Thomas Lamiaux, Yannick Forster, Matthieu Sozeau, Nicolas Tabareau
crossref: 2026-09-10

AI 速览

一句话:提出嵌套归纳类型的有效性判据,保证可展开为互归纳类型,并自动生成正确的消去原理。

嵌套归纳类型允许构造子使用以待定义类型实例化的参数化类型,广泛用于大型验证项目,但 Lean 与 Rocq 对其处理均不理想:前者拒绝许多实用定义,后者接受无法定义可用消去原理的定义,且二者都不能可靠自动生成消去原理。本文提出新的有效性判据,保证嵌套归纳类型可展开为良构的互归纳类型;在该判据下,原定义的消去原理可证明等价于展开后互归纳形式的消去原理。该条件严格推广 Lean 当前检查,并恰好排除 Rocq 接受的问题情形。基于此,作者给出自动生成正确消去原理的系统化方法,并在 Rocq 中实现,同时给出 Lean 实现计划。

问题
Lean 与 Rocq 对嵌套归纳类型的支持不完善:前者拒绝实用定义,后者接受无法定义可用消去原理的定义,且缺乏可靠的消去原理自动生成。
方法
提出保证可展开为良构互归纳类型的新有效性判据,证明展开前后消去原理等价,并据此系统化自动生成消去原理。
评估
在 Rocq 中集成实现并规划 Lean 实现;该判据严格推广 Lean 的检查并排除 Rocq 中接受的问题案例。
原文摘要(Abstract)

Inductive types are a fundamental abstraction mechanism in type theory and proof assistants, supporting the definition of data structures and rich specifications. Nested inductive types extend this mechanism by allowing constructors to use parametric types instantiated with the type being defined (lists or trees of the type to be defined). They are widely used in large verification projects – including CompCert, Iris, Verinum, and MetaRocq – to express complex, structured specifications. Despite this widespread use, the treatment of nested inductive types in both and is unsatisfactory. rejects many practical definitions while accepts definitions for which no usable elimination principle can be defined. Neither system provides reliable automatic generation of elimination principles. As a result, developers must define custom eliminators by hand, leading to fragility, duplication, and significant proof engineering overhead. This paper introduces a novel validity criterion for nested inductive types that guarantees that they can be elaborated into well-formed mutual inductive types. Under this criterion, the elimination principle for the original nested definition is provably equivalent to that of its elaborated mutual form. Our condition strictly generalizes Lean’s current check while ruling out exactly the problematic cases accepted in . Using this foundation, we give a systematic method for automatically generating correct elimination principles for nested inductive types, and we provide an implementation integrated into , along with an implementation plan for .

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{LamiauxFST26,
  title = {Nested Inductive Types: Justified and Usable Nested Inductive Types in Lean and Rocq},
  author = {Thomas Lamiaux and Yannick Forster and Matthieu Sozeau and Nicolas Tabareau},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808322}
}