On Herbrand Skeletons

09/30/2019 ∙ by Paul J. Voda, et al. ∙ Comenius University in Bratislava 0

Herbrand's theorem plays an important role both in proof theory and in computer science. Given a Herbrand skeleton, which is basically a number specifying the count of disjunctions of the matrix, we would like to get a computable bound on the size of terms which make the disjunction into a quasitautology. This is an important problem in logic, specifically in the complexity of proofs. In computer science, specifically in automated theorem proving, one hopes for an algorithm which avoids the guesses of existential substitution axioms involved in proving a theorem. Herbrand's theorem forms the very basis of automated theorem proving where for a given number n we would like to have an algorithm which finds the terms in the n disjunctions of matrices solely from the shape of the matrix. The main result of this paper is that both problems have negative solutions.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

By the theorem of Herbrand we have for a quantifier-free :

for certain and sequences of terms . The question whether for a given we can find such terms for arbitrary formulas is the problem of Herbrand skeletons of size . The terms solve the skeleton.

The problem is very important both in logic where we enquire about bounds on the size of such terms [HP93] and also in automated theorem proving (ATP) where one asks whether there is an algorithm which finds the terms from without a guess involved in the choice of existential substitution axioms. This use of Herbrand’s theorem is actually the very foundation of ATP. This is because the theorem of Herbrand has influenced the oldest ATP proof procedure of resolution [Rob65] and Herbrand skeletons directly appear in the modern ATP procedures based on the connection method (in the form of the multiplicity of formulas) [Bib82] and on semantic tableaux (in the form of free variables) [Fit90].

It was already known to Herbrand [Her30] that when the formula does not contain the identity then we can both effectively find the bounds and that there is an algorithm for finding the terms (unification). With identities permitted in the formulas , both problems were open although a recent result by Degtyarev and Voronkov on undecidability of the so called simultaneous rigid E-unification [DV95a] can be used to show the undecidability for the case when (see Par. 3.5 for more details). However, this result does not readily extend to the case .

Inspired by [DV95a] and [KP88] we settle in this paper both problems negatively: for no there is a computable function in giving a bound on the size of a solution, nor there is an algorithm with input for finding a solution. We do it by the reduction of the celebrated result of Matiyasevich on unsolvability of Diophantine equations [Mat70] to the solvability of -skeletons. In order to emphasize the purely logical character of the problem of Herbrand skeletons we deliberately refrain from using any specialized ATP and/or term-rewriting terminology.

In Sect. 2 we give our notation, Sect. 3 introduces the problem of Herbrand skeletons. Section 4 deals with the undecidability of Herbrand skeletons for , Sect. 5 proves technical lemmas needed for this. Section 6 presents the main result for , Sect. 7 proves technical lemmas for this.

2 Notation and Logical Background

2.1 Language of predicate calculus.

The language of first-order predicate calculus with identity consists of denumerably many variables, function and predicate symbols of all arities (function symbols of arity are constants, predicate symbols of arity are propositional constants). We use , and as metavariables ranging over function and predicate symbols respectively, , possibly with subscripts, as metavariables ranging over variables.

Semiterms are either variables or expressions where is a function symbol of arity and are previously constructed semiterms. We use as metavariables ranging over semiterms, as metavariables ranging over constant symbols, and we write constant semiterms as .

Any metavariable, say , written as denotes a possibly empty sequence of objects (terms, constants, variables) denoted by the metavariable. Sequences of variables , used in a certain context are always assumed to consist of pairwise distinct variables without having any variables in common.

Semiformulas are constructed from atomic semiformulas of identity and predicate applications by propositional connectives , , , and quantifiers , in the usual way. We use lowercase Greek letters to range over semiformulas. Free and bound variables of semiformulas are defined as usual.

Terms are semiterms without variables and formulas are semiformulas without free variables. As usual, a structure is given by a non-empty domain and an interpretation of function and predicate symbols. We write for the denotation of the term . For a formula we write to assert that is true in the structure , means that is valid, i.e. that it holds in all structures.

We assume that the objects of first-order predicate calculus are encoded into natural numbers in some of the usual ways. Thus, for instance, the set of terms is a subset of natural numbers. By having variables, semiterms, and semiformulas as natural numbers the metatheoretic predicates, as for instance, are numeric predicates. We may then say that is a recursively enumerable (r.e.) predicate without having to speak of codes of objects. We are also able to write to assert that both terms are identical (note that atomic identity formulas, which are numbers, are written as ).

2.2 Quasitautologies.

Quasitautologies are quantifier-free formulas which are tautological (propositional) consequences of identity axioms:

For a quantifier-free formula we have

iff is a quasitautology.

The predicate of being a quasitautology is primitive recursive (see, for instance, [BJ80]).

2.3 Language of arithmetic.

The first-order language of arithmetic consists of the constant , unary function symbol , and two binary function symbols , and ‘’. The structure

is over the domain of natural numbers with the standard interpretation of the constant as zero, as the successor function, as addition, and ‘’ as multiplication.

For every constant we define -numerals as terms of the form for some . Here and .

The class of diophantine semiformulas is composed from atomic semiformulas and by conjunctions. Here the terms , , and are either variables or -numerals.

By the theorem of Matiyasevich [Mat70] every recursively enumerable predicate can be represented by a diophantine semiformula with only the indicated variables free such that for every number

(2.3.1)

Although the predicate restricted to diophantine formulas is primitive recursive, the same predicate restricted to existentially closed diophantine semiformulas is only recursively enumerable.

3 Herbrand Skeletons

Herbrand’s theorem is the formal basis for ATP. For our purposes it is convenient to state it in terms of solvability of formulas.

3.1 Solvability of formulas.

Among the unlimited supply of constant symbols in the language of predicate calculus we single out the constants and call them unknowns. We use the metavariables to range over unknowns. Sequences of unknowns are denoted by with the same conventions as for sequences of variables.

We will indicate by writing that the unknowns occurring in the formula are among . For a sequence of terms of the same length we will write for the formula obtained by the simultaneous replacement in of unknowns by the respective terms in .

Terms (without unknowns) are called a solution of the formula if . A formula is solvable if it has a solution.

We mention some obvious facts about solvability. If is solvable then both and are. If and are solvable and they do not share unknowns then also is solvable. If or is solvable then also is. The converse does not hold even if the unknowns are not shared.

3.2 Herbrand’s theorem.

A formula of the form with quantifier-free and without unknowns is called existential formula. The semiformula is its matrice.

The first part of the theorem of Herbrand says that for every formula we can find an existential formula such that

This part can proved by the elimination of universal quantifiers from by means of Skolem functions (see, for instance, [Sho67]).

For an existential formula with the matrix we call any formula

(3.2.1)

a Herbrand skeleton of of size .

The second part of Herbrand’s theorem says that for an existential formula we have

We note that skeletons of the same size differ only in the names of unknowns. Hence, the solvability of any one of them implies the solvability of all skeletons of the same (and larger) size.

Herbrand skeletons are quantifier-free formulas. Thus the test whether a given sequence of terms is a solution to a given skeleton involves the primitive recursive test whether the formula obtained from the skeleton by the replacement of unknowns by the terms is a quasitautology.

We define the predicate as

iff is an existential formula with a solvable skeleton of size .

Hence, for an existential formula we have iff for some . For every number we define the predicate as

iff .

3.3 Solvability of Herbrand skeletons.

Predicate calculus is semi-decidable, i.e. the predicate is recursively enumerable but not recursive. By the first part of Herbrand’s theorem neither the restriction of to existential formulas is recursive. Hence, the equivalent predicate in :

for some

is not recursive although it is recursively enumerable.

The recursive enumerability of this predicate has two ‘degrees of freedom’ as it involves two guesses: first the number

and then the solution. It was hoped in ATP circles that the second guess was not needed and that there was an algorithm which would find a solution or would determine that a formula is unsolvable. In other words, it was hoped that the predicates were recursive. The main result of this paper is that this is not the case for any .

3.4 Example.

Consider an existential formula where and are different constants. We can solve its -skeleton

since

(3.4.1)

On the other hand, the -skeletons are not solvable.

3.5 Simultaneous rigid E-unification.

A simultaneous rigid -unification problem (SREU problem for short) is a problem of finding a solution of a formula which is a conjunction of -formulas of the form

(3.5.1)

We do not exclude in which case the above formula is just the identity . For we have a rigid E-unification problem.

It has been known for long that (non-simultaneous) rigid E-unification is decidable (see [GNPS88],[GNPS90]; for a more elementary proof see [Kog95]) while the decidability of SREU has been an open problem. It was recently settled negatively by Degtyarev and Voronkov [DV95a].

The reader will note that the problem of finding a solution of is equivalent to the problem of whether the existential formula has a solvable -skeleton. Thus the undecidability of SREU implies the undecidability of . However, the undecidability of for any , which is our main result given in Thm. 6.7, is not a direct consequence.

