Arithmetic must be done in the context of TFF logic, which supports the predefined types $int, $rat, and $real. Using TFF enforces types and semantics that separate $int from $rat from $real from $i from $o. If arithmetic is not done in the context of TFF, then the domain of every interpretation is the integers/rationals/reals. Here are some strange cases that show what can happen if you don't use a type system:
The numbers are unbounded and the reals of of infinite precision (rather than some specific implementation such as 32 bit 2's complement integer, or IEEE floating point). Systems that implement some limited arithmetic, e.g., 32 bit, must halt in an SZS error state if they hit overflow.
The following interpreted predicates and interpreted functions are proposed for the TPTP syntax. Each symbol is suffixed to indicate the type of numbers in the arguments and produced by functions. A _int suffix on indicates integers, a _rat suffix on indicates rationals, and a _real suffix indicates reals. Thus, for example $plus_int/2 takes two integer arguments and returns an integer, while $minus_real/2 takes two real arguments and returns a real. In the table below a * is used in place of specific suffixes. Comparators, e.g., $less_rat/2, return a $o. There are coercion functions to convert integers to rationals and reals, and rationals to reals. There are functions to convert reals and rationals to integers.
At this stage all the functions are written in prefix form. The general issue of flexible specification of infix operators in the TPTP syntax is an orthogonal issue, which must be addressed separately.
| Symbol | Operation | Number types | Comments, examples - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| $int | The type of integers | 123, -123<integer> ::- (<signed_integer>|<unsigned_integer>) <signed_integer> ::- <sign><unsigned_integer> <unsigned_integer> ::- <decimal_natural> <decimal_natural> ::: ([0]|<non_zero_numeric><numeric>*) <sign> ::: [+-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The extent to which ATP systems are able to work with the interpreted
predicates and functions may vary, from a simple ability to evaluate ground
terms, e.g., $plus_int(2,3) may be evaluated to 5, through
an ability to instantiate variables in equations involving such functions,
e.g., $times_int(2,$uminus_int(X)) = $uminus_int($plus_int(X,2))
may instantiate X to 2, to extensive algebraic manipulation
capability.
Axioms
The syntax does not axiomatize the theory, but may be used to write
axioms of the theory.
If such a set of axioms is implicit, then reasoning "about" integer
arithmetic becomes possible, e.g.,
! [X:$int] : $greater_int($succ_int(X),X)
becomes provable.
Sample Conjectures
These are sample conjectures, designed first to exercise basic arithmetic
machinery, and then to provide increasingly hard challenges that require
more complete treatment of arithmetic.
If you design further examples to test particular notions, please email
them to Geoff Sutcliffe, to be added to this list.
Axioms for other Operators
Other commonly used arithmetic operators can be defined in terms of
the interpreted ones.
This proposal was developed by
Stephan Schulz and
Geoff Sutcliffe, and
benefited from input at the
2005 TPTP Tea Party.