TPTP Format for Interpreted Integer Arithmetic

Introduction

The (new) TPTP syntax has features that were designed to facilitate the addition of interpreted functions and predicates for arithmetic. Specifically, (i) numbers have their own name space, and are assumed to be distinct, and (ii) interpreted functions and predicates have their own name space. This proposal is is to extend the TPTP syntax with interpreted functions and predicates for integer arithmetic. The proposed functions and predicates may be used for "doing" arithmetic - evaluation of ground expressions, and also for reasoning "about" arithmetic - manipulation of arithmetic expressions.

Arithmetic should be done in the context of TFF logic, which supports the predefined type $int. Using TFF enforces types and semantics that separate $int from $i from $o. If arithmetic is not done in the context of TFF, then the domain of every interpretation is the integers.

The integers are unbounded (rather than some specific implementation such as 16 bit 2's complement). Systems that implement some limited arithmetic, e.g., 32 bit, must halt in an SZS error state if they hit overflow.

Interpreted predicates and interpreted functions are proposed for the TPTP syntax:

The _int suffix on each indicates that they operate on integers. This enables differentiation in the future from analogous functions for, e.g., reals. The following will be added in the syntax:
<defined atom>       ::= $true | $false |
                         <term> = <term> | <term> != <term> | 
                         $equal(<term>,<term>) | 
                         <int_atom>
<int atom>           ::= $less_int(<term>,<term>) | $lesseq_int(<term>,<term>)

<term>               ::= <function term> | <variable>
<function term>      ::= <plain term> | <defined term> | <system term>
<plain term>         ::= <constant> | <functions>(<arguments>)
<defined term>       ::= <number> | <double quoted> | <int_term>
<int term>           ::= $plus_int(<term>,<term>) | $minus_int(<term>,<term>) |
                         $times_int(<term>,<term>) | $divide_int(<term>,<term>) |
                         $remainder_int(<term>,<term>) | $uminus_int(<term>)
<variable>           ::= <upper word>

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.

This proposal is minimal, in an effort to keep the entry barrier low. The choices made allow for conservative extensions in the future:

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.

IntegerArithmetic.p

Axioms for other Operators

Other commonly used arithmetic operators can be defined in terms of the interpreted ones.

IntegerArithmetic.ax


This proposal was developed by Stephan Schulz and Geoff Sutcliffe, and has benefited from input at the 2005 TPTP Tea Party.