The Boolean Solution Problemfrom the Perspective of Predicate Logic– Extended Version –

# The Boolean Solution Problem from the Perspective of Predicate Logic – Extended Version –

Christoph Wernhard
Technische Universität Dresden
###### Abstract

Finding solution values for unknowns in Boolean equations was a principal reasoning mode in the \nameAlgebra of Logic of the 19th century. Schröder investigated it as \nameAuflösungsproblem (\namesolution problem). It is closely related to the modern notion of Boolean unification. Today it is commonly presented in an algebraic setting, but seems potentially useful also in knowledge representation based on predicate logic. We show that it can be modeled on the basis of first-order logic extended by second-order quantification. A wealth of classical results transfers, foundations for algorithms unfold, and connections with second-order quantifier elimination and Craig interpolation show up. Although for first-order inputs the set of solutions is recursively enumerable, the development of constructive methods remains a challenge. We identify some cases that allow constructions, most of them based on Craig interpolation, and show a method to take vocabulary restrictions on solution components into account.

See pages 1-2 of title_boolean

Revision: October 27, 2017

\cftsetindents

section0em1.5em \cftsetindentssubsection1.5em2.3em

## 1 Introduction

Finding solution values for unknowns in Boolean equations was a principal reasoning mode in the \nameAlgebra of Logic of the 19th century. Schröder [schroeder:all] investigated it as \nameAuflösungsproblem (\namesolution problem). It is closely related to the modern notion of Boolean unification. For a given formula that contains unknowns formulas are sought such that after substituting the unknowns with them the given formula becomes valid or, dually, unsatisfiable. Of interest are also most general solutions, condensed representations of all solution substitutions. A central technique there is the \namemethod of successive eliminations, which traces back to Boole. Schröder investigated \namereproductive solutions as most general solutions, anticipating the concept of \namemost general unifier. A comprehensive modern formalization based on this material, along with historic remarks, is presented by Rudeanu [rudeanu:74] in the framework of Boolean algebra. In automated reasoning variants of these techniques have been considered mainly in the late 80s and early 90s with the motivation to enrich Prolog and constraint processing by Boolean unification with respect to propositional formulas handled as terms [martin-nipkow:rings-early, buettner:simonis:87, martin-nipkow:rings-journal, martin:nipkov:boolean:89, kkr:90, kkr:95]. An early implementation based on [rudeanu:74] has been also described in [Sofronie89]. An implementation with BDDs of the algorithm from [buettner:simonis:87] is reported in [carlsson:boolean:91]. The -completeness of Boolean unification with constants was proven only later in [kkr:90, kkr:95] and seemingly independently in [baader:boolean:98]. Schröder’s results were developed further by Löwenheim [loewenheim:1908, loewenheim:1910]. A generalization of Boole’s method beyond propositional logic to relational monadic formulas has been presented by Behmann in the early 1950s [beh:50:aufloesungs:phil:1, beh:51:aufloesungs:phil:2]. Recently the complexity of Boolean unification in a predicate logic setting has been investigated for some formula classes, in particular for quantifier-free first-order formulas [eberhard]. A brief discussion of Boolean reasoning in comparison with predicate logic can be found in [brown:boolean:03].

Here we remodel the solution problem formally along with basic classical results and some new generalizations in the framework of first-order logic extended by second-order quantification. The main thesis of this work is that it is possible and useful to apply second-order quantification consequently throughout the formalization. What otherwise would require meta-level notation is then expressed just with formulas. As will be shown, classical results can be reproduced in this framework in a way such that applicability beyond propositional logic, possible algorithmic variations, as well as connections with second-order quantifier elimination and Craig interpolation become visible. Of course, methods to solve Boolean equations on first-order formulas do not necessarily terminate. However, the set of solutions is recursively enumerable. By the modeling in predicate logic we try to pin down the essential points of divergence from propositional logic. Special cases that allow solution construction are identified, most of them related to definiens computation by Craig interpolation. In addition, a way to express a generalization of the solution problem where vocabulary restrictions are taken into account in terms of two related solution problems is shown.

