The TPTP Problem Library

TPTP v3.4.0

Geoff Sutcliffe
Department of Computer Science
University of Miami
geoff@cs.miami.edu

Abstract

This report provides a detailed description of the TPTP Problem Library for automated theorem proving systems. The library is available online, and forms a common basis for development of and experimentation with automated theorem provers. This report provides:

Table of Contents



Introduction

The TPTP (Thousands of Problems for Theorem Provers) is a library of problems, in first-order logic with an interpreted equality symbol, for Automated Theorem Proving (ATP) systems. The principal motivation for the TPTP is to move the testing and evaluation of ATP systems from the previously ad hoc situation onto a firm footing. This became necessary, as results being published do not always accurately reflect the capabilities of the ATP system being considered. A common library of problems is necessary for meaningful system evaluations, meaningful system comparisons, repeatability of testing, and the production of statistically significant results. The TPTP is such a library. The TPTP provides a simple, unambiguous, source and reference mechanism for ATP problems. It is comprehensive and up-to-date, and thus provides an overview of the current application of ATP. The TPTP problems are stored in a specifically designed, easy to understand format. Utilities for manipulating the problems, for converting the problems to other known ATP formats, and for finding problems with certain characteristics, are provided. Since its first release in 1993, many researchers have used the TPTP as an appropriate and convenient basis for ATP system evaluation.

This technical report explains the motivations and reasoning behind the development of the TPTP, and thus implicitly explains the design decisions made. It also serves as a manual explaining the structure and use of the TPTP: it provides a full description of the TPTP contents and organization, details of the utility programs, and guidelines for obtaining and using the TPTP.

A Quick Installation Guide for the TPTP is given in Section  Getting and Using the TPTP. Please be sure to read the guidelines for using TPTP problems and presenting results, given in Section Using the TPTP.

What's New in TPTP v3.4.0 :

Previous Problem Collections

A large number of interesting problems had accumulated over the years in the ATP community. Besides publishing particularly interesting individual problems, from early on researchers collected problems in order to obtain a basis for experimentation. Problems in First Order Form (FOF), published by mathematicians and logicians prior to the mechanization of reasoning (e.g., [
Chu56]) provided the first source for ATP researchers. The first major publication in this regard was [MOW76], which provides an explicit listing of clauses for 63 Clause Normal Form (CNF) problems, many of which are still relevant today (to our knowledge, the first circulation of problems for testing ATP systems was due to Larry Wos in the late sixties). In the same year [WM76] documented 86 CNF problems which were commonly used for ATP testing. However, the problem clauses are not supplied in [WM76]. A second major thrust was provided by [Pel86], which lists 75 problems in both FOF and CNF. Other more recent papers are [BL+86], [Qua92], [MW92], and [McC93], to name a few. The Journal of Automated Reasoning's Problem Corner also provided interesting challenge problems. Problems published in hardcopy form are, however, often not suitable for testing ATP systems, because they have to be transcribed to electronic form. This is a cumbersome, error-prone process, and is feasible for only small numbers of small problems.

The sparsness of research into ATP systems for FOF problems meant that no electronic collections of FOF test problems had previously been commonly available. A CNF problem collection in electronic form was made publicly available by Argonne National Laboratories (in Otter format [McC94]) in 1988 [ANL]. This collection was a major source of problems for ATP researchers. Other electronic collections of CNF problems have been available, but not announced officially (e.g., that distributed with the SPRFN ATP system [SPRFN]). Although some of these collections provided significant support to researchers, and formed the early core of the TPTP library, none (with the possible exception of the ANL collection) was specifically designed to serve as a common basis for ATP research. Rather, these collections typically were built in the course of research into a particular ATP system. As a result there are several factors that limited their usefulness as a common basis for research. In particular, previously existing problem collections:

The problem of meaningfully interpreting results can be even worse than indicated. A few problems may be selected and hand-tuned (formulae arranged in a special way, irrelevant formulae omitted, lemmas added in, etc) specifically for the ATP system being tested. The presentation of a problem can significantly affect the nature of the problem, and changing the formulae clearly makes a different problem altogether. Nevertheless the problem may be referenced under the same name as it was presented elsewhere. As a consequence the experimental results reveal little. Some researchers avoid this ambiguity by listing the formulae explicitly, but obviously this usually cannot be done for a large number of problems or for large individual problems. The only satisfactory solution to these issues is a common and stable library of problems. The TPTP is such a library.

What is Required?

The goal for building the TPTP has been to overcome previous drawbacks, and to centralize the burden of problem collection and maintenance. The TPTP tries to address all relevant issues. In particular, the TPTP:

The development of the TPTP problem library is an ongoing project, with the aim to provide all of the desired properties.

Current Limitations of the TPTP.
The current release of the TPTP library is limited to problems expressed in 1st order logic. There are no problems for induction, or for non-classical theorem proving. However, see Sections Current Activities and Further Plans for upcoming and planned extensions.



Inside the TPTP

Scope.
The TPTP contains problems in first-order logic with an interpreted equality symbol. Release v3.4.0 of the TPTP contains 7113 abstract problems, which result in 11279 ATP problems (due to alternative presentations, see Sections 
Problem Versions and Problem Generators). There are 3468 abstract FOF problems, which result in 5029 FOF ATP problems, and 4815 abstract CNF problems, which result in 6250 CNF ATP problems. The TPTP documents OverallSynopsis, FOFSynopsis, and CNFSynopsis provide some overall statistics about the TPTP.

