31 research outputs found

    Division safe calculation in totalised fields

    Get PDF

    Partial arithmetical data types of rational numbers and their equational specification

    Get PDF
    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

    Partial arithmetical data types of rational numbers and their equational specification

    Get PDF
    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

    Square root meadows

    Get PDF
    Let Q_0 denote the rational numbers expanded to a meadow by totalizing inversion such that 0^{-1}=0. Q_0 can be expanded by a total sign function s that extracts the sign of a rational number. In this paper we discuss an extension Q_0(s ,\sqrt) of the signed rationals in which every number has a unique square root.Comment: 9 page

    The Wheel of Rational Numbers as an Abstract Data Type

    Get PDF
    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

    Get PDF
    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
    corecore