The envisaged application scenario is to let solving “solution problems”, or Boolean equation solving, on the basis of predicate logic join reasoning modes like second-order quantifier elimination (or “semantic forgetting”), Craig interpolation and abduction to support the mechanized reasoning about relationships between theories and the extraction or synthesis of subtheories with given properties. On the practical side, the aim is to relate it to reasoning techniques such as Craig interpolation on the basis of first-order provers, SAT and QBF solving, and second-order quantifier elimination based on resolution [scan] and the Ackermann approach [dls]. Numerous applications of Boolean equation solving in various fields are summarized in [rudeanu:01, Chap. 14]. Applications in automated theorem proving and proof compression are mentioned in [eberhard, Sect. 7]. The prevention of certain redundancies has been described as application of (concept) unification in description logics [baader:narendran:01]. Here the synthesis of definitional equivalences is sketched as an application.

The rest of the paper is structured as follows: Notation, in particular for substitution in formulas, is introduced in Sect. 2. In Sect. 3 a formalization of the solution problem is presented and related to different points of view. Section 4 is concerned with abstract properties of and algorithmic approaches to solution problems with several unknowns. Conditions under which solutions exist are discussed in Sect. 5. Adaptions of classical material on reproductive solutions are given in Sect. 6. In Sect. LABEL:sec-construction various techniques for solution construction in particular cases are discussed. The solution problem with vocabulary restrictions is discussed in Sect. LABEL:sec-vocab. The solution problem is displayed in Sect. LABEL:sec-herbrand as embedded in a setting with Skolemization and Herbrand expansion. Section LABEL:sec-conclusion closes the paper with concluding remarks.

The material in Sect. 25 has also been published as [cw:boolean:frocos].

## 2 Notation and Preliminaries

### 2.1 Notational Conventions

We consider formulas in first-order logic extended by second-order quantification upon predicates. They are constructed from atoms, constant operators , , the unary operator , binary operators and quantifiers with their usual meaning. Further binary operators , as well as -ary versions of and can be understood as meta-level notation. The operators and bind stronger than , and . The scope of , the quantifiers, and the -ary connectives is the immediate subformula to the right. A subformula occurrence has in a given formula \defnamepositive (negative) polarity if it is in the scope of an even (odd) number of negations.

A \defnamevocabulary is a set of \defnamesymbols, that is, predicate symbols (briefly \defnamepredicates), function symbols (briefly \defnamefunctions) and \defnameindividual symbols. (Individual symbols are not partitioned into variables and constants. Thus, an individual symbol is – like a predicate – considered as variable if and only if it is bound by a quantifier.) The arity of a predicate or function is denoted by . The set of symbols that occur \defnamefree in a formula  is denoted by . The property that no member of is bound by a quantifier occurrence in is expressed as . Symbols not present in the formulas and other items under discussion are called \defnamefresh. We write for \name entails ; for \name is valid; and for \name is equivalent to , that is, \name and .

We write \defnamesequences of symbols, of terms and of formulas by juxtaposition. Their length is assumed to be finite. The empty sequence is written . A sequence with length is not distinguished from its sole member. In contexts where a set is expected, a sequence stands for the set of its members. Atoms are written in the form , where is a sequence of terms whose length is the arity of the predicate . Atoms of the form , that is, with a nullary predicate , are written also as . For a sequence of \defnamefresh symbols we assume that its members are distinct. A sequence of predicates is said to \defnamematch another sequence if and only if and for all it holds that . If is a sequence of symbols, then stands for and for .

If is a sequence of formulas, then states for all and . If is a second sequence of formulas, then stands for \nameand …and .

As explained below, in certain contexts the individual symbols in the set play a special role. For example in the following shorthands for a predicate , a formula  and : stands for ; for ; for ; and for .

### 2.2 Substitution with Terms and Formulas

To express systematic substitution of individual symbols and predicates concisely we use the following notation:

• and – Notational Context for Substitution of Individual Symbols. Let be a sequence of distinct individual symbols. We write as to declare that for a sequence  of terms the expression denotes with, for , all free occurrences of replaced by .

• , and – Notational Context for Substitution of Predicates. Let be a sequence of distinct predicates and let be a formula. We write as to declare the following:

• For a sequence  of formulas the expression denotes with, for , each atom occurrence where is free in replaced by .

• For a sequence of predicates that matches the expression denotes with, for , each free occurrence of replaced by .

• The above notation , where is a sequence of formulas or of predicates, is generalized to allow also at the th position of , for example . The formula then denotes with only those predicates with that are not present at the th position in replaced by the th component of as described above (in the example only would be replaced).

• – Notational Context for Substitution in a Sequence of Formulas. If is a sequence of formulas, then declares that , where is a sequence with the same length as , is to be understood as the sequence with the meaning of the members as described above.

In the above notation for substitution of predicates by formulas the members of play a special role: can be alternatively considered as obtained by replacing predicates with -expressions followed by -conversion. The shorthand can be correspondingly considered as . The following property \namesubstitutible specifies preconditions for meaningful simultaneous substitution of formulas for predicates: {defn}[ – Substitutible Sequence of Formulas] A sequence of formulas is called \defnamesubstitutible for a sequence of distinct predicates \defnamein a formula , written , if and only if and for all it holds that {enumerateinline} \iteminline No free occurrence of in is in the scope of a quantifier occurrence that binds a member of ; \iteminline ; and \iteminline. The following propositions demonstrate the introduced notation for formula substitution. It is well known that terms can be “pulled out of” and “pushed in to” atoms, justified by the equivalences , which hold if no member of does occur in the terms . Analogously, substitutible subformulas can be “pulled out of” and “pushed in to” formulas: {prop}[Pulling-Out and Pushing-In of Subformulas] Let be a sequence of formulas, let be a sequence of distinct predicates and let be a formula such that . Then

\slab

prop-pullout

\slab

prop-fixing \nameAckermann’s Lemma [ackermann:35] can be applied in certain cases to \defnameeliminate second-order quantifiers, that is, to compute for a given second-order formula an equivalent first-order formula. It plays an important role in many modern methods for elimination and semantic forgetting – see, e.g., [dls, sqema, soqe, schmidt:2012:ackermann, ks:2013:frocos, ZhaoSchmidt15b]: {prop}[Ackermann’s Lemma, Positive Version] Let be formulas and let be a predicate such that , and all free occurrences of in have negative polarity. Then .

## 3 The Solution Problem from Different Angles

### 3.1 Basic Formal Modeling

Our formal modeling of the Boolean solution problem is based on two concepts, \namesolution problem and \nameparticular solution: {defn}[ – Solution Problem (SP), Unary Solution Problem (1-SP)] A \defnamesolution problem (SP) is a pair of a formula and a sequence  of distinct predicates. The members of are called the \nameunknowns of the SP. The length of is called the \defnamearity of the SP. A SP with arity is also called \defnameunary solution problem (1-SP). The notation for solution problems establishes as a “side effect” a context for specifying substitutions of in by formulas as specified in Sect. 2.2. {defn}[Particular Solution] A \defnameparticular solution (briefly \namesolution) \defnameof a SP is defined as a sequence of formulas such that and . The property in this definition implies that no member of occurs free in a solution. Of course, \nameparticular solution can also be defined on the basis of unsatisfiability instead of validity, justified by the equivalence of and . The variant based on validity has been chosen here because then the associated second-order quantifications are existential, matching the usual presentation of elimination techniques.

\name

Solution problem and \namesolution as defined here provide abstractions of computational problems in a technical sense that would be suitable, e.g., for complexity analysis. Problems in the latter sense can be obtained by fixing involved formula and predicate classes. The abstract notions are adequate to develop much of the material on the “Boolean solution problem” shown here. On occasion, however, we consider restrictions, in particular to propositional and to first-order formulas, as well as to nullary predicates. As shown in Sect. 6, further variants of \namesolution, general representations of several particular solutions, can be introduced on the basis of the notions defined here.

{examp}

[A Solution Problem and its Particular Solutions] As an example of a solution problem consider where

 F=∀x(a(x)\impb(x))\imp(∀x(p1(x)\impp2(x))∧∀x(a(x)\impp2(x))∧∀x(p2(x)\impb(x))).

The intuition is that the antecedent specifies the “background theory”, and w.r.t. that theory the unknown is “stronger” than the other unknown , which is also “between” and . Examples of solutions are: ; ; ; ; and . No solutions are for example ; ; and all members of . Assuming a countable vocabulary, the set of valid first-order formulas is recursively enumerable. It follows that for an -ary SP where is first-order the set of those of its particular solutions that are sequences of first-order formulas is also recursively enumerable: An -ary sequence of well-formed first-order formulas that satisfies the syntactic restriction is a solution of if and only if is valid.