We will outline in Par. 3.6 a procedure, which is a matter of folklore in ATP circles. The procedure converts a Herbrand skeleton of size to a finite class of SREU problems such that the skeleton is solvable iff at least one SREU from the class is.

When all formulas of a SREU problem are identities, the problem becomes a (syntactical) unification problem. That this is decidable was already known to Herbrand [Her30]. Consequently, when an existential formula does not contain the identity then for any skeleton of size the conversion procedure yields a finite number of unification problems (i.e. in each of the problems). Hence, restricted to such existential formulas is decidable. This has been also known to Herbrand, see also [Bus95a, Bus95b].

3.6 Converting Herbrand skeletons to SREU problems.

In this paragraph we reduce in the following sense the problem of solvability of Herbrand skeletons to a class of SREU problems:

  • To every quantifier-free formula we can primitively recursively find a finite class of SREU problems which are solution equivalent in the sense that every solution to solves at least one problem from and vice versa, every solution of a problem from solves .

Let be a quantifier-free formula. The transformation consists of three steps.

(i): Transformation to conjunction of clauses.

We first convert into an equivalent conjunction of clauses . A clause is of a form

(3.6.1)

for atomic formulas . For the clause is called a Horn clause. We do not exclude the case when in which case (3.6.1) stands for or the case when in which case we put the formula for two new distinct constants in the consequent (body) of the clause.

We set and observe that and are solution equivalent.

(ii): Transformation to Horn clauses.

Assume that we are given a finite class of formulas which are conjunctions of clauses such that is solution equivalent to . If some formula has a form

with we replace the formula in by the set of formulas

for . We obtain a new class which is solution equivalent to . We repeat the process as long as contains non Horn-clauses.

(iii): Elimination of predicate symbols.

Assume that we are given a finite class of formulas which are conjunctions of Horn clauses such that is solution equivalent to . If some formula is not a SREU problem then one of the following cases must obtain:

  • The formula has a form

    and the predicate symbol does not occur in the antecedent of the clause. Then the formula is unsolvable as it can be always falsified in a suitable structure. We delete the formula from .

  • The formula has a form

    where and are distinct predicate symbols. Then we replace the formula in by the formula

  • The formula has a form

    Then we replace the formula in by two formulas

By the above changes we obtain a new class which is solution equivalent to . We repeat the process as long as contains formulas which are not SREU’s.

3.7 Example.

The above conversion is demonstrated with the formula

Here , , and are different constants. Note that the constant is a solution of its -skeleton . Converting the skeleton to a conjunction of clauses yields

Elimination of predicate symbols leads to four SREU problems:

(3.7.1)

Problem (3.7.1) is the only solvable one as it is solved by the constant .

4 Non-recursiveness of

4.1 Language of arithmetic formulas in predicate calculus.

We wish to simulate arithmetic by certain quantifier-free semiformulas of predicate calculus. The semiformulas will be in the language consisting of constants , , , , , of the unary function symbol , and of the binary function symbol ‘ ’. We write the binary symbol in the infix form where associates to the right, i.e. it is read as . The function symbol will simulate the successor function, while the function symbol ‘ ’ will play the role of a pairing function (cons of LISP).

We will define in Paragraphs 5.2, 5.7, and 5.16 quantifier-free semiformulas , , and of the language with all of their free variables indicated. The semiformulas simulate arithmetic in predicate calculus as can be seen from the following lemma which will be proved in Sect. 5.

4.2 Lemma ().

  • is solved exactly by -numerals,

  • is solvable iff ,

  • is solvable iff .

4.3 PC-arithmetic semiformulas.

We simulate arithmetic by certain quantifier-free semiformulas of the language where we use two disjoint sets of variables: called numeric variables, and called table variables. We will use and as metavariables ranging over numeric and table variables respectively. The semiformulas are built up from the semiformulas , , and by conjunctions. Here the terms , , and are either -numerals or numeric variables.

We associate with every diophantine semiformula a quantifier-free semiformula of called a PC-arithmetic semiformula. The class of PC-arithmetic semiformulas is denoted by . The association is defined inductively as follows:

  • is associated with any semiformula of the form

  • is associated with any semiformula of the form

  • a diophantine semiformula is associated with any semiformula of the form

    where and are associated with and respectively and the table variables and are disjoint.

It is easy to see that if the diophantine semiformula is associated with then both semiformulas contain the same numeric variables and every numeric variable of occurs in a semiformula .

4.4 Invariancy of association under substitution.

We will use the following fact:

if the diophantine semiformula is associated with then is associated with

which is easily proved by induction on .

For the proof of the undecidability of 1-skeletons in Thm. 4.9 we need some auxiliary propositions.