The problems in the TPTP are syntactically diverse, as is indicated by the ranges of the values in the tables. The problems in the TPTP are also semantically diverse, as is indicated by the range of domains that are covered. The problems are grouped into domains, covering topics in the fields of logic, mathematics, computer science, engineering, social sciences, and others. The domains are presented and discussed in Section The TPTP Domain Structure.

Sources
The problems have been collected from various sources. The two principal sources have been existing electronic problem collections and the ATP literature. Other sources include logic programming, mathematics, puzzles, and correspondence with ATP researchers. Many people and organizations have contributed towards the TPTP: the foundations of the TPTP were laid with David Plaisted's SPRFN collection; many problems were taken from Argonne National Laboratory's ATP problem library (special thanks to Bill McCune here); Art Quaife provided several hundred problems in set theory and algebra; the Journal of Automated Reasoning, CADE Proceedings, and Association for Automated Reasoning Newsletters have provided a wealth of material; smaller numbers of problems have been provided by a number of further contributors (see the Acknowledgements).

Releases
The TPTP is managed in the manner of a software product, in the sense that fixed releases are made. Each release of the TPTP is identified by a release number, in the form v<Version>.<Edition>.<Patch level>. The Version number enumerates major new releases of the TPTP, in which important new features have been added. The Edition number is incremented each time new problems are added to the current version. The Patch level is incremented each time errors, found in the current edition, are corrected. All non-trivial changes are recorded in a history file, as well as in the file for an affected problem.

The TPTP Domain Structure

This section provides the structure according to which the problems are grouped into domains. Some information about the domains is also given.

An attempt has been made to classify the totality of the TPTP problems in a systematic and natural way. The resulting domain scheme reflects the natural hierarchy of scientific domains, as presented in standard subject classification literature. The current classification is based mainly on the Dewey Decimal Classification (DDC) [CB+89] and the Mathematics Subject Classification (MSC) [MSC92] used for the Mathematical Reviews by the American Mathematical Society. Five main fields are defined: logic, mathematics, computer science, engineering, and other. Each field contains further subdivisions, called domains. Each domain is identified by a three-letter mnemonic. These mnemonics are also part of the TPTP problem naming scheme (see Section  Problem and Axiomatization Naming). The TPTP domains constitute the basic units of the classification. The full classification scheme is shown in Figure  The Domain Structure of the TPTP, and the numbers of abstract problems, problems, and generic problems in each domain are shown in the TPTP document OverallSynopsis

Logic Combinatory logic COL
Logic calculi LCL
Henkin models HEN
Mathematics Set theory SET and SEU
Graph theory GRA
Algebra Boolean algebra BOO
Robbins algebra ROB
Left distributive LDA
Lattices LAT
Groups GRP
Rings RNG
Fields FLD
Homological algebra HAL
General algebra ALG
Number theory NUM
Topology TOP
Analysis ANA
Geometry GEO
Category theory CAT
Computer science Computing theory COM
Knowledge representation KRS
Natural Language Processing NLP
Planning PLA
Agents AGT
Commonsense Reasoning CSR
Software creation SWC
Software verification SWV
Science and Engineering Hardware creation HWC
Hardware verification HWV
Medicine MED
Social sciences Management MGT
Other Syntactic SYN
Puzzles PUZ
Miscellaneous MSC
The Domain Structure of the TPTP.

A brief description of the domains, with a non-ATP reference for a general introduction and a generic ATP reference, is given below. For each domain, appropriate DDC and MSC numbers are also given:

Problem Versions and Standard Axiomatizations

There are often many ways to formulate a problem for presentation to an ATP system. Thus, in the TPTP, there are often alternative presentations of a problem. The alternative presentations are called versions of the underlying abstract problem. As the problem versions are the objects that ATP systems must deal with, they are referred to simply as problems, and the abstract problems are referred to explicitly as such. Each problem is stored in a separate physical file. In the TPTP the most coarse grain differentiation between problem versions is whether the problem is presented in FOF or CNF. Within a given presentation, the primary reason for different versions of an abstract problem is the use of different axiomatizations. This issue is discussed below. A secondary reason is different formulations of the theorem to be proven, e.g., different clausal forms of a FOF problem.

Different Axiomatizations
Commonly, many different axiomatizations of a theory exist. By using different axiomatizations of a particular theory, different versions of a problem can be formed.

In the TPTP an axiomatization is standard if it is a complete axiomatization of an established theory, no lemmas have been added, and it is not designed specifically to be suited or ill-suited to any ATP system, calculus, or control strategy. A problem version is standard if it uses a standard axiomatization. (Note: A standard axiomatization may be redundant, because some axioms are dependent on others. In general, it is not known whether or not an axiomatization is minimal, and thus the possibility of redundancy in standard axiomatizations must be tolerated.) In the TPTP, standard axiomatizations are kept in separate axiom files, and are included in problems as appropriate. Sets of specialization axioms may be used to extend or constrain an axiomatization. Specialization axioms are also kept in separate axiom files.