In the following subsections further views on the solution problem will be discussed: as unification or equation solving, as a special case of second-order quantifier elimination, and as related to determining definientia and interpolants.

### 3.2 View as Unification

Because if and only if , a particular solution of can be seen as a unifier of the two formulas and modulo logical equivalence as equational theory. From the perspective of unification the two formulas appear as terms, the members of play the role of variables and the other predicates play the role of constants.

Vice versa, a unifier of two formulas can be seen as a particular solution, justified by the equivalence of and , which holds for sequences and of formulas and predicates, respectively, and formulas , such that and . This view of formula unification can be generalized to sets with a finite cardinality of equivalences, since \namefor all it holds that can be expressed as .

An exact correspondence between solving a solution problem where is a propositional formula with as logic operators and E-unification with constants in the theory of Boolean algebra (with the mentioned logic operators as signature) applied to can be established: Unknowns correspond to variables and propositional atoms in correspond to constants. A particular solution corresponds to a unifier that is a ground substitution. The restriction to ground substitutions is due to the requirement that unknowns do not occur in solutions. General solutions Sect. 6 are expressed with further special parameter atoms, different from the unknowns. These correspond to fresh variables in unifiers.

A generalization of Boolean unification to predicate logic with various specific problems characterized by the involved formula classes has been investigated in [eberhard]. The material presented here is largely orthogonal to that work, but a technique from [eberhard] has been adapted to more general cases in Sect. LABEL:sec-ehw.

### 3.3 View as Construction of Elimination Witnesses

Another view on the solution problem is related to eliminating second-order quantifiers by replacing the quantified predicates with “witness formulas”. {defn}[ELIM-Witness] Let be a sequence of distinct predicates. An \defnameELIM-witness of \defnamein a formula is defined as a sequence of formulas such that and . The condition in this definition is equivalent to . If and the considered are first-order, then finding an ELIM-witness is second-order quantifier elimination on a first-order argument formula, restricted by the condition that the result is of the form . Differently from the general case of second-order quantifier elimination on first-order arguments, the set of formulas for which elimination succeeds and, for a given formula, the set of its elimination results, are then recursively enumerable. Some well-known elimination methods yield ELIM-witnesses, for example rewriting a formula that matches the left side of Ackermann’s Lemma (Prop. 2.2) with its right side, which becomes evident when considering that the right side is equivalent to . Finding particular solutions and finding ELIM-witnesses can be expressed in terms of each other: {prop}[Solutions and ELIM-Witnesses] Let be SP and let be a sequence of formulas. Then:

\slab

prop-wit-ito-sol is an ELIM-witness of in if and only if is a solution of the SP , where is a sequence of fresh predicates matching .

\slab

prop-sol-ito-wit is a solution of if and only if is an ELIM-witness of in and it holds that .

###### Proof (Sketch)

Assume . (LABEL:prop-wit-ito-sol) Follows since iff iff iff . (LABEL:prop-sol-ito-wit) Left-To-Right: Follows since implies and , which implies . Right-to-left: Follows since and together imply . ∎

### 3.4 View as Related to Definientia and Interpolants

The following proposition shows a further view on the solution problem that relates it to definitions of the unknown predicates: {prop}[Solution as Entailed by a Definition] A sequence of formulas is a particular solution of a SP if and only if and .

###### Proof

Follows from the definition of \nameparticular solution and Prop. LABEL:prop-pullout. ∎

In the special case where is a 1-SP with a nullary unknown , the characterization of a solution  according to Prop. 3.4 can be expressed with an entailment where a definition of the unknown  appears on the right instead of the left side: If is nullary, then . Thus, the statement is for nullary  equivalent to

 ¬F\entailsp⇔¬G. (i)

The second condition of the characterization of \namesolution according to Prop. 3.4, that is, , holds if it is assumed that is not in , that and that no member of is bound by a quantifier occurrence in . A solution is then characterized as negated definiens of in the negation of . Another way to express (i) along with the condition that is semantically independent from is as follows:

 ∃p(¬F∧¬p)\entailsG\entails¬∃p(¬F∧p). (ii)

The second-order quantifiers upon the nullary  can be eliminated, yielding the following equivalent statement:

 ¬F[\false]\entailsG\entailsF[\true]. (iii)

Solutions  then appear as the formulas in a range, between and . This view is reflected in [rudeanu:74, Thm. 2.2], which goes back to work by Schröder. If is first-order, then Craig interpolation can be applied to compute formulas  that also meet the requirements and to ensure . Further connections to Craig interpolation are discussed in Sect. LABEL:sec-construction.

## 4 The Method of Successive Eliminations – Abstracted

### 4.1 Reducing n-ary to 1-ary Solution Problems

The \namemethod of successive eliminations to solve an -ary solution problem by reducing it to unary solution problems is attributed to Boole and has been formally described in a modern algebraic setting in [rudeanu:74, Chapter 2, § 4]. It has been rediscovered in the context of Boolean unification in the late 1980s, notably with [buettner:simonis:87]. Rudeanu notes in [rudeanu:74, p. 72] that variants described by several authors in the 19th century are discussed by Schröder [schroeder:all, vol. 1, §§ 26,27]. To research and compare all variants up to now seems to be a major undertaking on its own. Our aim is here to provide a foundation to derive and analyze related methods. The following proposition formally states the core property underlying the method in a way that, compared to the Boolean algebra version in [rudeanu:74, Chapter 2, § 4], is more abstract in several aspects: Second-order quantification upon predicates that represent unknowns plays the role of meta-level shorthands that encode expansions; no commitment to a particular formula class is made, thus the proposition applies to second-order formulas with first-order and propositional formulas as special cases; it is not specified how solutions of the arising unary solution problems are constructed; and it is not specified how intermediate second-order formulas (that occur also for inputs without second-order quantifiers) are handled. The algorithm descriptions in the following subsections show different possibilities to instantiate these abstracted aspects. {prop}[Characterization of Solution Underlying the Method of Successive Eliminations] Let be a SP and let be a sequence of formulas. Then the following statements are equivalent:

{enumequi}

is a solution of .

For : is a solution of the 1-SP

 (∃pi+1…∃pnF[G1…Gi−1pi…pn])[pi]

such that .

###### Proof

Left-to-right: From 4.1 it follows that . Hence, for all by Prop. LABEL:prop-fixing it follows that

 \valid∃pi+1…∃pnF[G1…Gipi+1…pn].

From 4.1 it also follows that . This implies that for all it holds that

 \fSUBST(Gi,pi,∃pi+1…∃pnF[G1…Gi−1pi…pn]) and \ffree(Gi)∩p=∅.

We thus have derived for all the two properties that characterize as a solution of the 1-SP as stated in 4.1.

Right-to-left: From 4.1 it follows that is a solution of the 1-SP

 (F[G1…Gn−1pn])[pn].

Hence, by the characteristics of \namesolution it follows that . The property can be derived from and the fact that for all it holds that . The properties and characterize as a solution of the SP . ∎

This proposition states an equivalence between the solutions of an -ary SP and the solutions of 1-SPs. These 1-SPs are on formulas with an existential second-order prefix. The following gives an example of this decomposition: {examp}[Reducing an -ary Solution Problem to Unary Solution Problems] Consider the SP of Examp. 3.1. The 1-SP with unknown  according to Prop. 4.1 is

 (∃p2F[p1p2])[p1],

whose formula is, by second-order quantifier elimination, equivalent to . Take as solution of that 1-SP. The 1-SP with unknown according to Prop. 4.1 is

 (F[G1p2])[p2].

Its formula is then, by replacing in as specified in Examp. 3.1 with and removing the duplicate conjunct obtained then, equivalent to

 ∀x(a(x)\impb(x))\imp(∀x(a(x)\impp2(x))∧∀x(p2(x)\impb(x))).

A solution of that second 1-SP is, for example, , yielding the pair as solution of the originally considered SP .

### 4.2 Solving on the Basis of Second-Order Formulas

The following algorithm to compute particular solutions is an immediate transfer of Prop. 4.1. Actually, it is more an “algorithm template”, since it is parameterized with a method to compute 1-SPs and covers a nondeterministic as well as a deterministic variant: {algo}[] Let be a class of formulas and let be a nondeterministic or a deterministic algorithm that outputs for 1-SPs of the form with solutions such that and .

Input: A SP , where , that has a solution.

Method: For to do: Assign to an output of applied to the 1-SP

