自然数与整数的数据类型定义重写系统
Datatype defining rewrite systems for naturals and integers
AI总结:
本文为自然数和整数定义多种视图(一元、二进制、十进制)下的数据类型定义重写系统,证明其基项完备性,并扩展规范项代数。
摘要:
数据类型定义重写系统(DDRS)是一种旨在指定数据类型的代数(等式)规范。当从左到右解释等式时,DDRS定义了一个必须满足基项完备性的项重写系统。首先,我们为整数环定义了两个DDRS,每个包含十二条重写规则,并证明了它们的基项完备性。然后,我们根据一元视图引入自然数和整数算术,即基于后缀一元追加构造器(一种计数形式)的算术。接下来,我们基于另外两种视图指定算术:二进制和十进制表示法。二进制和十进制视图的特点是每个范式类似于常见的数字表示法,即要么是一个数字,要么是不含前导零的数字字符串,要么是后者的取反版本。二进制和十进制表示法中的整数算术基于(后缀)数字追加函数。对于每种视图,我们定义一个DDRS,并且在每种情况下,所得数据类型是一个规范项代数,它扩展了相应的自然数规范项代数。然后,对于每种视图,我们考虑一个基于树构造器的替代DDRS,它产生可比较的范式,对于该视图,该DDRS允许算法上更复杂的表达式。对于所有考虑的DDRS,都证明了基项完备性。
英文摘要:
A datatype defining rewrite system (DDRS) is an algebraic (equational) specification intended to specify a datatype. When interpreting the equations from left-to-right, a DDRS defines a term rewriting system that must be ground-complete. First we define two DDRSs for the ring of integers, each comprising twelve rewrite rules, and prove their ground-completeness. Then we introduce natural number and integer arithmetic specified according to unary view, that is, arithmetic based on a postfix unary append constructor (a form of tallying). Next we specify arithmetic based on two other views: 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. Integer arithmetic in binary and decimal notation is based on (postfix) digit append functions. For each view we define a 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 yields comparable normal forms, which for that view admits expressions that are algorithmically more involved. For all DDRSs considered, ground-completeness is proven.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。