4.5 Lemma ().

If the diophantine formula is associated with then iff is solvable.

Proof.

By induction on . If is then has a form

The first three conjuncts are valid by Lemma 4.2(a) and the equivalence follows directly from Lemma 4.2(b). The case when is is similar and uses Lemma 4.2(c). If is then has a form where is partitioned into two disjoint sequences and . Hence, iff and iff, by inductive hypotheses, and are solvable iff, because of disjointness of unknowns, is solvable. ∎

4.6 Lemma ().

Let be a semiformula with all of its numeric variables indicated. If the formula is solvable then the terms are -numerals.

Proof.

We recall (Par. 4.3) that every term of is substituted for in some conjunct of . Thus if for some terms then for every term of we have and by Lemma 4.2(a), the terms are -numerals. ∎

4.7 Lemma ().

Let the diophantine semiformula with all of its variables indicated be associated with some . Then iff is solvable.

Proof.

The diophantine semiformula has the same set of numeric variables as . Thus iff for some -numerals iff, by Par. 4.4 and Lemma 4.5, is solvable for some -numerals iff, by Lemma 4.6 (in the direction ), is solvable. ∎

4.8 Theorem ().

To every recursively enumerable predicate there is a semiformula such that for all

(4.8.1)
Proof.

By the theorem of Matiyasevich there is a diophantine semiformula with all free variables indicated such that for every number

(4.8.2)

Take a semiformula associated to . Then holds iff, by (4.8.2), iff, by Par. 4.4 and Lemma 4.7, is solvable iff . ∎

4.9 Theorem ().

The predicate is not recursive.

Proof.

Take any recursively enumerable but not recursive predicate and obtain a semiformula from Thm. 4.8. We can clearly find a primitive recursive function such that

Then iff by 4.8(4.8.1). If the predicate were recursive so would be . ∎

5 Simulation of Arithmetic

In this section we will define the semiformulas Num, Add, and Mul simulating arithmetic in predicate calculus and prove Lemma 4.2. This will finish the proof of the undecidability of (Thm. 4.9). The section is rather technical in that all proofs are carried out in detail. We do this on purpose in order to demonstrate that the problem of Herbrand skeletons is a purely logical problem albeit with extremely important consequences for ATP. Hence, we feel that the solution should be expressed in the well-developed apparatus of predicate calculus (see for instance [Sho67]) without any detours through the terminology and techniques of ATP and/or term rewriting. We start with a lemma which is used in ATP and term rewriting more or less automatically although its proof requires non-trivial properties of predicate calculus.

5.1 Lemma ().

  1. For a semiformula with at most free, term , and constant occurring neither in nor in we have iff .

  2. iff .

Proof.

(a): We have iff, by the theorem on constants in [Sho67], iff, by the third corollary of the equality theorem in [Sho67], .

(b): Clearly, if then . For the reverse direction consider a structure with the domain consisting of all terms (which are a subset of natural numbers) and with the interpretation of function symbols such that . Clearly, for all terms. If then , i.e. , and so . ∎

5.2 Numerals.

Denote by the semiformula and by the semiformula .

5.3 Lemma ().

  • is solved exactly by -numerals,

  • is solved exactly by -numerals.

Proof.

We prove only the part (a) as the proof of (b) is similar. is proved by a straightforward induction on . Conversely, if the term is not a -numeral then it must be the case that for a function symbol different from and , some number , and terms . Consider a structure with the domain and the interpretation of function symbols such that , for all in the domain, and , for all other symbols and all in the domain. We clearly have , i.e. and also

Hence, . Thus . ∎

5.4 Proof of Lemma 4.2(a).

This is Lemma 5.3(a). ∎

5.5 Similar numerals.

Denote by the semiformula .

5.6 Lemma ().

iff .

Proof.

We have iff iff, by Lemma 5.1(a), iff, by Lemma 5.1(b), iff . ∎

5.7 Addition.

Denote by the semiformula and by the semiformula

5.8 Lemma ().

iff .

Proof.

iff iff, by Lemma 5.1(a), iff, by Lemma 5.1(b), iff . ∎

5.9 Proof of Lemma 4.2(b).

is solvable iff for some iff

for some iff, by Lemma 5.3(b),

for some iff, by Lemma 5.6, iff, by Lemma 5.8, . ∎

5.10 Tables.

Semiterms of the form

are semitables of length . Note that the term is a semitable of length . Closed instances of semitables are tables. Denote by the semiformula

and by the semiformula

5.11 Lemma ().

  1. is solved exactly by