Output: The sequence of formulas, which is a particular solution of . The solution components are successively assigned to some solution of the 1-SP given in Prop. 4.1, on the basis of the previously assigned components . Even if the formula of the input problem does not involve second-order quantification, these 1-SPs are on second-order formulas with an existential prefix upon the yet “unprocessed” unknowns.

The algorithm comes in a nondeterministic and a deterministic variant, just depending on whether is instantiated by a nondeterministic or a deterministic algorithm. Thus, in the nondeterministic variant the nondeterminism of is the only source of nondeterminism. With Prop. 4.1 it can be verified that if a nondeterministic is “complete” in the sense that for each solution there is an execution path that leads to the output of that solution, then also based on it enjoys that property, with respect to the -ary solutions .

For the deterministic variant, from Prop. 4.1 it follows that if is “complete” in the sense that it outputs some solution whenever a solution exists, then, given that has a solution, which is ensured by the specification of the input, also outputs some solution .

This method applies to existential second-order formulas, which prompts some issues for future research: As indicated in Sect. 3.4 (and elaborated in Sect. LABEL:sec-construction) Craig interpolation can in certain cases be applied to compute solutions of 1-SPs. Can QBF solvers, perhaps those that encode QBF into predicate logic [qbf:pl], be utilized to compute Craig interpolants? Can it be useful to allow second-order quantifiers in solution formulas because they make these smaller and can be passed between different calls to ?

As shown in Sect. 6, if is a method that outputs so-called \namereproductive solutions, that is, most general solutions that represent all particular solutions, then also outputs reproductive solutions. Thus, there are two ways to obtain representations of all particular solutions whose comparison might be potentially interesting: A deterministic method that outputs a single reproductive solution and the nondeterministic method with an execution path to each particular solution.

### 4.3 Solving with the Method of Successive Eliminations

The \namemethod of successive eliminations in a narrower sense is applied in a Boolean algebra setting that corresponds to propositional logic and outputs reproductive solutions. The consideration of reproductive solutions belongs to the classical material on Boolean reasoning [schroeder:all, loewenheim:1910, rudeanu:74] and is modeled in the present framework in Sect. 6. Compared to , the method handles the second-order quantification by eliminating quantifiers one-by-one, inside-out, with a specific method and applies a specific method to solve 1-SPs, which actually yields reproductive solutions. These incorporated methods apply to propositional input formulas (and to first-order input formulas if the unknowns are nullary). Second-order quantifiers are eliminated by rewriting with the equivalence . As solution of an 1-SP the formula is taken, where is a fresh nullary predicate that is considered specially. The intuition is that particular solutions are obtained by replacing  with arbitrary formulas in which does not occur (see Sect. 6 for a more in-depth discussion).

The following algorithm is an iterative presentation of the \namemethod of successive eliminations, also called \nameBoole’s method, in the variant due to [buettner:simonis:87]. The presentation in [martin:nipkov:boolean:89, Sect. 3.1], where apparently minor corrections compared to [buettner:simonis:87] have been made, has been taken here as technical basis. We stay in the validity-based setting, whereas [rudeanu:74, buettner:simonis:87, martin:nipkov:boolean:89] use the unsatisfiability-based setting. Also differently from [buettner:simonis:87, martin:nipkov:boolean:89] we do not make use of the \namexor operator. {algo}[]

Input: A SP , where is propositional, that has a solution and a sequence of fresh nullary predicates.

Method:

1. Initialize with .

2. For to do: Assign to the formula .

3. For to do: Assign to the formula

Output: The sequence of formulas, which is a reproductive solution of with respect to the special predicates . The formula assigned to in step (2.) is the result of eliminating in and the formula assigned to in step (3.) is the reproductive solution of the 1-SP , obtained with the respective incorporated methods indicated above. The recursion in the presentations of [buettner:simonis:87, martin:nipkov:boolean:89] is translated here into two iterations that proceed in opposite directions: First, existential quantifiers of are eliminated inside-out and the intermediate results, which do not involve second-order quantifiers, are stored. Solutions of 1-SPs are computed in the second phase on the basis of the stored formulas.

