arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1802.06217cs.LO
收藏

Andromeda证明助手的设计与实现

Design and Implementation of the Andromeda Proof Assistant

Andrej Bauer, Gaëtan Gilbert, Philipp G. Haselwarter, Matija Pretnar, Christopher A. Stone

摘要:

Andromeda是一个LCF风格的证明助手,用户通过用元级程序设计语言AML编写代码来构建可导出的判断。Andromeda唯一可信的组件是一个最小化的核心(对象级类型论的推理规则的实现),它控制类型论判断的构造和分解。由于nucleus不执行复杂的任务,如语法相等之外的相等性检查,这个责任被委托给用户,用户在元语言中实现一个或多个相等性检查过程。AML解释器使用代数操作和处理程序的机制从用户代码中请求相等的见证。核心中的动态检查保证不会构造无效的对象级派生。%,即使AML代码(或解释器)是不可信的。为了证明这种系统结构的灵活性,我们实现了一个核心组成的依赖类型论与平等的反射。等式反射提供了非常高的表达能力,因为它允许用户添加新的判断等式,但它也破坏了类型论的理想元理论属性(例如可判定性和强规范化)。AML中的效果和处理程序的强大功能通过一个标准库来展示,该库提供了用于相等性检查、范式计算和隐式参数填充的默认算法。用户可以通过提供本地“提示”或完全替换这些算法来扩展这些新算法。我们证明了由此产生的系统,展示了如何公理化和计算自然数,公理化的无类型的$λ$-演算,并通过实现一个简单的自动化系统,用于管理宇宙的类型。

英文摘要:

Andromeda is an LCF-style proof assistant where the user builds derivable judgments by writing code in a meta-level programming language AML. The only trusted component of Andromeda is a minimalist nucleus (an implementation of the inference rules of an object-level type theory), which controls construction and decomposition of type-theoretic judgments. Since the nucleus does not perform complex tasks like equality checking beyond syntactic equality, this responsibility is delegated to the user, who implements one or more equality checking procedures in the meta-language. The AML interpreter requests witnesses of equality from user code using the mechanism of algebraic operations and handlers. Dynamic checks in the nucleus guarantee that no invalid object-level derivations can be constructed. %even if the AML code (or interpreter) is untrusted. To demonstrate the flexibility of this system structure, we implemented a nucleus consisting of dependent type theory with equality reflection. Equality reflection provides a very high level of expressiveness, as it allows the user to add new judgmental equalities, but it also destroys desirable meta-theoretic properties of type theory (such as decidability and strong normalization). The power of effects and handlers in AML is demonstrated by a standard library that provides default algorithms for equality checking, computation of normal forms, and implicit argument filling. Users can extend these new algorithms by providing local "hints" or by completely replacing these algorithms for particular developments. We demonstrate the resulting system by showing how to axiomatize and compute with natural numbers, by axiomatizing the untyped $λ$-calculus, and by implementing a simple automated system for managing a universe of types.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