Within the ATP community, some problems have been created with non-standard axiomatizations. A non-standard axiomatization may be formed by modifying a standard axiomatization: the standard axiomatization may be reduced (i.e., axioms are removed) and the result is an incomplete axiomatization, or it may be augmented (i.e., lemmas are added) and the result is a redundant axiomatization. Incomplete and redundant axiomatizations are typically used to find a proof of a conjecture (based on the axiomatization) using a particular ATP system. An axiomatization may also be non-standard because it is biased, i.e., designed specifically to be suited or ill-suited to some ATP system, calculus, or control strategy. A problem version is incomplete, redundant, or biased if its axiomatization is. In the TPTP, for each incomplete, redundant, and biased problem, a new version of the problem with a standard axiomatization is usually created. Finally, an axiomatization may be non-standard because it does not capture any established theory. i.e., a standard axiomatization does not exist, but the axioms are not biased. A problem version with such an axiomatization is especial. Typically, the axioms in an especial problem are specific to that problem, and are not used in any other problem.

In any 'real' application of an ATP system, a standard or especial problem version would typically be used, at least initially. The use of standard axiomatizations is particularly desirable.

Equality Axiomatization
In the TPTP equality is represented in infix using = and != for equality and inequality. An inequality has the same meaning as a negated equality. If equality is present in a problem, axioms of equality are not provided; it is assumed that equality reasoning is builtin to every ATP system. If equality axioms are required by an ATP system they can be added using the tptp2X utility (see Section 
The tptp2X Utility). If any axioms are added when the problems are submitted to an ATP system, then the addition must be explicitly noted in reported results (see Section Using the TPTP).

Problem Generators

Some abstract problems have a generic nature, and particular instances of the abstract problem are formed according to some size parameter(s). An example of a generic problem is the N-queens problem: place N queens on a N by N chess board such that no queen attacks another. The formulae for any size of this problem can be generated automatically, for any size of N >= 2. Note that satisfiability may depend on the problem size.

Up to TPTP v1.1.3, the TPTP contained problem files for particular sizes of generic problems. This, however, was undesirable. Firstly, only a finite number of different problem sizes could be included, and therefore a desired size may have been missing. Secondly, even a small number of different problem sizes for each generic problem could consume a considerable amount of disk space. To overcome these problems, the TPTP contains generator files. Generator files are used to generate instances of generic problems, according to user supplied size parameters. The generators are used in conjunction with the tptp2X utility, and a full description of their use is given in Section The tptp2X Utility.

For convenience, the TPTP still contains, where they exist, a theorem and a non-theorem size instance of each generic problem. The TPTP sizes chosen are non-trivial, unless the problem remains easy up to sizes that have very large files. In the latter situation the TPTP size is that used in TPTP v1.2.0. The statistics in the TPTP documents Overall synopsis, FOF synopsis, and CNF synopsis take into account these instances of generic problems.

Problem, Generator, and Axiomatization Naming

Providing unambiguous names for all problems is necessary in a problem library. A naming scheme has been developed for the TPTP, to provide unique, stable names for abstract problems, problems, axiomatizations, and generators. Files are assigned names according to the schemes depicted in Sections Problem Naming and Axiom Naming. The DDDNNN combination provides an unambiguous name for an abstract problem or axiomatization. The DDDNNNFV[.SSS] combination provides an unambiguous name for a problem or generator, and the DDDNNNFE combination provides an unambiguous name for a set of axioms. The complete file names are unique within the TPTP. For example, the file GRP135-1.002.p contains the group theory problem number 135, version number 1, generated size 2. Similarly, the file CAT001-0.ax contains the basic category theory axiomatization number 1.

DDD NNN F V .SSS .T
DDD - Domain name abbreviation. The domain names and their abbreviations are listed in Section  The Domain Structure of the TPTP.
NNN - Abstract problem number. It is unique within the domain.
F - Form. - for CNF and + for FOF.
V - Version number. It differentiates between different versions of the abstract problem, as discussed in Section Problem Versions.
SSS - Size parameter(s). These only occur for generated problems, and give the size parameter(s).
T - File name extension. p for problem files, g for generator files.

Problem file naming scheme.

The abstract problem numbers within each domain are not always successive. This is because some numbers have already been allocated to problems that will be part of a future TPTP release (see Section The Present).

The version numbers used for each abstract problem do not always start at 1, and are not always successive. This is because the same version number is assigned (wherever possible) to all problems that come from the same source, within each domain.

DDD NNN F V .TT
DDD - Domain name abbreviation. The domain names and their abbreviations are listed in Section  The Domain Structure of the TPTP.
NNN - Axiomatization number. It is unique within the domain.
F - Form. - for CNF and + for FOF.
V - Specialization number. It identifies sets of axioms that are used to specialize an axiomatization. Axiomatizations of basic theories are allocated the number 0, and specialization axiom sets are numbered from 1 onwards.
T - File name extension. An extension ax denotes a file containing axioms specific to a theory. An extension eq denotes a file containing equality substitution axioms for the corresponding theory specific axioms.

Axiom file naming scheme.

If a file is ever removed from or renamed in the TPTP, then the extension is changed to .rm. The file is not physically removed, and a comment is added to the file to explain what has happened. This mechanism maintains the unique identification of problems and axiomatizations.

Problem Presentation