In this presentation it is easy to identify two “hooks” where it is possible to plug-in alternate methods that produce other outputs or apply to further formula classes: In step (2.) the elimination method and in step (3.) the method to determine solutions of 1-SPs. If the plugged-in method to compute 1-SPs outputs particular solutions, then computes particular instead of reproductive solutions.

### 4.4 Solving by Inside-Out Witness Construction

Like , the following algorithm eliminates second-order quantifiers one-by-one, inside-out, avoiding intermediate formulas with existential second-order prefixes of length greater than , which arise with . In contrast to , it performs elimination by the computation of ELIM-witnesses. {algo}[] Let be a class of formulas and be an algorithm that computes for formulas and predicates an ELIM-witness  of in such that .

Input: A SP , where , that has a solution.

Method: For to do:

1. Assign to the output of applied to

 ∃piF[p1…piGi+1…Gn].
2. For to do: Re-assign to the formula .

Output: : The sequence of formulas, which provides a particular solution of . Step (2.) in the algorithm expresses that a new value is assigned to and that can be designated by , justified because the new value does not contain free occurrences of . In step (1.) the respective current values of are used to instantiate . It is not hard to see from the specification of the algorithm that for input and output it holds that and that . By Prop. LABEL:prop-sol-ito-wit, is then a solution if . This holds indeed if has a solution, as shown below with Prop. 5.1.

If is “complete” in the sense that it computes an elimination witness for all input formulas in , then outputs a solution. Whether all solutions of the input SP can be obtained as outputs for different execution paths of a nondeterministic version of obtained through a nondeterministic , in analogy to the nondeterministic variant of , appears to be an open problem.

## 5 Existence of Solutions

### 5.1 Conditions for the Existence of Solutions

We now turn to the question under which conditions there exists a solution of a given SP, or, in the terminology of [rudeanu:74], the SP is \nameconsistent. A necessary condition is easy to see: {prop}[Necessary Condition for the Existence of a Solution] If a SP has a solution, then it holds that .

###### Proof

Follows from the definition of \nameparticular solution and Prop. LABEL:prop-fixing. ∎

Under certain presumptions that hold for propositional logic this condition is also sufficient. To express these abstractly we use the following concept:

{defn}

[SOL-Witnessed Formula Class] A formula class is called \defnameSOL-switnessed for a predicate class if and only if for all and the following statements are equivalent: {enumequi}

.

There exists a solution of the 1-SP such that . Since the right-to-left direction of that equivalence holds in general, the left-to-right direction alone would provide an alternate characterization. The class of propositional formulas is SOL-witnessed (for the class of nullary predicates). This follows since in propositional logic it holds that

 ∃pF[p]≡F[F[\true]], (iv)

which can be derived in the following steps: .

The following definition adds closedness under existential second-order quantification and dropping of void second-order quantification to the notion of \nameSOL-witnessed, to allow the application on 1-SPs matching with item (b) in Prop. 4.1: {defn}[MSE-SOL-Witnessed Formula Class] A formula class is called \defnameMSE-SOL-witnessed for a predicate class if and only if it is SOL-witnessed for , for all predicates in and it holds that , and, if and , then . The class of existential QBFs (formulas of the form where is propositional) is MSE-SOL-witnessed (like the more general class of QBFs – second-order formulas with only nullary predicates). Another example is the class of first-order formulas extended by second-order quantification upon nullary predicates, which is MSE-SOL-witnessed for the class of nullary predicates. The following proposition can be seen as expressing an invariant of the method of successive eliminations that holds for formulas in an MSE-SOL-witnessed class: {prop}[Solution Existence Lemma] Let be a formula class that is MSE-SOL-witnessed for predicate class . Let with . If , then for all there exists a sequence of formulas such that , , and .

###### Proof

By induction on the length of the sequence . The conclusion of the proposition holds for the base case : The statement holds trivially, is given as precondition, and follows from . For the induction step, assume that the conclusion of the proposition holds for some . That is, there exists a sequence of formulas such that , , and . Since is MSE-SOL-witnessed for and it follows that there exists a solution of the 1-SP

 (∃p1…∃pi∃pi+2…∃pnF[G1…Gipi+1…pn])[pi+1]

such that . From the characteristics of \namesolution it follows that

 \fSUBST(Gi+1,pi+1,∃p1…∃pi∃pi+2…∃pnF[G1…Gipi+1…pn]),

