Proof assistants are getting more widespread use in research and industry to provide certified and independently checkable guarantees about theories, designs, systems and implementations. However, proof assistant implementations themselves are seldom verified, although they take a major share of the trusted code base in any such certification effort. In this area, proof assistants based on Higher-Order Logic enjoy stronger guarantees, as self-certified implementations have been available for some years. One cause of this difference is the inherent complexity of dependent type theories together with their extensions with inductive types, universe polymorphism and complex sort systems, and the gap between theory on paper and practical implementations in efficient programming languages. MetaCoq is a collaborative project that aims to tackle these difficulties to provide the first fully-certified realistic implementation of a type checker for the full calculus underlying the Coq proof assistant. To achieve this, we refined the sometimes blurry, if not incorrect, specification and implementation of the system. We show how theoretical tools from this community such as bidirectional type-checking, Tait-Martin-L\"of/Takahashi's confluence proof technique and monadic and dependently-typed programming can help construct the following artefacts: a specification of Coq's syntax and type theory, the Polymorphic Cumulative Calculus of (Co)-Inductive Constructions (PCUIC); a monad for the manipulation of raw syntax and interaction with the Coq system; a verification of PCUIC's metatheory, whose main results are the confluence of reduction, type preservation and principality of typing; a realistic, correct and complete type-checker for PCUIC; a sound type and proof erasure procedure from PCUIC to untyped lambda-calculus, i.e., the core of the extraction mechanism of Coq.
翻译:校对助理在研究和工业中日益广泛使用,以提供经认证和独立核实的理论、设计、系统和实施的保障。然而,校对助理本身很少得到核实,尽管在任何认证工作中他们占了信任代码基础的很大一部分。在这方面,基于高级逻辑的校对助理享有更强有力的保障,因为自认证的实施已经存在多年了。这种差异的一个原因是依赖型理论的内在复杂性,连同其扩展与感化类型、宇宙多变性和复杂排序系统,以及纸张理论与高效编程语言实际实施之间的差距。MetaCoq是一个合作项目,旨在解决这些困难,为Coq校验助理的全缩缩缩略图提供首次经认证的实际操作。为了实现这一点,我们改进了系统的某些模糊性,如果不是不正确的话,规格和实施。我们展示了来自这个社区的理论工具,如双向型、宇宙多态联盟和复杂排序系统,以及纸质/塔卡希的保存理论与实际执行之间的差距。 IMA 的原始校验检验技术, 和货币机序的缩缩缩缩缩缩缩缩缩缩缩缩缩缩缩的系统。