类型的exp-log范式
The exp-log normal form of types
摘要:
代数数据类型的Lambda演算是函数式程序设计语言和证明助手的核心,但在最简单的非平凡数据类型和类型的存在下,至少隐藏了两个基本的理论问题。首先,我们不知道一个明确的和实现的算法来决定贝塔-埃塔-平等的条款-这尽管第一个可判定性的结果证明了二十年前。第二,不清楚如何判定两种类型在本质上是相同的,即同构,尽管关于同构的可判定性的元理论结果。在本文中,我们提出了exp-log范式的类型-来自通过一元指数和对数函数的指数多项式的表示-任何类型建立的箭头,产品,和总和,可以同构映射。类型范式可以作为判定类型同构的简单启发式,这要归功于它是高中恒等式的系统应用。然后,我们表明,类型范式允许减少标准的beta-eta方程理论的λ演算到一个专门的版本,同时保持完整的平等的条款。最后,我们描述了另一种表示的正常条款的λ演算与总和,以及一个Coq实现的转换器到/从我们的新的长期演算。与其他唯一以前实现的启发式决定有趣的η-平等的例子由Balat,Di Cosmo和Fiore的区别是,我们充分利用条款的类型信息,这往往使我们能够获得一个规范的条款表示,而无需执行复杂的长期分析。
英文摘要:
Lambda calculi with algebraic data types lie at the core of functional programming languages and proof assistants, but conceal at least two fundamental theoretical problems already in the presence of the simplest non-trivial data type, the sum type. First, we do not know of an explicit and implemented algorithm for deciding the beta-eta-equality of terms---and this in spite of the first decidability results proven two decades ago. Second, it is not clear how to decide when two types are essentially the same, i.e. isomorphic, in spite of the meta-theoretic results on decidability of the isomorphism. In this paper, we present the exp-log normal form of types---derived from the representation of exponential polynomials via the unary exponential and logarithmic functions---that any type built from arrows, products, and sums, can be isomorphically mapped to. The type normal form can be used as a simple heuristic for deciding type isomorphism, thanks to the fact that it is a systematic application of the high-school identities. We then show that the type normal form allows to reduce the standard beta-eta equational theory of the lambda calculus to a specialized version of itself, while preserving the completeness of equality on terms. We end by describing an alternative representation of normal terms of the lambda calculus with sums, together with a Coq-implemented converter into/from our new term calculus. The difference with the only other previously implemented heuristic for deciding interesting instances of eta-equality by Balat, Di Cosmo, and Fiore, is that we exploit the type information of terms substantially and this often allows us to obtain a canonical representation of terms without performing sophisticated term analyses.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。