which implies (since all members of with exception of are in the quantifier prefix of the problem formula) that , hence

 \ffree(G1…Gi+1)∩p=∅.

Given the induction hypothesis , it also implies

 \fSUBST(G1…Gi+1,p1…pi+1,F).

From the characteristics of \namesolution it follows in addition that

 \valid∃p1…∃pi∃pi+2…∃pnF[G1…Gi+1pi+2…pn],

which, since , is equivalent to

 \valid∃pi+2…∃pnF[G1…Gi+1pi+2…pn].

Finally, we conclude from , established above, and the definition of \nameMSE-SOL-witnessed that

 ∃pi+2…∃pnF[G1…Gi+1pi+2…pn]∈F,

which completes the proof of the induction step. ∎

A sufficient and necessary condition for the existence of a solution of formulas in MSE-SOL-witnessed classes now follows from Prop. 5.1 and Prop. 5.1: {prop}[Existence of a Solution] Let be a formula class that is MSE-SOL-witnessed on predicate class . Then for all where the members of are in the following statements are equivalent: {enumequi}

.

There exists a solution of the SP such that .

###### Proof

Follows from Prop. 5.1 and Prop. 5.1. ∎

From that proposition it is easy to see that for SPs with propositional formulas the complexity of determining the existence of a solution is the same as the complexity of deciding validity of existential QBFs, as proven in [kkr:90, kkr:95, baader:boolean:98], that is, -completeness: By Prop. 5.1, an SP where is propositional has a solution if and only if the existential QBF is valid and, vice versa, an arbitrary existential QBF (where is quantifier-free) is valid if and only if the SP has a solution.

### 5.2 Characterization of SOL-Witnessed in Terms of ELIM-Witness

The following proposition shows that under a minor syntactic precondition on formula classes, \nameSOL-witnessed can also be characterized in terms of \nameELIM-witness instead of \namesolution as in Def. 5.1: {prop}[SOL-Witnessed in Terms of ELIM-Witness] Let be a class of formulas that satisfies the following properties: For all and predicates with the same arity of it holds that , and for all it holds that . The class is SOL-witnessed for a predicate class if and only if for all and there exists an ELIM-witness of in such that .

###### Proof

Left-to-right: Assume that is meets the specified closedness conditions and is SOL-witnessed for , and . Let be a fresh predicate with the arity of . The obviously true statement is equivalent to and thus to By the closedness properties of it holds that . Since is SOL-witnessed for it thus follows from Def. 5.1 that there exists a solution of the SP such that , and, by the closedness properties, also . From the definition of \namesolution it follows that , which is equivalent to , and also that , which implies . Thus is an SO-witness of in such that . Right-to-left: Easy to see from Prop. LABEL:prop-sol-ito-wit. ∎

### 5.3 The Elimination Result as Precondition of Solution Existence

Proposition 5.1 makes an interesting relationship between the existence of a solution and second-order quantifier elimination apparent that has been pointed out by Schröder [schroeder:all, vol. 1, § 21] and Behmann [beh:50:aufloesungs:phil:1], and is briefly reflected in [rudeanu:74, p. 62]: The formula is valid if and only if the result of eliminating the existential second-order prefix (called \nameResultante by Schröder [schroeder:all, vol. 1, § 21]) is valid. If it is not valid, then, by Prop. 5.1, the SP has no solution, however, in that case the elimination result represents the unique (modulo equivalence) weakest precondition under which the SP would have a solution. The following proposition shows a way to make this precise: {prop}[The Elimination Result is the Unique Weakest Precondition of Solution Existence] Let be a formula class and let be a predicate class such that is MSE-SOL-witnessed on . Let be a solution problem where and all members of are in . Let be a formula such that , , and no member of does occur in . Then

\slab

prop-wps-one The SP has a solution.

\slab

prop-wps-mid If is a formula such that , no member of occurs in , and the SP has a solution, then .

###### Proof

(LABEL:prop-wps-one) From the specification of it follows that and thus . Hence, by Prop. 5.1, the SP has a solution. (LABEL:prop-wps-mid) Let be a formula such that the left side of holds. With Prop. 5.1 it follows that . Hence . Hence . ∎

The following example illustrates Prop. 5.3: {examp}[Elimination Result as Precondition for Solvability] Consider the SP where

 F=∀x(p1(x