The physical presentation of the TPTP problem library is such that ATP researchers can easily use the problems. The TPTP file format, for problem files and axiom files, has three main sections. The first section is a header section that contains information for the user. This information is not for use by ATP systems (see Section Using the TPTP). The second section contains include instructions for axiom files. The last section contains the formulae that are specific to the problem or axiomatization. TPTP generator files have three sections, different from the problem and axiom files. The header section of generator files is similar to that of problem and axiom files, but with place-holders for information that is filled in based on the size of problem and the formulae generated. Following that comes Prolog source code to generate the formulae, and finally data describing the permissible sizes and the chosen TPTP size for the problem. More details are given in Section  Writing your own Problem Generators.

The syntax of all files is that of Prolog (with some operators defined). This conformance makes it trivial to manipulate the files using Prolog. All information in the files that is not for use by ATP systems is formatted as Prolog comments, with a leading %. The (annotated) formulae are formatted as Prolog facts. A full BNF specification of the problem and axiom file formats is provided in the Documents directory of the TPTP (see Section Physical Organization). The tptp2X utility can be used to convert TPTP files to other known ATP system formats (see Section The tptp2X Utility). A description of the information contained in TPTP files is given below.

The Header Section

This section contains information about the problem, for the user. It is divided into four parts separated by blank lines. The first part identifies and describes the problem. The second part provides information about occurrences of the problem in the literature and elsewhere. The third part gives the problem's ATP status and a table of syntactic measurements made on the problem. The last part contains general information about the problem. Examples of TPTP headers, extracted from the problem files GRP194+1.p and GRP039-7.p, are shown in Figures Example FOF header and Example CNF header.

%--------------------------------------------------------------------------
% File     : GRP194+1 : TPTP v2.2.0. Released v2.0.0.
% Domain   : Group Theory (Semigroups)
% Problem  : In semigroups, a surjective homomorphism maps the zero
% Version  : [Gol93] axioms.
% English  : If (F,*) and (H,+) are two semigroups, phi is a surjective 
%            homomorphism from F to H, and id is a left zero for F, 
%            then phi(id) is a left zero for H.

% Refs     : [Gol93] Goller (1993), Anwendung des Theorembeweisers SETHEO a
% Source   : [Gol93]
% Names    : 

% Status   : Theorem
% Rating   : 0.11 v2.7.0, 0.17 v2.6.0, 0.14 v2.5.0, 0.12 v2.4.0, 0.25 v2.3.0, 0.33 v2.2.1, 0.00 v2.1.0
% Syntax   : Number of formulae    :    8 (   2 unit)
%            Number of atoms       :   21 (   4 equality)
%            Maximal formula depth :    8 (   4 average)
%            Number of connectives :   13 (   0 ~  ;   0  |;   6  &)
%                                         (   1 <=>;   6 =>;   0 <=)
%                                         (   0 <~>;   0 ~|;   0 ~&)
%            Number of predicates  :    3 (   0 propositional; 2-2 arity)
%            Number of functors    :    5 (   3 constant; 0-3 arity)
%            Number of variables   :   15 (   0 singleton;  14 !;   1 ?)
%            Maximal term depth    :    3 (   1 average)

% Comments : 
%--------------------------------------------------------------------------
Example of a FOF problem file header (GRP194+1.p).

%--------------------------------------------------------------------------
% File     : GRP039-7 : TPTP v2.7.0. Bugfixed v1.0.1.
% Domain   : Group Theory (Subgroups)
% Problem  : Subgroups of index 2 are normal
% Version  : [MOW76] (equality) axioms : Augmented.
% English  : If O is a subgroup of G and there are exactly 2 cosets 
%            in G/O, then O is normal [that is, for all x in G and 
%            y in O, x*y*inverse(x) is back in O].

% Refs     : [MOW76] McCharen et al. (1976), Problems and Experiments for a
% Source   : [MOW76]
% Names    : GP2 [MOW76]

% Status   : Unsatisfiable
% Rating   : 0.45 v2.7.0, 0.50 v2.6.0, 0.40 v2.5.0, 0.42 v2.4.0, 0.33 v2.3.0, 0.44 v2.2.1, 0.44 v2.2.0, 0.67 v2.1.0, 0.89 v2.0.0
% Syntax   : Number of clauses    :   16 (   2 non-Horn;  12 unit;   8 RR)
%            Number of literals   :   24 (  11 equality)
%            Maximal clause size  :    4 (   2 average)
%            Number of predicates :    2 (   0 propositional; 1-2 arity)
%            Number of functors   :    8 (   5 constant; 0-2 arity)
%            Number of variables  :   16 (   0 singleton)
%            Maximal term depth   :    3 (   2 average)

