498 research outputs found
Simple Equational Specifications of Rational Arithmetic
We exhibit an initial specification of the rational numbers equipped with addition, subtraction, multiplication, greatest integer function, and absolute value. Our specification uses only the sort of rational numbers. It uses one hidden function; that function is unary. But it does not use an error constant, or extra (hidden) sorts, or conditional equations. All of our work is elementary and self-contained
Partial arithmetical data types of rational numbers and their equational specification
Upon adding division to the operations of a field we obtain a meadow. It is conventional to view division in a field as a partial function, which complicates considerably its algebra and logic. But partiality is one out of a plurality of possible design decisions regarding division. Upon adding a partial division function ÷ to a field Q of rational numbers we obtain a partial meadow Q (÷) of rational numbers that qualifies as a data type. Partial data types bring problems for specifying and programming that have led to complicated algebraic and logical theories – unlike total data types. We discuss four different ways of providing an algebraic specification of this important arithmetical partial data type Q (÷) via the algebraic specification of a closely related total data type. We argue that the specification method that uses a common meadow of rational numbers as the total algebra is the most attractive and useful among these four options. We then analyse the problem of equality between expressions in partial data types by examining seven notions of equality that arise from our methods alone. Finally, based on the laws of common meadows, we present an equational calculus for working with fracterms that is of general interest outside programming theory
Partial arithmetical data types of rational numbers and their equational specification
Upon adding division to the operations of a field we obtain a meadow. It is conventional toview division in a field as a partial function, which complicates considerably its algebra andlogic. But partiality is one out of a plurality of possible design decisions regarding division.Upon adding a partial division function ÷ to a field Q of rational numbers we obtain apartial meadow Q (÷) of rational numbers that qualifies as a data type. Partial data typesbring problems for specifying and programming that have led to complicated algebraicand logical theories – unlike total data types. We discuss four different ways of providingan algebraic specification of this important arithmetical partial data type Q (÷) via thealgebraic specification of a closely related total data type. We argue that the specificationmethod that uses a common meadow of rational numbers as the total algebra is themost attractive and useful among these four options. We then analyse the problem ofequality between expressions in partial data types by examining seven notions of equalitythat arise from our methods alone. Finally, based on the laws of common meadows, wepresent an equational calculus for working with fracterms that is of general interest outsideprogramming theory
Inversive Meadows and Divisive Meadows
Inversive meadows are commutative rings with a multiplicative identity
element and a total multiplicative inverse operation whose value at 0 is 0.
Divisive meadows are inversive meadows with the multiplicative inverse
operation replaced by a division operation. We give finite equational
specifications of the class of all inversive meadows and the class of all
divisive meadows. It depends on the angle from which they are viewed whether
inversive meadows or divisive meadows must be considered more basic. We show
that inversive and divisive meadows of rational numbers can be obtained as
initial algebras of finite equational specifications. In the spirit of
Peacock's arithmetical algebra, we study variants of inversive and divisive
meadows without an additive identity element and/or an additive inverse
operation. We propose simple constructions of variants of inversive and
divisive meadows with a partial multiplicative inverse or division operation
from inversive and divisive meadows. Divisive meadows are more basic if these
variants are considered as well. We give a simple account of how mathematicians
deal with 1 / 0, in which meadows and a customary convention among
mathematicians play prominent parts, and we make plausible that a convincing
account, starting from the popular computer science viewpoint that 1 / 0 is
undefined, by means of some logic of partial functions is not attainable.Comment: 18 pages; error corrected; 29 pages, combined with arXiv:0909.2088
[math.RA] and arXiv:0909.5271 [math.RA
The Transrational Numbers as an Abstract Data Type
In an arithmetical structure one can make division a total function by defining 1/0 to be an element of the structure, or by adding a new element, such as an error element also denoted with a new constant symbol, an unsigned infinity or one or both signed infinities, one positive and one negative. We define an enlargement of a field to a transfield, in which division is totalised by setting 1/0 equal to the positive infinite value and -1/0 equal to the negative infinite value , and which also contains an error element to help control their effects. We construct the transrational numbers as a transfield of the field of rational numbers and consider it as an abstract data type. We give it an equational specification under initial algebra semantics
The Wheel of Rational Numbers as an Abstract Data Type
In an arithmetical structure one can make division a total function by defining 1/0 to be an element of the structure, or by adding a new element such as infinity ∞ or error element ⊥. A wheel is an algebra in which division is totalised by setting 1/0 = ∞ but which also contains an error element ⊥ to help control its use. We construct the wheel of rational numbers as an abstract data type Qw and give it an equational specification without auxiliary operators under initial algebra semantics
Meadows and the equational specification of division
The rational, real and complex numbers with their standard operations,
including division, are partial algebras specified by the axiomatic concept of
a field. Since the class of fields cannot be defined by equations, the theory
of equational specifications of data types cannot use field theory in
applications to number systems based upon rational, real and complex numbers.
We study a new axiomatic concept for number systems with division that uses
only equations: a meadow is a commutative ring with a total inverse operator
satisfying two equations which imply that the inverse of zero is zero. All
fields and products of fields can be viewed as meadows. After reviewing
alternate axioms for inverse, we start the development of a theory of meadows.
We give a general representation theorem for meadows and find, as a corollary,
that the conditional equational theory of meadows coincides with the
conditional equational theory of zero totalized fields. We also prove
representation results for meadows of finite characteristic
A Complete Finite Equational Axiomatisation of the Fracterm Calculus for Common Meadows
We analyse abstract data types that model numerical structures with a concept
of error. Specifically, we focus on arithmetic data types that contain an error
flag whose main purpose is to always return a value for division. To
rings and fields we add a division operator and study a class of algebras
called \textit{common meadows} wherein . The set of equations true
in all common meadows is named the \textit{fracterm calculus of common
meadows}. We give a finite equational axiomatisation of the fracterm calculus
of common meadows and prove that it is complete and that the fracterm calculus
is decidable
- …