Skip to main content

On the Most Suitable Axiomatization of Signed Integers

  • Conference paper
  • First Online:
Recent Trends in Algebraic Development Techniques (WADT 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10644))

Included in the following conference series:

Abstract

The standard mathematical definition of signed integers, based on set theory, is not well-adapted to the needs of computer science. For this reason, many formal specification languages and theorem provers have designed alternative definitions of signed integers based on term algebras, by extending the Peano-style construction of unsigned naturals using “zero” and “succ” to the case of signed integers. We compare the various approaches used in CADP, CASL, Coq, Isabelle/HOL, KIV, Maude, mCRL2, PSF, SMT-LIB, TLA+, etc. according to objective criteria and suggest an “optimal” definition of signed integers.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In the present article, we distinguish between naturals (also: natural numbers), which are the elements of \({\mathbb {N}}\) (i.e., unsigned), and integers, which are the elements of \({\mathbb {Z}}\) (i.e., signed). We assume that \(0 \in {\mathbb {N}}\) and we write .

  2. 2.

    We prefer using sort rather than type, which is often given a different meaning.

  3. 3.

    And, hence, a bijection.

  4. 4.

    In particular, are pairwise disjoint.

  5. 5.

    https://swt.informatik.uni-augsburg.de/swt/projects/lib/basic/specs/int-basic1/export/unit.xml.

  6. 6.

    Notice that the IEEE 754 standard for floating-point numbers also defines two zeros, −0.0 and +0.0, which are equivalent in most cases but can still be distinguished, e.g., using the signbit primitive.

  7. 7.

    See http://rewriting.loria.fr/systems.html to learn about such halted tools.

  8. 8.

    http://coq.inria.fr/library.

  9. 9.

    I.e., a datatype in the terminology of Coq.

  10. 10.

    We name so this constructor, as a shorthand for NEGative One.

  11. 11.

    This definition generalizes the Peano system (for \(k=1\)) and the approach presented in this section (for \(k=2\)).

  12. 12.

    [22] suggests here the approach of Sect. 5.2 based on three non-free constructors.