% Comments : Used to define a subgroup of index two is a theorem which
%            says that {for all x, for all y, there exists a z such that
... some lines removed here for brevity
% Bugfixes : v1.0.1 - Duplicate axioms multiply_inverse_left and 
%            multiply_inverse_right removed.
%--------------------------------------------------------------------------
Example of a CNF problem file header (GRP039-7.p).

The % File field.
This field contains three items of information. The first item is the problem's name. The current TPTP release number is given next, followed by the TPTP release in which the problem was released or last bugfixed (i.e., the formulae were changed). The problem name in Figure 
Example CNF header is GRP039-7. The TPTP release is v2.2.0, and the problem clauses were last bugfixed in release v1.0.1.

The % Domain field.
The domain field identifies the domain, and possibly a subdomain, from which the problem is drawn (see Section  The TPTP Domain Structure). The domain corresponds to the first three letters of the problem name. The domain of the problem of Figure Example CNF header is Group Theory, and the subdomain is Subgroups.

The % Problem field.
This field provides a one-line, high-level description of the abstract problem. In axiom files, this field is called % Axioms, and provides a one-line, high-level description of the axiomatization. Thus, the problem of Figure Example CNF header proves that Subgroups of index 2 are normal.

The % Version field.
This field gives information that differentiates this version of the problem from other versions of the problem. The first possible differentiation is the axiomatization that is used. If a specific axiomatization is used, a citation is provided. In the problem of Figure Example CNF header the axiomatization used is that of [MOW76]. If the axiomatization is a pure equality axiomatization (uses only the equal/2 predicate) then this is noted too, as is the case in Figure Example CNF header.

The second possible differentiation is the status of the axiomatization, as discussed in Section Problem Versions. There are 12 possiblities:

In the problem of Figure Example CNF header an existing standard axiomatization has been Augmented, and has become non-standard due to redundancy.

The third possible differentiation between problem versions is in the theorem formulation. Variations in the theorem formulation are noted in a Theorem formulation entry, e.g.,

% Version  : [McCharen, et al., 1976] (equality) axioms.
%            Theorem formulation : Explicit formulation of the commutator.

The % English field.
This field provides a full description of the problem, if the one-line description in the % Problem field is too terse.

The % Refs field.
This field provides a list of abbreviated references for material in which the problem has been presented. Other relevant references are also listed. The reference keys identify BibTeX entries in the Bibliography.bib file supplied with the TPTP.

The % Source field.
The problems in the TPTP have been (physically) obtained from a variety of sources, both hardcopy and electronic. In this field the source of the problem is acknowledged, usually as a citation. If the problem was sourced from an existing problem collection then the collection name is given in [ ] brackets. The problem collections used thus far are:

The problem of Figure Example CNF header was taken from [MOW76].

The % Names field.
Problems which have appeared in other problem collections or the literature, often have names which are known in the ATP community. This field lists all such names known to us for the problem, along with the source of the name. If the source is an existing problem collection then the collection name is cited, as in the % Source field. If the source of a name is a paper then a citation is given. If a problem is not given a name in a paper then ``-'' is used as the known name and a citation is given. Problems which first appeared in the TPTP have source TPTP, and no other name. In generator files all known names for instances of the abstract problem are listed, with the instance size given before the source. A reverse index, from known names to TPTP names, is distributed with the TPTP (see Section Physical Organization). The problem of Figure Example CNF header is called GP2 in [MOW76].

The % Status field.
This field gives the ATP status of the problem, according to the SZS problem status ontology. For FOF problems it is one of:

For CNF problems it is one of: In Figure Example CNF header the status is unsatisfiable.

The % Rating field.
This field gives the difficulty of the problem, measured relative to state-of-the-art ATP systems. The rating is a real number in the range 0.0 to 1.0, where 0.0 means that all state-of-the-art ATP systems can solve the problem (i.e., the problem is easy), and 1.0 means no state-of-the-art ATP system can solve the problem (i.e., the problem is hard). The rating is followed by a TPTP release number, indicating in which release the rating was assigned. If no rating has been assigned, a ? is given. In Figure Example CNF header the rating is 0.45, assigned in release v2.7.0.

The % Syntax field.
This field lists various syntactic measures of the problem's clauses. The measures for CNF problems are: the number of clauses, the number of non-Horn clauses, the number of unit clauses, the number of range restricted clauses, the number of literals, the number of equality literals, the maximal and average clause size (measured by number of literals), the number of distinct predicate symbols, the number of distinct propositional symbols, the minimal and maximal predicate symbol arities, the number of distinct function symbols, the number of distinct constants, the minimal and maximal functor arities, the number of distinct variables, the number of singleton variables (variables that appear only once in a clause), and the maximal and average term depth (with constants and variables having depth 1). The measures for FOF problems are: the number of formulae, the number if unit formulae, the number of atoms, the number of equality atoms, the maximal and average formula depth, the number of connectives, the numbers of each type of connective, the number of distinct propositional symbols, the minimal and maximal predicate symbol arities, the number of distinct function symbols, the number of distinct constants, the minimal and maximal functor arities, the number of distinct variables, the number of singleton variables, the numbers of universally and existentially quantified variables, and the maximal and average term depth. See Section Inside the TPTP for a summary of this information over the entire TPTP.

The % Comments field.
This field contains free format comments about the problem, e.g., the significance of the problem, or the reason for creating the problem. If the problem was created using the tptp2X utility (see Section The tptp2X Utility) then the tptp2X parameters are given.

The % Bugfixes field.
This field describes any bugfixes that have been done to the formulae of the problem. Each entry gives the release number in which the bugfix was done, and attempts to pinpoint the bugfix accurately. In the problem of Figure Example CNF header a bugfix was made in release v1.0.1, by removing duplicate multiply_inverse_left and multiply_inverse_right clauses.

The Include Section

The include section contains include instructions for TPTP axiom files. An example is shown in Figure Example include section, extracted from the problem file GRP194+1.p.

%--------------------------------------------------------------------------
%----Include simple curve axioms
include('Axioms/GEO004+0.ax').
%----Include axioms of betweenness for simple curves
include('Axioms/GEO004+1.ax').
%----Include oriented curve axioms
include('Axioms/GEO004+2.ax').
%----Include trajectory axioms
include('Axioms/GEO004+3.ax',[connect_defn,symmetry_of_at_the_same_time]).
%--------------------------------------------------------------------------
Example of a problem file include section (adapted from GEO146+1.p).

Each of the include instructions indicates that the formulae in the named file should be included at that point. Include files with relative path names are expected to be found either under the directory of the current file, or if not found there then under the directory specified in the $TPTP environment variable. If the include instruction has a []ed list of formulae names as a second argument, the results of parsing the named file are filtered to retain only those formulae (thus this filter applies to formulae that may have been recursively included into the named file). If any member of the list cannot be found, or there are multiple formulae with a given name, that is an error condition. If there is no second argument, or the second argument is all, then all the formulae in the file are included. In Figure Example include section only connect_defn and symmetry_of_at_the_same_time are included from Axioms/GEO004+3.ax.

Full versions of TPTP problems (without include instructions) can be created by using the tptp2X utility (see Section The tptp2X Utility).

A side effect of separating out the axioms into axiom files is that the formula order in the TPTP presentation of problems is typically different from that of any original presentation. This reordering is acceptable because the performance of a decent ATP system should not be very dependent on a particular formula ordering.

The Formulae Section

Each logical formula is wrapped in an annotated formula structure, whose principle symbol is fof or cnf to indicate the form of the enclosed logic formula. The annotated formulae are in the formulae section of the problem file.

Each annotated formula has a name, in the form of a Prolog atom. Each annotated formula has a role, one of axiom, hypothesis, definition, lemma, theorem, conjecture, lemma_conjecture, negated_conjecture, plain, and unknown. axioms are accepted, without proof, as a basis for proving conjectures and lemma_conjectures in FOF problems. In CNF problems axioms are accepted as part of the set whose satisfiability has to be established. There is no guarantee that the axioms of a problem are consistent. hypothesiss are assumed to be true for a particular problem, and are used like axioms. definitions are used to define symbols, and are used like axioms. lemmas and theorems have been proven from the axioms, can be used like axioms, but are redundant wrt the axioms. lemma is used as the role of proven lemma_conjectures, and theorem is used as the role of proven conjectures, in output. A problem containing a lemma or theorem that is not redundant wrt the axioms is ill-formed. theorems are more important than lemmas from the user perspective. conjectures occur in only FOF problems, and are to all be proven from the axiom(-like) formulae. A problem is solved only when all conjectures are proven. lemma_conjectures are expected to be provable, and may be useful to prove, while proving conjectures. negated_conjectures ocuur in only CNF problems, and are formed from negation of a conjecture in a FOF to CNF conversion. plains have no special user semantics, and can be used like axioms. unknowns have unknown role, and this is an error situation.

The atoms that appear in logic formulae are presented in the form of Prolog terms, except if the predicate is equality in which case infix = and != are used. The connectives used to build non-atomic formulae are prefix ~ for negation, infix | for disjunction, infix & for conjunction, infix <=> for equivalence, infix => for implication, infix <= for reverse implication, infix <~> for non-equivalence (XOR), infix ~| for negated disjunction (NOR), and infix ~& for negated conjunction (NAND). Negation has higher precedence than the binary connectives, but no precedence between binary connectives is assumed; brackets are used to ensure the correct association. The binary connectives are right associative. The universal quantifier is ! and the existential quantifier is ?. Quantified formulae are written in the form <Quantifier> [<Variables>] : <Formula>. Logic formulae, including equality and inequality literals, can be read as Prolog terms using appropriate operator definitions.

An example of a FOF formula section, extracted from the problem file GRP194+1.p, is shown in Figure  Example FOF formulae. An example of a clause section, extracted from the problem file GRP039-7.p, is shown in Figure  Example CNF clauses.

%--------------------------------------------------------------------------
%----Definition of a homomorphism
fof(homomorphism1,axiom,
    ( ! [X] :
        ( group_member(X,f)
       => group_member(phi(X),h) ) )).

fof(homomorphism2,axiom,
    ( ! [X,Y] :
        ( ( group_member(X,f)
          & group_member(Y,f) )
       => multiply(h,phi(X),phi(Y)) = phi(multiply(f,X,Y)) ) )).

fof(surjective,axiom,
    ( ! [X] :
        ( group_member(X,h)
       => ? [Y] :
            ( group_member(Y,f)
            & phi(Y) = X ) ) )).

%----Definition of left zero
fof(left_zero,axiom,
    ( ! [G,X] :
        ( left_zero(G,X)
      <=> ( group_member(X,G)
          & ! [Y] :
              ( group_member(Y,G)
             => multiply(G,X,Y) = X ) ) ) )).

%----The conjecture
fof(left_zero_for_f,hypothesis,
    ( left_zero(f,f_left_zero) )).

fof(prove_left_zero_h,conjecture,
    ( left_zero(h,phi(f_left_zero)) )).
%--------------------------------------------------------------------------
Example of a FOF problem file formulae section (GRP194+1.p).

%--------------------------------------------------------------------------
%----Redundant two axioms
cnf(right_identity,axiom,
    ( multiply(X,identity) = X )).

cnf(right_inverse,axiom,
    ( multiply(X,inverse(X)) = identity )).

... some clauses omitted here for brevity

cnf(property_of_O2,axiom,
    ( subgroup_member(X)
    | subgroup_member(Y)
    | multiply(X,element_in_O2(X,Y)) = Y )).

%----Denial of theorem
cnf(b_in_O2,negated_conjecture,
    ( subgroup_member(b) )).

cnf(b_times_a_inverse_is_c,negated_conjecture,
    ( multiply(b,inverse(a)) = c )).

cnf(a_times_c_is_d,negated_conjecture,
    ( multiply(a,c) = d )).

cnf(prove_d_in_O2,negated_conjecture,
    ( ~ subgroup_member(d) )).
%--------------------------------------------------------------------------
Example of a CNF problem file clause section (GRP039-7.p).

Physical Organization

The TPTP is physically organized into six subdirectories, as follows:


Utilities

The tptp2X Utility

The tptp2X utility is a multi-functional utility for reformatting, transforming, and generating TPTP problem files. In particular, it tptp2X is written in Prolog, and should run on most Prolog systems. It is known to run on current versions of
Eclipse, SICStus, SWI, and YAP Prolog. Before using tptp2X, it is necessary to install the code for the dialect of Prolog that is to be used. This and other installation issues are described next.

Installation

The tptp2X utility consists of the following files: tptp2X is installed by running tptp2X_install, which will prompt for required information. To install tptp2X by hand, the following must be attended to:

Using tptp2X

The most convenient way of using the tptp2X utility is through the tptp2X script. The use of this script is:
tptp2X [-h][-q<Level>][-i][-s<Size>][-t<Transform>][-f<Format>] [-d<Directory>] -l<NamesFile>|<TPTPFiles>
The -h flag specifies that usage information should be output. The -q flag specifies the level of quietness at which the script should operate. There are three quietness levels; 0 is verbose mode, 1 suppresses informational output from the Prolog interpreter, and 2 suppresses all informational output except lines showing what files are produced. The default quietness level is 1. The -i flag specifies that the script should enter interactive mode after processing all other command line parameters. Interactive mode is described below. The other command line parameter values are:
A common first use of tptp2X is to convert TPTP problems to another format. To convert all TPTP problems to another format, the use is tptp2X -f<Format>, e.g., tptp2X -f otter. To limit the conversion to one or more domains, the domain names are specified after the <Format>, e.g., tptp2X -f leantap ALG GRP LDA. If you are a new TPTP user, these are probably the uses that you want to start with.

The tptp2X Output Files

The output files produced by tptp2X are named according to the input file name and the options used. The TPTP problem name (the input file name without the .p or .g) forms the basis of the output file names. For files created from TPTP generators, the size parameters are appended to the base name, separated from the base name by a ".". Then, for each transformation applied a suffix is appended. The suffixes for the transformations are:

Transformation Suffix

stdfof +stdfof
clausify:<Algorithm> +cls_<Algorithm>
simplify +simp
cnf:<Algorithm> +cnf_<Algorithm>
propify +prop
lr +lr
cr +cr
clr +clr
fr +fr
random +ran
er +er
ran_er +ran_er
add_equality:<Add> +eq_<Add>
rm_equality:<Remove> +rm_eq_<Remove>
set_equality:<Set> +seq_<Set>
to_equality +2eq
magic +nhms
shorten +short
none

Finally an extension to indicate the output format is appended to the file name. The suffixes for the output formats are:

Format Extension Format Extension

bliksem .blk carine .car
dedam .dedam dfg .dfg
dimacs .dimacs eqp .eqp
finder .fin geo .geo
kif .kif leancop .leancop
lf .lf oscar .oscar
otter .in protein .tme
prover9 .in sem .sem
setheo .lop smt .smt
thinker .thinker oldtptp .oldtptp
tptp .tptp waldmeister .pr

To record how a tptp2X output file has been formed, the tptp2X parameters are given in a % Comments field entry of the output file.

Example

~/TPTP/TPTP2X> tptp2X -tlr,cr,clr -fkif ../Problems/ALG/ALG001-1.p
---------------------------------------------------------------------
TPTP2X directory      = /home/graph/tptp/TPTP/TPTP2X
TPTP directory        = /home/graph/tptp/TPTP
Prolog interpreter    = /usr/local/bin/eclipse
Files to convert      = ../Problems/ALG/ALG001-1.p
Size                  = 
Transformation        = lr,cr,clr
Format to convert to  = kif
Output directory      = /home/graph/tptp/TPTP/TPTP2X/kif
---------------------------------------------------------------------
Made the directory /home/graph/tptp/TPTP/TPTP2X/kif/ALG
ALG001-1 -> /home/graph/tptp/TPTP/TPTP2X/kif/ALG/ALG001-1+lr.kif
ALG001-1 -> /home/graph/tptp/TPTP/TPTP2X/kif/ALG/ALG001-1+cr.kif
ALG001-1 -> /home/graph/tptp/TPTP/TPTP2X/kif/ALG/ALG001-1+clr.kif
~/TPTP/TPTP2X>
This run applies three separate transformations to the problem ALG001-1. The transformations are literal order reversal, clause order reversal, and reversal of both literal and clause order. The transformed problems are output in kif format, in the directory kif/ALG below the TPTP2X directory. The file names are ALG001-1+lr.kif, ALG001-1+cr.kif, and ALG001-1+clr.kif.

Example

~/TPTP/TPTP2X> tptp2X -q2 -s3..5 -fotter -d~tptp/tmp SYN001-1.g
SYN001-1 -> /home/tptp/tmp/SYN/SYN001-1.003+rm_eq_stfp.in
SYN001-1 -> /home/tptp/tmp/SYN/SYN001-1.004+rm_eq_stfp.in
SYN001-1 -> /home/tptp/tmp/SYN/SYN001-1.005+rm_eq_stfp.in
~/TPTP/TPTP2X>
This run generates three sizes of the generic problem SYN001-1. The sizes are 3, 4, and 5. The output files are formatted for Otter, to use its auto mode. The files are placed in \verb/~/tptp/tmp/SYN, and are named SYN001-1.003.lop, SYN001-1.004.lop, and SYN001-1.005.lop. The quietness level is set to 2, thus suppressing all informational output except the lines showing what files are produced. Note that the file SYN001-1.g is automatically found in the generators directory.

Example

~/TPTP/TPTP2X> tptp2X -tmagic+shorten - < ~tptp/TPTP/Problems/GRP/GRP001-1.p
---------------------------------------------------------------------
TPTP2X directory      = /home/tptp/TPTP/TPTP2X
TPTP directory        = /home/tptp/TPTP
Prolog interpreter    = /usr/local/bin/sicstus
Files to convert      = -
Size                  =
Transformation        = magic+shorten
Format to convert to  = tptp
Output directory      = -
---------------------------------------------------------------------
%--------------------------------------------------------------------------
% File     : Shortened file, so there is no header
%--------------------------------------------------------------------------
input_clause(clause_1,axiom,
    [++equal(X1,X1)]).

... Lots of output omitted here for brevity

input_clause(clause_41,theorem,
    [--p2(c8,c7,c9)]).
%--------------------------------------------------------------------------
~/TPTP/TPTP2X>
This run uses the tptp2X script as a filter, to apply the non-Horn magic set transformation and then the symbol shortening transformation to GRP001-1.p. GRP001-1.p is fed in from standard input, and the output is written to standard output (thus all informational output is suppressed).

The tptp2X Interactive Mode

If the -i flag is set, the tptp2X script enters interactive mode after processing all other command line parameters. In interactive mode the user can change the value of any of the command line parameters. The user is prompted for the <TPTPFiles>, the <Size>, the <Transform>, the <Format>, and the <Directory>. In each prompt the current value is given. The user may respond by specifying a new value or by entering <cr> to accept the current value. The prompt-respond loop continues for each parameter until the user accepts the value for the parameter. Example
~/TPTP/TPTP2X> tptp2X -q0 -d~tptp/tmp -i
---- Interactive mode -----------------------------------------------
Files to convert      [Problems/*/*.p] : ../Problems/GRP/GRP001-1.p
Files to convert      [../Problems/GRP/GRP001-1.p] :
Size                  [] :
Transformation        [none] : lr+rm_equality:stfp
Transformation        [lr+rm_equality:stfp] :
Format to convert to  [tptp] : setheo
Format to convert to  [setheo] :
Output directory      [/home/tptp/tmp] :
---- End of Interactive mode ----------------------------------------
---------------------------------------------------------------------
TPTP2X directory      = /home/2/tptp/TPTP/TPTP2X
TPTP directory        = /home/2/tptp/TPTP
Prolog interpreter    = /usr/local/bin/sicstus
Files to convert      = ../Problems/GRP/GRP001-1.p
Size                  =
Transformation        = lr+rm_equality:stfp
Format to convert to  = setheo:sign
Output directory      = /home/tptp/tmp
---------------------------------------------------------------------
Made the directory /home/tptp/tmp/GRP
SICStus 3  #6: Mon Nov 3 18:32:08 MET 1997

... Lots of informational output omitted here for brevity

{/home/2/tptp/TPTP/TPTP2X/tptp2X.main compiled, 12080 msec 785600 bytes}

yes

yes
GRP001-1 -> /home/tptp/tmp/GRP/GRP001-1+lr+rm_eq_stfp.lop
~/TPTP/TPTP2X>
This run converts the problem GRP001-1 to a SETHEO format file. The literals are reversed and all equality clauses except reflexivity are removed. The top level output directory is specified as \verb/~/tptp/tmp, below which the subdirectory GRP is made. The output file is named GRP001-1+lr+eq_stfp.lop. Verbose mode is used, so all informational output is given.

The following subsections are only of interest to real Prolog users. If you do not want to use Prolog directly, skip to the next section.

Running tptp2X from within Prolog

The tptp2X utility may also be run from within a Prolog interpreter. The tptp2X.main file has to be loaded, and the entry point is then tptp2X/5, in the form:

?-tptp2X(<TPTPFile>,<Size>,<Transform>,<Format>,<Directory>).

The parameters are similar to the tptp2X script command line parameters. A summary, highlighting differences with "(!)", is given here. See Section Using tptp2X for parameter options.

Exampl