1. Introduction
Background.
The study of propositional proof systems for certifying the unsatisfiability of quantifierfree propositional formulas is supported by multiple motivations [3, 15]. First, the desire to have an efficiently verifiable certificate of a formula’s unsatisfiability is a natural and basic one, and indeed the field of propositional proof complexity studies, for various proof systems, whether and when succinct proofs exist for unsatisfiable formulas. Next, theorem provers are typically based on such proof systems, and so insight into the behavior of proof systems can yield insight into the behavior of theorem provers. Also, algorithms that perform search to determine the satisfiability of formulas can typically be shown to implicitly generate proofs in a proof system, and thus lower bounds on proof size translate to lower bounds on the running time of such algorithms. Finally, algorithms that check for unsatisfiability proofs of various restricted forms have been shown to yield tractable cases of the propositional satisfiability problem and related problems (see for example [1, 2]).
In recent years, increasing attention has been directed towards the study of quantified proof systems that certify the falsity of quantified propositional formulas, which study is also pursued with the motivations similar to those outlined for the quantifierfree case. Indeed, the development of socalled QBF solvers, which determine the truth of quantified propositional formulas, has become an active research theme, and the study of quantified proof systems is pursued as a way to understand their behavior, as well as to explore the space of potential certificate formats for verifying their correctness on particular input instances [14].
Qresolution [4] is a quantified proof system that can be viewed as a quantified analog of resolution, one of the bestknown and most customarily considered propositional proof systems. In the context of quantified propositional logic, Qresolution is a heavily studied and basic proof system on which others are built and to which others are routinely compared, as well as a point of departure for the discussion of suitable certificate formats (see [11, 16, 12] for examples).
However, the Qresolution proof system has intrinsic shortcomings. First, it is only applicable to quantified propositional sentences that are in prenex form, that is, where all quantifiers appear in front. While it is certainly true that an arbitrary given quantified propositional formula may be efficiently prenexed, the process of prenexing is not canonical: intuitively, it involves choosing a total order of variables consistent with the partial order given by the input formula. As argued by Egly, Seidl, and Woltran [10], this may disrupt the original formula structure, “artificially extend” the scopes of quantifiers, and generate dependencies among variables that were not originally present, unnecessarily increasing the expense of solving; we refer the reader to their article for a contemporary discussion of this issue.^{1}^{1}1Let us remark that using socalled dependency schemes is a potential way to cope with such introduced dependencies in a prenex formula [16]. A second shortcoming of Qresolution is that it is only defined in the propositional setting, despite that some scenarios may be more naturally and cleanly modelled by allowing variables to be quantified over domains of size greater than two.
Contributions.
In this article, we introduce a proof system that directly overcomes both of the identified shortcomings of Qresolution and that, in a sense made precise, generalizes Qresolution.
We here define the quantified constraint satisfaction problem (QCSP) to be the problem of deciding, given a relational structure and a firstorder sentence (not necessarily in prenex form) built from the conjunction connective () and the two quantifiers (, ), whether or not the sentence is true on the structure. To permit different variables to have different domains, we formalize the QCSP using multisorted firstorder logic.
Our proof system (Section 3) allows for the certification of falsity of QCSP instances. While Qresolution provides rules for deriving clauses from a given quantified propositional formula, our proof system provides rules for deriving what we call constraints at various formula locations of a given QCSP instance; here, a constraint is a set of variables paired with a set of assignments, each defined on . A formula location paired with a constraint is called a judgement; a proof in our system is a sequence of judgements where each is derived from the previous ones via the rules.
Crucially, we formulate and prove a key lemma (Lemma 3) that shows (essentially) that if a judgement is derivable from a QCSP instance , then there exists a formula that “defines” the constraint over , such that can be conjoined to the input sentence at location while preserving logical equivalence. This key lemma is then swiftly deployed to establish soundness and completeness of our proof system (Theorem 3). We view the formulation of our proof system and of this key lemma as conceptual contributions. They offer a broader, deeper, and more general perspective on Qresolution and what it means for a clause to be derivable by Qresolution: we show (in a sense made precise) that each clause derivable by Qresolution is derivable by our proof system (see Theorem 4.2). This yields a clear and transparent proof of the soundness of Qresolution which, interestingly, is carried out in the setting of firstorder logic, despite the result concerning propositional logic.
In order to relate our proof system to Qresolution, we give a proof system for certain quantified propositional formulas (Section 4) and prove that this second proof system is a faithful propositional interpretation of our QCSP proof system (Theorem 4.1). We also provide an algorithmic interpretation of this second proof system. In particular, we give a nondeterministic search algorithm such that traces of execution that result in certifying falsity correspond to refutations in the proof system (Section 4.3). As a consequence, the proof system yields a basis for establishing runningtime lower bounds for any deterministic algorithm which instantiates the nondeterministic choices of our search algorithm.
In the final section of the article (Section 5), we present and study a notion of consistency for the QCSP that is naturally induced by our proof system. In the context of constraint satisfaction, a consistency notion is a condition which is necessary for the satisfiability of an instance and which can typically be efficiently checked. An example used in practice is arc consistency, and understanding when various forms of consistency provide an exact characterization of satisfiability (that is, when consistency is sufficient for satisfiability in addition to being necessary) has been a central theme in the tractability theory of constraint satisfaction [1, 2, 8]. Atserias, Kolaitis, and Vardi [1] showed that checking for consistency, an oftconsidered consistency notion, can be viewed as detecting the absence of a proof of unsatisfiability having width at most , in a natural proof system (the width of a proof is the maximum number of variables appearing in a line of the proof); Kolaitis and Vardi [13] also characterized consistency algebraically as whether or not Duplicator can win a natural SpoilerDuplicator pebble game in the spirit of EhrenfeuchtFraïssé games.
Inspired by these connections, we directly define a QCSP instance to be judgeconsistent if it has no unsatisfiability proof (in our proof system) of width at most ; and, we then present an algebraic, EhrenfeuchtFraïsséstyle characterization of judgeconsistency (Theorem 5). As an application of this algebraic characterization, we prove that (in a sense made precise) any case of the QCSP that lies in the tractable regime of a recent dichotomy theorem [7], is tractable via checking for judgeconsistency.^{2}^{2}2 Let us remark that this dichotomy theorem has since been generalized [5]. That is, within the framework considered by that dichotomy, if a class of QCSP instances is tractable at all, it is tractable via judge consistency. We remark that earlier work [6] presents algebraically a notion of consistency for the QCSP, but no corresponding proof system was explicitly presented; the notion of judgement consistency can be straightforwardly verified to imply the notion of consistency in this earlier article.
To sum up, this article presents a proof system for nonprenex quantified formulas. Our proof system is based on highly natural and simple rules, and its utility is witnessed by its connections to Qresolution and by our presentation of a consistency notion that it induces, which allows for the establishment of tractability results. We hope that this proof system will serve as a point of reference and foundation for the future study of solvers and certificates for nonprenex formulas. One particular possibility for future work is to compare this proof system to others that are defined on nonprenex formulas, such as those discussed and studied by Egly [9].
2. Preliminaries
When is a mapping, we use to denote its restriction to a set ; we use to denote the extension of that maps to . We extend this notation to sets of mappings in the natural fashion.
Firstorder logic.
We assume basic familiarity with the syntax and semantics of firstorder logic. For the sake of broad applicability, in this article, we work with multisorted relational firstorder logic, formalized here as follows. A signature is a pair where is a set of sorts and is a set of relation symbols; each relation symbol has an associated arity which is an element of . Each variable has an associated sort ; an atom is a formula where and . A structure on signature consists of an indexed family of sets, called the universe of , and, for each symbol , an interpretation . Here, for a word , we use to denote the product . Suppose that is a set of variables where each variable has an associated sort ; by a mapping , we mean a mapping that sends each to an element .
When is a formula, we use to denote the set containing the free variables of . The width of a formula is the maximum of over all subformulas of . A quantifiedconjunctive formula (for short, qcformula) is a formula over a signature built from atoms on the signature, conjunction (), and the two quantifiers (, ). Note that we permit conjunction of arbitrary arity. As expected, a qcsentence is a qcformula such that . We allow conjunction of arbitrary (finite) arity, in formulas. We will use to denote a sentence that is always true; this is considered to be a qcsentence. A relation is qcdefinable over a structure if there exists a qcformula such that and contains a tuple if and only if . Note that by the notation , we mean that the structure and the mapping taking each to satisfy . We sometimes use to indicate logical equivalence of two formulas.
We define the QCSP to be the problem of deciding, given a QCSP instance, which is a pair where is a qcsentence and is a structure that both have the same signature, whether or not .
3. QCSP proof system
In this section, we present our proof system for the QCSP, and establish some basic properties thereof, including soundness and completeness. Let be a QCSP instance, and conceive of as a tree. The proof system will allow us to derive what we call constraints at the various nodes of the tree. To facilitate the discussion, we will assume that each qcsentence has, associated with it, a set of indices that contains one index for each subformula occurrence of , that is, for each node of the tree corresponding for . Let us remark that (in general) the collection of constraints derivable at an occurrence of a subformula does not depend only on the subformula, but also on the subformula’s location in the full formula . When is an index, we use to denote the actual subformula of the subformula occurrence corresponding to ; we will also refer to as a location.
Example .
Consider the qcsentence . (See Figure 1.) When viewed as a tree, this formula has nodes. We may index them naturally according to the depthfirst search order: we could take the index set where , , , , and . ∎
We say that an index is a parent of an index , and also that is a child of , if, in viewing the formula as a tree, the root of the subformula occurrence of is the parent of the root of the subformula occurrence of . Note that, when this holds, the formula either is of the form where is a quantifier and is a variable, or is a conjunction where appears as a conjunct. As examples, with respect to the qcsentence and indexing in Example 3, index has two children, namely, and , and index has one parent, namely, .
Definition .
Let be a QCSP instance. A constraint (on ) is a pair where is a set of variables occurring in , and is a set of mappings from to . A judgement (on ) is a triple where and is a constraint with ; it is empty if .
Here, we use the convention that (relative to a QCSP instance) there is exactly one map defined on the empty set, so there are two constraints whose variable set is the empty set: the constraint , and the constraint where is the aforementioned map.
When , are two constraints on the same QCSP instance, we define the join of and , denoted by , to be the set
When is a constraint and is a variable in , we use to denote the set
The operator will be used to eliminate a universally quantified variable . Dually, in the following definition, projection can be used to cope with existential quantification.
Definition .
A judgement proof on is a finite sequence of judgements, each of which has one of the following types:
(atom)  where is an atom and 