References

  1. Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB Standard - Version 2.5, 93 p., June 2015

    Google Scholar 

  2. Bergstra, J.A.: Four complete datatype defining rewrite systems for an abstract datatype of natural numbers (version 3). Report TCS1407v3, University of Amsterdam (UvA), The Netherlands, June 2014

    Google Scholar 

  3. Bergstra, J.A., Ponse, A.: Datatype defining rewrite systems for the ring of integers, and for natural and integer arithmetic in unary view. The Computing Research Repository (CoRR) abs/1608.06212, August 2016. http://arxiv.org/abs/1608.06212

  4. Bergstra, J.A., Ponse, A.: Three datatype defining rewrite systems for datatypes of integers each extending a datatype of naturals (version 3). Report TCS1409v3, University of Amsterdam (UvA), The Netherlands, February 2016. http://arxiv.org/abs/1406.3280

  5. Berry, G.: The Esterel V5 Language Primer – Version v5_91. INRIA Sophia-Antipolis, France, June 2000

    Google Scholar 

  6. Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude – A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71999-1

    MATH  Google Scholar 

  7. Cohen, D., Watson, P.: An efficient representation of arithmetic for term rewriting. In: Book, R.V. (ed.) RTA 1991. LNCS, vol. 488, pp. 240–251. Springer, Heidelberg (1991). https://doi.org/10.1007/3-540-53904-2_100

    Chapter  Google Scholar 

  8. Contejean, E., Marché, C., Rabehasaina, L.: Rewrite systems for natural, integral, and rational arithmetic. In: Comon, H. (ed.) RTA 1997. LNCS, vol. 1232, pp. 98–112. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-62950-5_64

    Chapter  Google Scholar 

  9. Ehrig, H., Mahr, B.: Fundamentals of Algebraic Specification 1 - Equations and Initial Semantics. EATCS Monographs on Theoretical Computer Science, vol. 6. Springer, Heidelberg (1985). https://doi.org/10.1007/978-3-642-69962-7

    Book  MATH  Google Scholar 

  10. Ernst, G., Haneberg, D., Pfähler, J., Reif, W., Schellhorn, G., Stenzel, K., Tofan., B.: A practical course on KIV. Technical report, 152 p., Institute for Software and Systems Engineering, University of Augsburg, Germany (2015)

    Google Scholar 

  11. Garavel, H.: Compilation of LOTOS abstract data types. In: Vuong, S.T. (ed.) Proceedings of the 2nd International Conference on Formal Description Techniques, Vancouver B.C., Canada, FORTE 1989, pp. 147–162. North-Holland, December 1989

    Google Scholar 

  12. Groote, J., Mousavi, M.: Modeling and Analysis of Communicating Systems. The MIT Press, Cambridge (2014)

    MATH  Google Scholar 

  13. Houssais, B.: The Synchronous Programming Language SIGNAL – A Tutorial. INRIA Rennes, France, September 2004

    Google Scholar 

  14. ISO/IEC: LOTOS – A Formal Description Technique Based on the Temporal Ordering of Observational Behaviour. International Standard 8807, International Organization for Standardization – Information Processing Systems – Open Systems Interconnection, Geneva, September 1989

    Google Scholar 

  15. ISO/IEC: Vienna Development Method – Specification Language – Part 1: Base Language. Internation Standard 13817-1:1996, International Organization for Standardization – Programming Languages, their Environments and System Software Interfaces, Geneva, December 1995

    Google Scholar 

  16. ISO/IEC: Z Formal Specification Notation – Syntax, Type System and Semantics. International Standard 13568:2002, International Organization for Standardization – Information Technology, Geneva, July 2002

    Google Scholar 

  17. Kennaway, J.R.: Complete term rewrite systems for decimal arithmetic and other total recursive functions. In: Proceedings of the 2nd International Workshop on Termination, La Bresse, France, May 1995

    Google Scholar 

  18. Lamport, L.: Specifying Systems – The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)

    Google Scholar 

  19. Larsen, P.G., Lausdahl, K., Battle, N.: VDM-10 language manual. Technical report TR-2010-06, Overture – Open-source Tools for Formal Modelling, April 2010

    Google Scholar 

  20. Lecomte, T.: B Language Reference Manual (Version 1.8.7). ClearSy System Engineering, Aix-en-Provence, France (2010)

    Google Scholar 

  21. Mauw, S., Mulder, J.: A PSF library of data types. In: van den Brand, M.G.J., van Deursen, A., Dinesh, T.B., Kamperman, J., Visser, E. (eds.) Proceedings of ASF+SDF 1995: A Workshop on Generating Tools From Algebraic Specifications, May 1995. http://ivi.fnwi.uva.nl/tcs/pub/reports/1995/P9504/5.html. Technical report P9504-5, Programming Research Group, University of Amsterdam, The Netherlands

  22. Mendelson, E.: Number Systems and the Foundations of Analysis. Dover Books on Mathematics Series. Courier Corporation, Chelmsford (1973)

    MATH  Google Scholar 

  23. Mosses, P.D. (ed.): CASL Reference Manual – The Complete Documentation of the Common Algebraic Specification Language. LNCS, vol. 2960. Springer, Heidelberg (2004). https://doi.org/10.1007/b96103

    MATH  Google Scholar 

  24. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL – A Proof Assistant for Higher-Order Logic (2016). http://isabelle.in.tum.de/doc/tutorial.pdf (Early Version: Lecture Notes in Computer Science, vol. 2283, Springer, 2002)

  25. Owre, S., Shankar, N.: The PVS prelude library. Technical report CSL-03-01, SRI International, Computer Science Laboratory, March 2003

    Google Scholar 

  26. Paulin-Mohring, C.: Basics of COQ (Sep 2011), Lecture Notes of the LASER 2011 Summer School

    Google Scholar 

  27. Thompson, S.J.: Laws in Miranda. In: Proceedings of the ACM Conference on LISP and Functional Programming (LFP 1986), pp. 1–12 (1986)

    Google Scholar 

  28. Isabelle/HOL – Higher-Order Logic. University of Cambridge, Technische Universität München, February 2016. http://isabelle.in.tum.de/website-Isabelle2016/dist/library/HOL/HOL/document.pdf

  29. van der Kamp, L.: A Term Rewrite System for Decimal Integer Arithmetic. Bachelor Informatica, University of Amsterdam (UvA), The Netherlands, June 2016

    Google Scholar 

  30. van Wamel, J.J.: A Library for PSF. Report PR9301, Programming Research Group, University of Amsterdam, The Netherlands (1993)

    Google Scholar 

  31. Verimag: Lustre Language Reference Manual – Versions 3, 3+, 4, 5. Grenoble, France, September 1997

    Google Scholar 

  32. Walters, H.R., Zantema, H.: Rewrite systems for integer arithmetic. In: Hsiang, J. (ed.) RTA 1995. LNCS, vol. 914, pp. 324–338. Springer, Heidelberg (1995). https://doi.org/10.1007/3-540-59200-8_67

    Chapter  Google Scholar 

  33. Walters, H.R.: A complete term rewriting system for decimal integer arithmetic. Technical report CS-R9435, CWI, Amsterdam, The Netherlands (1994)

    Google Scholar 

  34. Zantema, H.: Basic Arithmetic by Rewriting and its Complexity, Technical University of Eindhoven, The Netherlands, December 2003. http://www.win.tue.nl/~hzantema/aritm.pdf

Download references

Acknowledgements

The author is grateful to Radu Mateescu and Mihaela Sighireanu who, in 1997 at INRIA Grenoble, helped writing LOTOS algebraic equations to show that the approach was feasible. Acknowledgements are also due to Holger Hermanns and Gilles Nies (Saarland University), and to Jan Friso Groote (Technical University of Eindhoven) for their valuable remarks. Jan Bergstra and Alban Ponse (University of Amsterdam) provided the author with recent bibliographic references. This article benefited from the lively WADT’2016 discussions in Gregynog, especially with Alexander Knapp (Augsburg University), who mentioned KIV, with Narciso Marti-Oliet (Conplutence University of Madrid), who gave informed comments about Maude, and with Lutz Schröder (Friedrich-Alexander-Universität Erlangen-Nürnberg), who suggested the approach . Frédéric Lang, Wendelin Serwe, and Hugues Evrard (INRIA Grenoble) proof-read earlier versions of this article.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hubert Garavel .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Garavel, H. (2017). On the Most Suitable Axiomatization of Signed Integers. In: James, P., Roggenbach, M. (eds) Recent Trends in Algebraic Development Techniques. WADT 2016. Lecture Notes in Computer Science(), vol 10644. Springer, Cham. https://doi.org/10.1007/978-3-319-72044-9_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-72044-9_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-72043-2

  • Online ISBN: 978-3-319-72044-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics