paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Observational Equality Meets CIC

观测等价遇上 CIC
TOPLAS 47(2)2025匹配度 2/10 · 论文属于依赖类型论与证明助手(Coq)的基础理论工作,研究观测等价与索引归纳类型的兼容性,虽涉及形式化验证,但与用户核心关注的 PL 与 LLM/Agent 交叉、静态分析、浮点/贝叶斯程序分析均无直接关联,也未使用 LLM 或面向工业落地/benchmark。引用 13 inbox
Loïc Pujet, Yann Leray, Nicolas Tabareau
crossref: 2026-09-10

AI 速览

一句话:提出类型强制转换算子,使观测等价与 CIC 的索引归纳类型兼容,并在 Coq 中实现。

论文关注依赖类型理论中的相等性。主流证明助手如 Agda、Lean 和 Coq 通常采用 Martin-Löf 等同类型,但其内涵性使函数与谓词推理不便,也无法定义商类型。观测等价被视为替代方案,却尚未集成到上述证明助手,主要障碍是与索引归纳类型不兼容。作者提出系统化方法,用可在自反等同证明上计算的类型强制转换算子来协调观测等价与索引归纳类型,并形式证明新增计算规则不会破坏转换的可判定性。最后在基于重写规则的 Coq 扩展中实现该观测等价,提供新的外延性原理,同时保持完全向后兼容。

问题
Martin-Löf 等同类型的内涵性不利于函数与谓词推理,且无法定义商类型;观测等价虽有前景,但与索引归纳类型不完全兼容,难以集成到主流证明助手。
方法
引入在自反等同证明上计算的类型强制转换算子,以系统化方式协调观测等价与索引归纳类型,并形式证明加入该计算规则后转换仍可判定。
评估
在基于重写规则的 Coq 扩展中实现该观测等价,展示其提供的新外延性原理,并验证与现有 Coq 代码完全向后兼容。
原文摘要(Abstract)

The notion of equality is at the heart of dependent type theory, as it plays a fundamental role in program specifications and mathematical reasoning. In mainstream proof assistants such as Agda , Lean , and Coq , equality is usually defined using Martin-Löf’s identity type, an elegant and simple approach that has stood the test of time since the 1970s. However, this definition also comes with serious downsides: the intensional nature of Martin-Löf’s identity type means that it is impractical for reasoning about functions and predicates, and it is impossible to define quotient types. Recently, observational equality has garnered attention as an alternative method for encoding equality, particularly in proof assistants supporting definitionally proof-irrelevant propositions. However, it has yet to be integrated in any of the three proof assistants mentioned above, as it is not fully compatible with another important feature of type theory: indexed inductive types. In this article, we propose a systematic approach to reconcile observational equality with indexed inductive types, using a type coercion operator that computes on reflexive identity proofs. The second contribution of this article is a formal proof that this additional computation rule can be integrated to the system without compromising the decidability of conversion. Finally, we provide an implementation of our observational equality in an extension of Coq . This extension is based on the recently introduced rewrite rules and provides new extensionality principles while remaining fully backward-compatible.

链接与引用

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

BibTeX
@article{PujetT24,
  title = {Observational Equality Meets CIC},
  author = {Loïc Pujet and Yann Leray and Nicolas Tabareau},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {47},
  number = {2},
  year = {2025},
  doi = {10.1145/3719342}
}