(projection)  where is a previous judgement, and 
(join)  where and are previous judgements 
(upward flow)  where is a previous judgement and is the parent of 
(elimination)  where is a previous judgement with , , and is the parent of 
(downward flow)  where is a previous judgement and is the parent of 
We say that a judgement is derivable if there exists a judgement proof that contains the judgement.
The width of a judgement is . The width of a judgement proof is the maximum width over all of its judgements, and the length of a judgement proof is the number of judgements that it contains. ∎
Let us emphasize that, by definition, a judgement proof is a finite sequence of judgements, and by definition, in order for a triple to be a judgement, it must hold that all variables in are free variables of . Consequently, upward flow can only be applied to a judgement if all variables in are free variables of , where is the parent of ; an analogous comment holds for downward flow.
Example .
Let be the qcsentence from Example 3 (shown in Figure 1), considered as a sentence over signature with and where and . Define to be a structure over this signature having universe defined by and , and where . To offer a feel of the proof system, we give some examples of derivable judgements.
Let be the set of assignments from to that satisfy (over ). By (atom), we may derive the judgement . By (upward flow), we may then derive the judgement . By (elimination), we may then derive the judgement , where contains the single map that takes to . By applying (downward flow) twice, we may then derive the judgement . By (atom), we may also derive the judgement . By (projection), we may then derive the judgement , where contains the maps taking to , , and , respectively. Let us remark that, even though and we derived the judgement , it is not possible to derive the judgement . (This can be verified by Lemma 3, to be presented next, and the observation that .) ∎
We now prove soundness and completeness of our proof system; we first establish a lemma, which indicates what it means for a judgement to be derivable.
When is a qcformula with index set , and is a family of formulas, we use to denote the formula obtained from by replacing, at each location , the subformula by . Formally, we define by induction. When is an atom, we define . When , we define . When , we define . We define to be where is the root index of (that is, where is such that ).
Lemma .
Let be a QCSP instance. For every derivable judgement , there exists a qcformula such that

