skip to main content
article

The rational numbers as an abstract data type

Authors Info & Claims
Published:01 April 2007Publication History
Skip Abstract Section

Abstract

We give an equational specification of the field operations on the rational numbers under initial algebra semantics using just total field operations and 12 equations. A consequence of this specification is that 0−1 = 0, an interesting equation consistent with the ring axioms and many properties of division. The existence of an equational specification of the rationals without hidden functions was an open question. We also give an axiomatic examination of the divisibility operator, from which some interesting new axioms emerge along with equational specifications of algebras of rationals, including one with the modulus function. Finally, we state some open problems, including: Does there exist an equational specification of the field operations on the rationals without hidden functions that is a complete term rewriting system?

References

  1. Adamek, J., Hebert, M., and Rosicky, J. 2002. On abstract data types presented by multiequations. Theoret. Comput. Sci. 275, 427--462. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bergstra, J. A. 2006. Elementary algebraic specifications of the rational function field. In Logical approaches to computational barriers. Proceedings of Computability in Europe 2006, A. Beckmann et al. Eds. Lecture Notes in Computer Science, vol. 3988, Springer-Verlag, New York, 40--54. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Bergstra, J. A., and Tucker, J. V. 1982. The completeness of the algebraic specification methods for data types. Inf. Cont. 54, 186--200.Google ScholarGoogle ScholarCross RefCross Ref
  4. Bergstra, J. A., and Tucker, J. V. 1983. Initial and final algebra semantics for data type specifications: Two characterisation theorems. SIAM J. Comput. 12, 366--387.Google ScholarGoogle ScholarCross RefCross Ref
  5. Bergstra, J. A., and Tucker, J. V. 1987. Algebraic specifications of computable and semicomputable data types. Theoret. Comput. Sci. 50, 137--181. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bergstra, J. A., and Tucker, J. V. 1995. Equational specifications, complete term rewriting systems, and computable and semicomputable algebras. J. ACM 42, 1194--1230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bergstra, J. A., and Tucker, J. V. 2005. The rational numbers as an abstract data type. Res. Rep. PRG0504, Programming Research Group, University of Amsterdam, August 2005, or Tech. Rep. CSR12-2005, Department of Computer Science, University of Wales, Swansea, August 2005.Google ScholarGoogle Scholar
  8. Bergstra, J. A., and Tucker, J. V. 2006a. Elementary algebraic specifications of the rational complex numbers. In Goguen Festschrift, K. Futatsugi et al., Eds. Lecture Notes in Computer Science, vol. 4060. Springer-Verlag, New York, pp. 459--475.Google ScholarGoogle Scholar
  9. Bergstra, J. A., and Tucker, J. V. 2006b. Division safe calculation in totalised fields. Res. Rep. PRG 0605, Programming Research Group, University of Amsterdam, September 2006 or Tech. Rep. CSR 14-2006, Department of Computer Science, University of Wales Swansea, September 2006.Google ScholarGoogle Scholar
  10. Calkin, N., and Wilf, H. S. 2000. Recounting the rationals. Amer. Math. Monthly 107, 360--363.Google ScholarGoogle ScholarCross RefCross Ref
  11. Carlström, J. 2004. Wheels - On division by zero. Math. Struct. Comput. Sci. 14, 143--184. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Chen, M., and Tucker, J. V. 2000. Constructive volume geometry. Computer Graphics Forum 19, 281--293.Google ScholarGoogle ScholarCross RefCross Ref
  13. Contejean, E., Marche, C., and Rabehasaina, L. 1997. Rewrite systems for natural, integral, and rational arithmetic. In Rewriting Techniques and Applications 1997. Lecture Notes in Computer Science vol. 1232. Springer-Verlag, Berlin, Germany, pp. 98--112. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dickson, L. E. 1952. History of the Theory of Numbers. Chelsea, New York.Google ScholarGoogle Scholar
  15. Goguen, J. A., Thatcher, J. W., and Wagner, E. G. 1978. An initial algebra approach to the specification, correctness and implementation of abstract data types. In Current Trends in Programming Methodology. IV. Data Structuring R.T. Yeh, Ed., Prentice-Hall, Engelwood Cliffs, pp. 80--149.Google ScholarGoogle Scholar
  16. Harrison, J. 1998. Theorem Proving with the Real Numbers, Springer-Verlag, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Haveraaen, M. 2000. Case study on algebraic software methodologies for scientific computing. Sci. Prog. 8, 261--273. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Haveraaen, M., Friis, H. A., and Munthe-Kaas, H. 2005. Computable scalar fields: A basis for PDE software. J. Logic Alg. Prog. 65, 36--49.Google ScholarGoogle ScholarCross RefCross Ref
  19. Hodges, W. 1993. Model Theory. Cambridge University Press, Cambridge, UK.Google ScholarGoogle Scholar
  20. Meinke, K., and Tucker, J. V. 1992. Universal algebra. In Handbook of Logic in Computer Science. Volume I: Mathematical Structures, S. Abramsky, D. Gabbay, and T. Maibaum, Eds. Oxford University Press, Oxford, UK, pp. 189--411. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Meseguer, J., and Goguen, J. A. 1985. Initiality, induction and computability. In Algebraic Methods in Semantics. M. Nivat and J. Reynolds, Eds. Cambridge University Press, Cambridge, pp. 459--541. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Klop, J. W. 1992. Term rewriting systems. In Handbook of Logic in Computer Science. Volume 2: Mathematical Structures, S. Abramsky, D. Gabbay, and T. Maibaum, Eds. Oxford University Press, Oxford, UK, pp. 1--116. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Moss, L. 2001. Simple equational specifications of rational arithmetic. Discr. Math. Theoret. Comput. Sci. 4, 291--300.Google ScholarGoogle Scholar
  24. Roggenbach, M., Schröder, L., and Mossakowski, T. 2004. Specifying real numbers in CASL. In Recent Trends in Algebraic Development Techniques. 14th International Workshop (WADT '99) (Chateau de Bonas, Sept. 15--18, 1999), D. Bert, C. Choppy, and P. D. Mosses, Eds. Lecture Notes in Computer Science, vol. 1827. Springer-Verlag, Berlin, 146--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Setzer, A. 1997. Wheels. Manuscript, 8 pp. Download at: http://www.cs.swan.ac.uk/csetzer.Google ScholarGoogle Scholar
  26. Stoltenberg-Hansen, V., and Tucker, J. V. 1995. Effective algebras. In Handbook of Logic in Computer Science. Volume IV: Semantic Modelling, S. Abramsky, D. Gabbay, and T. Maibaum, Eds. Oxford University Press, Oxford, UK, pp. 357--526. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Stoltenberg-Hansen, V., and Tucker, J. V. 1999. Computable rings and fields. In Handbook of Computability Theory, E. Griffor, Ed. Elsevier, North-Holland, Amsterdam, The Netherlands, pp. 363--447.Google ScholarGoogle Scholar
  28. Stoltenberg-Hansen, V., and Tucker, J. V. 1999. Concrete models of computation for topological algebras. Theoret. Comput. Sci. 219, 347--378. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Terese, 2003. Term Rewriting Systems. Cambridge Tracts in Theoretical Computer Science 55, Cambridge University Press, Cambridge, UK.Google ScholarGoogle Scholar
  30. Tucker, J. V., and Zucker, J. I. 2000. Computable functions and semicomputable sets on many sorted algebras. In Handbook of Logic for Computer Science. Volume V: Logic and Semantical Methods, S. Abramsky, D. Gabbay, and T. Maibaum, Eds. Oxford University Press, Oxford, UK, pp. 317--523. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Tucker, J. V., and Zucker, J. I. 2002. Infinitary initial algebraic specifications for stream algebras. In Reflections on the Foundations of Mathematics: Essays in honour of Solomon Feferman, W. Sieg, R. Somer and C. Talcott, Eds. Lecture Notes in Logic, Vol. 15, Association for Symbolic Logic, pp. 234--253.Google ScholarGoogle Scholar
  32. Tucker, J. V., and Zucker, J. I. 2004. Abstract versus concrete computation on metric partial algebras. ACM Trans. Computat. Logic 5, 4, 611--668. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Tucker, J. V., and Zucker, J. I. 2005. Computable total functions on metric algebras, universal algebraic specifications and dynamical systems. J. Alg. Logic Prog. 62, 71--108.Google ScholarGoogle ScholarCross RefCross Ref
  34. Wechler, W. 1992. Universal algebra for computer scientists. EATCS Monographs in Computer Science. Springer-Verlag, New York.Google ScholarGoogle Scholar
  35. van Wijngaarden, A. 1966. Numerical analysis as an independent science. BIT 6, 68--81.Google ScholarGoogle ScholarCross RefCross Ref
  36. Wirsing, M. 1990. Algebraic specifications. In Handbook of Theoretical Computer Science. Volume B: Formal Models and Semantics, J. van Leeuwen, Ed. North-Holland, Amsterdam, The Netherland, pp. 675--788. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The rational numbers as an abstract data type

                Recommendations

                Reviews

                Markus Wolf

                Conditional equational specifications of abstract data types have the advantage that, in principle, the specification is executable via a conditional term rewriting system. Hence, it is important to understand what can be modeled with conditional equational specification. It is a long-standing question whether there exists a conditional equational specification without hidden function symbols, the initial algebra of which is the rational numbers. In this paper, the authors extend this idea to arrive at a solution: it is possible to give a conditional equational specification of the rational numbers without hidden functions. The introduction gives a historical perspective, with attention to the question of the specification of the rational numbers. Next, a short overview on algebraic specification that introduces the necessary axioms needed to model the rational numbers is presented. In this section, and the one that follows, the problem of finding a conditional equational specification is elaborated, and two algebraic specifications of the rational numbers without hidden functions are presented. With a clever use of Lagrange's theorem, an equation is constructed that shows that a certain axiom set together with this equation indeed models the rational numbers without hidden function symbols. However, the trick with Lagrange's theorem is a bit hard to swallow; hence, in the fourth section the authors provide a simpler specification involving a rather useful additional modulus operation. In the fifth section, the authors explore the algebra that results from the replacement of the general axiom for the multiplicative inverse with a weaker strictly conditional axiom. This section is more or less a byproduct, but exhibits a certain mathematical beauty. The conclusion lists a number of open problems. The paper is well written, detailed, and understandable, and makes a definite contribution to the theoretical underpinnings of computer science. The ingenuity of the paper lies in the use of Lagrange's theorem. All other techniques are fairly straightforward algebraic specifications, and one is left wondering why it took so long to arrive at this point. Online Computing Reviews Service

                Access critical reviews of Computing literature here

                Become a reviewer for Computing Reviews.

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in

                Full Access

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader