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