;

for each , it holds that if and only if ; and

for any family of formulas, it holds that entails (and hence that ). Here, denotes the formula where, at location , the subformula is replaced with .
Moreover, if one has a judgement proof of width at most , then each of the formulas produced for its judgements has .
Proof.
We consider the different types of judgements, and use the notation from Definition 3. In each case, the claim on the width is straightforwardly verified.
In the case of (atom), we take ; the formulas and are logically equivalent since .
In the case of (projection), by induction, we have that entails where is the formula for the judgement . We take , where is a listing of the elements in . We have that entails , and hence by transitivity of the entailment relation that entails .
In the case of (join), by induction, we have (for any family ) that entails both and where and are the formulas corresponding to the judgements and . We take . Fix a family , and define to be the family that has , and is everywhere else equal to . We have that entails , and that entails . It follows that entails .
In the case of (elimination), by induction, we have that entails , where is the formula for the judgement . We take . We claim that the formula is logically equivalent to , which suffices to give that entails . This is because the subformula of at location is logically equivalent to which is logicically equivalent to .
In the cases of (upward flow) and (downward flow), we take to be equal to the formula that is given to us by the previous judgement. It is straightforwardly verified that and are logically equivalent. ∎
Theorem .
Let be a QCSP instance. An empty judgement on is derivable if and only if .
This theorem is proved in the following way. The forward direction follows immediately from the previous lemma. For the backward direction, we show by induction that, for each location , there exists a derivable judgement for which the formula given by the previous lemma is equal to !
Proof.
Suppose that an empty judgement is derivable. Then by invoking the (projection) rule, the empty judgement is derivable. Define so that is the true formula for each ; then, invoking Lemma 3, we have that there exists a qcformula that is false on (that is, ) and such that entails . We have that , and hence (since entails ) we have that .
Suppose that . We claim that for each location , there exists a derivable judgement where the corresponding formula , given by the proof of Lemma 3, is equal to . This suffices, as then the root location has a derivable judgement such that . We establish the claim by induction.
When is an atom, we use the judgement given by (atom) in the proof system (Definition 3). When is a conjunction, let and be the children of , so that . Let and be the derivable judgements given by induction. By (upward flow) in the proof system, we have that and are derivable judgements; by invoking (join), we obtain the desired judgement. When begins with existential quantification, let be the child of , and denote . Let be the derivable judgement given by induction; by applying the rule (projection) to obtain a constraint on and then the rule (upward flow), we obtain the desired derivation. When begins with universal quantification, let be the child of , and denote . Let be the derivable judgement given by induction; by the (elimination) rule, we obtain the desired derivation. ∎
4. Propositional proof system
In this section, we introduce a different proof system, which is a propositional interpretation of the QCSP proof system. For differentiation, we refer to judgements and judgement proofs as defined in the previous section as constraint judgements and constraint judgement proofs.
A literal is a propositional variable or the negation thereof. Two literals are complementary if one is a variable and the other is ; each is said to be the complement of the other. A clause is a disjunction of literals that contains, for each variable, at most one literal on the variable; a clause is sometimes viewed as the set of the literals that it contains. A clause is empty if it does not contain any literals. The variables of a clause are simply the variables that underlie the clause’s literals, and the set of variables of a clause is denoted by . A clause is a resolvent of two propositional clauses and if there exists a literal such that its complement is in , and . A clause is falsified by a propositional assignment if is defined on and each literal in evalutes to false under .
We define a QCBF instance to be a propositional formula not having free variables that is built from clauses, conjunction, and universal and existential quantification over propositional variables. As with QCSP instance, we assume that each QCBF instance has an associated index set that contains an index for each subformula of . Note that a clause is not considered to have any subformulas, other than itself. As an example, consider the QCBF instance . This formula would have indices: one for each of the two clauses, one for the conjunction of the two clauses, and one for each of the quantifiers.
Let be a QCBF instance. A clause judgement (on ) is a pair where and is a clause with ; a clause judgement is empty if is empty.
Definition .
A clause judgement proof on a QCBF instance is a finite sequence of clause judgements, each of which has one of the following types:
(clause)  where is the clause 

(resolve)  where and are previous clause judgements, and is a resolvent of and 
(upward flow)  where is a previous clause judgement and is the parent of 
(removal)  where is a previous clause judgement, , and is the parent of 
(downward flow)  where is a previous clause judgement and is the parent of 
We say that a clause judgement is derivable if there exists a clause judgement proof that contains the clause judgement. ∎
The width of a clause judgement is . The width of a clause judgement proof is the maximum width over all of its clause judgements; the length of a clause judgement proof is the number of judgements that it contains. In a clause judgement proof, we refer to judgements that are not derived by the rules (upward flow) and (downward flow) as nonflow judgements.
Let us emphasize that we allow resolution over both existential and universal variables, and the resolvent must be nontautological, because it must be a clause (for our definition of clause).
4.1. Relationship to the QCSP proof system
We now define the notion of a QCSP translation of a QCBF instance , which intuitively is a QCSP instance that behaves just like . When discussing QCSP translations, we will be concerned with structures that have just one sort with ; we slightly abuse notation and simply write .
Definition .
When is a QCBF instance, define a QCSP translation of to be a QCSP instance where is a onesorted structure with and where is obtainable from by replacing each clause having variables with an atom such that
we typically assume that and that each subformula of has the same index as the natural corresponding subformula of .
Note that when is a QCBF instance and is a QCSP translation thereof, it can be immediately verified, by induction, that for each index , an assignment to that is defined on satisfies if and only if it satisfies . In particular, we have that is true if and only if is true on .
We prove that our clause judgement proof system is a faithful interpretation of our QCSP proof system, as made precise by the following theorem.
Theorem .
Let be a QCBF instance and let be a QCSP translation of . For each clause judgement that is derivable from , there exists a constraint judgement derivable from such that the unique that does not satisfy is not in . The other way around, for each constraint judgement that is derivable from , and for each mapping with , there exists a clause judgement derivable from where and does not satisfy . Consequently, an empty clause judgement is derivable from if and only if an empty constraint judgement is derivable from .
The proof of this theorem is provided in Section A.
4.2. Simulation of Qresolution
We now show that our clause judgement proof system simulates Qresolution [4], as made precise by the following theorem.
Theorem .
Let be a QCBF instance in prenex form, whose quantifierfree part is a conjunction of clauses with index . If a clause is derivable from by Qresolution, then the clause judgement is derivable from by the clause judgement proof system.
Proof.
It is straightforwardly verified that each clause derivable by Qresolution from is contained in the smallest set of clauses satisfying the following recursive definition:

Each clause appearing in is in .

is closed under taking resolvents.

If and is universally quantified and is the first variable in to be quantified on the unique path from to the root of , then is in .
It suffices to show, then, that for each , the clause judgement is derivable. We consider the three types of clauses according to the justgiven recursive definition. For each clause appearing in , the clause judgement is derivable by applying the (clause) rule at the location of , followed by one application of the (upward flow) rule. For a clause that is a resolvent of two other clauses, one can simply apply the (resolve) rule. Finally, suppose that is derivable and that satisfies the described condition. We need to show that is derivable. Let be the first location where is quantified when walking from to the root, and let be the set of nodes appearing on the unique path from to the child of (inclusive). By the definition of , no variable in is quantified at a location in and for each ; hence, (upward flow) can be applied repeatedly to derive for each . By applying (removal) at the child of , we obtain ; then, (downward flow) can be applied repeatedly to derive . ∎
4.3. Algorithmic interpretation
We define the following notions relative to a QCBF instance . We view as a rooted tree. When , we write if is an ancestor of , that is, if occurs on the unique path from to the root; we write if and . We define a located variable to be a pair where is an index, and is a variable that is quantified at location ; this pair is a located variable if is universally quantified at location . We say that index follows a located variable if and for each index with , it holds that . We say that a located variable follows a located variable if follows . We say that an index or a located variable follows a set of located variables if follows each located variable in . A set of located variables is coherent if for any two distinct elements , one follows the other (that is, either follows or follows ). When is a set of located variables, we use to denote the set of variables occurring in the located variables in . Observe that when a set of located variables is coherent, no variable occurs in two distinct located variables in , and so .
We now present a nondeterministic, recursive algorithm that, in a sense to be made precise, corresponds to the proof system. At each point in time, the algorithm maintains a set of coherent variables; actions it may perform include branching on a located variable such that adding to is still coherent, and, nondeterministically setting a located variable that follows . The algorithm returns either the false value or the indeterminate value . On these two values, we define the operation by and . Intuitively speaking, the algorithm returns the indeterminate value when a nondeterministically selected action cannot be carried out. We assume that when the algorithm is first invoked on a given QCBF instance, the set is initially assigned to the empty set.
Algorithm Detect_Falsity( QCBF instance \(\psi\), coherent set \(S\), assignment \(a:\mathsf{vars}(S)\to\{0,1\}\)) { Select nondeterministically and perform one of the following: (falsify) check if there exists a location \(i\) following \(S\) such that \(\psi(i)\) is a clause falsified by \(a\) with \(\mathsf{vars}(\psi(i))=\mathsf{vars}(S)\); if so, return F, else return \(\bot\); (Qbranch) check if there exists a located variable \((i,u)\notin\hskip 0.1ptS\) such that \(S\cup\{(i,u)\}\) is coherent; if not, return \(\bot\), else:  nondeterministically select such a located variable \((i,u)\);  nondeterministically pick subsets \(S_{0},S_{1}\subseteq\hskip 0.1ptS\) with \(S_{0}\cup\hskip 0.1ptS_{1}=S\);  return DetectFalsity(\(\psi,S_{0}\cup\{(i,u)\},(a\upharpoonright\mathsf{vars}(S_{0}))[u\to 0]\)) \(\vee\) DetectFalsity(\(\psi,S_{1}\cup\{(i,u)\},(a\upharpoonright\mathsf{vars}(S_{1}))[u\to 1]\)) (\(\forall\)branch) check if there exists a \(\forall\)located variable \((i,y)\) that follows \(S\); if not, return \(\bot\), else:  nondeterministically select such a \(\forall\)located variable \((i,y)\);  nondeterministically pick a value \(b\in\{0,1\}\);  return DetectFalsity(\(\psi,S\cup\{(i,y)\},a[y\to\vspace{.1pt}b]\)) }
Relative to a clause judgement proof, we employ the following terminology. A clause judgement that is derived using a previous judgement is said to be a successor of ; also, is said to be a predecessor of . So, a clause judgement derived using the (clause) rule has predecessors, one derived using the (resolve) rule has predecessors, and one derived using one of the other rules has predecessor. We say that a clause judgement proof is treelike if each clause judgement has at most one successor; in this case, each clause judgement naturally induces a tree (defined recursively) where: each node is labelled with a clause judgement; the root is labelled with ; and, for each predecessor of the clause judgement , the root has a child which is the tree of the predecessor.
We formalize the notion of a trace of the nondeterministic algorithm. A trace of a QCBF instance is a rooted tree where:

