A Unified Formal Description of Arithmetic and Set Theoretical Data Types

  • Paul Tarau
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6167)


We provide a “shared axiomatization” of natural numbers and hereditarily finite sets built around a polymorphic abstraction of bijective base-2 arithmetics.

The “axiomatization” is described as a progressive refinement of Haskell type classes with examples of instances converging to an efficient implementation in terms of arbitrary length integers and bit operations. As an instance, we derive algorithms to perform arithmetic operations efficiently directly with hereditarily finite sets.

The self-contained source code of the paper is available at http:// logic.cse.unt.edu/tarau/research/2010/unified.hs


formal description of arithmetic and set theoretical data types Peano arithmetic and hereditarily finite sets bijective base-2 arithmetic software refinement with Haskell type classes computational mathematics 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Kaye, R., Wong, T.L.: On Interpretations of Arithmetic and Set Theory. Notre Dame J. Formal Logic 48(4), 497–510 (2007)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Jones, S.P., Jones, M., Meijer, E.: Type classes: An exploration of the design space. In: Haskell Workshop (1997)Google Scholar
  3. 3.
    Pettigrew, R.: On Interpretations of Bounded Arithmetic and Bounded Set Theory. Notre Dame J. Formal Logic 50(2), 141–151 (2009)MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Tarau, P.: A Groupoid of Isomorphic Data Transformations. In: Carette, J., Dixon, L., Coen, C.S., Watt, S.M. (eds.) Calculemus 2009, MKM 2009. LNCS (LNAI), vol. 5625, pp. 170–185. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  5. 5.
    Tarau, P.: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell. In: Proceedings of ACM SAC 2009, Honolulu, Hawaii, pp. 1898–1903. ACM, New York (March 2009)Google Scholar
  6. 6.
    Tarau, P.: An Embedded Declarative Data Transformation Language. In: Proceedings of 11th International ACM SIGPLAN Symposium PPDP 2009, Coimbra, Portugal, pp. 171–182. ACM Press, New York (September 2009)Google Scholar
  7. 7.
    Kirby, L.: Addition and multiplication of sets. Math. Log. Q. 53(1), 52–65 (2007)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Vuillemin, J.: Digital algebra and circuits. In: Dershowitz, N. (ed.) Verification: Theory and Practice. LNCS, vol. 2772, pp. 733–746. Springer, Heidelberg (2004)Google Scholar
  9. 9.
    Coquand, T., Huet, G.: The calculus of constructions. Information and Computation 76(2/3), 95–120 (1988)MATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    The Coq development team: The Coq proof assistant reference manual. LogiCal Project, Version 8.0 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Paul Tarau
    • 1
  1. 1.Department of Computer Science and EngineeringUniversity of North Texas 

Personalised recommendations