Organizing Numerical Theories Using Axiomatic Type Classes

  • Authors:
  • Lawrence C. Paulson

  • Affiliations:
  • Computer Laboratory, University of Cambridge, Cambridge, England CB3 0FD

  • Venue:
  • Journal of Automated Reasoning
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Mathematical reasoning may involve several arithmetic types, including those of the natural, integer, rational, real, and complex numbers. These types satisfy many of the same algebraic laws. These laws need to be made available to users, uniformly and preferably without repetition, but with due account for the peculiarities of each type. Subtyping, where a type inherits properties from a supertype, can eliminate repetition only for a fixed type hierarchy set up in advance by implementors. The approach recently adopted for Isabelle uses axiomatic type classes, an established approach to overloading. Abstractions such as semirings, rings, fields, and their ordered counterparts are defined, and theorems are proved algebraically. Types that meet the abstractions inherit the appropriate theorems.