each node has a label where is a coherent set of located variables and is an assignment;

each node has , , or children;

when a node has children and label , the labels of the two children could be generated by the (Qbranch) step from ;

when a node has child and label , the label of the child could be generated by the (branch) step from ;

when a node has children and label , the node has an associated index that follows and such that is a clause falsified by with .
We take it as evident that this notion of trace properly formalizes the recursion trees that the algorithm generates.
Let denote the unique assignment from to . We now show that, up to polynomialtime computable translations, treelike clause judgement proofs of an empty clause correspond precisely to traces having root label .
Theorem .
Let be a QCBF instance; let . There exists a treelike clause judgement proof (viewed as a tree) of an empty clause with nonflow judgements if and only if there exists a trace whose root has label and having nodes. Moreover, both implied translations (from proof to trace, and from trace to proof) can be computed in polynomial time.
The proof of this theorem is provided in Section B.
5. Algebraic characterization of judgeconsistency
We will assume that all structures under discussion in this section are finite, in that each structure’s universe is finite.
Definition .
Let . A QCSP instance is judgeconsistent if there does not exist a judgement proof of width less than or equal to that contains an empty judgement.
Definition .
Let be a QCSP instance, where is a qcformula with index set , and let . A constraint system provides, for each and each with , a nonempty set of maps from to satisfying the following four properties:

If is an atom with , then

If , then .

If is a child of and , then .

If is a child of , , is a subset of with and , and , then .
We show that the existence of a constraint system characterizes judge consistency.
Theorem .
Let be a QCSP instance. There exists a constraint system for the instance if and only if the instance is judgeconsistent.
A proof of this theorem can be found in Section C.
Theorem .
For each , there exists a polynomialtime algorithm that, given a QCSP instance , decides if the instance is judgeconsistent.
Proof.
We begin by describing the algorithm, which decides, given a QCSP instance , whether or not there exists a constraint system (this property is equivalent to judgeconsistency by Theorem 5). Throughout, and will always denote indices from .
For each and with , the algorithm initializes to be in the case that is an atom and , and otherwise initializes to be the set of all maps from to . The algorithm then iteratively performs the following rules (which parallel properties , , and in the definition of constraint system) until no changes can be made to :

When is an index and with , assign to the value and then assign to the value .

If is a child of , , and , assign to each of , the value .

If is a child of , , and is a set of variables with and , then assign to the value .
This algorithm runs in polynomial time: there are polynomially many pairs for which is initialized and used, and each contains (at most) polynomially many maps: when , the number of maps from to is polynomial. (Here, when we say polynomial, we mean as a function of the input length.) Applying the three given rules can be done in polynomial time; each time they are applied, the sets may only decrease in size. Hence, the process of repeatedly applying the three rules until no changes are possible terminates in polynomial time.
We now explain why the instance is judgeconsistent if and only if no set is empty, which suffices to give the theorem. It is straightforward to verify that, for any constraintsystem , the invariant is maintained by the algorithm. Hence, when the algorithm terminates, if any set is empty, then there does not exist a constraint system . It is also straightforward to verify that, when the algorithm terminates, the four properties in the definition of constraint system hold on . (As an example, consider property (). Suppose that is a child of and that . When the algorithm terminates, since the second rule can no longer be applied it must hold that .) Hence, if the algorithm terminates without any empty set , it holds that is a constraint system. ∎
We can upper bound the number of iterations that the algorithm performs on an instance in the following way. Let be the maximum number of free variables, over all subformulas of . For each index of , the algorithm maintains, for each with , a set of mappings from to . The size of such a set is at most . In each iteration, each such set of mappings can only have mappings deleted from it. The number of iterations is thus upper bounded by the number of mappings that can occur in such sets of mappings, which is .
We now show that checking for judgeconsistency gives a way to decide a set of prenex qcsentences that is tractable via the dichotomy theorem on socalled prefixed graphs [7]. In particular, we prove this in the setting where relation symbols have bounded arity. Let us refer to the width notion defined in that previous work [7] as elimination width. Define the Qwidth of a prenex qcsentence to be the maximum of its elimination width and (where this maximum ranges over all relation symbols appearing in ).
Theorem .
Let . Suppose that is a prenex qcsentence with Qwidth (or less). For any finite structure , it holds that is judgeconsistent if and only if . (Intuitively, this says that checking for judge consistency is a decision procedure for QCSP instances involving .)
This theorem, in conjunction with Theorem 5, immediately implies that for any set of qcsentences having Qwidth bounded by a constant , checking for judgeconsistency is a uniform polynomialtime procedure that decides any QCSP instance where and is finite. Hence, in the setting of bounded arity, checking for judgeconsistency is a generic reasoning procedure that correctly decides the tractable cases of QCSP identified by the work on elimination width.
In order to establish this theorem, we first prove a lemma.
Lemma .
Suppose that the QCSP instance is judgeconsistent, that is a finite structure, and that is a qcsentence obtained from by applying one of the following three syntactic transformations to a subformula of :

