Skip to main content
QUICK REVIEW

[论文解读] Three Datatype Defining Rewrite Systems for Datatypes of Integers each extending a Datatype of Naturals

J.A. Bergstra, Alban Ponse|arXiv (Cornell University)|Jun 12, 2014
Logic, programming, and type systems参考文献 14被引用 7
一句话总结

本文提出了三种针对整数的、满足地完全性且地合流性的数据类型定义重写系统(DDRS):一种使用一元记法(0, S, P),一种使用二进制数位拼接构造符,一种使用十进制数位拼接构造符。每种系统均扩展了自然数的典范项代数,确保其唯一规范形与标准整数记法一致,并通过结构归纳法与终止性论证证明地完全性。

ABSTRACT

Integer arithmetic is specified according to three views: unary, binary, and decimal notation. The binary and decimal view have as their characteristic that each normal form resembles common number notation, that is, either a digit, or a string of digits without leading zero, or the negated versions of the latter. The unary view comprises a specification of integer arithmetic based on 0, successor function $S$, and predecessor function, with negative normal forms $-S^i(0)$. Integer arithmetic in binary and decimal notation is based on (postfix) digit append functions. For each view we define a ground-confluent and terminating datatype defining rewrite system (DDRS), and in each case the resulting datatype is a canonical term algebra that extends a corresponding canonical term algebra for natural numbers. Then, for each view, we consider an alternative DDRS based on tree constructors that yield comparable normal forms, which for that binary and decimal view admits expressions that are algorithmically more involved. These DDRSes are incorporated because they are closer to existing literature. For these DDRSes we also provide ground-completeness results. Finally, we define a DDRS for the ring of Integers (comprising fifteen rewrite rules) and prove its ground-completeness.

研究动机与目标

  • 提供整数算术的等式规格说明,采用三种不同的记法视角:一元、二进制和十进制。
  • 为每种整数记法定义地合流且强终止的DDRS,确保唯一规范形。
  • 将自然数的典范项代数扩展为整数的相应典范项代数。
  • 提供基于树构造符的替代DDRS,与现有文献中的形式化更一致,同时保持规范形等价性。
  • 为所有DDRS证明地完全性,包括一个基于环的最小化规格说明,用于整数在交换环语言中的表示。

提出的方法

  • 定义三种使用数位拼接构造符的整数DDRS:一元(S, P)、二进制(拼接0/1)和十进制(拼接0–9),每种系统均扩展自然数代数。
  • 构建基于树构造符(如二叉与十叉数位树)的替代DDRS,以更贴近标准语法形式地建模数的表示。
  • 通过闭项的结构归纳法证明强终止性与地合流性,表明每个项均可重写为唯一的规范形。
  • 利用权重函数并结合项结构的案例分析,验证所有闭项要么已是规范形,要么可进一步约化。
  • 在附录中提供所有DDRS地完全性的形式化证明,包括一个含15条规则的最小化环基DDRS。
  • 验证所有重写系统均为标准环公理的语义推论,并保持与整数环Z的同构性。

实验结果

研究问题

  • RQ1能否通过三种不同的记法视角——一元、二进制和十进制——形式化指定整数算术,每种系统均产生与标准记法一致的唯一规范形?
  • RQ2所提出的DDRS是否满足地合流性与强终止性,从而确保所有闭项具有唯一规范形?
  • RQ3能否定义基于树构造符的替代DDRS,使其与数位拼接系统产生相同的规范形,但更符合现有形式化文献?
  • RQ4一个最小化的DDRS(在符号{0, 1, −, +, ·}下)是否满足地完全性,且是否可由标准环公理推导得出?
  • RQ5能否为所有DDRS(包括具有复杂构造符与多条重写规则的系统)形式化证明地完全性?

主要发现

  • 整数的一元DDRS(Zubd)满足地完全性,使用符号{0, S, P},其规范形为−Si(0),用于表示负整数。
  • 二进制DDRS(Zbud)使用数位拼接操作,经证明地完全性,共16条等式,确保规范形与标准二进制记法一致。
  • 十进制DDRS(Zdub)使用数位拼接操作,经证明地完全性,共16条等式,其规范形与标准十进制记法一致。
  • 基于树构造符的替代DDRS(Zut, Zbt, Zdt)已定义并证明地完全性,提供了与现有文献更紧密的对齐。
  • 一个含15条规则的最小化DDRS(Zr),用于整数环,经证明地完全性,仅使用环运算与公理。
  • 环基DDRS(Zr)在标准意义下不满足合流性,但满足地合流性,其强终止性通过项上的权重函数得到证明。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。