, where is the disjoint union of and

where

Then, the QCSP instance is judgeconsistent.
Proof.
By Theorem 5, it suffices to show that if has a constraint system , then does as well. We consider each of the three cases.
Case (1): We define a constraint system for in the following way. Relative to the transformation, let denote the index of in both and ; let denote the index of in and of in ; let be the index of in ; and let be the index of in . For each other subformula occurrence in , there is a corresponding subformula occurrence in ; we will assume that these two corresponding subformula occurrences share the same index.
We now describe how to define . Whenever discussing , it will hold that is an index of , and we assume that and . We define as . We define as . We define as , and similarly we define as . For each other index of , we define as . It is straightforward to verify that is a constraint system.
Case (2): We proceed as in the previous case; we define a constraint system for . Relative to the transformation, let denote the index of in ; let denote the index of the subformula in . We define as . For each other subformula occurrence of with index , there exists a corresponding subformula occurrence of which we assume to also have index . We define as . It is straightforward to verify that is a constraint system.
Case (3): We proceed as in the previous cases; we define a constraint system for . Let denote the index of in , and also the index of in . Let denote the index of in both and . Let denote the index of in , and let denote the index of in . For each with , define to be . Elsewhere, define to be equal to (each other index of corresponds to an index of ). It is straightforward to verify that is a constraint system. In the region of interest, the property can be verified as follows. Suppose that has and , and that . Then since is a constraint system. As by our definition of , it follows that . ∎
Proof.
(Theorem 5) Suppose that the instance is not judgeconsistent. Then, by definition, there exists a judgement proof for the instance containing an empty judgement, implying that by Theorem 3.
For the other direction, suppose that . From the definition of elimination width (defined as width in [7]), it can straightforwardly be verified by induction on the number of variables in that can be transformed to a sentence having width less than or equal to , via the three syntactic transformations of Lemma 5. As these three syntactic transformations preserve logical equivalence, we have . By Theorem 3, an empty judgement is derivable; by the proof of this theorem, there is a judgement proof with the empty judgement whose width is equal to the width of . Since the width of is less than or equal to , we thus obtain a judgement proof of the empty judgement having width less than or equal to , so by definition, is not judgeconsistent. By appeal to Lemma 5, is not judgeconsistent. ∎
Acknowledgements
The author thanks Moritz Müller and Friedrich Slivovsky for useful comments. This work was supported by the Spanish project TIN201346181C22R, by the Basque project GIU12/26, and by the Basque grant UFI11/45.
Appendix A Proof of Theorem 4.1
The theorem follows directly from the following two theorems.
Theorem .
Let be a QCBF instance and let be a QCSP translation of . For each clause judgement proof of having length and width , there exists a constraint judgement proof of having length and width
Comments
There are no comments yet.