This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Π2P\Pi_{2}^{P} vs PSpace Dichotomy for the Quantified Constraint Satisfaction Problem

Dmitriy Zhuk The author is funded by the European Union (ERC, POCOCOP, 101071674). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Abstract

The Quantified Constraint Satisfaction Problem is the problem of evaluating a sentence with both quantifiers, over relations from some constraint language, with conjunction as the only connective. We show that for any constraint language on a finite domain the Quantified Constraint Satisfaction Problem is either in Π2P\Pi_{2}^{P}, or PSpace-complete. Additionally, we build a constraint language on a 6-element domain such that the Quantified Constraint Satisfaction Problem over this language is Π2P\Pi_{2}^{P}-complete.

1 Introduction

The Quantified Constraint Satisfaction Problem QCSP(Γ)\operatorname{QCSP}(\Gamma) is the generalization of the Constraint Satisfaction Problem CSP(Γ)\operatorname{CSP}(\Gamma) which, given the latter in its logical form, augments its native existential quantification with universal quantification. That is, QCSP(Γ)\operatorname{QCSP}(\Gamma) is the problem to evaluate a sentence of the form x1y1xnynΦ\forall x_{1}\exists y_{1}\ldots\forall x_{n}\exists y_{n}\ \Phi, where Φ\Phi is a conjunction of relations from the constraint language Γ\Gamma, all over the same finite domain AA. Since the resolution of the Feder-Vardi “Dichotomy” Conjecture, classifying the complexity of CSP(Γ)\operatorname{CSP}(\Gamma), for all finite Γ\Gamma, between P and NP-complete [7, 8, 17, 19], a desire has been building for a classification for QCSP(Γ)\operatorname{QCSP}(\Gamma). Indeed, since the classification of the Valued CSPs was reduced to that for CSPs [14], the QCSP remains the last of the older variants of the CSP to have been systematically studied but not classified. More recently, other interesting open classification questions have appeared such as that for Promise CSPs [5] and finitely-bounded, homogeneous infinite-domain CSPs [3].

1.1 Complexity of the QCSP

While CSP(Γ)\operatorname{CSP}(\Gamma) remains in NP for any finite Γ\Gamma, QCSP(Γ)\operatorname{QCSP}(\Gamma) can be PSpace-complete, as witnessed by Quantified 3-Satisfiability or Quantified Graph 3-Colouring (see [4]). It is well-known that the complexity classification for QCSPs embeds the classification for CSPs: if Γ+1\Gamma+1 is Γ\Gamma with the addition of a new isolated element not appearing in any relations, then CSP(Γ)\operatorname{CSP}(\Gamma) and QCSP(Γ+1)\operatorname{QCSP}(\Gamma+1) are polynomially equivalent. Thus, and similarly to the Valued CSPs, the CSP classification will play a part in the QCSP classification. For a long time the complexities P, NP-complete, and PSpace-complete were the only complexity classes that could be achieved by QCSP(Γ)\operatorname{QCSP}(\Gamma) [4, 10, 9, 12, 15]. Nevertheless, in [22, 23] a constraint language Γ\Gamma on a 3-element domain was discovered such that QCSP(Γ)\operatorname{QCSP}(\Gamma) is coNP-complete. Combining this language with an NP-complete language the authors also built a DP-complete constraint language on a 4-element domain and a Θ2P\Theta_{2}^{P}-complete language on a 10-element domain [22, 23]. Discovering these exotic complexity classes ruined hope to obtain a simple and complete classification of the complexity of the QCSP for all constraint languages on a finite domain. On the other hand, the possibility to express those complexity classes by fixing a constraint language makes the QCSP a powerful tool for studying complexity classes between P and PSpace. Finding a concrete border between complexity classes in terms of constraint languages may shed some light on the fundamental differences between them, and may bring us closer to understanding why P and PSpace are different (if they are).

The exotic complexity classes appeared only on domains of size at least 4, while on a domain of size 2 we have a complete classification between P and PSpace-complete, and on a domain of size 3 we have a partial classification between P, NP-complete, coNP-complete, and PSpace-complete.

Theorem 1 ([16]).

Suppose Γ\Gamma is a constraint language on {0,1}\{0,1\}. Then QCSP(Γ)\operatorname{QCSP}(\Gamma) is in P if CSP(Γ{x=0,x=1})\operatorname{CSP}(\Gamma\cup\{x=0,x=1\}) is in P, QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-complete otherwise.

Theorem 2 ([22, 23]).

Suppose Γ{x=aaA}\Gamma\supseteq\{x=a\mid a\in A\} is a constraint language on {0,1,2}\{0,1,2\}. Then QCSP(Γ)\operatorname{QCSP}(\Gamma) is either in P, or NP-complete, or coNP-complete, or PSpace-complete.

The statement proved in [22, 23] is stronger than Theorem 2 as the authors provide necessary and sufficient conditions for the QCSP(Γ)\operatorname{QCSP}(\Gamma) to be in each of these classes. Notice that for the QCSP we do not know a simple trick that allows us to find an equivalent constraint language with all constant relations {x=aaA}\{x=a\mid a\in A\} for a constraint language without. Recall that for the usual CSP we first consider the core of the language and then safely add all the constant relations to it [13, 6]. For the QCSP reducing the domain is not an option as the universal quantifier lives on the whole domain. That is why, Theorem 2, has been proved only for constraint languages with all constant relations, and a complete classification for all constraint languages on a 3-element domain is wide open.

1.2 Reduction to CSP

It is natural to try to reduce the QCSP to its older brother CSP. In fact, any QCSP instance y0x1y1xnynΨ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\;\Psi can be viewed as a CSP instance of an exponential size. If a QCSP-sentence holds, then there exists a winning strategy for the Existential Player (EP) defined by Skolem functions, i.e., yi=fi(x1,,xi)y_{i}=f_{i}(x_{1},\dots,x_{i}). We encode every value of fi(a1,,ai)f_{i}(a_{1},\dots,a_{i}) by a new variable yia1,,aiy_{i}^{a_{1},\dots,a_{i}}, and for any play of the Universal Player (UP) we list all the constraints that have to be satisfied (see Section 5.3 for more details).

Clearly, this procedure gives us nothing algorithmically, because the obtained CSP instance is of exponential size. Nevertheless, we might ask whether it is necessary to look at the whole instance to learn that it does not hold, which can be formulated as follows. We say that the UP wins on SAnS\subseteq A^{n} in y0x1y1xnynΨ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\;\Psi if the instance

y0x1y1xnyn((x1,,xn)SΨ)\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}((x_{1},\dots,x_{n})\in S\rightarrow\Psi)

does not hold.

Question 1.

For a No-instance of QCSP(Γ)\operatorname{QCSP}(\Gamma) with nn universal variables, what is the minimal SAnS\subseteq A^{n} such that the UP wins on SS?

In this paper we answer this fundamental question by showing that unless the problem is PSpace-hard, the set SS can be chosen of polynomial size. Notice that for the PSpace-hard case we should not expect SS to be of non-exponential size, as it would send our problem to some class below PSpace.

It would be even better if the set SS, on which the UP wins, could be fixed for all No-instances or could be calculated efficiently. We can ask the following question.

Question 2.

What is the minimal SAnS\subseteq A^{n} such that for any No-instance of QCSP(Γ)\operatorname{QCSP}(\Gamma) with nn universal variables the UP wins on SS?

If SS can always be chosen of polynomial-size and can be computed efficiently, then QCSP(Γ)\operatorname{QCSP}(\Gamma) immediately goes to the complexity class NP, as it is reduced to a polynomial-size CSP instance that can be efficiently computed. Surprisingly, all the problems QCSP(Γ)\operatorname{QCSP}(\Gamma) known to be in NP by 2018 satisfy the above property [11, 12, 15]. In fact, as it is shown in [20], for all constraint languages whose polymorphisms satisfy the Polynomially Generated Powers (PGP) Property, the set SS can be chosen to be very simple: there exists kk such that the UP wins in any No-instance on the set of all tuples having at most kk switches, where a switch in a tuple (a1,,an)(a_{1},\dots,a_{n}) is a pair (ai,ai+1)(a_{i},a_{i+1}) such that aiai+1a_{i}\neq a_{i+1}. Moreover, as it was shown in [18], if polymorphisms do not satisfy the PGP property, they satisfy the Exponential Generated Powers (EGP) Property, which automatically implies that such a polynomial-size SS cannot exist (at least if the number of existential variables is not limited).

Surprisingly, in [22, 23] two constraint languages on a 3-element domain were discovered such that the QCSP over these languages is solvable in polynomial time, but they do not satisfy the PGP property and, therefore, we cannot fix a polynomial-size SS. Nevertheless, for every instance we can efficiently calculate a polynomial-size SS such that if the UP can win, the UP wins on SS. We can formulate the following open question.

Question 3.

Suppose QCSP(Γ)\operatorname{QCSP}(\Gamma) is in NP. Is it true that for any instance of QCSP(Γ)\operatorname{QCSP}(\Gamma) with nn universal variables there exists a polynomial-time computable set SAnS\subseteq A^{n} such that the UP can win if and only if the UP wins on SS?

2 Main Results

2.1 Π2P\Pi_{2}^{P} vs PSpace Dichotomy

The main result of this paper comes from Question 1 from the introduction. We show that if QCSP(Γ)\operatorname{QCSP}(\Gamma) is not PSpace-complete and the UP has a winning strategy in a concrete QCSP instance, then this winning strategy can be chosen to be rather simple. We cannot expect the winning strategy for the UP to be polynomial-time computable because this would imply that QCSP(Γ)\operatorname{QCSP}(\Gamma) is in NP, and we know that QCSP(Γ)\operatorname{QCSP}(\Gamma) can be coNP-complete [23]. Nevertheless, as we show in the next theorem, the UP wins in any No-instance on a set SS of polynomial size, that is, we can restrict the UP to polynomially many possible moves and he still wins.

Theorem 3.

Suppose Γ\Gamma is a constraint language on a finite set AA, QCSP(Γ)\operatorname{QCSP}(\Gamma) is not PSpace-hard. Then for any No-instance y0x1y1xnynΨ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\Psi of QCSP(Γ)\operatorname{QCSP}(\Gamma) there exists SAnS\subseteq A^{n} with |S||A|2(n|A|)22|A||A|+1|S|\leqslant|A|^{2}\cdot(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} such that

y0x1y1xnyn((x1,,xn)SΨ)\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}((x_{1},\dots,x_{n})\in S\rightarrow\Psi)

does not hold.

In other words, the above theorem states that unless QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-hard, for any No-instance the UP wins on a set SS of polynomial-size (notice that the domain AA is fixed). If the polynomial-size set SS is fixed, then to confirm that the instance does not hold we need to check all the strategies of the EP defined on prefixes of the words (tuples) from SS, which is also a polynomial-size set. Thus, if QCSP(Γ)\operatorname{QCSP}(\Gamma) is not PSpace-hard, then to solve an instance y0x1y1xnynΨ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\Psi we need to check that for all SAnS\subseteq A^{n} with |S||A|2(n|A|)22|A||A|+1|S|\leqslant|A|^{2}\cdot(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} there exists a winning strategy for the EP for the restricted problem, which sends the problem to the complexity class Π2P\Pi_{2}^{P}. In fact, Π2P\Pi_{2}^{P} is the class of problems 𝒰\mathcal{U} that can be defined as

𝒰(Z)=X|X|<p(|Z|)Y|Y|<q(|Z|)𝒱(X,Y,Z),\mathcal{U}(Z)=\forall X^{\color[rgb]{0.6,0.6,0.6}\definecolor[named]{pgfstrokecolor}{rgb}{0.6,0.6,0.6}\pgfsys@color@gray@stroke{0.6}\pgfsys@color@gray@fill{0.6}|X|<p(|Z|)}\exists Y^{\color[rgb]{0.6,0.6,0.6}\definecolor[named]{pgfstrokecolor}{rgb}{0.6,0.6,0.6}\pgfsys@color@gray@stroke{0.6}\pgfsys@color@gray@fill{0.6}|Y|<q(|Z|)}\mathcal{V}(X,Y,Z),

for some 𝒱P\mathcal{V}\in\mathrm{P} and some polynomials pp and qq. In our case the set SS plays the role of XX and the restricted Skolem functions play the role of YY. Then, in 𝒱\mathcal{V} we need to check for every tuple from SS (play of the UP) that the corresponding strategy of the EP works, which is obviously computable in polynomial time. Thus, we have the following Dichotomy Theorem.

Theorem 4.

Suppose Γ\Gamma is a constraint language on a finite set. Then QCSP(Γ)\operatorname{QCSP}(\Gamma) is

  • PSpace-complete or

  • in Π2P\Pi_{2}^{P}.

2.2 What is inside Π2P\Pi_{2}^{P}?

We show that the gap between Pspace and Π2P\Pi_{2}^{P} cannot be enlarged, and there is a constraint language whose QCSP is Π2P\Pi_{2}^{P}-complete.

Theorem 5.

There exists Γ\Gamma on a 6-element domain such that QCSP(Γ)\operatorname{QCSP}(\Gamma) is Π2P\Pi_{2}^{P}-complete.

Thus, we already have 7 complexity classes that can be expressed as the QCSP for some constraint language: P, NP, coNP, DP, Θ2P\Theta_{2}^{P}, Π2P\Pi_{2}^{P}, and PSpace. In Figure 1 we show all the complexity classes known to be expressible as the QCSP and inclusions between them, where the edge is solid if we know that there are no classes between them, and dotted otherwise.

Question 4.

Are there any other complexity classes up to polynomial reduction that can be expressed as QCSP(Γ)\operatorname{QCSP}(\Gamma) for some Γ\Gamma on a finite set?

In fact, we want to prove or disprove the following dichotomy claims:

Question 5.

Suppose Γ\Gamma is a constraint language on a finite set. Is it true that

  1. 1.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either Π2P\Pi_{2}^{P}-hard, or in Θ2P\Theta_{2}^{P}?

  2. 2.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either Θ2P\Theta_{2}^{P}-hard, or in DP\mathrm{DP}?

  3. 3.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either DP\mathrm{DP}-hard, or in NPcoNP\mathrm{NP}\cup\mathrm{coNP}?

  4. 4.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either NP\mathrm{NP}-hard, or in coNP\mathrm{coNP}?

  5. 5.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either coNP\mathrm{coNP}-hard, or in NP\mathrm{NP}?

  6. 6.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is either in P\mathrm{P}, or NP\mathrm{NP}-hard, or coNP\mathrm{coNP}-hard?

PNPcoNPDPΘ2P\Theta_{2}^{P}Π2P\Pi_{2}^{P}PSPACE
Figure 1: Complexity classes expressible as QCSP(Γ)\operatorname{QCSP}(\Gamma) for some Γ\Gamma.

It is not hard to build an example showing that we cannot just move all universal quantifiers left to reduce QCSP(Γ)\operatorname{QCSP}(\Gamma) to a Π2P\Pi_{2}^{P}-sentence even if QCSP(Γ)\operatorname{QCSP}(\Gamma) is in Π2P\Pi_{2}^{P}. Nevertheless, it is still not clear whether a smarter polynomial reduction to a Π2\Pi_{2}-sentence over the same language exists. We denote the modification of QCSP(Γ)\operatorname{QCSP}(\Gamma) in which only Π2\Pi_{2}-sentences are allowed by Π2\Pi_{2}-QCSP(Γ)\operatorname{QCSP}(\Gamma). Then this question can be formulated as follows.

Question 6.

Suppose Γ\Gamma is a constraint language on a finite set and QCSP(Γ)\operatorname{QCSP}(\Gamma) is Π2P\Pi_{2}^{P}-complete. Is it true that Π2\Pi_{2}-QCSP(Γ)\operatorname{QCSP}(\Gamma) is Π2P\Pi_{2}^{P}-complete?

One may also ask whether it is sufficient to consider only Π2\Pi_{2}-sentences for all complexity classes but PSpace.

Question 7.

Suppose Γ\Gamma is a constraint language on a finite domain and QCSP(Γ)\operatorname{QCSP}(\Gamma) is in Π2P\Pi_{2}^{P}. Is it true that Π2\Pi_{2}-QCSP(Γ)\operatorname{QCSP}(\Gamma) is polynomially equivalent to QCSP(Γ)\operatorname{QCSP}(\Gamma)?

A positive answer to this question would make a complete classification of the complexity of QCSP(Γ)\operatorname{QCSP}(\Gamma) for each Γ\Gamma much closer. Checking a Π2\Pi_{2}-sentence is equivalent to solving a Constraint Satisfaction Problem for every evaluation of universal variables, but if we need to check exponentially many of them, it does not give us an efficient algorithm. It is very similar to Question 1 from the introduction on whether the UP can win only playing strategies from a polynomial-size subset, but for the Π2\Pi_{2}-sentence the situation is much easier as the UP plays first and the EP just reacts.

Earlier Hubie Chen noticed [11] that in some cases it is sufficient to check only polynomially many evaluations to guarantee that the Π2\Pi_{2}-sentence holds, which implies that the problem is equivalent to the CSP and belongs to NP. Precisely, this reduction works for constraint languages satisfying the Polynomially Generated Powers (PGP) Property already mentioned in the introduction. These are languages such that all the tuples of AnA^{n} can be generated from polynomially many tuples by applying polymorphisms of Γ\Gamma coordinate-wise. Notice that in the PGP case this polynomial set of evaluations can be chosen independently of the instance and can be calculated efficiently, as it is just the set of all tuples with at most kk switches [18]. This gives us a very simple polynomial reduction to CSP [11].

Sometimes a similar strategy works even if the polymorphisms of the constraint language do not satisfy the PGP property: two such constraint languages were presented in [23]. The polynomial algorithm for them works as follows. First, by solving many CSP instances it calculates the polynomial set of tuples (evaluations of the universal variables). Then, again by solving CSP instances, it checks that the quantifier-free part of the instance is satisfiable for every tuple (evaluation) it found. This gives us a Turing reduction to the CSP, and if the CSP is solvable in polynomial time, it gives us a polynomial algorithm. This idea completed the classification of the complexity of the QCSP for all constraint languages on a 3-element set containing all constant relations [23], and we hope that a generalization of this idea will lead to a complete classification of the complexity inside Π2P\Pi_{2}^{P}.

2.3 PSpace-complete languages

The complexity of the CSP for a (finite) constraint language Γ\Gamma has a very simple characterization in terms of polymorphisms. Precisely, CSP(Γ)\operatorname{CSP}(\Gamma) is solvable in polynomial time if Γ\Gamma admits a cyclic polymorphism, and it is NP-complete otherwise [7, 8, 17, 19]. It is also known that the complexity of QCSP(Γ)\operatorname{QCSP}(\Gamma) is determined by surjective polymorphisms of Γ\Gamma [4], but we are not aware of a nice characterization of Π2P\Pi_{2}^{P}-membership in terms of polymorphisms, moreover polymorphisms do not play any role in this paper. Nevertheless, we have a nice characterization in terms of relations. It turned out all the PSpace-hard cases are similar in the sense that they can express certain relations giving us PSpace-hardness. We say that a constraint language Γ\Gamma q-defines a relation RR if there exists a quantified conjunctive formula over Γ\Gamma that defines the relation RR. Similarly, we say that Γ\Gamma q-defines a set SS of relations if it q-defines each relation from SS. In this case we also say that SS is q-definable over Γ\Gamma. It is an easy observation that QCSP(Γ1)\operatorname{QCSP}(\Gamma_{1}) can be (LOGSPACE) reduced to QCSP(Γ2)\operatorname{QCSP}(\Gamma_{2}) if Γ2\Gamma_{2} q-defines Γ1\Gamma_{1} [4].

To formulate the classification of all PSpace-complete languages, we introduce the notion of a mighty tuple. Suppose k0k\geqslant 0, m1m\geqslant 1, QA|A|+k+m+2Q\subseteq A^{|A|+k+m+2}, B,C,DA|A|+k+m+1B,C,D\subseteq A^{|A|+k+m+1}, ΔA|A|+k\Delta\subseteq A^{|A|+k}. The relation QQ can be viewed as a binary relation having three additional parameters 𝐳A|A|\mathbf{z}\in A^{|A|}, δAk\delta\in A^{k}, and αAm\alpha\in A^{m}. Similarly, Δ\Delta is a kk-ary relation with an additional parameter 𝐳A|A|\mathbf{z}\in A^{|A|}, B,C,DB,C,D are unary relations with additional parameters 𝐳A|A|\mathbf{z}\in A^{|A|} and δAk\delta\in A^{k}. By Δ𝐳\prescript{\mathbf{z}}{}{\Delta}, Qαδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\alpha}, Dδ𝐳\prescript{\mathbf{z}}{\delta}{D}, Bδ𝐳\prescript{\mathbf{z}}{\delta}{B}, Cδ𝐳\prescript{\mathbf{z}}{\delta}{C} we denote the respective kk-ary, binary, and unary relations where these parameters are fixed. For instance, we say that (a,b)Qαδ𝐳(a,b)\in\prescript{\mathbf{z}}{\delta}{Q}^{\alpha} if (𝐳,δ,α,a,b)Q(\mathbf{z},\delta,\alpha,a,b)\in Q. Denote

Qδ𝐳(y1,y2)\displaystyle\prescript{\mathbf{z}}{\delta}{Q}^{\forall}(y_{1},y_{2}) =xQx,x,,xδ𝐳(y1,y2),\displaystyle=\forall x\;\prescript{\mathbf{z}}{\delta}{Q}^{x,x,\dots,x}(y_{1},y_{2}), (1)
Qδ𝐳(y1,y2)\displaystyle\prescript{\mathbf{z}}{\delta}{Q}^{\forall\forall}(y_{1},y_{2}) =x1xmQx1,x2,,xmδ𝐳(y1,y2).\displaystyle=\forall x_{1}\dots\forall x_{m}\;\prescript{\mathbf{z}}{\delta}{Q}^{x_{1},x_{2},\dots,x_{m}}(y_{1},y_{2}). (2)

A tuple (Q,D,B,C,Δ)(Q,D,B,C,\Delta) is called a mighty tuple I if

  1. 1.

    Δ𝐳\prescript{\mathbf{z}}{}{\Delta}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    Bδ𝐳\prescript{\mathbf{z}}{\delta}{B}, Cδ𝐳\prescript{\mathbf{z}}{\delta}{C}, and Dδ𝐳\prescript{\mathbf{z}}{\delta}{D} are nonempty for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta};

  3. 3.

    Qαδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\alpha} is an equivalence relation on Dδ𝐳\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and αAm\alpha\in A^{m};

  4. 4.

    Qδ𝐳=Dδ𝐳×Dδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall}=\prescript{\mathbf{z}}{\delta}{D}\times\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta};

  5. 5.

    Bδ𝐳\prescript{\mathbf{z}}{\delta}{B} and Cδ𝐳\prescript{\mathbf{z}}{\delta}{C} are equivalence classes of Qδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall\forall};

  6. 6.

    there exists 𝐳A|A|\mathbf{z}\in A^{|A|} such that Bδ𝐳Cδ𝐳\prescript{\mathbf{z}}{\delta}{B}\neq\prescript{\mathbf{z}}{\delta}{C} for every δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}.

The idea behind this definition is as follows. For fixed 𝐳\mathbf{z} and δ\delta we have a parameterized binary relation Qδ𝐳\prescript{\mathbf{z}}{\delta}{Q}, which is the full equivalence relation if α\alpha is a constant tuple and some equivalence relation otherwise. Relations BB and CC are just two equivalence classes that the EP has to connect by a complicated formula over QQ and the UP is trying to prevent this by choosing the parameters α\alpha.

In the next two theorems and later in the paper we assume that PSpaceΠ2P\mathrm{PSpace}\neq\Pi_{2}^{P}.

Theorem 6.

Suppose Γ\Gamma is a constraint language on a finite set AA. Then the following conditions are equivalent:

  1. 1.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-complete;

  2. 2.

    there exists a mighty tuple I q-definable over Γ\Gamma.

For constraint languages containing all constant relations we get an easier characterization.

Theorem 7.

Suppose Γ{x=aaA}\Gamma\supseteq\{x=a\mid a\in A\} is a constraint language on a finite set AA. Then the following conditions are equivalent:

  1. 1.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-complete;

  2. 2.

    there exist an equivalence relation σ\sigma on DAD\subseteq A and B,CAB,C\subsetneq A such that BC=AB\cup C=A and Γ\Gamma q-defines the relations (y1,y2D)(σ(y1,y2)(xB))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in B)) and (y1,y2D)(σ(y1,y2)(xC))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in C)).

The above theorems show that all the hardness cases have the same nature. In the next section we provide a sketch of a proof of the PSpace-hardness in Theorem 7 for the case when A={+,,0,1}A=\{+,-,0,1\}, D={+,}D=\{+,-\}, σ\sigma is the equality on DD, B={+,,1}B=\{+,-,1\} and C={+,,0}C=\{+,-,0\}, but one may check that the same proof works word for word for the arbitrary AA, BB, CC, DD, and σ\sigma. Moreover, as we show in Section 7.2 a very similar reduction works for the general case in Theorem 6.

2.4 Idea of the proof

The proof of Theorem 3, which is the main result of the paper, comes from the exponential-size CSP instance we discussed in Section 1.2. Even though we cannot actually run any algorithm on it, one may ask whether it is solvable by local consistency methods. Surprisingly, unless QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-hard, a slight modification of the exponential-size CSP instance can be solved even by arc-consistency, which is the biggest discovery of this paper (see Theorem 22). The reader should not think that the trick is hidden in the modification, as we just replace the constraint language Γ\Gamma by the relation that is defined by the quantifier-free part of the instance (see Section 5.3).

This result does not give immediate consequences on the complexity of the QCSP as the instance is still of exponential size. Nevertheless, we prove that unless the QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-hard, the arc-consistency can show that the instance has no solutions only by looking at the polynomial part of it, and this is the second main discovery of the paper (see Corollary 33 and Theorem 18).

Notice that most of the previous results on the complexity of the QCSP were proved for constraint languages with all constant relations x=ax=a [11, 15, 22]. Here, we obtain results for the general case replacing constant relations by |A||A| new variables that are universally quantified at the very beginning, and therefore can be viewed as external parameters. The price we pay for the general case is that all the relations and instances are parameterized by two additional parameters 𝐳\mathbf{z} and δ\delta, which you already saw in the classification of all PSpace-complete languages.

2.5 Are there other complexity classes?

As we now know, QCSP(Γ)\operatorname{QCSP}(\Gamma) can be solvable in polynomial time, NP-complete, coNP-complete, DP-complete, Θ2P\Theta_{2}^{P}-complete, Π2P\Pi_{2}^{P}-complete, and PSpace-complete. Knowing this, most of the readers probably expect infinitely many other complexity classes up to polynomial equivalence that can be expressed via the QCSP by fixing the constraint language. In our opinion it is highly possible that these 7 complexity classes are everything we can attain, as we mostly expected new classes between Π2P\Pi_{2}^{P} and PSpace, and now we know that there are none. In this section we share our speculations on the question.

First, let us formulate what each of the classes means from the game theoretic point of view. A QCSP instance is a game between the Universal Player (he) and the Existential Player (she): he tries to make the quantifier-free part false, and she tries to make it true [1]. We say that a move of a player is trivial if the optimal move can be calculated in polynomial time. Then, those complexity classes just show how much they can interact with each other.

𝐏\mathbf{P}: the play of both players is trivial;

𝐍𝐏\mathbf{NP}: only the EP plays, the play of the UP is trivial;

𝐜𝐨𝐍𝐏\mathbf{coNP}: only the UP plays, the play of the EP is trivial;

𝐃𝐏=𝐍𝐏𝐜𝐨𝐍𝐏\mathbf{DP}=\mathbf{NP}\wedge\mathbf{coNP}: each player plays their own game. Yes-instance: EP wins, UP loses;

𝚯𝟐𝐏=(𝐍𝐏𝐜𝐨𝐍𝐏)(𝐍𝐏𝐜𝐨𝐍𝐏)\mathbf{\Theta_{2}^{P}}=(\mathbf{NP}\vee\mathbf{coNP})\wedge\dots\wedge(\mathbf{NP}\vee\mathbf{coNP}): each player plays many games (no interaction), the result is a boolean combination of the results of those games;

𝚷𝟐𝐏\mathbf{\Pi_{2}^{P}}: the UP plays first, then the EP plays;

𝐏𝐒𝐩𝐚𝐜𝐞\mathbf{PSpace}: they play against each other (no restrictions).

We do not expect anything new between P and DP because we do not have anything between P and NP for the CSP. As the conjunction is given for free in the QCSP, whenever we can combine NP and coNP by anything else than conjunction, we expect to obtain a disjunction and, therefore, get Θ2P\Theta_{2}^{P}. Thus, the only place where we expect new classes is between Θ2P\Theta_{2}^{P} and Π2P\Pi_{2}^{P}. Nevertheless, even here we cannot imagine an interaction which is weaker than in Π2P\Pi_{2}^{P}, and we must have some interaction as the class Θ2P\Theta_{2}^{P} is the strongest class where we just combine the results of the independent games.

Notice that everything we wrote in this section is only speculation, and we need a real proof of all of the dichotomies formulated in Section 2.2.

2.6 Structure of the paper

The rest of the paper is organized as follows. In Section 3 we show a concrete constraint language on a 4-element domain whose complexity of the QCSP is PSpace-complete. Then, in Section 4 we present a constraint language on a 6-element domain whose QCSP is Π2P\Pi_{2}^{P}-complete.

In Section 5 we provide necessary definitions and derive all the main results of the paper from the statements that are proved later. Here, we define 5 tuples of relations, called mighty tuples, such that the QCSP over any of them is PSpace-hard. In Section 6 we prove all the necessary statements under the assumption that a mighty tuple is not q-definable. Finally, in Section 7 we prove PSpace-hardness for a mighty tuple I, show the equivalence and reductions between mighty tuples.

3 The most general PSpace-hard constraint language

In this section for a concrete constraint language Γ\Gamma on a 4-element domain we show how to reduce the complement of Quantified-3-CNF to QCSP(Γ)\operatorname{QCSP}(\Gamma) and therefore prove PSpace-hardness. This constraint language is important because a similar reduction works for all the PSpace-hard cases.

Lemma 8.

Suppose A={+,,0,1}A=\{+,-,0,1\}, R0(y1,y2,x)=(y1,y2{+,})(x=0y1=y2)R_{0}(y_{1},y_{2},x)=(y_{1},y_{2}\in\{+,-\})\wedge(x=0\rightarrow y_{1}=y_{2}), R1(y1,y2,x)=(y1,y2{+,})(x=1y1=y2)R_{1}(y_{1},y_{2},x)=(y_{1},y_{2}\in\{+,-\})\wedge(x=1\rightarrow y_{1}=y_{2}), Γ={R0,R1,{+},{}}\Gamma=\{R_{0},R_{1},\{+\},\{-\}\}. Then QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-hard.

This example may be viewed as the weakest constraint language whose QCSP is PSpace-hard. It can be seen from the definition that the UP should only play xx-variables (the last coordinates of R0R_{0} and R1R_{1}) and the EP should only play yy-variables (the first two coordinates), and originally we did not see how they can interact with each other and, therefore, did not expect the QCSP to be PSpace-hard. Below we demonstrate on a concrete example how the EP can control the moves of the UP and therefore, interact in the area of the UP.

Sketch of the proof:.

We build a reduction from the complement of the Quantified-3-CNF. Let the sentence be

¬(x1x2x3((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3)).\neg(\exists x_{1}\forall x_{2}\exists x_{3}\;\;((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3})).

Instead of formulas we draw graphs whose vertices are variables and edges are relations. R0(y1,y2,x)R_{0}(y_{1},y_{2},x) is drawn as a red edge from y1y_{1} to y2y_{2} labeled with xx. Similarly R1(y1,y2,x)R_{1}(y_{1},y_{2},x) is drawn as a blue edge from y1y_{1} to y2y_{2} labeled with xx. If a vertex has no name, then we assume that the variable is existentially quantified after all other variables are quantified. If the vertex is marked with ++ or -, then we assume that the corresponding variable is equal to ++ or - respectively. In Figure 2 you can see an example of a graph and the corresponding formula.

y1y_{1}++x1x_{1}1x2x_{2}0x3x_{3}1
Figure 2: A graph for u1u2u3R1(y1,u1,x1)R0(u1,u2,x2)R1(u2,u3,x3)(u3=+)\exists u_{1}\exists u_{2}\exists u_{3}R_{1}(y_{1},u_{1},x_{1})\wedge R_{0}(u_{1},u_{2},x_{2})\wedge R_{1}(u_{2},u_{3},x_{3})\wedge(u_{3}=+)

Thus, these graphs can be viewed as electrical circuits where the ends of an edge are connected (equal) whenever the variable written on it has the corresponding value. Then the encoding of the quantifier-free part

((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3))((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3}))

is shown in Figure 3. If we assume that all the xx-variables are from {0,1}\{0,1\}, which will be the case, then the formula in Figure 3 holds if and only if the 3-CNF does not hold. In fact, if the 3-CNF holds then ++ is connected (equal) to - through three edges, which gives a contradiction. If the formula in Figure 3 holds, then at some point we go from ++ to -, which means that the corresponding clause does not hold.

++-x1x_{1}1x3x_{3}1x2x_{2}0x1x_{1}0x3x_{3}0x2x_{2}1x1x_{1}1x3x_{3}0x2x_{2}0
Figure 3: A graph expressing ¬((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3)).\neg((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3})).

If we add universal quantifiers to the formula in Figure 3 we get

x1x2x3¬((x1x¯2x3)\displaystyle\forall x_{1}\forall x_{2}\forall x_{3}\;\;\neg((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge (x¯1x2x¯3)(x1x¯2x¯3))=\displaystyle(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3}))=
¬(x1x2x3((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3)))\displaystyle\neg(\exists x_{1}\exists x_{2}\exists x_{3}\;((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3})))

Notice that it does not make sense for the UP to play values ++ and - because the relations R0R_{0} and R1R_{1} hold whenever the last coordinate is from {+,}\{+,-\}. Thus, we already encoded the complement to 3-CNF-Satisfability, which means that QCSP(Γ)\operatorname{QCSP}(\Gamma) is coNP-hard.

To show PSpace-hardness we need to add existential quantifiers. We cannot just add x2\exists x_{2} because the obvious choice for the EP would be ++ or -. As shown in Figure 4, whenever we want to add x2\exists x_{2}, we add a new existential variable y2y_{2} and universally quantify x2x_{2}. The goal of the UP is to connect ++ and -. Hence, if the EP plays y2=+y_{2}=+, then the only reasonable choice for the UP is to play x2=1x_{2}=1; and if the EP plays y2=y_{2}=-, then the UP must play x2=0x_{2}=0. Thus, the EP controls the moves of the UP, which is equivalent to the EP playing on the set {0,1}\{0,1\}.

x1y2x2x3\forall x_{1}\exists y_{2}\forall x_{2}\forall x_{3}++-x2x_{2}0x2x_{2}1y2y_{2}x1x_{1}1x2x_{2}0x3x_{3}1x1x_{1}1x2x_{2}0x3x_{3}0x3x_{3}0x2x_{2}1x1x_{1}0
Figure 4: A graph expressing x1x2x3¬((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3))\forall x_{1}\exists x_{2}\forall x_{3}\;\;\neg((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3}))

Thus, we encoded

x1x2x3¬((x1x¯2x3)\displaystyle\forall x_{1}\exists x_{2}\forall x_{3}\;\;\neg((x_{1}\vee\overline{x}_{2}\vee x_{3}) (x¯1x2x¯3)(x1x¯2x¯3))=\displaystyle\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3}))=
¬(x1x2x3((x1x¯2x3)(x¯1x2x¯3)(x1x¯2x¯3)),\displaystyle\neg(\exists x_{1}\forall x_{2}\exists x_{3}\;\;((x_{1}\vee\overline{x}_{2}\vee x_{3})\wedge(\overline{x}_{1}\vee x_{2}\vee\overline{x}_{3})\wedge(x_{1}\vee\overline{x}_{2}\vee\overline{x}_{3})),

which is a complement to the Quantified-3-CNF. ∎

As we saw in Theorem 7 two relations equivalent to R0R_{0} and R1R_{1} can be q-defined from Γ\Gamma whenever Γ\Gamma contains all constant relations and QCSP(Γ)\operatorname{QCSP}(\Gamma) is not in Π2P\Pi_{2}^{P}. The criterion for the general case is formulated using mighty tuples, but as you can see in the proof of Theorem 14 in Section 7.2 we still build two relations R0R_{0} and R1R_{1} and use almost the same construction to prove PSpace-hardness.

4 Π2P\Pi_{2}^{P}-complete constraint language

In this section we define a concrete constraint language Γ\Gamma on a 6-element domain A={0,1,2,0,1,2}A=\{0,1,2,0^{\prime},1^{\prime},2^{\prime}\} such that QCSP(Γ)\operatorname{QCSP}(\Gamma) is Π2P\Pi_{2}^{P}-complete.

First, we define two ternary relations AND2\mathrm{AND}_{2} and OR2\mathrm{OR}_{2} corresponding to the operations \wedge and \vee on {0,1}\{0,1\}. If one of the first two coordinates is from {2,0,1,2}\{2,0^{\prime},1^{\prime},2^{\prime}\}, then the remaining elements can be chosen arbitrary, i.e.,

{2,0,1,2}×A×A\displaystyle\{2,0^{\prime},1^{\prime},2^{\prime}\}\times A\times A\subseteq AND2,\displaystyle\mathrm{AND}_{2}, {2,0,1,2}×A×AOR2,\displaystyle\{2,0^{\prime},1^{\prime},2^{\prime}\}\times A\times A\subseteq\mathrm{OR}_{2},
A×{2,0,1,2}×A\displaystyle A\times\{2,0^{\prime},1^{\prime},2^{\prime}\}\times A\subseteq AND2,\displaystyle\mathrm{AND}_{2}, A×{2,0,1,2}×AOR2.\displaystyle A\times\{2,0^{\prime},1^{\prime},2^{\prime}\}\times A\subseteq\mathrm{OR}_{2}.

If a,b{0,1}a,b\in\{0,1\}, then (a,b,c)AND2(ab=c)(a,b,c)\in\mathrm{AND}_{2}\Rightarrow(a\wedge b=c) and (a,b,c)OR2(ab=c)(a,b,c)\in\mathrm{OR}_{2}\Rightarrow(a\vee b=c). In other words

AND2({0,1}×{0,1}×A)=(001101010001),OR2({0,1}×{0,1}×A)=(001101010111),\mathrm{AND}_{2}\cap(\{0,1\}\times\{0,1\}\times A)=\begin{pmatrix}0&0&1&1\\ 0&1&0&1\\ 0&0&0&1\end{pmatrix},\mathrm{OR}_{2}\cap(\{0,1\}\times\{0,1\}\times A)=\begin{pmatrix}0&0&1&1\\ 0&1&0&1\\ 0&1&1&1\end{pmatrix},

where each matrix should be understood as the set of tuples written as columns. The remaining four relations are defined by

1IN3\displaystyle\operatorname{1IN3^{\prime}} ={(2,2,2),(1,0,0),(0,1,0),(0,0,1)},\displaystyle=\{(2^{\prime},2^{\prime},2^{\prime}),(1^{\prime},0^{\prime},0^{\prime}),(0^{\prime},1^{\prime},0^{\prime}),(0^{\prime},0^{\prime},1^{\prime})\},
δ0\displaystyle\delta_{0} ={1}×{0,2}(A{1})×{0,1,2},\displaystyle=\{1\}\times\{0^{\prime},2^{\prime}\}\cup(A\setminus\{1\})\times\{0^{\prime},1^{\prime},2^{\prime}\},
δ1\displaystyle\delta_{1} ={1}×{1,2}(A{1})×{0,1,2},\displaystyle=\{1\}\times\{1^{\prime},2^{\prime}\}\cup(A\setminus\{1\})\times\{0^{\prime},1^{\prime},2^{\prime}\},
ϵ\displaystyle\epsilon ={0}×{0,1}(A{0})×{0,1,2}.\displaystyle=\{0\}\times\{0^{\prime},1^{\prime}\}\cup(A\setminus\{0\})\times\{0^{\prime},1^{\prime},2^{\prime}\}.

The relation 1IN3\operatorname{1IN3^{\prime}} is the usual relation 1IN3\mathrm{1IN3} on {0,1}\{0^{\prime},1^{\prime}\} with an additional tuple (2,2,2)(2^{\prime},2^{\prime},2^{\prime}). The relations δ0\delta_{0}, δ1\delta_{1} and ϵ\epsilon can also be viewed as

δ0(x,y)\displaystyle\delta_{0}(x,y) =(y{0,1,2})(x=1y1),\displaystyle=(y\in\{0^{\prime},1^{\prime},2^{\prime}\})\wedge(x=1\Rightarrow y\neq 1^{\prime}),
δ1(x,y)\displaystyle\delta_{1}(x,y) =(y{0,1,2})(x=1y0),\displaystyle=(y\in\{0^{\prime},1^{\prime},2^{\prime}\})\wedge(x=1\Rightarrow y\neq 0^{\prime}),
ϵ(x,y)\displaystyle\epsilon(x,y) =(y{0,1,2})(x=0y2).\displaystyle=(y\in\{0^{\prime},1^{\prime},2^{\prime}\})\wedge(x=0\Rightarrow y\neq 2^{\prime}).

Note that δ1\delta_{1} can be derived from δ0\delta_{0} and 1IN3\operatorname{1IN3^{\prime}} by the formula

δ1(x,y)=u1u2u3δ0(x,u1)1IN3(y,u1,u2)1IN3(u2,u2,u3).\delta_{1}(x,y)=\exists u_{1}\exists u_{2}\exists u_{3}\;\delta_{0}(x,u_{1})\wedge\operatorname{1IN3^{\prime}}(y,u_{1},u_{2})\wedge\operatorname{1IN3^{\prime}}(u_{2},u_{2},u_{3}).

Let Γ={AND2,OR2,1IN3,δ0,δ1,ϵ}\Gamma=\{\mathrm{AND}_{2},\mathrm{OR}_{2},\operatorname{1IN3^{\prime}},\delta_{0},\delta_{1},\epsilon\}.

Lemma 9.

QCSP(Γ)\operatorname{QCSP}(\Gamma) is Π2P\Pi_{2}^{P}-hard.

Proof.

First, we derive the OR\mathrm{OR} relation of larger arity by

ORn+1(x1,,xn+1,y)=yORn(x1,,xn,y)OR2(y,xn+1,y).\mathrm{OR}_{n+1}(x_{1},\dots,x_{n+1},y)=\exists y^{\prime}\;\mathrm{OR}_{n}(x_{1},\dots,x_{n},y^{\prime})\wedge\mathrm{OR}_{2}(y^{\prime},x_{n+1},y).

Then we assume that ORn\mathrm{OR}_{n} is in our language. To prove the Π2P\Pi_{2}^{P}-hardness we build a reduction from Π2\Pi_{2}-QCSP(1IN3)\operatorname{QCSP}(\mathrm{1IN3}), where 1IN3={(1,0,0),(0,1,0),(0,0,1)}\mathrm{1IN3}=\{(1,0,0),(0,1,0),(0,0,1)\}. Let

Φ=x1xmxm+1xn 1IN3(xi1,xj1,xk1)1IN3(xis,xjs,xks).\Phi=\forall x_{1}\dots\forall x_{m}\exists x_{m+1}\dots\exists x_{n}\;\mathrm{1IN3}(x_{i_{1}},x_{j_{1}},x_{k_{1}})\wedge\dots\wedge\mathrm{1IN3}(x_{i_{s}},x_{j_{s}},x_{k_{s}}).

Since we can always add dummy variables, we assume that Φ\Phi has at least two universally quantified variables for the general construction to make sense. The problem of checking whether Φ\Phi holds is Π2P\Pi_{2}^{P}-complete [1]. We will encode Φ\Phi by the following instance of QCSP(Γ)\operatorname{QCSP}(\Gamma).

Ψ=x10x11xm0xm1x1x2xnz1znzi=1m(δ0(xi0,xi)δ1(xi1,xi))\displaystyle\Psi=\forall x_{1}^{0}\forall x_{1}^{1}\dots\forall x_{m}^{0}\forall x_{m}^{1}\;\;\exists x_{1}\exists x_{2}\dots\exists x_{n}\;\;\exists z_{1}\dots\exists z_{n}\;\;\exists z\;\;\bigwedge\limits_{i=1}^{m}\left(\delta_{0}(x_{i}^{0},x_{i})\wedge\delta_{1}(x_{i}^{1},x_{i})\right)\wedge
i=1mAND2(xi0,xi1,zi)ORm(z1,zn,z)i=1nϵ(z,xi)=1s1IN3(xi,xj\displaystyle\;\bigwedge\limits_{i=1}^{m}\mathrm{AND}_{2}(x_{i}^{0},x_{i}^{1},z_{i})\wedge\mathrm{OR}_{m}(z_{1}\dots,z_{n},z)\wedge\bigwedge\limits_{i=1}^{n}\epsilon(z,x_{i})\wedge\bigwedge\limits_{\ell=1}^{s}\operatorname{1IN3^{\prime}}(x_{i_{\ell}},x_{j_{\ell}} ,xk)\displaystyle,x_{k_{\ell}})
x11x_{1}^{1}x10x_{1}^{0}ANDx21x_{2}^{1}x20x_{2}^{0}ANDxi1x_{i}^{1}xi0x_{i}^{0}ANDxm1x_{m}^{1}xm0x_{m}^{0}ANDx10x_{1}^{0} =1=1 \downarrow 1\neq 1^{\prime} x11x_{1}^{1} =1=1 \downarrow 0\neq 0^{\prime} x20x_{2}^{0} =1=1 \downarrow 1\neq 1^{\prime} x21x_{2}^{1} =1=1 \downarrow 0\neq 0^{\prime} xi0x_{i}^{0} =1=1 \downarrow 1\neq 1^{\prime} xi1x_{i}^{1} =1=1 \downarrow 0\neq 0^{\prime} xm0x_{m}^{0} =1=1 \downarrow 1\neq 1^{\prime} xm1x_{m}^{1} =1=1 \downarrow 0\neq 0^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} =0=0 \downarrow 2\neq 2^{\prime} x1x_{1}               x2x_{2}      …      xix_{i}      …     xmx_{m}    xm+1x_{m+1}\ldots  xnx_{n} 1IN3(xi1,xj1,xk1)1IN3(xi2,xj2,xk2)1IN3(xis,xjs,xks)\operatorname{1IN3^{\prime}}(x_{i_{1}},x_{j_{1}},x_{k_{1}})\wedge\operatorname{1IN3^{\prime}}(x_{i_{2}},x_{j_{2}},x_{k_{2}})\wedge\dots\wedge\operatorname{1IN3^{\prime}}(x_{i_{s}},x_{j_{s}},x_{k_{s}}) ORm\mathrm{OR}_{m}
Figure 5: Reduction from Π2\Pi_{2}-QCSP(1IN3)\operatorname{QCSP}(\mathrm{1IN3}) to QCSP(Γ)\operatorname{QCSP}(\Gamma).

The quantifier free part of Ψ\Psi is shown in Figure 5, where triangle elements are AND2\mathrm{AND}_{2} and ORm\mathrm{OR}_{m}, rectangular elements are δ0\delta_{0}, δ1\delta_{1}, and ϵ\epsilon, and the big block at the bottom is just the conjunction of the corresponding 1IN3\operatorname{1IN3^{\prime}}-relations. The variable xix_{i} in Ψ\Psi will take values from {0,1,2}\{0^{\prime},1^{\prime},2^{\prime}\}, which makes the use of universal quantifiers directly impossible. For the universal variables to be applicable we introduce two new variables xi0x_{i}^{0} and xi1x_{i}^{1} for each xix_{i} where i{1,2,,m}i\in\{1,2,\dots,m\}. We expect exactly one of the two values xi0x_{i}^{0} and xi1x_{i}^{1} to be equal to 1. xi0=1x_{i}^{0}=1 means that xi=0x_{i}=0^{\prime}, xi1=1x_{i}^{1}=1 means that xi=1x_{i}=1^{\prime}. Using the relations δ0\delta_{0} and δ1\delta_{1} we make xix_{i} equal to the value we need. Notice that xix_{i} can also be equal to 22^{\prime} and this value should be forbidden by ϵ\epsilon. Let us prove that Φ\Phi and Ψ\Psi are equivalent.

ΦΨ\Phi\Rightarrow\Psi. Suppose we have a winning strategy for the Existential Player (EP) in Φ\Phi, let us define a winning strategy for the EP in Ψ\Psi. If the Universal Player (UP) in Ψ\Psi plays xi0=xi1=1x_{i}^{0}=x_{i}^{1}=1, or xi0{0,1}x_{i}^{0}\notin\{0,1\}, or xi1{0,1}x_{i}^{1}\notin\{0,1\} for some ii, then the winning strategy for the EP is to choose x1==xn=2x_{1}=\dots=x_{n}=2^{\prime}. Then the 1IN3\operatorname{1IN3^{\prime}}-block of Ψ\Psi is satisfied as (2,2,2,,2)(2^{\prime},2^{\prime},2^{\prime},\dots,2^{\prime}) is its trivial solution. Only value 1 restricts the second coordinate of the relations δ0\delta_{0} and δ1\delta_{1}, hence the best choice for the UP is to make (xi0,xi1){(0,1),(1,0)}(x_{i}^{0},x_{i}^{1})\in\{(0,1),(1,0)\}. We interpret (xi0,xi1)=(0,1)(x_{i}^{0},x_{i}^{1})=(0,1) as xi=1x_{i}=1 and (xi0,xi1)=(1,0)(x_{i}^{0},x_{i}^{1})=(1,0) as xi=0x_{i}=0. Then the EP in Ψ\Psi plays x1,,xmx_{1},\dots,x_{m} according to (xi0,xi1)(x_{i}^{0},x_{i}^{1}) and plays xm+1,,xnx_{m+1},\dots,x_{n} just copying the moves of the EP in Φ\Phi but 00^{\prime} instead of 0 and 11^{\prime} instead of 11. Since the quantifier-free part of Φ\Phi is satisfied, the 1IN3\operatorname{1IN3^{\prime}}-block of Ψ\Psi is also satisfied.

ΨΦ\Psi\Rightarrow\Phi. Suppose the UP in Φ\Phi plays x1,,xmx_{1},\dots,x_{m}. Let the UP in Ψ\Psi play xi0=1x_{i}^{0}=1, xi1=0x_{i}^{1}=0 if xi=0x_{i}=0 and xi0=0x_{i}^{0}=0, xi1=1x_{i}^{1}=1 if xi=1x_{i}=1. Then the EP in Ψ\Psi should play only values from {0,1}\{0^{\prime},1^{\prime}\} for x1,,xnx_{1},\dots,x_{n}. The EP in Φ\Phi just copies the moves of the EP in Ψ\Psi playing 0 instead of 00^{\prime}, and 11 instead of 11^{\prime}. The satisfiability of the 1IN3\operatorname{1IN3^{\prime}}-block of Ψ\Psi implies the satisfiability of the quantifier-free part of Φ\Phi. ∎

Lemma 10.

QCSP(Γ)\operatorname{QCSP}(\Gamma) is in Π2P\Pi_{2}^{P}.

Proof.

One of the definitions of the class Π2P\Pi_{2}^{P} is coNPNP\mathrm{coNP}^{\mathrm{NP}}, that is the class of problem solvable by a nondetermenistic Turing machine augmented by an oracle for some NP-complete problem [1]. Thus, to prove the membership in Π2P\Pi_{2}^{P}, it is sufficient to show that an optimal strategy for the EP can be calculated in polynomial time using the NP-oracle.

Suppose we have an instance x1y1x2y2xnynΦ\forall x_{1}\exists y_{1}\forall x_{2}\exists y_{2}\dots\forall x_{n}\exists y_{n}\Phi. Suppose the variables x1,,xix_{1},\dots,x_{i} and y1,,yi1y_{1},\dots,y_{i-1} are already evaluated with a1,,aia_{1},\dots,a_{i} and b1,,bi1b_{1},\dots,b_{i-1}, respectively. We need to calculate an optimal value bib_{i} for yiy_{i}, i.e., suppose the EP can still win in this position then she should be able to win after making the move yi=biy_{i}=b_{i}.

We will explain the algorithm first and then we argue why it returns an optimal move. Using the NP-oracle for every dAd\in A we check the satisfiability of the instance

Φj=1j=ixj=ajj=i+1j=nxj=1j=1j=i1yj=bjyi=d.\displaystyle\Phi\wedge\bigwedge_{j=1}^{j=i}x_{j}=a_{j}\wedge\bigwedge_{j=i+1}^{j=n}x_{j}=1\wedge\bigwedge_{j=1}^{j=i-1}y_{j}=b_{j}\wedge y_{i}=d. (3)

Thus, we just send the previous variables to their values, evaluate all further universal variables to 1 and the variable yiy_{i} to dd. Let DD be the set of dd such that (3) has a solution. Then we choose an optimal value as follows:

  1. 1.

    If DD is empty, then the EP cannot win and an optimal move does not exist.

  2. 2.

    If D={b}D=\{b\} for some bb then yi=by_{i}=b is the optimal move.

  3. 3.

    If cD{0,1,2}c\in D\cap\{0^{\prime},1^{\prime},2\} then yi=cy_{i}=c is an optimal move.

The algorithm is obviously polynomial. Hence it is sufficient to prove that cases 1-3 cover all the possible cases and the move chosen by 3 is optimal.

The binary operation g(x,y)={x,if y=1x,if x=yy,if y{0,1}x,if x{0,1} and y=22,otherwiseg(x,y)=\begin{cases}x,&\text{if $y=1$}\\ x,&\text{if $x=y$}\\ y,&\text{if $y\in\{0^{\prime},1^{\prime}\}$}\\ x,&\text{if $x\in\{0^{\prime},1^{\prime}\}$ and $y=2^{\prime}$}\\ 2,&\text{otherwise}\end{cases} preserves all the relations from Γ\Gamma and all constant relations, which follows from the following properties of gg and manual checking of some cases:

  • gg either returns the first variable or an element of {0,1,2}\{0^{\prime},1^{\prime},2\}.

  • gg preserves {0,1,2}\{0^{\prime},1^{\prime},2^{\prime}\} and gg restricted to {0,1,2}\{0^{\prime},1^{\prime},2^{\prime}\} returns the last non-22^{\prime} value if it exists.

  • gg returns 1 only on the tuple (1,1)(1,1) and it returns 22^{\prime} only on the tuple (2,2)(2^{\prime},2^{\prime}).

This implies (see [2]) that gg preserves the solution set of any instance of CSP(Γ)\operatorname{CSP}(\Gamma).

The only cases that are not covered by cases 1-3 are {0,1}D\{0,1\}\subseteq D, {0,2}D\{0,2^{\prime}\}\subseteq D, or {1,2}D\{1,2^{\prime}\}\subseteq D. Since g(1,0)=g(0,2)=g(1,2)=2g(1,0)=g(0,2^{\prime})=g(1,2^{\prime})=2, we have 2D2\in D, which means that DD satisfies case 3.

It remains to show that any value cD{0,1,2}c\in D\cap\{0^{\prime},1^{\prime},2\} is an optimal move for the EP. Let yj:=fj(xi+1,,xj)y_{j}:=f_{j}(x_{i+1},\dots,x_{j}), where j=i,i+1,,nj=i,i+1,\dots,n, be the winning strategy for the EP. Then the tuple

(a1,b1,,ai1,bi1,ai,fi(),ai+1,fi+1(ai+1),ai+2,fi+2(ai+1,ai+2),,an,fn(ai+1,,an))\displaystyle(a_{1},b_{1},\dots,a_{i-1},b_{i-1},a_{i},f_{i}(),a_{i+1},f_{i+1}(a_{i+1}),a_{i+2},f_{i+2}(a_{i+1},a_{i+2}),\dots,a_{n},f_{n}(a_{i+1},\dots,a_{n})) (4)

is a solution of the quantifier-free part Φ\Phi for any ai+1,,anAa_{i+1},\dots,a_{n}\in A. By the definition of DD the tuple

(a1,b1,,ai1,bi1,ai,c,1,ci+1,1,ci+2,,1,cn)\displaystyle(a_{1},b_{1},\dots,a_{i-1},b_{i-1},a_{i},c,1,c_{i+1},1,c_{i+2},\dots,1,c_{n}) (5)

is a solution of Φ\Phi for some ci+1,,cnAc_{i+1},\dots,c_{n}\in A. Applying gg to the tuples (4) and (5) coordinate-wise we derive that the tuple

(a1,b1,,ai1,bi1,ai,c,\displaystyle(a_{1},b_{1},\dots,a_{i-1},b_{i-1},a_{i},c,
ai+1,g(fi+1(ai+1),\displaystyle a_{i+1},g(f_{i+1}(a_{i+1}), ci+1),ai+2,g(fi+2(ai+1,ai+2),ci+2),,an,g(fn(ai+1,,an),cn))\displaystyle c_{i+1}),a_{i+2},g(f_{i+2}(a_{i+1},a_{i+2}),c_{i+2}),\dots,a_{n},g(f_{n}(a_{i+1},\dots,a_{n}),c_{n}))

is a solution of Φ\Phi for any ai+1,,anAa_{i+1},\dots,a_{n}\in A. Hence yi=cy_{i}=c is an optimal move for the EP, which completes the proof. ∎

Thus, we proved Theorem 5 from Section 2.

5 Proof of the main result

5.1 Necessary definitions and notations

In the paper we assume that the overall domain AA is finite and fixed. To simplify notations we even assume that A={1,2,,|A|}A=\{1,2,\dots,|A|\}. For a positive integer mm by [m][m] we denote the set {1,2,,m}\{1,2,\dots,m\}.

For two binary relations S1S_{1} and S2S_{2} by S1+S2S_{1}+S_{2} we denote the composition of two relations, that is S1+S2=SS_{1}+S_{2}=S, where S(x,y)=zS1(x,z)S2(z,y)S(x,y)=\exists z\;S_{1}(x,z)\wedge S_{2}(z,y). By S1S2S_{1}-S_{2} we denote the binary relation S(x,y)=zS1(x,z)S2(y,z)S(x,y)=\exists z\;S_{1}(x,z)\wedge S_{2}(y,z), that is, S1S2=S1+S2S_{1}-S_{2}=S_{1}+S_{2}^{\prime}, where S2S_{2}^{\prime} is obtained from S2S_{2} by switching the coordinates. Similarly, we can write U1+S2U_{1}+S_{2} if U1U_{1} is unary, that is U1+S2=UU_{1}+S_{2}=U, where U(x)=zU1(z)S2(z,x)U(x)=\exists z\;U_{1}(z)\wedge S_{2}(z,x).

For a formula Φ\Phi and some free variables u1,,usu_{1},\dots,u_{s} of this formula by Φu1usv1vs\Phi\downarrow\begin{smallmatrix}u_{1}&\dots&u_{s}\\ v_{1}&\dots&v_{s}\end{smallmatrix} we denote the formula obtained from Φ\Phi by substituting each uiu_{i} by viv_{i}.

For a relation RAnR\subseteq A^{n} and i[n]i\in[n] by pri(R)\operatorname{pr}_{i}(R) we denote the projection of RR onto the ii-th coordinate. Similarly for a constraint C=R(u1,,us)C=R(u_{1},\dots,u_{s}) by prui(C)\operatorname{pr}_{u_{i}}(C) we denote pri(R)\operatorname{pr}_{i}(R).

Sometimes it will be convenient to assume that some of the variables of a relation are external parameters. Thus, a relation of arity |A|+2|A|+2 is called a 𝐳\mathbf{z}-parameterized binary relation, where 𝐳A|A|\mathbf{z}\in A^{|A|}. Some relations have two or even three parameters. Thus, we may consider (𝐳,δ,α)(\mathbf{z},\delta,\alpha)-parameterized binary relation QQ, where 𝐳A|A|\mathbf{z}\in A^{|A|}, δAk\delta\in A^{k}, and αAm\alpha\in A^{m}, which is a relation of arity |A|+k+m+2|A|+k+m+2. To refer to the binary relation for the fixed parameters 𝐳,δ\mathbf{z},\delta, and α\alpha we write Qαδ𝐳\prescript{\mathbf{z}}{\delta}{Q^{\alpha}}. Sometimes we replace the α\alpha-parameter with \forall or \forall\forall meaning that we universally quantify this parameter in two different ways (see equations (1) and (2)).

A parameterized unary relation is called nonempty if it is nonempty for every choice of the parameters. For an instance \mathcal{I} by Var()\operatorname{Var}(\mathcal{I}) we denote the set of all variables appearing in this instance.

For a CSP instance \mathcal{I} (conjunctive formula) and some variables u1,,ukVar()u_{1},\dots,u_{k}\in\operatorname{Var}(\mathcal{I}) by (u1,,uk)\mathcal{I}(u_{1},\dots,u_{k}) we denote the set of all tuples (a1,,ak)(a_{1},\dots,a_{k}) such that \mathcal{I} has a solution with ui=aiu_{i}=a_{i} for every ii. Thus, (x1,,xk)\mathcal{I}(x_{1},\dots,x_{k}) defines a kk-ary relation. Since this relation is defined from \mathcal{I} by adding existential quantifiers, the relation (x1,,xk)\mathcal{I}(x_{1},\dots,x_{k}) is q-definable from relations in \mathcal{I}.

5.2 Universal subset

Suppose SWAtS\subseteq W\subseteq A^{t} and Σ\Sigma is a set of relations on AA. We say that SS is a universal subset of WW over Σ\Sigma, denote SΣWS\mathrel{\trianglelefteq}^{\Sigma}W, if there exist ss and a relation RAt+sR\subseteq A^{t+s} q-definable from Σ\Sigma such that

S(y1,,yt)\displaystyle S(y_{1},\dots,y_{t}) =x1xsR(y1,,yt,x1,,xs),\displaystyle=\forall x_{1}\dots\forall x_{s}\;R(y_{1},\dots,y_{t},x_{1},\dots,x_{s}),
W(y1,,yt)\displaystyle W(y_{1},\dots,y_{t}) =xR(y1,,yt,x,,x).\displaystyle=\forall x\;R(y_{1},\dots,y_{t},x,\dots,x).

Notice that SΣWS\mathrel{\trianglelefteq}^{\Sigma}W also implies that Σ\Sigma q-defines both SS and WW. To emphasize that SS and WW are different we write SΣWS\mathrel{\lhd}^{\Sigma}W instead of SΣWS\mathrel{\trianglelefteq}^{\Sigma}W.

Lemma 11 (proved in Section 6.2).

Suppose

W(y1,,yt)\displaystyle W(y_{1},\dots,y_{t}) =u1u2uW1(z1,1,,z1,n1)Wm(zm,1,,zm,nm),\displaystyle=\exists u_{1}\exists u_{2}\dots\exists u_{\ell}\;\;\;W_{1}(z_{1,1},\dots,z_{1,n_{1}})\wedge\dots\wedge W_{m}(z_{m,1},\dots,z_{m,n_{m}}),
S(y1,,yt)\displaystyle S(y_{1},\dots,y_{t}) =u1u2uS1(z1,1,,z1,n1)Sm(zm,1,,zm,nm),\displaystyle=\exists u_{1}\exists u_{2}\dots\exists u_{\ell}\;\;\;S_{1}(z_{1,1},\dots,z_{1,n_{1}})\wedge\dots\wedge S_{m}(z_{m,1},\dots,z_{m,n_{m}}),

where each zi,j{y1,,yt,u1,,u}z_{i,j}\in\{y_{1},\dots,y_{t},u_{1},\dots,u_{\ell}\}, and SiΣWiS_{i}\mathrel{\trianglelefteq}^{\Sigma}W_{i} for every ii. Then SΣWS\mathrel{\trianglelefteq}^{\Sigma}W.

For k0k\geqslant 0 we write SkΣWS\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}_{k}^{\Sigma}W if SΣC1ΣC2ΣΣCkΣWS\mathrel{\trianglelefteq}^{\Sigma}C_{1}\mathrel{\trianglelefteq}^{\Sigma}C_{2}\mathrel{\trianglelefteq}^{\Sigma}\dots\mathrel{\trianglelefteq}^{\Sigma}C_{k}\mathrel{\trianglelefteq}^{\Sigma}W for some relations C1,,CkC_{1},\dots,C_{k} q-definable from Σ\Sigma. We often omit kk, if we do not want to specify the length of the sequence. In Section 6 we usually omit Σ\Sigma and write just \mathrel{\trianglelefteq}, \mathrel{\lhd}, or \mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}} meaning that Σ={R}\Sigma=\{R\}.

It follows from the definition that for any α\alpha-parameterized relation QQ we have Q{Q}QQ^{\forall\forall}\mathrel{\trianglelefteq}^{\{Q\}}Q^{\forall}.

5.3 Induced CSP Instances

Suppose Ψ=y0x1y1xnynΦ\Psi=\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\Phi is an instance of QCSP(Γ)\operatorname{QCSP}(\Gamma), where Φ\Phi a quantifier-free conjunctive formula. Let us show how to build an equivalent CSP instance of an exponential size. If the sentence Ψ\Psi holds, then there exist Skolem functions f0,,fnf_{0},\dots,f_{n} defining a winning strategy for the existential player (EP), that is, she can play yi=fi(x1,,xi)y_{i}=f_{i}(x_{1},\dots,x_{i}). Since it is a winning strategy, if the universal player (UP) plays (x1,x2,,xn)=(a1,a2,,an)(x_{1},x_{2},\dots,x_{n})=(a_{1},a_{2},\dots,a_{n}) and the EP plays (y0,y1,,yn)=(f0(),f1(a1),f2(a1,a2),,fn(a1,,an))(y_{0},y_{1},\dots,y_{n})=(f_{0}(),f_{1}(a_{1}),f_{2}(a_{1},a_{2}),\dots,f_{n}(a_{1},\dots,a_{n})), then the obtained evaluation should satisfy the quantifier-free part Φ\Phi. We introduce an existential variable yia1,,aiy_{i}^{a_{1},\dots,a_{i}} for every ii and a1,,aiAa_{1},\dots,a_{i}\in A. Then Ψ\Psi is equivalent to the satisfiability of the CSP instance a1,,anA(Φx1xny1y2yna1any1a1y2a1,a2yna1,,an)\bigwedge\limits_{a_{1},\dots,a_{n}\in A}(\Phi\downarrow\begin{smallmatrix}x_{1}&\dots&x_{n}&y_{1}&y_{2}&\dots&y_{n}\\ a_{1}&\dots&a_{n}&y_{1}^{a_{1}}&y_{2}^{a_{1},a_{2}}&\dots&y_{n}^{a_{1},\dots,a_{n}}\end{smallmatrix}). Notice that this instance is of exponential size, that is why we cannot really use it in the algorithm. Since usually we do not have constant relations in our constraint language Γ\Gamma we replace the constants 1,2,,|A|A1,2,\dots,|A|\in A by the respective universally quantified variables z1,,z|A|z_{1},\dots,z_{|A|}. Since in the paper we do not care about a concrete conjunctive formula Φ\Phi, we usually define the relation RA2n+1R\subseteq A^{2n+1} by R(y0,y1,,yn,x1,,xn)=ΦR(y_{0},y_{1},\dots,y_{n},x_{1},\dots,x_{n})=\Phi and work with it instead of constraints of Φ\Phi.

In Section 6 the crucial idea is to show that the induced exponential-size CSP instance can be solved by arc-consistency, and to make it work we replace the relations RR by stronger relations defined below. For RA2n+1R\subseteq A^{2n+1} and m{0,1,,n1}m\in\{0,1,\dots,n-1\} put

𝒲Rm(y0,,ym,x1,,xm)=\displaystyle\mathcal{W}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m})= xym+1ym+2ynR(y0,,yn,x1,,xm,x,x,,x),\displaystyle\forall x\exists y_{m+1}\exists y_{m+2}\dots\exists y_{n}R(y_{0},\dots,y_{n},x_{1},\dots,x_{m},x,x,\dots,x),
𝒮Rm(y0,,ym,x1,,xm)=\displaystyle\mathcal{S}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m})= xym+1xym+2ynR(y0,,yn,x1,,xm,x,x,,x).\displaystyle\forall x\exists y_{m+1}\forall x^{\prime}\exists y_{m+2}\dots\exists y_{n}R(y_{0},\dots,y_{n},x_{1},\dots,x_{m},x,x^{\prime},\dots,x^{\prime}).

Notice that 𝒮Rn1=𝒲Rn1\mathcal{S}_{R}^{n-1}=\mathcal{W}_{R}^{n-1}. We set by definition that 𝒮Rn=𝒲Rn=R\mathcal{S}_{R}^{n}=\mathcal{W}_{R}^{n}=R. The crucial property of 𝒲Rm\mathcal{W}_{R}^{m} and 𝒮Rm\mathcal{S}_{R}^{m} is formulated in the following lemma.

Lemma 12.

Suppose RA2n+1R\subseteq A^{2n+1} and m{0,1,,n}m\in\{0,1,\dots,n\}, then 𝒮Rm{R}𝒲Rm\mathcal{S}_{R}^{m}\mathrel{\trianglelefteq}^{\{R\}}\mathcal{W}_{R}^{m}.

Proof.

We define a relation QQ by

Q(y0,,ym,\displaystyle Q(y_{0},\dots,y_{m}, x1,,xm,x,x1,,x|A|)=\displaystyle x_{1},\dots,x_{m},x,x^{1},\dots,x^{|A|})=
ym+1aA\displaystyle\exists y_{m+1}\bigwedge\limits_{a\in A} (ym+2ym+3ynR(y0,,ym,ym+1,ym+2,,yn,x1,,xm,x,xa,,xa)).\displaystyle\left(\exists y_{m+2}\exists y_{m+3}\dots\exists y_{n}\;R(y_{0},\dots,y_{m},y_{m+1},y_{m+2},\dots,y_{n},x_{1},\dots,x_{m},x,x^{a},\dots,x^{a})\right).

Then the relation QQ witnesses that 𝒮Rm𝒲Rm\mathcal{S}_{R}^{m}\mathrel{\trianglelefteq}\mathcal{W}_{R}^{m}:

𝒲Rm(y0,,ym,x1,,xm)\displaystyle\mathcal{W}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m}) =xQ(y0,,ym,x1,,xm,x,x,,x),\displaystyle=\forall x\;Q(y_{0},\dots,y_{m},x_{1},\dots,x_{m},x,x,\dots,x),
𝒮Rm(y0,,ym,x1,,xm)\displaystyle\mathcal{S}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m}) =xx1x2x|A|Q(y0,,ym,x1,,xm,x,x1,x2,,x|A|).\displaystyle=\forall x\forall x^{1}\forall x^{2}\dots\forall x^{|A|}\;Q(y_{0},\dots,y_{m},x_{1},\dots,x_{m},x,x^{1},x^{2},\dots,x^{|A|}).

Thus, we can define a bunch of CSP instances equivalent to the original QCSP instance.

Lemma 13.

Suppose y0x1y1xnynΦ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\Phi is an instance of QCSP(Γ)\operatorname{QCSP}(\Gamma) and RA2n+1R\subseteq A^{2n+1} is defined by R(y0,y1,,yn,x1,,xn)=ΦR(y_{0},y_{1},\dots,y_{n},x_{1},\dots,x_{n})=\Phi. Then the following conditions are equivalent:

  1. 1.

    y0x1y1xnynΦ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\Phi holds;

  2. 2.

    a1,,anA(Φx1xny1y2yna1any1a1y2a1,a2yna1,,an)\bigwedge\limits_{a_{1},\dots,a_{n}\in A}(\Phi\downarrow\begin{smallmatrix}x_{1}&\dots&x_{n}&y_{1}&y_{2}&\dots&y_{n}\\ a_{1}&\dots&a_{n}&y_{1}^{a_{1}}&y_{2}^{a_{1},a_{2}}&\dots&y_{n}^{a_{1},\dots,a_{n}}\end{smallmatrix}) has a solution;

  3. 3.

    a1,,anAR(y0,y1a1,y2a1,a2,,yna1,,an,a1,,an)\bigwedge\limits_{a_{1},\dots,a_{n}\in A}R(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{n}^{a_{1},\dots,a_{n}},a_{1},\dots,a_{n}) has a solution;

  4. 4.

    a1,,anA(Φx1xny1y2ynza1zany1a1y2a1,a2yna1,,an)\bigwedge\limits_{a_{1},\dots,a_{n}\in A}(\Phi\downarrow\begin{smallmatrix}x_{1}&\dots&x_{n}&y_{1}&y_{2}&\dots&y_{n}\\ z_{a_{1}}&\dots&z_{a_{n}}&y_{1}^{a_{1}}&y_{2}^{a_{1},a_{2}}&\dots&y_{n}^{a_{1},\dots,a_{n}}\end{smallmatrix}) has a solution for every z1,,z|A|Az_{1},\dots,z_{|A|}\in A;

  5. 5.

    a1,,anAR(y0,y1a1,y2a1,a2,,yna1,,an,za1,,zan)\bigwedge\limits_{a_{1},\dots,a_{n}\in A}R(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{n}^{a_{1},\dots,a_{n}},z_{a_{1}},\dots,z_{a_{n}}) has a solution for every z1,,z|A|Az_{1},\dots,z_{|A|}\in A;

  6. 6.

    m{0,1,,n}a1,,amA𝒮Rm(y0,y1a1,y2a1,a2,,yma1,,am,za1,,zam)\bigwedge\limits_{\begin{subarray}{c}m\in\{0,1,\dots,n\}\\ a_{1},\dots,a_{m}\in A\end{subarray}}\mathcal{S}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}}) has a solution for every z1,,z|A|Az_{1},\dots,z_{|A|}\in A.

Proof.

Trivially, we have 1231\leftrightarrow 2\leftrightarrow 3 and 65426\rightarrow 5\leftrightarrow 4\rightarrow 2. To complete the proof let us show that 363\rightarrow 6. Let us define a solution to 6 for a concrete z1,,z|A|Az_{1},\dots,z_{|A|}\in A. Let yia1,,ai=bia1,,aiy_{i}^{a_{1},\dots,a_{i}}=b_{i}^{a_{1},\dots,a_{i}} be a solution of 3. Then a solution to 6 can be defined by yia1,,ai=biza1,,zaiy_{i}^{a_{1},\dots,a_{i}}=b_{i}^{z_{a_{1}},\dots,z_{a_{i}}}. ∎

Denote R=m{0,1,,n}a1,,amA𝒮Rm(y0,y1a1,y2a1,a2,,yma1,,am,za1,,zam)\mathcal{I}_{R}=\bigwedge\limits_{\begin{subarray}{c}m\in\{0,1,\dots,n\}\\ a_{1},\dots,a_{m}\in A\end{subarray}}\mathcal{S}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}}), that is the equivalent CSP instance from item 6. Notice that the variables z1,,z|A|z_{1},\dots,z_{|A|} are viewed as external parameters of the instance R\mathcal{I}_{R} and we call such instances 𝐳\mathbf{z}-parameterized. That is why, we assume that z1,,z|A|z_{1},\dots,z_{|A|} are not in Var(R)\operatorname{Var}(\mathcal{I}_{R}). Also, when we refer to the constraint

𝒮Rm(y0,y1a1,y2a1,a2,,yma1,,am,za1,,zam)\mathcal{S}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}})

we usually omit these variables and write 𝒮Rm(y0,y1a1,y2a1,a2,,yma1,,am)\mathcal{S}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}}) instead.

5.4 Mighty tuples

In this subsection, we formulate five sufficient conditions for the QCSP over a constraint language Γ\Gamma to be PSpace-hard. One of them, already defined in Section 2, is also a necessary condition.

Mighty tuple I. A tuple (Q,D,B,C,Δ)(Q,D,B,C,\Delta) is called a mighty tuple I if Δ\Delta is a 𝐳\mathbf{z}-parameterized kk-ary relation, QQ is a (𝐳,δ,α)(\mathbf{z},\delta,\alpha)-parameterized binary relations, DD, BB, and CC are (𝐳,δ)(\mathbf{z},\delta)-parameterized unary relations, and they satisfy the following conditions:

  1. 1.

    Δ𝐳\prescript{\mathbf{z}}{}{\Delta}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    Bδ𝐳\prescript{\mathbf{z}}{\delta}{B}, Cδ𝐳\prescript{\mathbf{z}}{\delta}{C}, and Dδ𝐳\prescript{\mathbf{z}}{\delta}{D} are nonempty for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta};

  3. 3.

    Qαδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\alpha} is an equivalence relation on Dδ𝐳\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} and αAm\alpha\in A^{m};

  4. 4.

    Qδ𝐳=Dδ𝐳×Dδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall}=\prescript{\mathbf{z}}{\delta}{D}\times\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta};

  5. 5.

    Bδ𝐳\prescript{\mathbf{z}}{\delta}{B} and Cδ𝐳\prescript{\mathbf{z}}{\delta}{C} are equivalence classes of Qδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall\forall};

  6. 6.

    there exists 𝐳A|A|\mathbf{z}\in A^{|A|} such that Bδ𝐳Cδ𝐳\prescript{\mathbf{z}}{\delta}{B}\neq\prescript{\mathbf{z}}{\delta}{C} for every δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}.

In Section 7 we prove the following theorem.

Theorem 14.

Suppose (Q,D,B,C,Δ)(Q,D,B,C,\Delta) is a mighty tuple I. Then QCSP({Q,D,B,C,Δ})\operatorname{QCSP}(\{Q,D,B,C,\Delta\}) is PSpace-hard.

In the paper instead of deriving a mighty tuple I, which is rather complicated, we derive one of the easier tuples that we call a mighty tuple II, a mighty tuple III, a mighty tuple IV, and a mighty tuple V. They are defined below.

Mighty tuple II. A tuple (Q,D,B,C)(Q,D,B,C) is called a mighty tuple II if QQ is a (𝐳,α)(\mathbf{z},\alpha)-parameterized binary relation, DD, BB, and CC are 𝐳\mathbf{z}-parameterized unary relations, and they satisfy the following conditions:

  1. 1.

    B𝐳\prescript{\mathbf{z}}{}{B}\neq\varnothing and C𝐳\prescript{\mathbf{z}}{}{C}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    Qα𝐳\prescript{\mathbf{z}}{}{Q^{\alpha}} is an equivalence relations on D𝐳\prescript{\mathbf{z}}{}{D} for every 𝐳\mathbf{z} and α\alpha;

  3. 3.

    B𝐳+Q𝐳=B𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{Q^{\forall\forall}}=\prescript{\mathbf{z}}{}{B} and C𝐳+Q𝐳=C𝐳\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{Q^{\forall\forall}}=\prescript{\mathbf{z}}{}{C} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  4. 4.

    B𝐳+Q𝐳=C𝐳+Q𝐳=D𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{Q^{\forall}}=\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{Q^{\forall}}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  5. 5.

    B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|}.

Mighty tuple III. A tuple (Q,B,C)(Q,B,C) is called a mighty tuple III if QQ is a (𝐳,α)(\mathbf{z},\alpha)-parameterized binary relation, BB and CC are 𝐳\mathbf{z}-parameterized unary relations, and they satisfy the following conditions:

  1. 1.

    B𝐳\prescript{\mathbf{z}}{}{B}\neq\varnothing and C𝐳\prescript{\mathbf{z}}{}{C}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    B𝐳+Q𝐳=B𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{Q^{\forall\forall}}=\prescript{\mathbf{z}}{}{B} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    Q𝐳+C𝐳=C𝐳\prescript{\mathbf{z}}{}{Q^{\forall\forall}}+\prescript{\mathbf{z}}{}{C}=\prescript{\mathbf{z}}{}{C} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  4. 4.

    Q𝐳(B𝐳×C𝐳)\prescript{\mathbf{z}}{}{Q}^{\forall}\cap(\prescript{\mathbf{z}}{}{B}\times\prescript{\mathbf{z}}{}{C})\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  5. 5.

    B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|}.

Mighty tuple IV. A tuple (Q,D,B,C)(Q,D,B,C) is called a mighty tuple IV if QQ is a (𝐳,α)(\mathbf{z},\alpha)-parameterized binary relation, DD, BB, and CC are 𝐳\mathbf{z}-parameterized unary relations, and they satisfy the following conditions:

  1. 1.

    B𝐳D𝐳\varnothing\neq\prescript{\mathbf{z}}{}{B}\subseteq\prescript{\mathbf{z}}{}{D} and C𝐳D𝐳\varnothing\neq\prescript{\mathbf{z}}{}{C}\subseteq\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    B𝐳+Q𝐳=B𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{Q^{\forall\forall}}=\prescript{\mathbf{z}}{}{B} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    B𝐳+Q𝐳=D𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{Q^{\forall}}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  4. 4.

    D𝐳+Q𝐳=D𝐳\prescript{\mathbf{z}}{}{D}+\prescript{\mathbf{z}}{}{Q^{\forall\forall}}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  5. 5.

    B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|}.

As we prove in Section 7.3 the existence of a mighty tuple II, a mighty tuple III, and a mighty tuple IV are equivalent:

Lemma 15.

Suppose Σ\Sigma is a set of relations on AA. Then the following conditions are equivalent:

  1. 1.

    Σ\Sigma q-defines a mighty tuple II;

  2. 2.

    Σ\Sigma q-defines a mighty tuple III;

  3. 3.

    Σ\Sigma q-defines a mighty tuple IV.

Moreover, each of them implies a mighty tuple I and therefore guarantees PSpace-hardness.

Lemma 16.

Suppose TT is a mighty tuple of type II, III, or IV. Then relations of TT q-define a mighty tuple I.

Mighty tuple V. A tuple (Q,D)(Q,D) is called a mighty tuple V if QQ is a (𝐳,α)(\mathbf{z},\alpha)-parameterized binary relation, DD is a nonempty 𝐳\mathbf{z}-parameterized unary relation, and they satisfy the following conditions:

  1. 1.

    {(d,d)dD𝐳}Q𝐳\{(d,d)\mid d\in\prescript{\mathbf{z}}{}{D}\}\subseteq\prescript{\mathbf{z}}{}{Q}^{\forall} for every 𝐳A|A|\mathbf{z}\in A^{|A|};   (Q𝐳\prescript{\mathbf{z}}{}{Q}^{\forall} is reflexive)

  2. 2.

    pr1(Q𝐳)=pr2(Q𝐳)=D𝐳\operatorname{pr}_{1}(\prescript{\mathbf{z}}{}{Q}^{\forall\forall})=\operatorname{pr}_{2}(\prescript{\mathbf{z}}{}{Q}^{\forall\forall})=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    Q𝐳{(d,d)dA}=\prescript{\mathbf{z}}{}{Q}^{\forall\forall}\cap\{(d,d)\mid d\in A\}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|}.  (Q𝐳\prescript{\mathbf{z}}{}{Q}^{\forall\forall} is irreflexive)

In Section 7.4 we prove that a mighty tuple V implies a mighty tuple I.

Lemma 17.

Suppose (Q,D)(Q,D) is a mighty tuple V. Then there exists a mighty tuple I q-definable from {Q,D}\{Q,D\}.

5.5 Reductions

A 𝐳\mathbf{z}-parameterized reduction D()D^{(\top)} for a 𝐳\mathbf{z}-parameterized CSP instance \mathcal{I} is a mapping that assigns a 𝐳\mathbf{z}-parameterized unary relation Du()D_{u}^{(\top)} to every variable uu of \mathcal{I}. Then for any constraint C=R(u1,,us)C=R(u_{1},\dots,u_{s}) by C()C^{(\top)} we denote the constraint R()(u1,,us)R^{(\top)}(u_{1},\dots,u_{s}), where R()𝐳(u1,,us)=R𝐳(u1,,us)i=1s(uiDui()𝐳)\prescript{\mathbf{z}}{}{R}^{(\top)}(u_{1},\dots,u_{s})=\prescript{\mathbf{z}}{}{R}(u_{1},\dots,u_{s})\wedge\bigwedge_{i=1}^{s}(u_{i}\in\prescript{\mathbf{z}}{}{D}_{u_{i}}^{(\top)}). A reduction D()D^{(\top)} of \mathcal{I} is called 1-consistent if for any constraint C=R(u1,,us)C=R(u_{1},\dots,u_{s}) in \mathcal{I} and any i{1,2,,s}i\in\{1,2,\dots,s\} we have prui(C())=Dui()\operatorname{pr}_{u_{i}}(C^{(\top)})=D_{u_{i}}^{(\top)}.

We say that a 𝐳\mathbf{z}-parameterized reduction D()D^{(\bot)} is smaller than a 𝐳\mathbf{z}-parameterized reduction D()D^{(\top)} if Du()𝐳Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\bot)}\subseteq\prescript{\mathbf{z}}{}{D}_{u}^{(\top)} for every uu and 𝐳\mathbf{z}, and D()D()D^{(\bot)}\neq D^{(\top)}. In this case we write D()D()D^{(\bot)}\subsetneq D^{(\top)}. A reduction D()D^{(\top)} is called nonempty if Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\top)} is nonempty for every uu and 𝐳\mathbf{z}.

For a 𝐳\mathbf{z}-parameterized reduction D()D^{(\top)} of R\mathcal{I}_{R} by Dyma1,,am(,0)D^{(\top,0)}_{y_{m}^{a_{1},\dots,a_{m}}} we denote the 𝐳\mathbf{z}-parameterized unary relation defined by

(𝒲Rm(y0,y1a1,y2a1,a2,,yma1,,am)i=0m1(yia1,,aiDyia1,,ai()))(yma1,,am),\left(\mathcal{W}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}})\wedge\bigwedge\limits_{i=0}^{m-1}(y_{i}^{a_{1},\dots,a_{i}}\in D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)})\right)(y_{m}^{a_{1},\dots,a_{m}}),

which is the set of all possible values of yma1,,amy_{m}^{a_{1},\dots,a_{m}} in solutions of the conjunction in the brackets. In other words, Du(,0)D^{(\top,0)}_{u} is the restriction on uu we get by restricting the variables u0,u1,,um1u_{0},u_{1},\dots,u_{m-1} in 𝒲Rm(u0,u1,,um1,u)\mathcal{W}_{R}^{m}(u_{0},u_{1},\dots,u_{m-1},u) to D()D^{(\top)}. Notice that if D()D^{(\top)} is 1-consistent then Du()Du(,0)D^{(\top)}_{u}\subseteq D^{(\top,0)}_{u} for every uu. A reduction D()D^{(\top)} of R\mathcal{I}_{R} is called a universal reduction if Du()Du(,0)D^{(\top)}_{u}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}D^{(\top,0)}_{u} for every uVar(R)u\in\operatorname{Var}(\mathcal{I}_{R}).

5.6 Proof of Theorems 3, 6, and 7

As we said before for a given instance of the QCSP we define an equivalent 𝐳\mathbf{z}-parameterized exponential CSP R\mathcal{I}_{R} whose only relations are 𝒮Rm\mathcal{S}_{R}^{m}. The next theorem shows that either we can find a 1-consistent reduction of R\mathcal{I}_{R}, or we can find a small subinstance without a solution for some 𝐳\mathbf{z}, or the QCSP over this language is PSpace-hard.

Theorem 18.

Suppose RA2n+1R\subseteq A^{2n+1}. Then one of the following conditions holds:

  1. 1.

    there exists a 𝐳\mathbf{z}-parameterized nonempty 1-consistent reduction for R\mathcal{I}_{R};

  2. 2.

    there exists a subinstance 𝒥R\mathcal{J}\subseteq\mathcal{I}_{R} with at most (n|A|)22|A||A|+1(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} variables not having a solution for some 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    there exists a mighty tuple III q-definable from RR.

The next theorem as well as Theorem 18 is proved in Section 6.3.

Theorem 19.

Suppose RA2n+1R\subseteq A^{2n+1}, D()D^{(\top)} is an inclusion-maximal 𝐳\mathbf{z}-parameterized 1-consistent nonempty reduction for R\mathcal{I}_{R}. Then D()D^{(\top)} is a universal reduction.

Then we consider the case when there exists a 1-consistent universal reduction for R\mathcal{I}_{R}. We will show that if the instance has no solutions, then we can find a smaller 1-consistent reduction. We do this in two steps. First, in Section 6.4 we prove the following theorem that states that we can find a universal subset on some Du()D_{u}^{(\top)}.

Theorem 20.

Suppose RA2n+1R\subseteq A^{2n+1}, R\mathcal{I}_{R} has no solutions for some 𝐳\mathbf{z}, D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction for R\mathcal{I}_{R}. Then one of the following conditions holds:

  1. 1.

    there exists a variable uu of R\mathcal{I}_{R} and a 𝐳\mathbf{z}-parameterized unary relation BB such that BDu()B\mathrel{\lhd}D_{u}^{(\top)};

  2. 2.

    there exists a mighty tuple V q-definable from RR.

Then we show (in Section 6.5) that this universal subset can be extended to a smaller 1-consistent reduction.

Theorem 21.

Suppose RA2n+1R\subseteq A^{2n+1}, D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction for R\mathcal{I}_{R}, uVar(R)u\in\operatorname{Var}(\mathcal{I}_{R}), BDu()B\mathrel{\lhd}D_{u}^{(\top)} is a 𝐳\mathbf{z}-parameterized nonempty unary relation. Then one of the following conditions holds:

  1. 1.

    there exists a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction D()D^{(\bot)} for R\mathcal{I}_{R} that is smaller than D()D^{(\top)};

  2. 2.

    there exists a mighty tuple IV q-definable from RR.

In both cases, there is an option that it cannot be done, but this implies that the QCSP is PSpace-hard. Combining above theorems we obtain the fundamental fact that it is sufficient to run arc-consistency algorithm on R\mathcal{I}_{R} to be sure that it has a solution.

Theorem 22.

Suppose RA2n+1R\subseteq A^{2n+1}, there exists a 𝐳\mathbf{z}-parameterized nonempty 1-consistent reduction for R\mathcal{I}_{R}. Then one of the following conditions holds:

  1. 1.

    R\mathcal{I}_{R} has a solution for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    there exists a mighty tuple IV or V q-definable from RR.

Proof.

Assume the converse. Suppose there does not exist a mighty tuple IV or V q-definable from RR and R\mathcal{I}_{R} has no solutions for some 𝐳\mathbf{z}. By Theorem 19 there exists a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction D(1)D^{(1)} for R\mathcal{I}_{R}. By Theorem 20 there exists a variable uu of R\mathcal{I}_{R} and a 𝐳\mathbf{z}-parameterized unary relation BB such that BDu(1)B\mathrel{\lhd}D_{u}^{(1)}. By Theorem 21 there exists a smaller 𝐳\mathbf{z}-parameterized 1-consistent universal reduction D(2)D^{(2)}. Then iteratively applying Theorems 20 and 21 we build reductions D(1),D(2),,D(s)D^{(1)},D^{(2)},\dots,D^{(s)}. Since we never stop and we cannot reduce domains forever, we get a contradiction. ∎

Summarizing above theorems we obtain the following theorem.

Theorem 23.

Suppose Γ\Gamma is a constraint language on a finite set AA. Then one of the following conditions holds:

  1. 1.

    for any No-instance y0x1y1xnynΨ\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}\;\Psi of QCSP(Γ)\operatorname{QCSP}(\Gamma) there exists SAnS\subseteq A^{n} with |S||A|2(n|A|)22|A||A|+1|S|\leqslant|A|^{2}\cdot(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} such that y0x1y1xnyn((x1,,xn)SΨ)\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}((x_{1},\dots,x_{n})\in S\rightarrow\Psi) does not hold;

  2. 2.

    there exists a mighty tuple III, IV, or V q-definable over Γ\Gamma.

Proof.

Below we assume that the second condition does not hold, that is, there does not exist a mighty tuple III, IV, or V q-definable over Γ\Gamma.

Let us prove condition 1. Put R(y0,y1,,yn,x1,,xn)=ΨR(y_{0},y_{1},\dots,y_{n},x_{1},\dots,x_{n})=\Psi. By Lemma 13, R\mathcal{I}_{R} has no solutions for some 𝐳A|A|\mathbf{z}\in A^{|A|}. Then by Theorem 22 there does not exist a 𝐳\mathbf{z}-parameterized nonempty 1-consistent reduction for R\mathcal{I}_{R}. Applying Theorem 18 to R\mathcal{I}_{R} we obtain that only case 2 is possible.

Thus, there exists a subinstance 𝒥R\mathcal{J}\subseteq\mathcal{I}_{R} with at most (n|A|)22|A||A|+1(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} variables not having a solution for some 𝐳=(b1,,b|A|)\mathbf{z}=(b_{1},\dots,b_{|A|}). Let us define an appropriate SAnS\subseteq A^{n}. For a tuple (a1,,ai)(a_{1},\dots,a_{i}) and i{0,1,,n2}i\in\{0,1,\dots,n-2\} by E(a1,,ai)E(a_{1},\dots,a_{i}) we denote the set

{(ba1,ba2,,bai,c,d,d,,dni)c,dA}.\{(b_{a_{1}},b_{a_{2}},\dots,b_{a_{i}},\underbrace{c,d,d,\dots,d}_{n-i})\mid c,d\in A\}.

Put E(a1,,an)={(ba1,,ban)}E(a_{1},\dots,a_{n})=\{(b_{a_{1}},\dots,b_{a_{n}})\} and E(a1,,an1)={(ba1,,ban1,c)cA}E(a_{1},\dots,a_{n-1})=\{(b_{a_{1}},\dots,b_{a_{n-1}},c)\mid c\in A\}. Then put S=yia1,,aiVar(𝒥)E(a1,,ai)S=\bigcup\limits_{y_{i}^{a_{1},\dots,a_{i}}\in\operatorname{Var}(\mathcal{J})}E(a_{1},\dots,a_{i}). We have

|S||A|2|Var(𝒥)||A|2(n|A|)22|A||A|+1.|S|\leqslant|A|^{2}\cdot|\operatorname{Var}(\mathcal{J})|\leqslant|A|^{2}\cdot(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}}.

Observe that tuples from SS cover all the constraints of 𝒥\mathcal{J} for 𝐳=(b1,,b|A|)\mathbf{z}=(b_{1},\dots,b_{|A|}). Therefore the CSP instance (a1,,an)SR(y0,y1a1,y2a1,a2,,yna1,,an,a1,,an)\bigwedge\limits_{(a_{1},\dots,a_{n})\in S}R(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{n}^{a_{1},\dots,a_{n}},a_{1},\dots,a_{n}) cannot be satisfied. Notice that the existence of a winning strategy for the EP in

y0x1y1xnyn((x1,,xn)SΨ)\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}((x_{1},\dots,x_{n})\in S\rightarrow\Psi)

is equivalent to the satisfiability of (a1,,an)SR(y0,y1a1,y2a1,a2,,yna1,,an,a1,,an)\bigwedge\limits_{(a_{1},\dots,a_{n})\in S}R(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{n}^{a_{1},\dots,a_{n}},a_{1},\dots,a_{n}). Hence, the sentence y0x1y1xnyn((x1,,xn)SΨ)\exists y_{0}\forall x_{1}\exists y_{1}\dots\forall x_{n}\exists y_{n}((x_{1},\dots,x_{n})\in S\rightarrow\Psi) does not hold, which completes the proof. ∎

Combining the above theorem with Theorem 14 and Lemmas 16 and 17, we derive Theorem 3. Assuming that PSpaceΠ2P\mathrm{PSpace}\neq\Pi_{2}^{P}, we obtain the following classification of PSpace-complete languages that is a bit stronger than the classification in Theorem 6:

Theorem 24.

Suppose Γ\Gamma is a constraint language on a finite set AA. Then the following conditions are equivalent:

  1. 1.

    QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-complete;

  2. 2.

    Γ\Gamma q-defines a mighty tuple I;

  3. 3.

    Γ\Gamma q-defines a mighty tuple II or V.

Proof.

2 implies 1 by Theorem 14. 3 implies 2 by Lemmas 16 and 17. Let us prove that 1 implies 3. As we assumed that PSpaceΠ2P\mathrm{PSpace}\neq\Pi_{2}^{P}, and the first case of Theorem 23 implies Π2P\Pi_{2}^{P}-membership, we derive the second case of Theorem 23, that is, there exists a mighty tuple III, IV, or V q-definable from Γ\Gamma. Using lemma 15 there exists a mighty tuple II or V q-definable from Γ\Gamma, which compltes the proof. ∎

For constraint languages containing all constant relations an easier classification of PSpace-complete languages is proved in Section 7.5.

Lemma 25.

Suppose Γ{x=aaA}\Gamma\supseteq\{x=a\mid a\in A\} is a set of relations on AA. Then the following conditions are equivalent:

  1. 1.

    Γ\Gamma q-defines a mighty tuple I;

  2. 2.

    Γ\Gamma q-defines a mighty tuple II;

  3. 3.

    there exist an equivalence relation σ\sigma on DAD\subseteq A and B,CAB,C\subsetneq A such that BC=AB\cup C=A and Γ\Gamma q-defines the relations (y1,y2D)(σ(y1,y2)(xB))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in B)) and (y1,y2D)(σ(y1,y2)(xC))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in C)).

The above lemma together with Theorem 14 implies Theorem 7.

As we prove in Lemmas 15 and 16, mighty tuples II, III, and IV are equivalent, and each of them implies a mighty tuple I. Nevertheless, it is still not clear whether a mighty tuple I implies a mighty tuple II. Moreover, we do not know how to q-define a mighty tuple II or V from a mighty tuple I even though we know it is possible by Theorem 24. Considering constraint languages with all constant relations from Lemma 25, we can observe that a mighty tuple V cannot be derived from the relations σ(y1,y2)(xB)\sigma(y_{1},y_{2})\vee(x\in B), σ(y1,y2)(xC)\sigma(y_{1},y_{2})\vee(x\in C) and constant relations. Hence, it is not always true that a mighty tuple I implies a mighty tuple V, but we can formulate the following conjecture.

Conjecture 1.

QCSP(Γ)\operatorname{QCSP}(\Gamma) is PSpace-complete if and only if Γ\Gamma q-defines a mighty tuple II.

6 Finding a solution of R\mathcal{I}_{R}

6.1 Definitions

We say that u0C1u1Cuu_{0}-C_{1}-u_{1}-\dots-C_{\ell}-u_{\ell} is a path in a CSP instance \mathcal{I} if CiC_{i} is a constraint of \mathcal{I} and ui,ui+1Var(Ci)u_{i},u_{i+1}\in\operatorname{Var}(C_{i}) for every ii. The number \ell is called the length of the path. We say that an instance is connected if any two variables are connected by a path. We say that an instance is a tree-instance if it is connected and there is no path u0C1u1u1Cuu_{0}-C_{1}-u_{1}-\dots-u_{\ell-1}-C_{\ell}-u_{\ell} such that 2\ell\geqslant 2, u0=ulu_{0}=u_{l}, and all the constraints C1,,CC_{1},\ldots,C_{\ell} are different.

An instance \mathcal{I}^{\prime} is called a universal weakening of \mathcal{I} if \mathcal{I} can be obtained from \mathcal{I}^{\prime} by replacing some constraint relations by their universal subsets over {R}\{R\}. We also denote it by \mathcal{I}\mathrel{\trianglelefteq}\mathcal{I}^{\prime}.

A (𝐳\mathbf{z}-parameterized) CSP instance \mathcal{I}^{\prime} is called a covering of a (𝐳\mathbf{z}-parameterized) CSP instance \mathcal{I} if there exists a mapping ϕ:Var()Var()\phi:\operatorname{Var}(\mathcal{I}^{\prime})\to\operatorname{Var}(\mathcal{I}) such that for every constraint S(u1,,ut)S(u_{1},\dots,u_{t}) of \mathcal{I}^{\prime} the constraint S(ϕ(u1),,ϕ(ut))S(\phi(u_{1}),\dots,\phi(u_{t})) is in \mathcal{I}. We say that ϕ(u)\phi(u) is the parent of uu and uu is a child of ϕ(u)\phi(u). The same child/parent terminology will also be applied to constraints. An instance is called a tree-covering if it is a covering and also a tree-instance. Notice that reductions for an instance can be naturally extended to their coverings.

For a (𝐳\mathbf{z}-parameterized) instance \mathcal{I} and a (𝐳\mathbf{z}-parameterized) reduction D()D^{(\top)} by ()\mathcal{I}^{(\top)} we denote the instance whose constraints are reduced to D()D^{(\top)}.

All the variables of R\mathcal{I}_{R} can be drawn as a tree with a root y0y_{0} and leaves yna1,,any_{n}^{a_{1},\dots,a_{n}}. We assume that the root is at the top and the leaves are at the bottom. Thus, whenever we refer to a lowest/highest variable we mean yia1,,aiy_{i}^{a_{1},\dots,a_{i}} with the maximal/minimal ii. Also we say that a variable yia1,,aiy_{i}^{a_{1},\dots,a_{i}} is from the ii-th level.

For a (𝐳\mathbf{z}-parameterized) instance \mathcal{I} and some variables u1,,umVar()u_{1},\dots,u_{m}\in\operatorname{Var}(\mathcal{I}) by (u1,,um)\mathcal{I}(u_{1},\dots,u_{m}) we denote the set of all tuples (a1,,am)(a_{1},\dots,a_{m}) such that \mathcal{I} has a solution with ui=aiu_{i}=a_{i} for every ii. Thus, (u1,,um)\mathcal{I}(u_{1},\dots,u_{m}) defines an mm-ary (𝐳\mathbf{z}-parameterized) relation. Notice that (u1,,um)\mathcal{I}(u_{1},\dots,u_{m}) is q-definable over the relations appearing in \mathcal{I}.

Suppose D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized universal reduction of R\mathcal{I}_{R}, that is, for every variable uu we have Du()Du(,0)D_{u}^{(\top)}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}D_{u}^{(\top,0)}. As we can repeat elements in the sequence \mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}} and any sequence longer than |A||A| has repetitions, we have B|A|CBCB\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}_{|A|}C\Leftrightarrow B\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}C for any B,CAB,C\subseteq A. The sequence witnessing that Du()|A|Du(,0)D_{u}^{(\top)}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}_{|A|}D_{u}^{(\top,0)} we denote by

Du(,|A|),Du(,|A|1),,Du(,1),Du(,0),D_{u}^{(\top,|A|)},D_{u}^{(\top,|A|-1)},\dots,D_{u}^{(\top,1)},D_{u}^{(\top,0)},

where Du(,|A|)=Du()D_{u}^{(\top,|A|)}=D_{u}^{(\top)}. Also, notice that the reduction D(,i)D^{(\top,i)} is defined independently on different variables, that is why we should not expect it to be 1-consistent.

To simplify the explanation we give names to some constraints we will need later.

CS,a1,,am:=\displaystyle C_{S,\top}^{a_{1},\dots,a_{m}}:=\;\;\;\;\; (𝒮Rm(y0,y1a1,,yma1,,am,za1,,zam)i=0myiDyia1,,ai())\displaystyle\left(\mathcal{S}_{R}^{m}(y_{0},y_{1}^{a_{1}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}})\wedge\bigwedge\limits_{i=0}^{m}y_{i}\in D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)}\right)
CW,a1,,am:=\displaystyle C_{W,\top}^{a_{1},\dots,a_{m}}:=\;\;\;\;\; (𝒲Rm(y0,y1a1,,yma1,,am,za1,,zam)i=0myiDyia1,,ai())\displaystyle\left(\mathcal{W}_{R}^{m}(y_{0},y_{1}^{a_{1}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}})\wedge\bigwedge\limits_{i=0}^{m}y_{i}\in D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)}\right)
CW,,ja1,,am:=\displaystyle C_{W,\top,j}^{a_{1},\dots,a_{m}}:=\;\;\;\;\; (yma1,,am𝒲Rm(y0,y1a1,,yma1,,am,za1,,zam)\displaystyle\left(\exists y_{m}^{a_{1},\dots,a_{m}}\;\mathcal{W}_{R}^{m}(y_{0},y_{1}^{a_{1}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}})\wedge\right.
i=0m1yiDyia1,,ai()yma1,,amDyma1,,am(,j))\displaystyle\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\left.\bigwedge\limits_{i=0}^{m-1}y_{i}\in D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)}\wedge y_{m}^{a_{1},\dots,a_{m}}\in D_{y_{m}^{a_{1},\dots,a_{m}}}^{(\top,j)}\right)

Notice that CS,a1,,amC_{S,\top}^{a_{1},\dots,a_{m}} and CW,a1,,amC_{W,\top}^{a_{1},\dots,a_{m}} have m+1m+1 yy-variables, but CW,,ja1,,amC_{W,\top,j}^{a_{1},\dots,a_{m}} has only mm yy-variables. Then R()\mathcal{I}_{R}^{(\top)} is the instance consisting of the constraints CS,a1,,amC_{S,\top}^{a_{1},\dots,a_{m}}, where m{0,1,,n}m\in\{0,1,\dots,n\} and a1,,amAa_{1},\dots,a_{m}\in A.

By Lemma 11, CS,a1,,amCW,a1,,amC_{S,\top}^{a_{1},\dots,a_{m}}\mathrel{\trianglelefteq}C_{W,\top}^{a_{1},\dots,a_{m}} and CW,,j+1a1,,amCW,,ja1,,amC_{W,\top,j+1}^{a_{1},\dots,a_{m}}\mathrel{\trianglelefteq}C_{W,\top,j}^{a_{1},\dots,a_{m}}.

6.2 Auxiliary statements

Lemma 11.

Suppose

W(y1,,yt)\displaystyle W(y_{1},\dots,y_{t}) =u1u2uW1(z1,1,,z1,n1)Wm(zm,1,,zm,nm),\displaystyle=\exists u_{1}\exists u_{2}\dots\exists u_{\ell}\;\;\;W_{1}(z_{1,1},\dots,z_{1,n_{1}})\wedge\dots\wedge W_{m}(z_{m,1},\dots,z_{m,n_{m}}),
S(y1,,yt)\displaystyle S(y_{1},\dots,y_{t}) =u1u2uS1(z1,1,,z1,n1)Sm(zm,1,,zm,nm),\displaystyle=\exists u_{1}\exists u_{2}\dots\exists u_{\ell}\;\;\;S_{1}(z_{1,1},\dots,z_{1,n_{1}})\wedge\dots\wedge S_{m}(z_{m,1},\dots,z_{m,n_{m}}),

where each zi,j{y1,,yt,u1,,u}z_{i,j}\in\{y_{1},\dots,y_{t},u_{1},\dots,u_{\ell}\}, and SiΣWiS_{i}\mathrel{\trianglelefteq}^{\Sigma}W_{i} for every ii. Then SΣWS\mathrel{\trianglelefteq}^{\Sigma}W.

Proof.

Let SiΣWiS_{i}\mathrel{\trianglelefteq}^{\Sigma}W_{i} be witnessed by a relation RiAni+kiR_{i}\subseteq A^{n_{i}+k_{i}}. Let k=|A|k=|A|. Define the relation RR witnessing that SΣWS\mathrel{\trianglelefteq}^{\Sigma}W by

R(y1,,yt,x1,,\displaystyle R(y_{1},\dots,y_{t},x_{1},\dots, xk)=\displaystyle x_{k})=
u1u2u\displaystyle\exists u_{1}\exists u_{2}\dots\exists u_{\ell} (i=1mϕ:[ki][k]Ri(zi,1,,zi,ni,xϕ(1),,xϕ(ki))i=1mWi(zi,1,,zi,ni))\displaystyle\left(\bigwedge\limits_{i=1}^{m}\;\bigwedge\limits_{\phi\colon[k_{i}]\to[k]}R_{i}(z_{i,1},\dots,z_{i,n_{i}},x_{\phi(1)},\dots,x_{\phi(k_{i})})\wedge\bigwedge\limits_{i=1}^{m}W_{i}(z_{i,1},\dots,z_{i,n_{i}})\right)

Notice that WiW_{i} is q-definable from RiR_{i}, hence RR is q-definable over Σ\Sigma. ∎

Lemma 26 ([21], Lemma 5.6).

Suppose D()D^{(\top)} is a reduction for an instance \mathcal{I}, D()D^{(\bot)} is an inclusion maximal 1-consistent reduction for \mathcal{I} such that Du()Du()D_{u}^{(\bot)}\subseteq D_{u}^{(\top)} for every uu. Then for every variable yVar()y\in\operatorname{Var}(\mathcal{I}) there exists a tree-covering Υy\Upsilon_{y} of \mathcal{I} such that Υy()(y)\Upsilon_{y}^{(\top)}(y) defines Dy()D_{y}^{(\bot)}.

The above lemma can be generalized for 𝐳\mathbf{z}-parameterized reductions as follows:

Lemma 27.

Suppose D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized reduction for a 𝐳\mathbf{z}-parameterized instance \mathcal{I}, D()D^{(\bot)} is an inclusion maximal 𝐳\mathbf{z}-parameterized 1-consistent reduction for \mathcal{I} such that Du()Du()D^{(\bot)}_{u}\subseteq D^{(\top)}_{u} for every uu. Then for every variable yVar()y\in\operatorname{Var}(\mathcal{I}) there exists a tree-covering Υy\Upsilon_{y} of \mathcal{I} such that Υy()𝐳(y)\prescript{\mathbf{z}}{}{\Upsilon}_{y}^{(\top)}(y) defines Dy()𝐳\prescript{\mathbf{z}}{}{D}_{y}^{(\bot)} for every 𝐳\mathbf{z}.

Proof.

By Lemma 26 for every 𝐳A|A|\mathbf{z}\in A^{|A|} and vv there exists a tree-covering Υv,𝐳\Upsilon_{v,\mathbf{z}} such that Υv,𝐳()𝐳(v)\prescript{\mathbf{z}}{}{\Upsilon_{v,\mathbf{z}}^{(\top)}}(v) defines Dv()𝐳\prescript{\mathbf{z}}{}{D_{v}^{(\bot)}}. Let Υv\Upsilon_{v} be 𝐳A|A|Υv,𝐳\bigwedge_{\mathbf{z}\in A^{|A|}}\Upsilon_{v,\mathbf{z}}, where we assume that the only common variable of Υv,𝐳1\Upsilon_{v,\mathbf{z}_{1}} and Υv,𝐳2\Upsilon_{v,\mathbf{z}_{2}}, if 𝐳1𝐳2\mathbf{z}_{1}\neq\mathbf{z}_{2}, is vv. Then Υv\Upsilon_{v} is a tree-covering of \mathcal{I} and Υv()𝐳(v)\prescript{\mathbf{z}}{}{\Upsilon_{v}^{(\top)}}(v) defines Dv()𝐳\prescript{\mathbf{z}}{}{D_{v}^{(\bot)}} for every 𝐳\mathbf{z}. ∎

We can always take a trivial reduction Du()𝐳=A\prescript{\mathbf{z}}{}{D}_{u}^{(\top)}=A for every 𝐳\mathbf{z} and uu, and derive the following lemma.

Lemma 28.

Suppose D()D^{(\bot)} is an inclusion maximal 𝐳\mathbf{z}-parameterized 1-consistent reduction for a 𝐳\mathbf{z}-parameterized instance \mathcal{I}. Then for every variable uVar()u\in\operatorname{Var}(\mathcal{I}) there exists a tree-covering Υu\Upsilon_{u} of \mathcal{I} such that Υu𝐳(u)\prescript{\mathbf{z}}{}{\Upsilon}_{u}(u) defines Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\bot)} for every 𝐳\mathbf{z}.

6.3 Finding a 1-consistent reduction

In this section we prove that either there exists a 1-consistent reduction for R\mathcal{I}_{R}, or there exists a polynomial size subinstance of R\mathcal{I}_{R} without a solution, or we can build a mighty tuple III that guarantees PSpace-hardness. To be able to simplify our instance to a polynomial size we will need even stronger relations. Put

𝒲~Rm(y0,,ym,x1,,xm)\displaystyle\mathcal{\widetilde{W}}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m}) =i=0m𝒲Ri(y0,,yi,x1,,xi),\displaystyle=\bigwedge\limits_{i=0}^{m}\mathcal{W}_{R}^{i}(y_{0},\dots,y_{i},x_{1},\dots,x_{i}),
𝒮~Rm(y0,,ym,x1,,xm)\displaystyle\mathcal{\widetilde{S}}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m}) =𝒮Rm(y0,,ym,x1,,xm)i=0m1𝒲Ri(y0,,yi,x1,,xi).\displaystyle=\mathcal{S}_{R}^{m}(y_{0},\dots,y_{m},x_{1},\dots,x_{m})\wedge\bigwedge\limits_{i=0}^{m-1}\mathcal{W}_{R}^{i}(y_{0},\dots,y_{i},x_{1},\dots,x_{i}).

The following lemma follows immediately from the definition and Lemmas 12 and 11.

Lemma 29.

Suppose RA2n+1R\subseteq A^{2n+1}, then 𝒮~Rm𝒲~Rm\mathcal{\widetilde{S}}_{R}^{m}\mathrel{\trianglelefteq}\mathcal{{\widetilde{W}}}_{R}^{m}.

Denote

~R=m{0,1,,n}a1,,amA\displaystyle\mathcal{\widetilde{I}}_{R}=\bigwedge\limits_{\begin{subarray}{c}m\in\{0,1,\dots,n\}\\ a_{1},\dots,a_{m}\in A\end{subarray}} 𝒮~Rm(y0,y1a1,y2a1,a2,,yma1,,am,za1,,zam)\displaystyle\mathcal{\widetilde{S}}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}})\wedge
m{0,1,,n}a1,,amA𝒲~Rm(y0,y1a1,y2a1,a2,,yma1,,am,za1,,zam).\displaystyle\bigwedge\limits_{\begin{subarray}{c}m\in\{0,1,\dots,n\}\\ a_{1},\dots,a_{m}\in A\end{subarray}}\mathcal{\widetilde{W}}_{R}^{m}(y_{0},y_{1}^{a_{1}},y_{2}^{a_{1},a_{2}},\dots,y_{m}^{a_{1},\dots,a_{m}},z_{a_{1}},\dots,z_{a_{m}}).

Notice that ~R\mathcal{\widetilde{I}}_{R} is obtained from R\mathcal{I}_{R} by adding constraints that are satisfied by any solution of R\mathcal{I}_{R}. Hence ~R\mathcal{\widetilde{I}}_{R} is satisfiable if and only if R\mathcal{I}_{R} is satisfiable.

First, we prove some technical lemmas showing the connection of the length of a path and the size of a tree-covering.

Lemma 30.

Suppose 𝒯\mathcal{T} is a 𝐳\mathbf{z}-parameterized tree-instance such that 𝒯𝐳\prescript{\mathbf{z}}{}{\mathcal{T}} has no solutions for some 𝐳\mathbf{z}, but if we remove any constraint from 𝒯\mathcal{T} we get an instance with a solution for every 𝐳\mathbf{z}. Then each variable appears in 𝒯\mathcal{T} at most |A||A| times.

Proof.

Let uu be some variable of 𝒯\mathcal{T}. Since 𝒯\mathcal{T} is a tree-instance, we can split it into tree-subinstances in uu, that is, for any constraint CC containing uu we take the (maximal) tree-subinstance containing CC but not the other constraints containing uu. Let Φ1,,Φs\Phi_{1},\dots,\Phi_{s} be the subinstances we obtain if we split the instance 𝒯\mathcal{T} in uu. By BiB_{i} we denote the 𝐳\mathbf{z}-parameterized unary relation defined by Φi(u)\Phi_{i}(u). Then there exists 𝐳\mathbf{z} such that i[s]Bi𝐳=\bigcap\limits_{i\in[s]}\prescript{\mathbf{z}}{}{B}_{i}=\varnothing. Since removing any constraint from 𝒯\mathcal{T} gives an instance with a solution, i[s]{j}Bi𝐳\bigcap\limits_{i\in[s]\setminus\{j\}}\prescript{\mathbf{z}}{}{B}_{i}\neq\varnothing for every j[s]j\in[s]. Therefore s|A|s\leqslant|A|, which completes the proof. ∎

Lemma 31.

Suppose 𝒯\mathcal{T} is a tree-instance having N2N\geqslant 2 variables, the arity of every constraint of 𝒯\mathcal{T} is at most nn, and every variable appears at most |A||A| times. Then there exists a path in 𝒯\mathcal{T} of length at least logk(N(k1)+1)\lceil{\log_{k}(N\cdot(k-1)+1)}\rceil, where k=(n1)|A|k=(n-1)\cdot|A|.

Proof.

We prove even a stronger claim by induction on NN. We prove that there exists a path of length logk(N(k1)+1)\lceil{\log_{k}(N\cdot(k-1)+1)}\rceil starting with any variable uu.

Suppose uu appears in constraints C1,C2,,CsC_{1},C_{2},\dots,C_{s}, where s|A|s\leqslant|A|. Let VV be the set of all variables appearing in C1,,CsC_{1},\dots,C_{s} except for uu. Notice that every variable vVv\in V appears in exactly one constraint CiC_{i}. By Φv\Phi_{v} we denote the (maximal) tree-subinstance of 𝒯\mathcal{T} containing all the constraints with vv but constraints from {C1,,Cs}\{C_{1},\dots,C_{s}\}. Then 𝒯=vVΦvi[s]Ci\mathcal{T}=\bigwedge_{v\in V}\Phi_{v}\wedge\bigwedge_{i\in[s]}C_{i}, and Φv1\Phi_{v_{1}} and Φv2\Phi_{v_{2}} do not share any variables if v1v2v_{1}\neq v_{2}. Since |V|s(n1)k|V|\leqslant s\cdot(n-1)\leqslant k, there exists vVv\in V such that Φv\Phi_{v} contains at least (N1)/k(N-1)/k variables. By the inductive assumption Φv\Phi_{v} contains a path starting with vv of length at least logk(((N1)/k)(k1)+1)\lceil\log_{k}(((N-1)/k)\cdot(k-1)+1)\rceil. Then 𝒯\mathcal{T} has a path of length at least

1+logk(((N1)/k)(k1)+1)=logk((N1)(k1)+k)=logk(N(k1)+1).1+\lceil\log_{k}(((N-1)/k)\cdot(k-1)+1)\rceil=\lceil\log_{k}((N-1)\cdot(k-1)+k)\rceil=\lceil\log_{k}(N\cdot(k-1)+1)\rceil.

Suppose 𝒯\mathcal{T} is a tree-covering of ~R\mathcal{\widetilde{I}}_{R}. We define several transformations of 𝒯\mathcal{T}, which we will apply to make it easier.

  1. (w)

    replace a constraint 𝒮~Ri(u0,u1,,ui){\mathcal{\widetilde{S}}}_{R}^{i}(u_{0},u_{1},\dots,u_{i}) by 𝒲~Ri(u0,u1,,ui){\mathcal{\widetilde{W}}}_{R}^{i}(u_{0},u_{1},\dots,u_{i});

  2. (s)

    if uiu_{i} appears only once in 𝒯\mathcal{T} in a constraint 𝒲~Ri(u0,u1,,ui1,ui){\mathcal{\widetilde{W}}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1},u_{i}) then replace this constraint by 𝒮~Ri(u0,u1,,ui1){\mathcal{\widetilde{S}}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1});

  3. (r)

    remove some constraint;

  4. (j)

    suppose uiVar(𝒯)u_{i}\in\operatorname{Var}(\mathcal{T}) appears in constraints Q(u0,u1,,ui,,uj)Q(u_{0},u_{1},\dots,u_{i},\dots,u_{j}) and 𝒲~Ri(v0,v1,,vi1,ui){\mathcal{\widetilde{W}}}_{R}^{i}(v_{0},v_{1},\dots,v_{i-1},u_{i}), where Q{𝒲~Rj,𝒮~Rj}Q\in\{{\mathcal{\widetilde{W}}}_{R}^{j},{\mathcal{\widetilde{S}}}_{R}^{j}\} and jij\geqslant i. Then we identify the variables vk=ukv_{k}=u_{k} for every k{0,1,,i1}k\in\{0,1,\dots,i-1\} and remove the constraint 𝒲~Ri(v0,v1,,vi1,ui){\mathcal{\widetilde{W}}}_{R}^{i}(v_{0},v_{1},\dots,v_{i-1},u_{i}).

Notice that transformations (w) and (r) make the instance weaker (more solutions) but (s) and (j) make the instance stronger (less solutions). The next lemma shows that if a tree-covering without a solution cannot be simplified using the transformations and it is large enough then we can cut it into three pieces satisfying nice properties.

Lemma 32.

Suppose

  1. 1.

    RA2n+1R\subseteq A^{2n+1}, where n>0n>0;

  2. 2.

    𝒯\mathcal{T} is a tree-covering of ~R\mathcal{\widetilde{I}}_{R} having at least (n|A|)22|A||A|+1(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} variables;

  3. 3.

    𝒯𝐳0\prescript{\mathbf{z}_{0}}{}{\mathcal{T}} has no solutions for some 𝐳0A|A|\mathbf{z}_{0}\in A^{|A|};

  4. 4.

    applying transformations (w) and (r) to 𝒯\mathcal{T} gives an instance with a solution for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  5. 5.

    transformations (s) and (j) are not applicable.

Then 𝒯\mathcal{T} can be divided into 3 nonempty connected parts 1\mathcal{I}_{1}, 2\mathcal{I}_{2}, and 3\mathcal{I}_{3} such that

  • (l1)

    the only common variable of 1\mathcal{I}_{1} and 2\mathcal{I}_{2} is a variable uu;

  • (r1)

    the only common variable of 2\mathcal{I}_{2} and 3\mathcal{I}_{3} is a variable vv;

  • (l2)

    1𝐳(u)=(1𝐳2𝐳)(v)\prescript{\mathbf{z}}{}{\mathcal{I}_{1}(u)}=(\prescript{\mathbf{z}}{}{\mathcal{I}_{1}}\wedge\prescript{\mathbf{z}}{}{\mathcal{I}_{2}})(v) for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  • (r2)

    3𝐳(v)=(2𝐳3𝐳)(u)\prescript{\mathbf{z}}{}{\mathcal{I}_{3}(v)}=(\prescript{\mathbf{z}}{}{\mathcal{I}_{2}}\wedge\prescript{\mathbf{z}}{}{\mathcal{I}_{3}})(u) for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  • (m)

    2\mathcal{I}_{2} contains a constraint 𝒮~Ri(v0,,vi)\mathcal{\widetilde{S}}_{R}^{i}(v_{0},\dots,v_{i}) with i<n1i<n-1.

Proof.

Let N=|Var(𝒯)|N=|\operatorname{Var}(\mathcal{T})|, k=n|A|k=n\cdot|A|. Notice that the arity of constraints in ~R\mathcal{\widetilde{I}}_{R} is at most n+1n+1 if we ignore 𝐳\mathbf{z}-variables. Since we cannot remove any constraints (property 4), Lemmas 30 and 31 imply that there exists a path u0C1u1C2Csusu_{0}-C_{1}-u_{1}-C_{2}-\dots-C_{s}-u_{s} with

slogk(N(k1)+1)logkN22|A||A|+1=(2|A|)2|A||A|>1+(2|A|1)2|A||A|.s\geqslant\lceil{\log_{k}(N\cdot(k-1)+1)}\rceil\geqslant\log_{k}N\geqslant 2^{{2|A|}^{|A|+1}}={(2^{|A|})}^{2|A|^{|A|}}>1+{(2^{|A|}-1)}^{2|A|^{|A|}}.

For every i[s1]i\in[s-1] we split 𝒯\mathcal{T} into two tree-coverings Φi\Phi_{i} and Ψi\Psi_{i} as follows. If we split 𝒯\mathcal{T} in the variable uiu_{i}, then the part containing Ci+1C_{i+1} goes to Ψi\Psi_{i} and all the remaining parts go to Φi\Phi_{i}. Thus, the only common variable of Φi\Phi_{i} and Ψi\Psi_{i} is uiu_{i}. Let BiB_{i} and CiC_{i} be the 𝐳\mathbf{z}-parameterized unary relations defined by Φi(ui)\Phi_{i}(u_{i}) and Ψi(ui)\Psi_{i}(u_{i}), respectively.

Since the transformation (r) cannot be applied, Bi𝐳\prescript{\mathbf{z}}{}{B}_{i} and Ci𝐳\prescript{\mathbf{z}}{}{C}_{i} are nonempty for every i[s1]i\in[s-1] and 𝐳A|A|\mathbf{z}\in A^{|A|}. Since 𝒯𝐳0\prescript{\mathbf{z}_{0}}{}{\mathcal{T}} has no solutions, Bi𝐳0Ci𝐳0=\prescript{\mathbf{z}_{0}}{}{B}_{i}\cap\prescript{\mathbf{z}_{0}}{}{C}_{i}=\varnothing for every i[s1]i\in[s-1].

There are exactly (2|A|1)|A||A|{(2^{|A|}-1)}^{|A|^{|A|}} distinct nonempty 𝐳\mathbf{z}-parameterized unary relations. Since s>1+(2|A|1)2|A||A|s>1+{(2^{|A|}-1)}^{2|A|^{|A|}}, there should be 1i<is11\leqslant i<i^{\prime}\leqslant s-1 such that Bi𝐳=Bi𝐳\prescript{\mathbf{z}}{}{B}_{i}=\prescript{\mathbf{z}}{}{B}_{i^{\prime}} and Ci𝐳=Ci𝐳\prescript{\mathbf{z}}{}{C}_{i}=\prescript{\mathbf{z}}{}{C}_{i^{\prime}} for every 𝐳A|A|\mathbf{z}\in A^{|A|}. By 1\mathcal{I}_{1} we denote Φi\Phi_{i}, by 3\mathcal{I}_{3} we denote Ψi\Psi_{i^{\prime}}, and by 2\mathcal{I}_{2} we denote the intersection of Ψi\Psi_{i} and Φi\Phi_{i^{\prime}}. Then conditions (l1), (l2), (r1), and (r2) are satisfied for u=uiu=u_{i} and v=uiv=u_{i^{\prime}}. It remains to prove property (m).

We say that a variable is a leaf if it occurs only in one constraint. We say that a constraint is a leaf-constraint if only one of its variables is not a leaf. Suppose a leaf-constraint is 𝒲~Rj(u0,u1,,uj){\mathcal{\widetilde{W}}}_{R}^{j}(u_{0},u_{1},\dots,u_{j}) for some jj. If its nonleaf variable is uju_{j^{\prime}}, where j<jj^{\prime}<j, then we can use the transformation (s). If its nonleaf variable is uju_{j}, then from the definition of 𝒮~Ri{\mathcal{\widetilde{S}}}_{R}^{i} and 𝒲~Ri{\mathcal{\widetilde{W}}}_{R}^{i} we derive that this leaf-constraint can be removed from the instance not changing the property that it has no solutions for some 𝐳\mathbf{z}. Both situations contradict our assumptions that (r) and (s) are not applicable. Hence, any leaf-constraint of 𝒯\mathcal{T} is of the form 𝒮~Rj(v0,v1,,vj){\mathcal{\widetilde{S}}}_{R}^{j}(v_{0},v_{1},\dots,v_{j}). Notice that jj must be smaller than n1n-1 because otherwise 𝒮~Rj=𝒲~Rj{\mathcal{\widetilde{S}}}_{R}^{j}={\mathcal{\widetilde{W}}}_{R}^{j} and the transformation (w) does not really change the instance and can always be applied. Consider several cases:

Case 1. The constraint Ci+1C_{i+1} is 𝒮~Rj(v0,v1,,vj){\mathcal{\widetilde{S}}}_{R}^{j}(v_{0},v_{1},\dots,v_{j}) for some jj. Then Ci+1C_{i+1} is the required constraint to satisfy (m).

Case 2. The constraint Ci+1C_{i+1} is 𝒲~Rj(v0,v1,,vj){\mathcal{\widetilde{W}}}_{R}^{j}(v_{0},v_{1},\dots,v_{j}) where vjuiv_{j}\neq u_{i} and vjui+1v_{j}\neq u_{i+1}. If vjv_{j} is a leaf, we can apply the transformation (s). Otherwise, consider a part of 2\mathcal{I}_{2} containing vjv_{j}. This part must contain a leaf-constraint, which implies property (m).

Case 3. The constraint Ci+1C_{i+1} is 𝒲~Rj(v0,v1,,vj1,ui){\mathcal{\widetilde{W}}}_{R}^{j}(v_{0},v_{1},\dots,v_{j-1},u_{i}). Then we apply transformation (j) to CiC_{i} and Ci+1C_{i+1}, which contradicts our assumptions.

Case 4. The constraint Ci+1C_{i+1} is 𝒲~Rj(v0,v1,,vj1,ui+1){\mathcal{\widetilde{W}}}_{R}^{j}(v_{0},v_{1},\dots,v_{j-1},u_{i+1}). Then we apply transformation (j) to Ci+1C_{i+1} and Ci+2C_{i+2}, which again contradicts our assumptions. ∎

Corollary 33.

Suppose

  1. 1.

    RA2n+1R\subseteq A^{2n+1}, where n>0n>0;

  2. 2.

    𝒯\mathcal{T} is a tree-covering of ~R\mathcal{\widetilde{I}}_{R} with the minimal number of variables such that 𝒯𝐳\prescript{\mathbf{z}}{}{\mathcal{T}} has no solutions for some 𝐳\mathbf{z};

  3. 3.

    |Var(𝒯)|(n|A|)22|A||A|+1|\operatorname{Var}(\mathcal{T})|\geqslant(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}}.

Then RR q-defines a mighty tuple III.

Proof.

We apply transformations (w) and (r) to 𝒯\mathcal{T} while we can maintain the condition that 𝒯𝐳\prescript{\mathbf{z}}{}{\mathcal{T}} has no solutions for some 𝐳\mathbf{z}. Also, we apply transformations (s) and (j) when applicable. Notice that we cannot apply these transformations forever, and we never increase the number of variables. Thus, the obtained tree-instance 𝒯\mathcal{T}^{\prime} still contains the minimal number of variables and satisfies the same conditions.

By Lemma 32 we can split 𝒯\mathcal{T}^{\prime} into 3 parts 1\mathcal{I}_{1}, 2\mathcal{I}_{2}, and 3\mathcal{I}_{3} satisfying conditions (l1), (r1), (l2), (r2), and (m). Let 2\mathcal{I}_{2}^{\prime} be obtained from 2\mathcal{I}_{2} by replacing the constraint 𝒮~Ri(v0,,vi)\mathcal{\widetilde{S}}_{R}^{i}(v_{0},\dots,v_{i}) coming from condition (m) by 𝒲~Ri(v0,,vi)\mathcal{\widetilde{W}}_{R}^{i}(v_{0},\dots,v_{i}). Notice that 123\mathcal{I}_{1}\wedge\mathcal{I}_{2}^{\prime}\wedge\mathcal{I}_{3} has a solution for every 𝐳\mathbf{z}. Let 1(u)\mathcal{I}_{1}(u) define BB, 3(v)\mathcal{I}_{3}(v) define CC, 2(u,v)\mathcal{I}_{2}(u,v) define SS, and 2(u,v)\mathcal{I}_{2}^{\prime}(u,v) define WW. By Lemma 29, 22\mathcal{I}_{2}\mathrel{\trianglelefteq}\mathcal{I}_{2}^{\prime}, hence by Lemma 11 we have SWS\mathrel{\trianglelefteq}W. Let QQ be a (𝐳,α)(\mathbf{z},\alpha)-parameterized relation q-definable from RR such that Q=WQ^{\forall}=W and Q=SQ^{\forall\forall}=S. Let us show that (Q,B,C)(Q,B,C) is a mighty tuple III. Condition 1 follows from the fact that the transformation (r) gives an instance with a solution for every 𝐳\mathbf{z}. Condition 2 follows from (l2), condition 3 follows from (r2), condition 4 follows from the existence of a solution of 123\mathcal{I}_{1}\wedge\mathcal{I}_{2}^{\prime}\wedge\mathcal{I}_{3} for every 𝐳\mathbf{z}. Condition 5 follows from the fact that 𝒯𝐳0=1𝐳02𝐳03𝐳0\prescript{\mathbf{z}_{0}}{}{\mathcal{T}^{\prime}}=\prescript{\mathbf{z}_{0}}{}{\mathcal{I}_{1}}\wedge\prescript{\mathbf{z}_{0}}{}{\mathcal{I}_{2}}\wedge\prescript{\mathbf{z}_{0}}{}{\mathcal{I}_{3}} has no solutions for some 𝐳0\mathbf{z}_{0}. ∎

Now we are ready to prove two theorems from Section 5.

Theorem 18.

Suppose RA2n+1R\subseteq A^{2n+1}. Then one of the following conditions holds:

  1. 1.

    there exists a 𝐳\mathbf{z}-parameterized nonempty 1-consistent reduction for R\mathcal{I}_{R};

  2. 2.

    there exists a subinstance 𝒥R\mathcal{J}\subseteq\mathcal{I}_{R} with at most (n|A|)22|A||A|+1(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}} variables not having a solution for some 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    there exists a mighty tuple III q-definable from RR.

Proof.

Let us consider a maximal 𝐳\mathbf{z}-parameterized 1-consistent reduction for ~\mathcal{\widetilde{I}_{R}}. By Lemma 28 either this reduction is nonempty, or there exists a 𝐳\mathbf{z}-parameterized tree-covering 𝒯\mathcal{T} of ~\mathcal{\widetilde{I}_{R}} such that the instance 𝒯𝐳\prescript{\mathbf{z}}{}{\mathcal{T}} has no solutions for some 𝐳\mathbf{z}. In the first case the same reduction is also a nonempty 1-consistent reduction for R\mathcal{I}_{R}, and we satisfied condition 1.

In the second case we consider a tree-covering 𝒯\mathcal{T} with the minimal number of variables. If |Var(𝒯)|(n|A|)22|A||A|+1|\operatorname{Var}(\mathcal{T})|\geqslant(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}}, then Corollary 33 implies that a mighty tuple III is q-definable from RR. If |Var(𝒯)|<(n|A|)22|A||A|+1|\operatorname{Var}(\mathcal{T})|<(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}}, then let 𝒥\mathcal{J} be the subinstance of R\mathcal{I}_{R} containing all the constraints CC of R\mathcal{I}_{R} such that a child of each variable of CC appears in 𝒯\mathcal{T}. Notice that if 𝒥𝐳\prescript{\mathbf{z}}{}{\mathcal{J}} has a solution then 𝒯𝐳\prescript{\mathbf{z}}{}{\mathcal{T}} has a solution. Thus, 𝒥𝐳\prescript{\mathbf{z}}{}{\mathcal{J}} has no solutions for some 𝐳\mathbf{z}. Hence |Var(𝒥)||Var(𝒯)|<(n|A|)22|A||A|+1|\operatorname{Var}(\mathcal{J})|\leqslant|\operatorname{Var}(\mathcal{T})|<(n\cdot|A|)^{2^{{2|A|}^{|A|+1}}}. ∎

Theorem 19.

Suppose RA2n+1R\subseteq A^{2n+1}, D()D^{(\top)} is an inclusion-maximal 𝐳\mathbf{z}-parameterized 1-consistent nonempty reduction for R\mathcal{I}_{R}. Then D()D^{(\top)} is a universal reduction.

Proof.

Choose some variable uVar(R)u\in\operatorname{Var}(\mathcal{I}_{R}) and prove that Du()Du(,0)D^{(\top)}_{u}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}D^{(\top,0)}_{u}.

By Lemma 28, there exists a tree-covering Υ0\Upsilon_{0} of R\mathcal{I}_{R} such that Υ0𝐳(u)\prescript{\mathbf{z}}{}{\Upsilon}_{0}(u) defines Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\top)} for every 𝐳\mathbf{z}. We apply the following transformations to Υ0\Upsilon_{0} similar to the transformations we used before:

  1. (w)

    replace a constraint 𝒮Ri(u0,u1,,ui){\mathcal{S}}_{R}^{i}(u_{0},u_{1},\dots,u_{i}) by 𝒲Ri(u0,u1,,ui){\mathcal{W}}_{R}^{i}(u_{0},u_{1},\dots,u_{i});

  2. (s)

    if uiu_{i} appears only once in the instance in a constraint 𝒲Ri(u0,u1,,ui1,ui){\mathcal{W}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1},u_{i}), and uiuu_{i}\neq u; then replace the constraint by 𝒮Ri(u0,u1,,ui1){\mathcal{S}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1});

  3. (j)

    suppose uiVar(𝒯)u_{i}\in\operatorname{Var}(\mathcal{T}) appears in constraints 𝒲Ri(u0,u1,,ui1,ui){\mathcal{W}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1},u_{i}) and 𝒲Ri(v0,v1,,vi1,ui){\mathcal{W}}_{R}^{i}(v_{0},v_{1},\dots,v_{i-1},u_{i}), and u{v1,,vi1}u\notin\{v_{1},\dots,v_{i-1}\}; then we identify the variables vk=ukv_{k}=u_{k} for every k{0,1,,i1}k\in\{0,1,\dots,i-1\} and remove the constraint 𝒲Ri(v0,v1,,vi1,ui){\mathcal{W}}_{R}^{i}(v_{0},v_{1},\dots,v_{i-1},u_{i}).

Notice that transformation (w) makes the instance weaker (more solutions) but (s) and (j) make the instance stronger (less solutions).

We apply transformations (w), (s), and (j) in any order and obtain a sequence Υ0,Υ1,,Υt\Upsilon_{0},\Upsilon_{1},\dots,\Upsilon_{t} of tree-coverings of R\mathcal{I}_{R}. Notice that at least one transformation is applicable unless the lowest variable of Υt\Upsilon_{t} is uu and uu appears exactly once. Let the constraint containing uu be 𝒲Ri(u0,u1,,ui1,u){\mathcal{W}}_{R}^{i}(u_{0},u_{1},\dots,u_{i-1},u). Since D()D^{(\top)} is a 1-consistent reduction and Υt\Upsilon_{t} is a tree-covering, Duk()Υt(uk)D_{u_{k}}^{(\top)}\subseteq\Upsilon_{t}(u_{k}) for every k{0,1,,i1}k\in\{0,1,\dots,i-1\}. Hence, Υt(u)Du(,0)\Upsilon_{t}(u)\supseteq D_{u}^{(\top,0)}. Let the 𝐳\mathbf{z}-parameterized unary relation CjC_{j} be defined by Υj(u)\Upsilon_{j}(u) for j=0,1,2,,tj=0,1,2,\dots,t. By the construction and Lemma 11 we have CjCj+1C_{j}\supseteq C_{j+1} or CjCj+1C_{j}\mathrel{\trianglelefteq}C_{j+1} for every jj. Put Ej=CjCj+1CtDu(,0)E_{j}=C_{j}\cap C_{j+1}\cap\dots\cap C_{t}\cap D_{u}^{(\top,0)} for j=0,1,2,,tj=0,1,2,\dots,t. Since the reduction D()D^{(\top)} is 1-consistent and each Υj\Upsilon_{j} is a tree-covering, we have CjDu()C_{j}\supseteq D_{u}^{(\top)}. Hence, E0=C0=Υ0(u)=Du()E_{0}=C_{0}=\Upsilon_{0}(u)=D_{u}^{(\top)} and Et=Du(,0)E_{t}=D_{u}^{(\top,0)}. By Lemma 11 EjEj+1E_{j}\mathrel{\trianglelefteq}E_{j+1} for every j{0,1,,t}j\in\{0,1,\dots,t\}. Thus, Du()Du(,0)D_{u}^{(\top)}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}D_{u}^{(\top,0)} and D()D^{(\top)} is a universal reduction. ∎

6.4 The existence of a universal subset

In this section we prove that for any 1-consistent 𝐳\mathbf{z}-parameterized universal reduction D()D^{(\top)} of R\mathcal{I}_{R} there exists a 𝐳\mathbf{z}-parameterized unary relation BB and a variable yia1,,aiy_{i}^{a_{1},\dots,a_{i}} such that BDyia1,,ai()B\mathrel{\lhd}D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)}.

For a sequence a1,,ama_{1},\dots,a_{m}, where m{0,1,,n}m\in\{0,1,\dots,n\} and it can be empty, we put

Ra1,,am()=i=mnam+1,,aiACS,a1,,ai.{\mathcal{I}^{a_{1},\dots,a_{m}}_{R}}^{(\top)}=\bigwedge\limits_{i=m}^{n}\;\;\bigwedge\limits_{a_{m+1},\dots,a_{i}\in A}C_{S,\top}^{a_{1},\dots,a_{i}}.

Thus, Ra1,,am(){\mathcal{I}^{a_{1},\dots,a_{m}}_{R}}^{(\top)} is the part of R()\mathcal{I}_{R}^{(\top)} containing the variable yma1,,amy_{m}^{a_{1},\dots,a_{m}}.

Theorem 20.

Suppose RA2n+1R\subseteq A^{2n+1}, R\mathcal{I}_{R} has no solutions for some 𝐳\mathbf{z}, D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction for R\mathcal{I}_{R}. Then one of the following conditions holds:

  1. 1.

    there exists a variable uu of R\mathcal{I}_{R} and a 𝐳\mathbf{z}-parameterized nonempty unary relation BB such that BDu()B\mathrel{\lhd}D_{u}^{(\top)};

  2. 2.

    there exists a mighty tuple V q-definable from RR.

Proof.

Since R\mathcal{I}_{R} has no solutions for some 𝐳\mathbf{z}, R(){\mathcal{I}_{R}}^{(\top)} also does not have solutions for some 𝐳\mathbf{z}. Consider maximal mm such that Rc1,,cm(){\mathcal{I}_{R}^{c_{1},\dots,c_{m}}}^{(\top)} has no solutions for some c1,,cmAc_{1},\dots,c_{m}\in A and 𝐳\mathbf{z}. We fix c1,,cmc_{1},\dots,c_{m} and denote 0=Rc1,,cm()\mathcal{I}_{0}={\mathcal{I}_{R}^{c_{1},\dots,c_{m}}}^{(\top)}. Then we apply the following transformations to the instance 0\mathcal{I}_{0} while possible to obtain a sequence of instances 0,1,,T\mathcal{I}_{0},\mathcal{I}_{1},\dots,\mathcal{I}_{T}.

  1. (w)

    replace the constraint CS,a1,,aiC_{S,\top}^{a_{1},\dots,a_{i}} by CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}};

  2. (e)

    if a variable yia1,,aiy_{i}^{a_{1},\dots,a_{i}}, where i>mi>m, appears only once in the instance in a constraint CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}}, then replace CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}} by CW,,|A|a1,,aiC_{W,\top,|A|}^{a_{1},\dots,a_{i}};

  3. (z)

    replace CW,,ja1,,aiC_{W,\top,j}^{a_{1},\dots,a_{i}} by CW,,j1a1,,aiC_{W,\top,j-1}^{a_{1},\dots,a_{i}};

  4. (s)

    replace CW,,0a1,,aiC_{W,\top,0}^{a_{1},\dots,a_{i}} by CS,a1,,ai1C_{S,\top}^{a_{1},\dots,a_{i-1}}.

Notice that (w) replaces an instance by its universal weakening, (s) makes the instance stronger, (e) just existentially quantifies a variable that appears only once, (z) replaces a constraint by its universal weakening.

It follows from the definition that we cannot apply these transformations forever, and we can never remove the constraint CW,c1,,cmC_{W,\top}^{c_{1},\dots,c_{m}}. Let us show that the final instance T\mathcal{I}_{T} consists of just one constraint CW,c1,,cmC_{W,\top}^{c_{1},\dots,c_{m}}. If T\mathcal{I}_{T} contains some CS,a1,,aiC_{S,\top}^{a_{1},\dots,a_{i}} or CW,,ja1,,aiC_{W,\top,j}^{a_{1},\dots,a_{i}}, then we can apply the transformations (w) , (z), or (s), which contradicts the assumption that T\mathcal{I}_{T} is final. Otherwise, let yia1,,aiy_{i}^{a_{1},\dots,a_{i}} be the lowest variable of T\mathcal{I}_{T}. If i>mi>m, then yia1,,aiy_{i}^{a_{1},\dots,a_{i}} appears only in the constraint CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}} and we can apply transformation (e), which again contradicts the assumption. Thus, i=mi=m and the only constraint in T\mathcal{I}_{T} is CW,c1,,cmC_{W,\top}^{c_{1},\dots,c_{m}}.

Consider the last instance t\mathcal{I}_{t} in the sequence 0,1,,T\mathcal{I}_{0},\mathcal{I}_{1},\dots,\mathcal{I}_{T} not satisfying the following property: t\mathcal{I}_{t} has a solution with yic1,,ci=dy_{i}^{c_{1},\dots,c_{i}}=d for any 𝐳A|A|\mathbf{z}\in A^{|A|}, any i{0,,m}i\in\{0,\dots,m\}, and any dDyic1,,ci()𝐳d\in\prescript{\mathbf{z}}{}{D}_{y_{i}^{c_{1},\dots,c_{i}}}^{(\top)}. We refer to this property as the subdirectness property. Since 0\mathcal{I}_{0} does not satisfy the subdirectness property, such tt always exists. Notice that T\mathcal{I}_{T} and even T1\mathcal{I}_{T-1} satisfy the subdirectness property, hence t<T1t<T-1. By the definition of tt, the instance t+1\mathcal{I}_{t+1} cannot be stronger than t\mathcal{I}_{t}. Hence, tt+1\mathcal{I}_{t}\mathrel{\trianglelefteq}\mathcal{I}_{t+1}. Consider two cases:

Case 1. t\mathcal{I}_{t} has a solution for every 𝐳A|A|\mathbf{z}\in A^{|A|}. Then consider some variable yic1,,ciy_{i}^{c_{1},\dots,c_{i}} wintessing that t\mathcal{I}_{t} does not have the subdirectness property. Since t+1\mathcal{I}_{t+1} has the subdirectness property, t+1(yic1,,ci)\mathcal{I}_{t+1}(y_{i}^{c_{1},\dots,c_{i}}) defines Dyic1,,ci()D_{y_{i}^{c_{1},\dots,c_{i}}}^{(\top)}. Let t(yic1,,ci)\mathcal{I}_{t}(y_{i}^{c_{1},\dots,c_{i}}) define a 𝐳\mathbf{z}-parameterized unary relation BB. Since tt+1\mathcal{I}_{t}\mathrel{\trianglelefteq}\mathcal{I}_{t+1}, Lemma 11 implies BDyic1,,ci()B\mathrel{\lhd}D_{y_{i}^{c_{1},\dots,c_{i}}}^{(\top)}, which satisfies condition 1 and completes this case.

Case 2. t\mathcal{I}_{t} does not have a solution for some 𝐳A|A|\mathbf{z}\in A^{|A|}. Put 𝒥0=t\mathcal{J}_{0}=\mathcal{I}_{t}. Then we apply another transformation to t\mathcal{I}_{t} and obtain a sequence of instances 𝒥0,𝒥1,,𝒥s\mathcal{J}_{0},\mathcal{J}_{1},\dots,\mathcal{J}_{s}, where 𝒥0=t\mathcal{J}_{0}=\mathcal{I}_{t}. If a variable uu is a child of yic1,,ciy_{i}^{c_{1},\dots,c_{i}}, where i{0,1,,m}i\in\{0,1,\dots,m\}, and uu appears several times in 𝒥k\mathcal{J}_{k}, then we rename some (but not all) of the variables uu into uu^{\prime} and obtain a covering 𝒥k+1\mathcal{J}_{k+1} of 𝒥k\mathcal{J}_{k}. If 𝒥k+1\mathcal{J}_{k+1} has a solution for every 𝐳\mathbf{z}, we finish the sequence. Notice that if we split all the children of each yic1,,ciy_{i}^{c_{1},\dots,c_{i}} so that each of them appears exactly once, then the obtained instance has a solution for every 𝐳\mathbf{z} by the maximality of mm. Thus, we get a sequence 𝒥0,𝒥1,,𝒥s\mathcal{J}_{0},\mathcal{J}_{1},\dots,\mathcal{J}_{s} of coverings of t\mathcal{I}_{t} such that 𝒥s\mathcal{J}_{s} has a solution for every 𝐳\mathbf{z}.

Since t+1\mathcal{I}_{t+1} is a universal weakening of t\mathcal{I}_{t}, this universal weakening can be transferred to 𝒥s\mathcal{J}_{s}, where we replace the child of every constraint of t\mathcal{I}_{t} by the corresponding weakened version. As a result we get a universal weakening 𝒥s\mathcal{J}_{s}^{\prime} of 𝒥s\mathcal{J}_{s}. Notice that 𝒥s\mathcal{J}_{s}^{\prime} is a covering of t+1\mathcal{I}_{t+1}, which implies that 𝒥s\mathcal{J}_{s}^{\prime} satisfies the modification of the subdirectness property for coverings. That is, 𝒥s\mathcal{J}_{s}^{\prime} has a solution with v=dv=d, if vv is a child of yic1,,ciy_{i}^{c_{1},\dots,c_{i}}, for any 𝐳A|A|\mathbf{z}\in A^{|A|}, any i{0,,m}i\in\{0,\dots,m\}, and any dDyic1,,ci()𝐳d\in\prescript{\mathbf{z}}{}{D}_{y_{i}^{c_{1},\dots,c_{i}}}^{(\top)}. Let uu be the variable we split while defining 𝒥s\mathcal{J}_{s} and uu^{\prime} be the new variable we added. Consider two subcases:

Subcase 2A. There exist 𝐳\mathbf{z} and dDu()𝐳d\in\prescript{\mathbf{z}}{}{D}_{u}^{(\top)} such that 𝒥s𝐳\prescript{\mathbf{z}}{}{\mathcal{J}_{s}} has no solution with u=du=d or has no solution with u=du^{\prime}=d. Without loss of generality let it be uu. By the subdirectness property for 𝒥s\mathcal{J}_{s}^{\prime}, the formula 𝒥s(u)\mathcal{J}_{s}(u) defines the 𝐳\mathbf{z}-parameterized unary relation Du()D_{u}^{(\top)}. Suppose 𝒥s(u)\mathcal{J}_{s}(u) defines a 𝐳\mathbf{z}-parameterized unary relation BB. Since 𝒥s𝒥s\mathcal{J}_{s}\mathrel{\trianglelefteq}\mathcal{J}_{s}^{\prime}, Lemma 11 implies that BDu()B\mathrel{\lhd}D_{u}^{(\top)} and BB satisfies condition 1, which completes this case.

Subcase 2B. For every 𝐳\mathbf{z} and every dDu()d\in D_{u}^{(\top)} the instance 𝒥s\mathcal{J}_{s} has a solution with u=du=d and a solution with u=du^{\prime}=d. Let SS be the binary 𝐳\mathbf{z}-parameterized relation defined by 𝒥s(u,u)\mathcal{J}_{s}(u,u^{\prime}) and WW be the binary 𝐳\mathbf{z}-parameterized relation defined by 𝒥s(u,u)\mathcal{J}_{s}^{\prime}(u,u^{\prime}). Since 𝒥s𝒥s\mathcal{J}_{s}\mathrel{\trianglelefteq}\mathcal{J}_{s}^{\prime}, Lemma 11 implies that SWS\mathrel{\trianglelefteq}W. Let QQ be a (𝐳,α)(\mathbf{z},\alpha)-parameterized relation q-definable from RR witnessing SWS\mathrel{\trianglelefteq}W, that is, Q=WQ^{\forall}=W and Q=SQ^{\forall\forall}=S. Let us show that (Q,D)(Q,D) forms a mighty tuple V. Property 1 follows from the subdirectness of 𝒥s\mathcal{J}_{s}^{\prime}. Property 2 follows from the definition of subcase 2B. Since 𝒥s1\mathcal{J}_{s-1} has no solutions for some 𝐳\mathbf{z}, Q𝐳\prescript{\mathbf{z}}{}{Q}^{\forall\forall} is irreflexive for this 𝐳\mathbf{z}, and we get property 3. ∎

6.5 Finding a smaller reduction

In this section we will show that for any 1-consistent universal reduction D()D^{(\top)} for R\mathcal{I}_{R} and a unary 𝐳\mathbf{z}-parameterized relation BDyia1,,ai()B\mathrel{\lhd}D_{y_{i}^{a_{1},\dots,a_{i}}}^{(\top)} we can build a smaller 1-consistent universal reduction D()D()D^{(\bot)}\subsetneq D^{(\top)}.

By R\mathcal{I}_{R}^{\prime} we denote the instance R()\mathcal{I}_{R}^{(\top)} with additional constraints CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}}, CW,,ja1,,aiC_{W,\top,j}^{a_{1},\dots,a_{i}}, for all i{0,1,,n}i\in\{0,1,\dots,n\}, a1,,aiAa_{1},\dots,a_{i}\in A, and j{0,1,,|A|}j\in\{0,1,\dots,|A|\}. Notice that all the constraints we added to R\mathcal{I}_{R} to get R\mathcal{I}_{R}^{\prime} are weaker than the constraints that are already there. Hence, R\mathcal{I}_{R}^{\prime} has a solution if and only if R\mathcal{I}_{R} has a solution, and a reduction is 1-consistent for R\mathcal{I}_{R}^{\prime} if and only if it is 1-consistent for R\mathcal{I}_{R}.

To simplify presentation we fix a highest variable ymc1,,cmy_{m}^{c_{1},\dots,c_{m}} such that there exists a 𝐳\mathbf{z}-parameterized unary relation BB satisfying BDymc1,,cm()B\mathrel{\lhd}D_{y_{m}^{c_{1},\dots,c_{m}}}^{(\top)}. Denote this variable by u=ymc1,,cmu=y_{m}^{c_{1},\dots,c_{m}}. By \mathcal{B} we denote the set of all 𝐳\mathbf{z}-parameterized nonempty unary relations BB satisfying BDu()B\mathrel{\lhd}D_{u}^{(\top)}.

By 𝒯\mathcal{T} we denote the set of all tree-coverings of R\mathcal{I}_{R}^{\prime} such that some of the children of uu are marked as leaves and exactly one child of uu is marked as the root. Elements of 𝒯\mathcal{T} are called trees. Notice that a vertex can be simultaneously a leaf and the root. Any path in an instance R\mathcal{I}_{R}^{\prime} can be viewed as a tree-covering. Marking the first element of the path as a leaf and the last element as the root we can make a tree from any path. By 𝒫\mathcal{P} we denote the set of all paths in 𝒯\mathcal{T}. Notice that by choosing one leaf in a tree we can always make a path from a tree.

Suppose t𝒯t\in\mathcal{T} with leaves u1,,usu_{1},\dots,u_{s} and the root u0u_{0}. For a 𝐳\mathbf{z}-parameterized unary relation BB by B+tB+t we denote the 𝐳\mathbf{z}-parameterized unary relation defined by (tu1BusB)(u0)(t\wedge u_{1}\in B\wedge\dots\wedge u_{s}\in B)(u_{0}). Informally, B+tB+t is the restriction we get on the root if restrict we all the leaves to BB. Notice that, since the reduction D()D^{(\top)} is 1-consistent, we have Du()+t=Du()D_{u}^{(\top)}+t=D_{u}^{(\top)} for any t𝒯t\in\mathcal{T}.

To prove the existence of a smaller reduction, it is sufficient to satisfy the following Lemma.

Lemma 34.

Suppose BB\in\mathcal{B} and B𝐳+t𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}\neq\varnothing for every t𝒯t\in\mathcal{T} and every 𝐳A|A|\mathbf{z}\in A^{|A|}. Then there exists a 𝐳\mathbf{z}-parameterized 1-consistent universal reduction D()D^{(\bot)} for R\mathcal{I}_{R} such that D()D()D^{(\bot)}\subsetneq D^{(\top)}.

Proof.

Let D()D^{(\triangle)} be the 𝐳\mathbf{z}-parameterized reduction for R\mathcal{I}_{R} such that Du()=BD_{u}^{(\triangle)}=B and Dv()=Dv()D_{v}^{(\triangle)}=D_{v}^{(\top)} for every vuv\neq u. For every 𝐳A|A|\mathbf{z}\in A^{|A|} let D()𝐳\prescript{\mathbf{z}}{}{D}^{(\bot)} be the inclusion maximal 1-consistent reduction such that D()𝐳D()𝐳\prescript{\mathbf{z}}{}{D}^{(\bot)}\subseteq\prescript{\mathbf{z}}{}{D}^{(\triangle)}. Consider two cases:

Case 1. Assume that Dv()𝐳0\prescript{\mathbf{z}_{0}}{}{D_{v}^{(\bot)}} is empty for some 𝐳0A|A|\mathbf{z}_{0}\in A^{|A|} and some variable vv. Then by Lemma 26 there exists a tree-covering Υ\Upsilon of R\mathcal{I}_{R}^{\prime} such that Υ𝐳0\prescript{\mathbf{z}_{0}}{}{\Upsilon} has no solutions if all the children of uu are restricted to B𝐳0\prescript{\mathbf{z}_{0}}{}{B}. Let t𝒯t\in\mathcal{T} be the tree obtained from Υ()\Upsilon^{(\top)} by marking all the children of uu as leaves and marking one of the children as the root. Then B𝐳0+t𝐳0=\prescript{\mathbf{z}_{0}}{}{B}+\prescript{\mathbf{z}_{0}}{}{t}=\varnothing, which contradicts our assumptions.

Case 2. Dv()𝐳\prescript{\mathbf{z}}{}{D_{v}^{(\bot)}} is not empty for every 𝐳A|A|\mathbf{z}\in A^{|A|} and every vv. By Lemma 27 for every vv there exists a tree-covering Υv\Upsilon_{v} of R\mathcal{I}_{R} such that Υv()𝐳(v)\prescript{\mathbf{z}}{}{\Upsilon_{v}^{(\triangle)}}(v) defines Dv()𝐳\prescript{\mathbf{z}}{}{D_{v}^{(\bot)}} for every 𝐳\mathbf{z}. Since D()D^{(\top)} is 1-consistent and Υv\Upsilon_{v} is a tree-formula, Υv()𝐳(v)\prescript{\mathbf{z}}{}{\Upsilon_{v}^{(\top)}}(v) defines Dv()𝐳\prescript{\mathbf{z}}{}{D_{v}^{(\top)}}. Since BDu()B\mathrel{\lhd}D^{(\top)}_{u}, Lemma 11 implies that Dv()Dv()D_{v}^{(\bot)}\mathrel{\trianglelefteq}D_{v}^{(\top)} for every vv. Again, by Lemma 11

Dv()=Dv()Dv(,0)Dv()Dv(,0)Dv(,0)Dv(,0)=Dv(,0).D_{v}^{(\bot)}=D_{v}^{(\bot)}\cap D_{v}^{(\bot,0)}\mathrel{\trianglelefteq}D_{v}^{(\top)}\cap D_{v}^{(\bot,0)}\mathrel{\mathrel{\lhd}\!\!\mathrel{\lhd}\!\!\mathrel{\lhd}}D_{v}^{(\top,0)}\cap D_{v}^{(\bot,0)}=D_{v}^{(\bot,0)}.

Hence, D()D^{(\bot)} is a 𝐳\mathbf{z}-parameterized 1-consistent universal reduction for R\mathcal{I}_{R} that is smaller than D()D^{(\top)}. ∎

We define two directed graphs G𝒫G_{\mathcal{P}} and G𝒯G_{\mathcal{T}} whose vertices are elements of \mathcal{B}. There is an edge B1B2B_{1}\to B_{2} in G𝒫G_{\mathcal{P}} if there exists p𝒫p\in\mathcal{P} such that B1+p=B2B_{1}+p=B_{2}. Similarly, the edge B1B2B_{1}\to B_{2} is in G𝒯G_{\mathcal{T}} if there exists t𝒯t\in\mathcal{T} such that B1+t=B2B_{1}+t=B_{2}. Since we consider trivial paths/trees, both graphs are reflexive (have all the loops). Since we can compose paths and trees, B1B2B_{1}\to B_{2} and B2B3B_{2}\to B_{3} implies B1B3B_{1}\to B_{3}, that is both graphs are transitive. Let 𝒯\mathcal{B}_{\mathcal{T}} be a strongly connected component of G𝒯G_{\mathcal{T}} not having edges going outside of the component. Let 𝒫\mathcal{B}_{\mathcal{P}} be a strongly connected component of G𝒫G_{\mathcal{P}} inside 𝒯\mathcal{B}_{\mathcal{T}} not having edges going outside of the component. Thus, we have 𝒫𝒯\mathcal{B}_{\mathcal{P}}\subseteq\mathcal{B}_{\mathcal{T}}\subseteq\mathcal{B}. Put 𝒫=B𝒫{Du()}\mathcal{B}_{\mathcal{P}}^{*}=B_{\mathcal{P}}\cup\{D_{u}^{(\top)}\}. Then for every B𝒫B\in\mathcal{B}_{\mathcal{P}}^{*}, and p𝒫p\in\mathcal{P} we have B+p𝒫B+p\in\mathcal{B}_{\mathcal{P}}^{*}.

In this section we prove that there exists a smaller 1-consistent reduction for R\mathcal{I}_{R} or RR q-defines a mighty tuple IV. As we show in Lemma 35, to prove this, it is sufficient to satisfy the following property: there exist B𝒫B\in\mathcal{B}_{\mathcal{P}} and 𝐳\mathbf{z}-parameterized binary relations SS and WW q-definable from RR such that

  1. 1.

    SWS\triangleleft W;

  2. 2.

    B𝐳+S𝐳=B𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{S}=\prescript{\mathbf{z}}{}{B} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. 3.

    B𝐳+W𝐳=Du()𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{W}=\prescript{\mathbf{z}}{}{D_{u}^{(\top)}} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  4. 4.

    Du()𝐳+S𝐳=Du()𝐳\prescript{\mathbf{z}}{}{D_{u}^{(\top)}}+\prescript{\mathbf{z}}{}{S}=\prescript{\mathbf{z}}{}{D_{u}^{(\top)}} for every 𝐳A|A|\mathbf{z}\in A^{|A|}.

In this case we say that the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Lemma 35.

Suppose (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is a strong tuple. Then one of the following conditions holds:

  1. 1.

    there exists a 𝐳\mathbf{z}-parameterized 1-consistent universal reduction D()D^{(\bot)} for R\mathcal{I}_{R} such that D()D()D^{(\bot)}\subsetneq D^{(\top)};

  2. 2.

    there exists a mighty tuple IV q-definable from RR.

Proof.

By the definition, there exist B𝒫B\in\mathcal{B}_{\mathcal{P}} and 𝐳\mathbf{z}-parameterized binary relations SS and WW q-definable from RR satisfying the required 4 conditions. If B𝐳+t𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}\neq\varnothing for any t𝒯t\in\mathcal{T} and 𝐳\mathbf{z} then Lemma 34 implies that condition 1 holds. Otherwise, let tt be the tree with the minimal number of leaves such that B𝐳+t𝐳=\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}=\varnothing. Define a new tree tt^{\prime} by moving the root of tt to one of the leaves and removing its leaf mark. By the minimality of the number of leaves B𝐳+t𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}^{\prime}\neq\varnothing for any 𝐳\mathbf{z}. Denote C=B+tC=B+t^{\prime}. Since SWS\mathrel{\lhd}W, there exists a q-definable relation QQ such that Q=SQ^{\forall\forall}=S and Q=WQ^{\forall}=W. Let us check that (Q,Du(),B,C)(Q,D_{u}^{(\top)},B,C) forms a mighty tuple IV. All the conditions but 5 follow from the definition of a strong tuple. Condition 5 follows from the fact that B𝐳+t𝐳=\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}=\varnothing for some 𝐳\mathbf{z} and therefore B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing for this 𝐳\mathbf{z}. ∎

In the first case of the above lemma we obtain a smaller reduction, and in the second case we can build a mighty tuple and therefore prove PSpace-hardness. Thus, whenever the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong, we can achieve the required result. That is why, in many further lemmas we have an assumption that it is not strong.

We say that B1B_{1} is a supervised universal subset of B2B_{2} if there exist B0𝒫B_{0}\in\mathcal{B}_{\mathcal{P}} and p1,p2𝒫p_{1},p_{2}\in\mathcal{P} such that p1p2p_{1}\mathrel{\trianglelefteq}p_{2}, B0+p1=B1B_{0}+p_{1}=B_{1}, and B0+p2=B2B_{0}+p_{2}=B_{2}. We write it as B1B2B_{1}\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}B_{2}.

The following lemma follows immediately from the definition and the fact that we can compose paths.

Lemma 36.

Suppose B1B2B_{1}\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}B_{2} and p𝒫p\in\mathcal{P}. Then B1+pB2+pB_{1}+p\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}B_{2}+p.

The following lemma is the crucial fact in the whole proof. We show that we are done whenever BDu()B\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}D_{u}^{(\top)}, and in the next lemmas we just try to achieve the condition BDu()B\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}D_{u}^{(\top)}.

Lemma 37.

Suppose BDu()B\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}D_{u}^{(\top)}. Then (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is a strong tuple.

Proof.

Consider B0𝒫B_{0}\in\mathcal{B}_{\mathcal{P}} and two paths p1,p2𝒫p_{1},p_{2}\in\mathcal{P} such that B0+p1=BB_{0}+p_{1}=B, B0+p2=Du()B_{0}+p_{2}=D_{u}^{(\top)}, and p1p2p_{1}\mathrel{\trianglelefteq}p_{2}. Consider a path p0𝒫p_{0}\in\mathcal{P} such that B+p0=B0B+p_{0}=B_{0}, and define two new paths by p1=p0+p1p_{1}^{\prime}=p_{0}+p_{1} and p2=p0+p2p_{2}^{\prime}=p_{0}+p_{2}. Then B+p1=BB+p_{1}^{\prime}=B, B+p2=Du()B+p_{2}^{\prime}=D_{u}^{(\top)}, and p1p2p_{1}^{\prime}\mathrel{\trianglelefteq}p_{2}^{\prime}. Let u1u_{1} and u2u_{2} be the two ends of the paths p1p_{1}^{\prime} and p2p_{2}^{\prime}. Let p1(u1,u2)p_{1}^{\prime}(u_{1},u_{2}) define SS, p2(u1,u2)p_{2}^{\prime}(u_{1},u_{2}) define WW. Then WW, SS, and BB witness that (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is a strong tuple. ∎

Lemma 38.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}. Then for every 𝐳\mathbf{z} either both B1𝐳\prescript{\mathbf{z}}{}{B}_{1} and B2𝐳\prescript{\mathbf{z}}{}{B}_{2} are different from Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\top)}, or both are equal to Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\top)}.

Proof.

Since B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}, there exist paths p1,p2𝒫p_{1},p_{2}\in\mathcal{P} such that B1+p1=B2B_{1}+p_{1}=B_{2} and B2+p2=B1B_{2}+p_{2}=B_{1}. Since the reduction D()D^{(\top)} is 1-consistent, Du()𝐳+p=Du()𝐳\prescript{\mathbf{z}}{}{D}_{u}^{(\top)}+p=\prescript{\mathbf{z}}{}{D}_{u}^{(\top)} for any p𝒫p\in\mathcal{P} and 𝐳A|A|\mathbf{z}\in A^{|A|}. This implies the required property. ∎

A supervised zig-zag from B1B_{1} to B2B_{2} is a sequence C0,C1,,Ck𝒫C_{0},C_{1},\dots,C_{k}\in\mathcal{B}_{\mathcal{P}}^{*} such that

  • C0=B1C_{0}=B_{1}, Ck=B2C_{k}=B_{2};

  • Ci1CiC_{i-1}\supseteq C_{i} or Ci1CiC_{i-1}\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}C_{i} for every i[k]i\in[k].

If there exists a supervised zig-zag of length kk from B1B_{1} to B2B_{2}, then we write B1kB2B_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k}B_{2} or just B1B2B_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}B_{2} if we do not want to specify the length.

Lemma 39.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}. Then B1B2B_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}B_{2}.

Proof.

Consider a path p0𝒫p_{0}\in\mathcal{P} such that B2+p0=B1B_{2}+p_{0}=B_{1}. We will build a sequence of paths p0,p1,,pkp_{0},p_{1},\dots,p_{k} such that Ci=B2+piC_{i}=B_{2}+p_{i}. We have C0=B2+p0=B1C_{0}=B_{2}+p_{0}=B_{1}.

By the choice of the variable uu there is no 𝐳\mathbf{z}-parameterized unary relation BDv()B\triangleleft D_{v}^{(\top)} for any variable vv that is above uu in R\mathcal{I}_{R}. Therefore, by Lemma 11, these variables cannot appear in the path from the leaf to the root but can appear in some constraints.

We apply the following transformations to p0p_{0} and define a sequence p0,p1,,pk𝒫p_{0},p_{1},\dots,p_{k}\in\mathcal{P}.

  1. (w)

    replace a child of the constraint CS,a1,,aiC_{S,\top}^{a_{1},\dots,a_{i}} by the corresponding child of CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}};

  2. (e)

    if the lowest variable of a child of CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}} appears only once, then replace it by the corresponding child of CW,,|A|a1,,aiC_{W,\top,|A|}^{a_{1},\dots,a_{i}};

  3. (j)

    if a variable from the ii-th level appears in two children of CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}}, then we replace these children by one child of CW,a1,,aiC_{W,\top}^{a_{1},\dots,a_{i}} identifying the corresponding variables of the children;

  4. (z)

    replace a child of CW,,ja1,,aiC_{W,\top,j}^{a_{1},\dots,a_{i}} by the corresponding child of CW,,j1a1,,aiC_{W,\top,j-1}^{a_{1},\dots,a_{i}};

  5. (s)

    replace a child of CW,,0a1,,aiC_{W,\top,0}^{a_{1},\dots,a_{i}} by the corresponding child of CS,a1,,ai1C_{S,\top}^{a_{1},\dots,a_{i-1}}.

Notice that (w) replaces an instance by its universal weakening, (s) makes the instance stronger, (e) just existentially quantifies a variable that appears only once, (j) joins several constraints together and makes the instance stronger, (z) replaces the instance by its universal weakening. Notice that we do not apply (e) if the lowest variable is a child of uu because this would mean removing a root.

Let us show that we can apply these transformation till the moment when we have only one constraint and this constraint is a child of CWc1,,cmC_{W}^{c_{1},\dots,c_{m}}. Suppose we already have p0,,pp_{0},\dots,p_{\ell}. If pp_{\ell} has a child of CW,ja1,,aiC_{W,j}^{a_{1},\dots,a_{i}} or a child of CSa1,,aiC_{S}^{a_{1},\dots,a_{i}} then we can apply (w), (z), or (s). Otherwise, let vv be the lowest variable of pp_{\ell}. Notice that vv has to be from a level below uu, since otherwise pp_{\ell} already consists of just one constraint. If vv appears only once, then we can apply (e). Otherwise, we can apply (j).

Since we always reduce the tree and reduce the arity of a constraint, we cannot apply transformations forever. Thus, we have the sequence p0,p1,,pk𝒫p_{0},p_{1},\dots,p_{k}\in\mathcal{P} such that for every ii either pi+1p_{i+1} is stronger than pip_{i}, or pipi+1p_{i}\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}p_{i+1}. Since the last path in the sequence consists of a child of CWc1,,cmC_{W}^{c_{1},\dots,c_{m}}, we have B2+pk=B2B_{2}+p_{k}=B_{2} and the sequence C0,C1,C2,,CkC_{0},C_{1},C_{2},\dots,C_{k} witnesses that B1B2B_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}B_{2}. ∎

Lemma 40.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}, p𝒫p\in\mathcal{P}, B1+pDu()B_{1}+p\neq D_{u}^{(\top)}. Then B2+pDu()B_{2}+p\neq D_{u}^{(\top)} or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

Assume that B2+p=Du()B_{2}+p=D_{u}^{(\top)}. By Lemma 39 there is a supervised zig-zag C0,C1,,CkC_{0},C_{1},\dots,C_{k} from B1B_{1} to B2B_{2}. Consider the last element in the sequence C0+p,C1+p,,Ck+pC_{0}+p,C_{1}+p,\dots,C_{k}+p that is different from Du()D_{u}^{(\top)}. Let it be Ci+pC_{i}+p. Then by Lemma 36, Ci+pCi+1+p=Du()C_{i}+p\mathrel{\mathchoice{\ooalign{\cr$\displaystyle\leq$\cr\raisebox{0.86108pt}{$\displaystyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\textstyle\leq$\cr\raisebox{0.86108pt}{$\textstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}{\ooalign{\cr$\scriptscriptstyle\leq$\cr\raisebox{0.86108pt}{$\scriptscriptstyle\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft$}}}}C_{i+1}+p=D_{u}^{(\top)}, which by Lemma 37 implies that the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong. ∎

Lemma 41.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}, B1kB2B_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k}B_{2}, and B1𝐳B2𝐳\prescript{\mathbf{z}}{}{B_{1}}\not\supseteq\prescript{\mathbf{z}}{}{B_{2}} for some 𝐳A|A|\mathbf{z}\in A^{|A|}. Then there exists p𝒫p\in\mathcal{P} such that B1+pk1B2+pDu()B_{1}+p\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k-1}B_{2}+p\neq D_{u}^{(\top)} or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

Let C0,,CkC_{0},\dots,C_{k} be a supervised zig-zag from B1B_{1} to B2B_{2}. Since B1𝐳B2𝐳\prescript{\mathbf{z}}{}{B_{1}}\not\supseteq\prescript{\mathbf{z}}{}{B_{2}}, CiCi+1C_{i}\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}C_{i+1} for some ii. Choose an inclusion maximal B𝒫B\in\mathcal{B}_{\mathcal{P}} and a path p𝒫p\in\mathcal{P} such that Ci+p=BC_{i}+p=B. Unless the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong, Lemma 40 implies that Cj+pDu()C_{j}+p\neq D_{u}^{(\top)} for every jj. Since CiCi+1C_{i}\subseteq C_{i+1} and BB is inclusion maximal, we have Ci+p=Ci+1+pC_{i}+p=C_{i+1}+p. Then by Lemma 36, C0+p,C1+p,,Ci+p,Ci+2+p,,Ck+pC_{0}+p,C_{1}+p,\dots,C_{i}+p,C_{i+2}+p,\dots,C_{k}+p is a supervised zig-zag from B1+pB_{1}+p to B2+pB_{2}+p of length k1k-1. ∎

Lemma 42.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}. Then there exists p𝒫p\in\mathcal{P} such that B1+pB2+pDu()B_{1}+p\subseteq B_{2}+p\neq D_{u}^{(\top)} or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

By Lemma 39, B2kB1B_{2}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k}B_{1} for some kk. Applying Lemma 41 we obtain B2+p1k1B1+p1B_{2}+p_{1}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k-1}B_{1}+p_{1}. Applying Lemma 41 again we obtain B2+p1+p2k2B1+p1+p2B_{2}+p_{1}+p_{2}\mathrel{\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}\!\!\supset\!\!\!\mathrel{\color[rgb]{0.45,0.45,0.45}\definecolor[named]{pgfstrokecolor}{rgb}{0.45,0.45,0.45}\pgfsys@color@gray@stroke{0.45}\pgfsys@color@gray@fill{0.45}\blacktriangleleft}}_{k-2}B_{1}+p_{1}+p_{2}. We can do this till the moment when B2+p1+p2++psB1+p1+p2++psB_{2}+p_{1}+p_{2}+\dots+p_{s}\supseteq B_{1}+p_{1}+p_{2}+\dots+p_{s}. It remains to put p=p1+p2++psp=p_{1}+p_{2}+\dots+p_{s}. ∎

Corollary 43.

Suppose B1,B2𝒫B_{1},B_{2}\in\mathcal{B}_{\mathcal{P}}. Then there exists p𝒫p\in\mathcal{P} such that B1+p=B2+pDu()B_{1}+p=B_{2}+p\neq D_{u}^{(\top)} or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

By Lemma 42 there exists pp such that B1+pB2+pB_{1}+p\supseteq B_{2}+p. Again by Lemma 42 there exists pp^{\prime} such that B1+p+pB2+p+pB_{1}+p+p^{\prime}\subseteq B_{2}+p+p^{\prime}. Combining this with B1+pB2+pB_{1}+p\supseteq B_{2}+p, we obtain B1+p+p=B2+p+pB_{1}+p+p^{\prime}=B_{2}+p+p^{\prime}. ∎

Lemma 44.

Suppose B𝒫B\in\mathcal{B}_{\mathcal{P}}. Then there exists p𝒫p\in\mathcal{P} such that B+p=BB^{\prime}+p=B for every B𝒫B^{\prime}\in\mathcal{B}_{\mathcal{P}} or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

First, let us show that there exists a path sending all B𝒫B^{\prime}\in\mathcal{B}_{\mathcal{P}} to the same element of 𝒫\mathcal{B}_{\mathcal{P}}. Put 0=𝒫\mathcal{B}_{0}=\mathcal{B}_{\mathcal{P}}. If |0|=1|\mathcal{B}_{0}|=1 then we can take a trivial path pp. Otherwise, consider different B1,B20B_{1},B_{2}\in\mathcal{B}_{0}. By Corollary 43, there exists a path p1p_{1} such that B1+p1=B2+p1Du()B_{1}+p_{1}=B_{2}+p_{1}\neq D_{u}^{(\top)}. Put 1={B+p1B0}\mathcal{B}_{1}=\{B^{\prime}+p_{1}\mid B^{\prime}\in\mathcal{B}_{0}\}. If |1|=1|\mathcal{B}_{1}|=1 then we finish. Otherwise, choose different B1,B21B_{1},B_{2}\in\mathcal{B}_{1} and make them equal using a path p2p_{2}. Then define 2={B+p2B1}\mathcal{B}_{2}=\{B^{\prime}+p_{2}\mid B^{\prime}\in\mathcal{B}_{1}\}. Proceeding this way we get paths p1,,psp_{1},\dots,p_{s} and sets 1,,s\mathcal{B}_{1},\dots,\mathcal{B}_{s} such that i={B+piBi1}\mathcal{B}_{i}=\{B^{\prime}+p_{i}\mid B^{\prime}\in\mathcal{B}_{i-1}\} and |i|<|i1||\mathcal{B}_{i}|<|\mathcal{B}_{i-1}| for i=1,2,,si=1,2,\dots,s. Notice that by Lemma 40 Du()iD_{u}^{(\top)}\notin\mathcal{B}_{i} for any ii. We finish when |s|=1|\mathcal{B}_{s}|=1, so let s={B0}\mathcal{B}_{s}=\{B_{0}\}.

Thus, for any B𝒫B^{\prime}\in\mathcal{B}_{\mathcal{P}} we have B+p1+p2++ps=B0𝒫B^{\prime}+p_{1}+p_{2}+\dots+p_{s}=B_{0}\in\mathcal{B}_{\mathcal{P}}. By the definition of 𝒫\mathcal{B}_{\mathcal{P}} there exists a path ps+1𝒫p_{s+1}\in\mathcal{P} such that B0+ps+1=BB_{0}+p_{s+1}=B. It remains to put p=p1+p2++ps+ps+1p=p_{1}+p_{2}+\dots+p_{s}+p_{s+1}. ∎

Lemma 45.

Suppose B𝒯B\in\mathcal{B}_{\mathcal{T}}. Then there exists B𝒫B^{\prime}\in\mathcal{B}_{\mathcal{P}} such that BBB^{\prime}\supseteq B, or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

By the definition of 𝒯\mathcal{B}_{\mathcal{T}} there exist B0𝒫B_{0}\in\mathcal{B}_{\mathcal{P}} and a tree t1𝒯t_{1}\in\mathcal{T} such that B0+t1=BB_{0}+t_{1}=B. Let M𝒯M\in\mathcal{B}_{\mathcal{T}} be chosen inclusion maximal. Choose t0,t2𝒯t_{0},t_{2}\in\mathcal{T} such that M+t0=B0M+t_{0}=B_{0} and B+t2=MB+t_{2}=M. Put t=t0+t1+t2t=t_{0}+t_{1}+t_{2}. Then M+t=MM+t=M.

Consider the minimal set LL of leaves of tt we need to restrict to MM to obtain a 𝐳\mathbf{z}-parameterized unary relation in the root that is different from Du()D_{u}^{(\top)}. Since MM is inclusion maximal, this unary relation must be MM. Let L={u1,,u}L=\{u_{1},\dots,u_{\ell}\} and u0u_{0} be the root of tt. We consider two cases:

Case 1. >1\ell>1. Let (tu2CuC)(u1,u0)(t\wedge u_{2}\in C\wedge\dots\wedge u_{\ell}\in C)(u_{1},u_{0}) define a 𝐳\mathbf{z}-parameterized binary relation SS and t(u1,u0)t(u_{1},u_{0}) define a 𝐳\mathbf{z}-parameterized binary relation WW. By the minimality of \ell we have Du()𝐳+S𝐳=Du()𝐳\prescript{\mathbf{z}}{}{D_{u}^{(\top)}}+\prescript{\mathbf{z}}{}{S}=\prescript{\mathbf{z}}{}{D_{u}^{(\top)}} for any 𝐳\mathbf{z}. Then WW, SS, and BB witness that (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is a strong tuple.

Case 2. =1\ell=1. Let pp be the path in tt from the leaf u1u_{1} to the root u0u_{0}. Then p=p0+p1+p2p=p_{0}+p_{1}+p_{2}, where p0p_{0}, p1p_{1}, and p2p_{2} are parts of pp coming from t0t_{0}, t1t_{1}, and t2t_{2}, respectively. Notice that M+p=MM+p=M, M+p0B0M+p_{0}\supseteq B_{0}, M+p0+p1BM+p_{0}+p_{1}\supseteq B, and M+p0+p1Du()M+p_{0}+p_{1}\neq D_{u}^{(\top)}. Hence, B0+p1M+p0+p1Du()B_{0}+p_{1}\subseteq M+p_{0}+p_{1}\neq D_{u}^{(\top)} and B0+p1BB_{0}+p_{1}\supseteq B. It remains to put B=B0+p1B^{\prime}=B_{0}+p_{1}. ∎

Lemma 46.

Suppose B1𝒫B_{1}\in\mathcal{B}_{\mathcal{P}} and B2𝒯B_{2}\in\mathcal{B}_{\mathcal{T}}. Then B1B2B_{1}\cap B_{2}\neq\varnothing, or the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong.

Proof.

By Lemma 44 there exists a path p𝒫p\in\mathcal{P} such that B+p=B1B+p=B_{1} for every B𝒫B\in\mathcal{B}_{\mathcal{P}}. Let B0=B2+pB_{0}=B_{2}+p^{\prime}, where pp^{\prime} is obtained from pp by switching ends (we could also write B0=B2pB_{0}=B_{2}-p). If B0=Du()B_{0}=D_{u}^{(\top)} then B1+p=B1B_{1}+p=B_{1} implies B1B2B_{1}\cap B_{2}\neq\varnothing. Otherwise, B0𝒯B_{0}\in\mathcal{B}_{\mathcal{T}} and by Lemma 45 there exists B0𝒫B_{0}^{\prime}\in\mathcal{B}_{\mathcal{P}} such that B0B0B_{0}^{\prime}\supseteq B_{0}. By the definition of pp we must have B0+p=B1B_{0}^{\prime}+p=B_{1}. Therefore, B2B2p+p=B0+pB0+p=B1B_{2}\subseteq B_{2}-p+p=B_{0}+p\subseteq B_{0}^{\prime}+p=B_{1}, which completes the proof. ∎

We are ready to prove the main theorem of this subsection.

Theorem 21.

Suppose RA2n+1R\subseteq A^{2n+1}, D()D^{(\top)} is a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction for R\mathcal{I}_{R}, uVar(R)u\in\operatorname{Var}(\mathcal{I}_{R}), BDu()B\mathrel{\lhd}D_{u}^{(\top)} is a 𝐳\mathbf{z}-parameterized nonempty unary relation. Then one of the following conditions holds:

  1. 1.

    there exists a 𝐳\mathbf{z}-parameterized universal 1-consistent reduction D()D^{(\bot)} for R\mathcal{I}_{R} that is smaller than D()D^{(\top)};

  2. 2.

    there exists a mighty tuple IV q-definable from RR.

Proof.

First, we repeat assumptions from the beginning of this section. We choose the highest variable uu with the same property, then we define \mathcal{B} and choose 𝒯\mathcal{B}_{\mathcal{T}} and 𝒫\mathcal{B}_{\mathcal{P}}.

Choose some B𝒫B\in\mathcal{B}_{\mathcal{P}}. If B𝐳+t𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}\neq\varnothing for every 𝐳\mathbf{z} and t𝒯t\in\mathcal{T}, then by Lemma 34 there exists a required smaller reduction. Otherwise, choose a tree t𝒯t\in\mathcal{T} with the minimal number of leaves such that B𝐳0+t𝐳0=\prescript{\mathbf{z}_{0}}{}{B}+\prescript{\mathbf{z}_{0}}{}{t}=\varnothing for some 𝐳0\mathbf{z}_{0}. Moving the root to one of the leaves and removing its leaf mark we get another tree tt^{\prime} such that B𝐳0+t𝐳0B𝐳0=\prescript{\mathbf{z}_{0}}{}{B}+\prescript{\mathbf{z}_{0}}{}{t}^{\prime}\cap\prescript{\mathbf{z}_{0}}{}{B}=\varnothing. Since tt has the minimal number of leaves, B𝐳+t𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}^{\prime}\neq\varnothing for any 𝐳\mathbf{z} and B𝐳+t𝐳𝒯\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{t}^{\prime}\in\mathcal{B}_{\mathcal{T}}. Then Lemma 46 implies that the tuple (R,D(),u,𝒫)(R,D^{(\top)},u,\mathcal{B}_{\mathcal{P}}) is strong. It remains to apply Lemma 35. ∎

7 Hardness Claims

7.1 Definitions

Binary relations in this section are often viewed as directed graphs, and we use terminology from the graph theory such as paths and cycles. A binary relation RR is called transitive if R+R=RR+R=R. Even though the general domain of any relation RR is AA, we often define a subset DD such that RD2R\subseteq D^{2}. Then we call the relation RR reflexive if {(d,d)dD}R\{(d,d)\mid d\in D\}\subseteq R. Suppose RR is a reflexive relation on DD. Then the transitive symmetric closure of RR is the minimal transitive symmetric relation RRR^{\prime}\supseteq R. Notice that R=RR+RR++RR+RR^{\prime}=R-R+R-R+\dots+R-R+R, for sufficiently many pluses and minuses, hence RR^{\prime} is q-definable over RR.

For a positive integer mm and a binary relation SS denote mS=S+S++Smm\cdot S=\underbrace{S+S+\dots+S}_{m}.

Lemma 47.

Suppose RA×AR\subseteq A\times A, S=(|A|!|A|2)RS=(|A|!\cdot|A|^{2})\cdot R. Then S+S=SS+S=S.

Proof.

First, put S1=(|A|!)RS_{1}=(|A|!)\cdot R. Notice that if (a,b)S1(a,b)\in S_{1}, then there is a path from aa to bb in RR of length |A|!|A|!. Since the domain is of size |A||A|, there must be a cycle of length m|A|m\leqslant|A| in the path. Repeating this cycle |A|!/m|A|!/m times we make a path of length 2|A|!2|A|!, which implies S1+S1S1S_{1}+S_{1}\supseteq S_{1}. Put Sn=nS1S_{n}=n\cdot S_{1}. Since S1+S1S1S_{1}+S_{1}\supseteq S_{1}, we have SiSi+1S_{i}\subseteq S_{i+1}. Moreover, if Si=Si+1S_{i}=S_{i+1}, then Sj=SiS_{j}=S_{i} for any j>ij>i. Thus, the sequence S1,S2,,S_{1},S_{2},\dots, stabilises at some SiS_{i}, where i|A|2i\leqslant|A|^{2}. Hence, S|A|2+S|A|2=S|A|2S_{|A|^{2}}+S_{|A|^{2}}=S_{|A|^{2}}, which completes the proof. ∎

For two equivalence relations R1R_{1} and R2R_{2} on some set DD by R1∨⃝R2R_{1}\ovee R_{2} we denote the minimal equivalence relation on DD containing R1R_{1} and R2R_{2}. Thus, it is the usual join of two equivalence relations, but we prefer to use this symbol to distinguish it from the disjunction. Notice that R1∨⃝R2R_{1}\ovee R_{2} is q-definable from R1R_{1} and R2R_{2} as we can always write a quantified formula defining R1+R2+R1+R2++R1+R2R_{1}+R_{2}+R_{1}+R_{2}+\dots+R_{1}+R_{2}.

Recall that we agreed that A={1,,|A|}A=\{1,\dots,|A|\}. Then we put κ=(1,,|A|)\kappa=(1,\dots,|A|), that is, κ\kappa is a concrete tuple of length |A||A| with all the elements of AA.

7.2 PSpace-hardness for a mighty tuple I

In this section we show that the QCSP over a mighty tuple I is PSpace-hard.

For technical reasons we will need mighty tuples with an additional property:

  • (κ\kappa)

    Rκδ𝐳Rαδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{\delta}{R}^{\alpha} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and α\alpha.

A mighty tuple I satisfying property (κ\kappa) is called a mighty tuple I’.

Lemma 48.

Suppose (Q,D,B,C,Δ)(Q,D,B,C,\Delta) is a mighty tuple I. Then {Q,D,B,C,Δ}\{Q,D,B,C,\Delta\} q-defines a mighty tuple I’.

Proof.

Define a mighty tuple I’ as follows. Suppose the α\alpha-parameter is from AkA^{k}. Put

Rx1,,x|A|δ𝐳(y1,y2)=i1,,ik{1,2,,|A|}.Qxi1,,xikδ𝐳(y1,y2).\prescript{\mathbf{z}}{\delta}{R}^{x_{1},\dots,x_{|A|}}(y_{1},y_{2})=\bigwedge\limits_{i_{1},\dots,i_{k}\in\{1,2,\dots,|A|\}.}\prescript{\mathbf{z}}{\delta}{Q}^{x_{i_{1}},\dots,x_{i_{k}}}(y_{1},y_{2}).

Then Rκ=R=QR^{\kappa}=R^{\forall\forall}=Q^{\forall\forall} and R=QR^{\forall}=Q^{\forall}. Hence (R,D,B,C,Δ)(R,D,B,C,\Delta) is a mighty tuple I’. ∎

As we mentioned in Section 3 we have one reduction covering all the PSpace-hard cases of the QCSP. Precisely, we will show that using a mighty tuple we can build relations very similar to the relations from Section 3. Then we use the same reduction from the Quantified-3-DNF, which is the complement of the Quantified-3-CNF.

First, for any instance of the Quantified-3-DNF we define a sentence corresponding to this reduction. Suppose we have two relational symbols Υ0\Upsilon_{0} and Υ1\Upsilon_{1} of arity m+2m+2 for some m1m\geqslant 1. Then Υ0\Upsilon_{0} and Υ1\Upsilon_{1} can be viewed as 𝐱\mathbf{x}-parameterized binary relations, where 𝐱Am\mathbf{x}\in A^{m}. Let Φ\Phi be an instance of the Quantified-3-DNF of the form

Q1x1Q2x2Qnxn(xa1=a1xb1=b1xc1=c1)(xas=asxbs=bsxcs=cs),Q_{1}x_{1}Q_{2}x_{2}\dots Q_{n}x_{n}\;(x_{a_{1}}=a_{1}^{\prime}\wedge x_{b_{1}}=b_{1}^{\prime}\wedge x_{c_{1}}=c_{1}^{\prime})\vee\dots\vee(x_{a_{s}}=a_{s}^{\prime}\wedge x_{b_{s}}=b_{s}^{\prime}\wedge x_{c_{s}}=c_{s}^{\prime}),

where Q1,Q2,,Qn{,}Q_{1},Q_{2},\dots,Q_{n}\in\{\forall,\exists\}, ai,bi,ci[n]a_{i},b_{i},c_{i}\in[n] and ai,bi,ci{0,1}a_{i}^{\prime},b_{i}^{\prime},c_{i}^{\prime}\in\{0,1\} for every i[n]i\in[n].

We define recursively formulas Ψn,Ψn1,,Ψ1,Ψ0\Psi_{n},\Psi_{n-1},\dots,\Psi_{1},\Psi_{0}. Put

Ψn=y1ys11is(Υai¯𝐱ai(yi1,yi)Υbi¯𝐱bi(yi1,yi)Υci¯𝐱ci(yi1,yi)),\displaystyle\Psi_{n}=\exists y_{1}\dots\exists y_{s-1}\bigwedge_{1\leqslant i\leqslant s}(\Upsilon_{\overline{a_{i}^{\prime}}}^{\mathbf{x}_{a_{i}}}(y_{i-1},y_{i})\wedge\Upsilon_{\overline{b_{i}^{\prime}}}^{\mathbf{x}_{b_{i}}}(y_{i-1},y_{i})\wedge\Upsilon_{\overline{c_{i}^{\prime}}}^{\mathbf{x}_{c_{i}}}(y_{i-1},y_{i})),

where a¯\overline{a} is a negation of aa for any a{0,1}a\in\{0,1\}. Notice that for any variable xix_{i} of the original instance we introduce a variable 𝐱i\mathbf{x}_{i}, which takes values from AmA^{m}.

For every ii by lil_{i} and rir_{i} we denote the minimal and the maximal indices of yy-variables appearing in the formula Ψi\Psi_{i}. Thus, we have ln=0l_{n}=0 and rn=sr_{n}=s. Let us show how to define Ψk1\Psi_{k-1} from Ψk\Psi_{k}. If Qk=Q_{k}=\forall, then we put Ψk1=𝐱kΨk\Psi_{k-1}=\forall\mathbf{x}_{k}\;\Psi_{k}.

If Qk=Q_{k}=\exists, then we put

Ψk1=yrk𝐱kylkΨkΥ0𝐱k(ylk1,ylk)Υ1𝐱k(yrk+1,ylk).\Psi_{k-1}=\exists y_{r_{k}}\forall\mathbf{x}_{k}\exists y_{l_{k}}\;\Psi_{k}\wedge\Upsilon_{0}^{\mathbf{x}_{k}}(y_{l_{k}-1},y_{l_{k}})\wedge\Upsilon_{1}^{\mathbf{x}_{k}}(y_{r_{k}+1},y_{l_{k}}).

Notice that in the formula Ψ0\Psi_{0} all the variables except for yl0y_{l_{0}} and yr0y_{r_{0}} are quantified. By 𝒬Φ\mathcal{Q}^{\Phi} we denote the formula Ψ0\Psi_{0} whose variables yl0y_{l_{0}} and yr0y_{r_{0}} are replaced by yy and yy^{\prime} respectively.

For 𝐱\mathbf{x}-parameterized relations R0R_{0}, R1R_{1}, and an instance Φ\Phi of the Quantified-3-DNF by 𝒬Φ(R0,R1)\mathcal{Q}^{\Phi}(R_{0},R_{1}) we denote the formula obtained from 𝒬Φ\mathcal{Q}^{\Phi} by substituting R0R_{0} for Υ0\Upsilon_{0} and R1R_{1} for Υ1\Upsilon_{1}. By 𝒯Φ(R0,R1)\mathcal{T}^{\Phi}(R_{0},R_{1}) we denote the transitive symmetric closure of σ\sigma, where σ(y,y)=𝒬Φ(R0,R1)\sigma(y,y^{\prime})=\mathcal{Q}^{\Phi}(R_{0},R_{1}).

Arguing as in Section 3 we can prove the following lemma.

Lemma 49.

Suppose Φ\Phi is an instance of the Quantified-3-DNF, A={+,,0,1}A=\{+,-,0,1\}, V0x(y1,y2)=(y1,y2{+,})(x=0y1=y2)V_{0}^{x}(y_{1},y_{2})=(y_{1},y_{2}\in\{+,-\})\wedge(x=0\rightarrow y_{1}=y_{2}), V1x(y1,y2)=(y1,y2{+,})(x=1y1=y2)V_{1}^{x}(y_{1},y_{2})=(y_{1},y_{2}\in\{+,-\})\wedge(x=1\rightarrow y_{1}=y_{2}). Then 𝒯Φ(V0,V1)={(+,+),(,)}\mathcal{T}^{\Phi}(V_{0},V_{1})=\{(+,+),(-,-)\} if Φ\Phi does not hold; 𝒯Φ(V0,V1)={+,}2\mathcal{T}^{\Phi}(V_{0},V_{1})=\{+,-\}^{2} if Φ\Phi holds.

The next lemmas describe important properties of the operator 𝒯Φ\mathcal{T}^{\Phi}.

Lemma 50.

Suppose

  1. 1.

    Φ\Phi is a No-instance of the Quantified-3-DNF;

  2. 2.

    R0R_{0} and R1R_{1} are 𝐱\mathbf{x}-parameterized equivalence relations on DD;

  3. 3.

    (B×C)(R0β0∨⃝R1β1)=(B\times C)\cap(R_{0}^{\beta_{0}}\ovee R_{1}^{\beta_{1}})=\varnothing for some β0\beta_{0} and β1\beta_{1}.

Then (B×C)𝒯Φ(R0,R1)=(B\times C)\cap\mathcal{T}^{\Phi}(R_{0},R_{1})=\varnothing.

Proof.

Let δ=R0β0∨⃝R1β1\delta=R_{0}^{\beta_{0}}\ovee R_{1}^{\beta_{1}}. Let BB^{\prime} be the union of all classes of δ\delta having a nonempty intersection with BB. Let C=DBC^{\prime}=D\setminus B^{\prime}, δ=B2C2\delta^{\prime}=B^{\prime 2}\cup C^{\prime 2}, L0𝐱={δ if 𝐱=β0D×D otherwiseL_{0}^{\mathbf{x}}=\begin{cases}\delta^{\prime}&\text{ if $\mathbf{x}=\beta_{0}$}\\ D\times D&\text{ otherwise}\end{cases}, L1𝐱={δ if 𝐱=β1D×D otherwiseL_{1}^{\mathbf{x}}=\begin{cases}\delta^{\prime}&\text{ if $\mathbf{x}=\beta_{1}$}\\ D\times D&\text{ otherwise}\end{cases}.

Notice that L0R0L_{0}\supseteq R_{0} and L1R1L_{1}\supseteq R_{1}, hence replacement of R0R_{0} by L0L_{0} and R1R_{1} by L1L_{1} would make it even harder for the UP to win. Also, we may assume that the UP only plays β0\beta_{0} and β1\beta_{1}. Interpreting β0\beta_{0} as 0 and β1\beta_{1} as 1, and interpreting the domain D/δD/\delta^{\prime} as {+,}\{+,-\} we derive that {(+,)}𝒯Φ(V0,V1)=\{(+,-)\}\cap\mathcal{T}^{\Phi}(V_{0},V_{1})=\varnothing if and only if (B×C)𝒯Φ(L0,L1)=(B\times C)\cap\mathcal{T}^{\Phi}(L_{0},L_{1})=\varnothing, where V0V_{0} and V1V_{1} are the canonical relations from Lemma 49. This implies (B×C)𝒯Φ(R0,R1)=(B\times C)\cap\mathcal{T}^{\Phi}(R_{0},R_{1})=\varnothing. ∎

Lemma 51.

Suppose

  1. 1.

    Φ\Phi is a Yes-instance of the Quantified-3-DNF;

  2. 2.

    R0R_{0} and R1R_{1} are 𝐱\mathbf{x}-parameterized equivalence relations on DD;

  3. 3.

    (b,c)R0α(b,c)\in R_{0}^{\alpha} or (b,c)R1α(b,c)\in R_{1}^{\alpha} for every α\alpha.

Then (b,c)𝒯Φ(R0,R1)(b,c)\in\mathcal{T}^{\Phi}(R_{0},R_{1}).

Proof.

Notice that if b=cb=c, then there is an obvious winning strategy for the EP where she always plays the element bb. Thus, we assume that bcb\neq c. To make it harder for the EP to win we let her play only elements bb and cc. That is, we replace the relation R0𝐱R_{0}^{\mathbf{x}} by the relation L0𝐱=R0𝐱{b,c}2L_{0}^{\mathbf{x}}=R_{0}^{\mathbf{x}}\cap\{b,c\}^{2} and the relation R1𝐱R_{1}^{\mathbf{x}} by L1𝐱=R1𝐱{b,c}2L_{1}^{\mathbf{x}}=R_{1}^{\mathbf{x}}\cap\{b,c\}^{2}. By condition 3 for any 𝐱\mathbf{x} one of the two relations L0𝐱L_{0}^{\mathbf{x}} and L1𝐱L_{1}^{\mathbf{x}} is equal to {b,c}2\{b,c\}^{2} and another is either {(b,b),(c,c)}\{(b,b),(c,c)\}, or {b,c}2\{b,c\}^{2}.

Since Φ\Phi is a Yes-instance, (+,)𝒯Φ(V0,V1)(+,-)\in\mathcal{T}^{\Phi}(V_{0},V_{1}) for the canonical relations V0V_{0} and V1V_{1} in Lemma 49. Interpreting bb and cc as - and ++ we can derive that (b,c)𝒯Φ(L0,L1)(b,c)\in\mathcal{T}^{\Phi}(L_{0},L_{1}). In fact, for any choice of 𝐱\mathbf{x} either L0𝐱L_{0}^{\mathbf{x}} connects bb and cc, or L1𝐱L_{1}^{\mathbf{x}} connects bb and cc, or both connect. Hence, if the UP cannot win in 𝒯Φ(V0,V1)\mathcal{T}^{\Phi}(V_{0},V_{1}), then he cannot win in 𝒯Φ(L0,L1)\mathcal{T}^{\Phi}(L_{0},L_{1}). This implies that (b,c)𝒯Φ(R0,R1)(b,c)\in\mathcal{T}^{\Phi}(R_{0},R_{1}). ∎

We will need parameterized relations having arbitrary many parameters. Formally, we say that SS is a multi-parameter equivalence relation if it assigns an equivalence relation Sα1,,αnS^{\alpha_{1},\dots,\alpha_{n}} to every sequence α1,,αnAm\alpha_{1},\dots,\alpha_{n}\in A^{m} and satisfies the following properties:

  1. (s)

    Sα1,,αn1=Sβ1,,βn2S^{\alpha_{1},\dots,\alpha_{n_{1}}}=S^{\beta_{1},\dots,\beta_{n_{2}}} whenever {α1,,αn1}={β1,,βn2}\{\alpha_{1},\dots,\alpha_{n_{1}}\}=\{\beta_{1},\dots,\beta_{n_{2}}\}

  2. (m)

    Sα1,,αnSα1,,αn,αn+1S^{\alpha_{1},\dots,\alpha_{n}}\subseteq S^{\alpha_{1},\dots,\alpha_{n},\alpha_{n+1}} for any α1,,αn,αn+1Am\alpha_{1},\dots,\alpha_{n},\alpha_{n+1}\in A^{m}

Since the set AmA^{m} is finite, (s) implies that we may think of SS as a relation of an arity N:=m|A|m+2N:=m\cdot|A|^{m}+2 such that Sα1,,αNS^{\alpha_{1},\dots,\alpha_{N}} depends only on the set {α1,,αN}\{\alpha_{1},\dots,\alpha_{N}\}. Thus, SS is still a finite relation of a fixed arity, but it will be convenient for us to assume that it can have arbitrary many parameters. We say that a multi-parameter equivalence relation S1S_{1} is larger than a multi-parameter equivalence relation S2S_{2} if S1α1,,αnS2α1,,αnS_{1}^{\alpha_{1},\dots,\alpha_{n}}\supseteq S_{2}^{\alpha_{1},\dots,\alpha_{n}} for every α1,,αnAm\alpha_{1},\dots,\alpha_{n}\in A^{m}. If additionally S1S2S_{1}\neq S_{2}, we say that S1S_{1} is strictly larger than S2S_{2}.

We extend 𝒯Φ\mathcal{T}^{\Phi} to multi-parameter equivalence relations. For a multi-parameter equivalence relation SS and a parameterized equivalence relation RR by 𝒯Φ(S,R)\mathcal{T}^{\Phi}(S,R) we denote the multi-parameter equivalence relation S0S_{0} defined as follows. To define S0𝐮1,,𝐮nS_{0}^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}} we take the formula 𝒬Φ\mathcal{Q}^{\Phi}, replace each Υ0𝐱i\Upsilon_{0}^{\mathbf{x}_{i}} by S𝐮1,,𝐮n,𝐱iS^{\mathbf{u}_{1},\dots,\mathbf{u}_{n},\mathbf{x}_{i}}, replace each Υ1𝐱i\Upsilon_{1}^{\mathbf{x}_{i}} by S𝐮1,,𝐮n∨⃝R𝐱iS^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}\ovee R^{\mathbf{x}_{i}}. For fixed 𝐮1,,𝐮n\mathbf{u}_{1},\dots,\mathbf{u}_{n} the obtained formula has only two free variables yy and yy^{\prime} and defines a binary relation σ\sigma. Then S0𝐮1,,𝐮nS_{0}^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}} is the transitive symmetric closure of σ\sigma.

Lemma 52.

Suppose

  1. 1.

    SS is a multi-parameter relation on a set DD;

  2. 2.

    RR is an 𝐱\mathbf{x}-parameterized equivalence relation on DD;

  3. 3.

    Φ\Phi is an instance of the Quantified-3-DNF.

Then 𝒯Φ(S,R)\mathcal{T}^{\Phi}(S,R) is a multi-parameter equivalence relation that is larger than SS.

Proof.

Suppose 𝒯Φ(S,R)=S0\mathcal{T}^{\Phi}(S,R)=S_{0}. Since SS satisfies properties (s) and (m), it immediately follows from the definition that S0S_{0} also satisfies properties (s) and (m). Let us show that S0S_{0} is larger than SS. For any 𝐮1,,𝐮n\mathbf{u}_{1},\dots,\mathbf{u}_{n} we have S𝐮1,,𝐮nS𝐮1,,𝐮n,𝐱iS^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}\subseteq S^{\mathbf{u}_{1},\dots,\mathbf{u}_{n},\mathbf{x}_{i}} and S𝐮1,,𝐮nS𝐮1,,𝐮n∨⃝R𝐱iS^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}\subseteq S^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}\ovee R^{\mathbf{x}_{i}}. Hence, the interpretations of both Υ0𝐱i\Upsilon_{0}^{\mathbf{x}_{i}} and Υ1𝐱i\Upsilon_{1}^{\mathbf{x}_{i}} contain every pair (b,c)(b,c) from S𝐮1,,𝐮nS^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}. Thus, for any play of the UP the EP can always play bb to confirm that (b,c)S0𝐮1,,𝐮n(b,c)\in S_{0}^{\mathbf{u}_{1},\dots,\mathbf{u}_{n}}. ∎

Lemma 53.

Suppose

  1. (1)

    SS is a multi-parameter equivalence relation on a set DD;

  2. (2)

    RR is an 𝐱\mathbf{x}-parameterized equivalence relation on DD;

  3. (3)

    (b,c)Sα∨⃝Rα(b,c)\in S^{\alpha}\ovee R^{\alpha} for every αAm\alpha\in A^{m};

  4. (4)

    (b,c)Sα(b,c)\notin S^{\alpha} for some αAm\alpha\in A^{m};

  5. (5)

    Φ\Phi is a Yes-instance of the Quantitied-3-DNF.

Then 𝒯Φ(S,R)\mathcal{T}^{\Phi}(S,R) is strictly larger than SS.

Proof.

Suppose 𝒯Φ(S,R)=S0\mathcal{T}^{\Phi}(S,R)=S_{0}. Consider a maximal set of tuples α1,,αn\alpha_{1},\dots,\alpha_{n} such that (b,c)Sα1,,αn(b,c)\notin S^{\alpha_{1},\dots,\alpha_{n}}. By condition (4) such a set exists. Note that this set may contain all tuples. Let us show that (b,c)S0α1,,αn(b,c)\in S_{0}^{\alpha_{1},\dots,\alpha_{n}}, which together with Lemma 52 would mean that 𝒯Φ(S,R)\mathcal{T}^{\Phi}(S,R) is strictly larger than SS.

Let us consider the interpretations of Υ0𝐱i\Upsilon_{0}^{\mathbf{x}_{i}} and Υ1𝐱i\Upsilon_{1}^{\mathbf{x}_{i}} in the definition of 𝒯Φ(S,R)\mathcal{T}^{\Phi}(S,R). If 𝐱i\mathbf{x}_{i} is not from the set {α1,,αn}\{\alpha_{1},\dots,\alpha_{n}\}, then by the maximality of the set the relation Υ0𝐱i=Sα1,,αn,𝐱i\Upsilon_{0}^{\mathbf{x}_{i}}=S^{\alpha_{1},\dots,\alpha_{n},\mathbf{x}_{i}} contains (b,c)(b,c). If 𝐱i\mathbf{x}_{i} is from the set {α1,,αn}\{\alpha_{1},\dots,\alpha_{n}\}, then Υ1𝐱i=Sα1,,αn∨⃝R𝐱iS𝐱i∨⃝R𝐱i\Upsilon_{1}^{\mathbf{x}_{i}}=S^{\alpha_{1},\dots,\alpha_{n}}\ovee R^{\mathbf{x}_{i}}\supseteq S^{\mathbf{x}_{i}}\ovee R^{\mathbf{x}_{i}}, which contains (b,c)(b,c) by condition (3). Hence, by Lemma 51 (b,c)S0α1,,αn(b,c)\in S_{0}^{\alpha_{1},\dots,\alpha_{n}}. ∎

Lemma 54.

Suppose

  1. (1)

    SS is a multi-parameter equivalence relation on a set DD;

  2. (2)

    RR is an 𝐱\mathbf{x}-parameterized equivalence relation on DD;

  3. (3)

    (B×C)Sβ=(B\times C)\cap S^{\beta}=\varnothing for some βAm\beta\in A^{m};

  4. (4)

    there exists α\alpha such that RαS𝐱R^{\alpha}\subseteq S^{\mathbf{x}} for every 𝐱\mathbf{x};

  5. (5)

    Φ\Phi is a No-instance of the Quantitied-3-DNF.

Then (B×C)S0β=(B\times C)\cap S_{0}^{\beta}=\varnothing, where S0=𝒯Φ(S,R)S_{0}=\mathcal{T}^{\Phi}(S,R).

Proof.

Recall that S0βS_{0}^{\beta} is defined using the formula 𝒬Φ\mathcal{Q}^{\Phi}, where we substitute Sβ,𝐱iS^{\beta,\mathbf{x}_{i}} for each Υ0𝐱i\Upsilon_{0}^{\mathbf{x}_{i}} and Sβ∨⃝R𝐱iS^{\beta}\ovee R^{\mathbf{x}_{i}} for each Υ1𝐱i\Upsilon_{1}^{\mathbf{x}_{i}}. We derive from (3) and (4) that (B×C)(Sβ,β∨⃝(Sβ∨⃝Rα))=(B\times C)\cap(S^{\beta,\beta}\ovee(S^{\beta}\ovee R^{\alpha}))=\varnothing. Then Lemma 50 implies that (B×C)S0β=(B\times C)\cap S_{0}^{\beta}=\varnothing. ∎

Lemma 55.

Suppose (R,D,B,C,Δ)(R,D,B,C,\Delta) is a mighty tuple I’. Then there exist (𝐳,δ,𝐱)(\mathbf{z},\delta,\mathbf{x})-parameterized equivalence relations R0R_{0} and R1R_{1} on DD q-definable from {R,D,B,C,Δ}\{R,D,B,C,\Delta\} and satisfying the following conditions:

  1. (1)

    𝐳A|A|δΔ𝐳𝐱(Bδ𝐳×Cδ𝐳R0𝐱δ𝐳∨⃝R1𝐱δ𝐳)\forall\mathbf{z}\in A^{|A|}\exists\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\forall\mathbf{x}\;(\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C}\subseteq\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}}\ovee\prescript{\mathbf{z}}{\delta}{R}_{1}^{\mathbf{x}});

  2. (2)

    𝐳A|A|δΔ𝐳𝐱((Bδ𝐳×Cδ𝐳)R0𝐱δ𝐳=)\exists\mathbf{z}\in A^{|A|}\forall\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\exists\mathbf{x}((\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C})\cap\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}}=\varnothing);

  3. (3)

    there exists α\alpha such that R1αδ𝐳R0𝐱δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{1}^{\alpha}\subseteq\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and 𝐱\mathbf{x}.

Proof.

Let σ1,,σN\sigma_{1},\dots,\sigma_{N} be the set of all injective mappings from {1,2,,|A|}\{1,2,\dots,|A|\} to {1,2,,|A|2}\{1,2,\dots,|A|^{2}\}. Let

Unx1,,x|A|2δ𝐳=Rxσ1(1),,xσ1(|A|)δ𝐳∨⃝Rxσ2(1),,xσ2(|A|)δ𝐳∨⃝∨⃝Rxσn(1),,xσn(|A|)δ𝐳\prescript{\mathbf{z}}{\delta}{U}_{n}^{x_{1},\dots,x_{|A|^{2}}}=\prescript{\mathbf{z}}{\delta}{R}^{x_{\sigma_{1}(1)},\dots,x_{\sigma_{1}(|A|)}}\ovee\prescript{\mathbf{z}}{\delta}{R}^{x_{\sigma_{2}(1)},\dots,x_{\sigma_{2}(|A|)}}\ovee\dots\ovee\prescript{\mathbf{z}}{\delta}{R}^{x_{\sigma_{n}(1)},\dots,x_{\sigma_{n}(|A|)}}

Since at least |A||A| elements in the set x1,,x|A|2x_{1},\dots,x_{|A|^{2}} are equal, there exists i{1,2,,N}i\in\{1,2,\dots,N\} such that xσi(1)=xσi(2)==xσi(|A|)x_{\sigma_{i}(1)}=x_{\sigma_{i}(2)}=\dots=x_{\sigma_{i}(|A|)}. Since Rδ𝐳=Dδ𝐳×Dδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\forall}=\prescript{\mathbf{z}}{\delta}{D}\times\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, the relation UNx1,,x|A|2δ𝐳\prescript{\mathbf{z}}{\delta}{U}_{N}^{x_{1},\dots,x_{|A|^{2}}} is equal to Dδ𝐳×Dδ𝐳\prescript{\mathbf{z}}{\delta}{D}\times\prescript{\mathbf{z}}{\delta}{D}.

Consider the maximal nn such that the following condition holds

𝐳A|A|δΔ𝐳𝐱0((Bδ𝐳×Cδ𝐳)(Un𝐱0δ𝐳)=).\exists\mathbf{z}\in A^{|A|}\forall\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\exists\mathbf{x}_{0}((\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C})\cap(\prescript{\mathbf{z}}{\delta}{U}_{n}^{\mathbf{x}_{0}})=\varnothing).

Put R0x1,,x|A|2δ𝐳=Unx1,,x|A|2δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{0}^{x_{1},\dots,x_{|A|^{2}}}=\prescript{\mathbf{z}}{\delta}{U}_{n}^{x_{1},\dots,x_{|A|^{2}}} and R1x1,,x|A|2δ𝐳=Rxσn+1(1),,xσn+1(|A|)δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{1}^{x_{1},\dots,x_{|A|^{2}}}=\prescript{\mathbf{z}}{\delta}{R}^{x_{\sigma_{n+1}(1)},\dots,x_{\sigma_{n+1}(|A|)}} and show that they satisfy the required properties.

Property (1) follows from the fact that nn was chosen maximal and the corresponding condition for Un+1𝐱δ𝐳=R0𝐱δ𝐳∨⃝R1𝐱δ𝐳\prescript{\mathbf{z}}{\delta}{U}_{n+1}^{\mathbf{x}}=\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}}\ovee\prescript{\mathbf{z}}{\delta}{R}_{1}^{\mathbf{x}} does not hold. Property (2) again follows from the choice of nn. To prove property (3) consider a tuple α=(a1,,a|A|2)\alpha=(a_{1},\dots,a_{|A|^{2}}) such that (aσn+1(1),,aσn+1(|A|))=κ(a_{\sigma_{n+1}(1)},\dots,a_{\sigma_{n+1}(|A|)})=\kappa. Then R1αδ𝐳=Rκδ𝐳R0𝐱0δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{1}^{\alpha}=\prescript{\mathbf{z}}{\delta}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}_{0}} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and 𝐱0\mathbf{x}_{0}. ∎

Theorem 14.

Suppose (Q,D,B,C,Δ)(Q,D,B,C,\Delta) is a mighty tuple I. Then QCSP({Q,D,B,C,Δ})\operatorname{QCSP}(\{Q,D,B,C,\Delta\}) is PSpace-hard.

Proof.

By Lemma 48 there exists a mighty tuple I’ (R,D,B,C,Δ)(R,D,B,C,\Delta) q-definable from the set {Q,D,B,C,Δ}\{Q,D,B,C,\Delta\}. By Lemma 55 there exist R0R_{0} and R1R_{1} satisfying the corresponding conditions (1)-(3). For every 𝐳\mathbf{z} and δ\delta we define a multi-parameter equivalence relation S0δ𝐳\prescript{\mathbf{z}}{\delta}{S}_{0} by

S0𝐱1,,𝐱kδ𝐳=R0𝐱1δ𝐳∨⃝∨⃝R0𝐱kδ𝐳.\prescript{\mathbf{z}}{\delta}{S}_{0}^{\mathbf{x}_{1},\dots,\mathbf{x}_{k}}=\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}_{1}}\ovee\dots\ovee\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}_{k}}.

Using the operator 𝒯Φ\mathcal{T}^{\Phi} we will build a sequence of multi-parameter equivalence relations S0δ𝐳,S1δ𝐳,,SNδ𝐳\prescript{\mathbf{z}}{\delta}{S}_{0},\prescript{\mathbf{z}}{\delta}{S}_{1},\dots,\prescript{\mathbf{z}}{\delta}{S}_{N}. The idea is to reduce an instance Φ\Phi of the Quantified-3-DNF to QCSP(Γ)\operatorname{QCSP}(\Gamma) by substituting SNS_{N} into the formula 𝒬Φ\mathcal{Q}^{\Phi}. If this reduction works, then we proved the PSpace-hardness. If it does not work, we define a new bigger multi-parameter equivalence relation SN+1S_{N+1} and continue. Thus, we want to build a sequence S0,,SNS_{0},\dots,S_{N} maintaining the following properties:

  1. (s1)

    SiS_{i} is q-definable over {R,D,B,C,Δ}\{R,D,B,C,\Delta\};

  2. (s2)

    for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} the universal relation Si+1δ𝐳\prescript{\mathbf{z}}{\delta}{S}_{i+1} is larger than Siδ𝐳\prescript{\mathbf{z}}{\delta}{S}_{i};

  3. (s3)

    there exist 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} such that Si+1δ𝐳\prescript{\mathbf{z}}{\delta}{S}_{i+1} is strictly larger than Siδ𝐳\prescript{\mathbf{z}}{\delta}{S}_{i};

  4. (s4)

    𝐳A|A|δΔ𝐳𝐱(Bδ𝐳×Cδ𝐳Si𝐱δ𝐳∨⃝R1𝐱δ𝐳)\forall\mathbf{z}\in A^{|A|}\exists\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\forall\mathbf{x}\;(\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C}\subseteq\prescript{\mathbf{z}}{\delta}{S}_{i}^{\mathbf{x}}\ovee\prescript{\mathbf{z}}{\delta}{R}_{1}^{\mathbf{x}});

  5. (s5)

    𝐳A|A|δΔ𝐳𝐱((Bδ𝐳×Cδ𝐳)Si𝐱δ𝐳=)\exists\mathbf{z}\in A^{|A|}\forall\delta\in\prescript{\mathbf{z}}{}{\Delta}\exists\mathbf{x}((\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C})\cap\prescript{\mathbf{z}}{\delta}{S}_{i}^{\mathbf{x}}=\varnothing).

Let us check that S0S_{0} satisfies conditions (s1), (s4), and (s5). Condition (s1) follows from the definition. Condition (s4) and (s5) come from (1) and (2) in Lemma 55.

Properties (s2) and (s3) guarantee that the sequence will not be infinite. Assume that we have a sequence S0,S1,,SNS_{0},S_{1},\dots,S_{N}. Let us build SN+1S_{N+1} satisfying the above properties or prove the PSpace-hardness using SNS_{N}. For every instance Φ\Phi of the Quantified-3-DNF by SN+1,Φδ𝐳\prescript{\mathbf{z}}{\delta}{S}_{N+1,\Phi} we denote 𝒯Φ(SNδ𝐳,R1δ𝐳)\mathcal{T}^{\Phi}(\prescript{\mathbf{z}}{\delta}{S}_{N},\prescript{\mathbf{z}}{\delta}{R}_{1}). Consider two cases:

Case 1. There exists a Yes-instance Φ\Phi of the Quantified-3-DNF such that SN+1,ΦS_{N+1,\Phi} satisfies condition (s5). Put SN+1=SN+1,ΦS_{N+1}=S_{N+1,\Phi} and check that each of the properties (s1)-(s5) holds. Property (s1) follows from the definition. Property (s2) follows from Lemma 52. To prove property (s3) consider 𝐳\mathbf{z} from condition (s5) for SNS_{N}, and the corresponding δ\delta from condition (s4) for SNS_{N}. Then Bδ𝐳×Cδ𝐳SN𝐱δ𝐳∨⃝R1𝐱δ𝐳\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C}\subseteq\prescript{\mathbf{z}}{\delta}{S}_{N}^{\mathbf{x}}\ovee\prescript{\mathbf{z}}{\delta}{R}_{1}^{\mathbf{x}} for every 𝐱\mathbf{x} and (Bδ𝐳×Cδ𝐳)SN𝐱δ𝐳=(\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C})\cap\prescript{\mathbf{z}}{\delta}{S}_{N}^{\mathbf{x}}=\varnothing for some 𝐱\mathbf{x}. Then Lemma 53 implies that SN+1δ𝐳\prescript{\mathbf{z}}{\delta}{S}_{N+1} is strictly larger than SNδ𝐳\prescript{\mathbf{z}}{\delta}{S}_{N} which proves condition (s3). Property (s4) follows from the fact that SN+1S_{N+1} is larger that SNS_{N} and SNS_{N} satisfies (s4). Property (s5) is just the definition of Case 1. Thus, we defined SN+1S_{N+1} satisfying the required properties (s1)-(s5).

Case 2. SN+1,ΦS_{N+1,\Phi} does not satisfy property (s5) for any Yes-instance Φ\Phi of the Quantified-3-DNF. Thus, for every Yes-instance Φ\Phi we have

𝐳A|A|δΔ𝐳𝐱(Bδ𝐳×Cδ𝐳SN+1,Φ𝐱δ𝐳).\displaystyle\forall\mathbf{z}\in A^{|A|}\exists\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\forall\mathbf{x}\;(\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C}\subseteq\prescript{\mathbf{z}}{\delta}{S}_{N+1,\Phi}^{\mathbf{x}}). (6)

Let us show that any (Yes- or No-) instance Φ\Phi of the Quantified-3-DNF is equivalent to

𝐳A|A|δΔ𝐳𝐮(SN+1,Φ𝐮(y,y)yBδ𝐳yCδ𝐳).\displaystyle\forall\mathbf{z}\in A^{|A|}\exists\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\forall\mathbf{u}\;(S_{N+1,\Phi}^{\mathbf{u}}(y,y^{\prime})\wedge y\in\prescript{\mathbf{z}}{\delta}{B}\wedge y^{\prime}\in\prescript{\mathbf{z}}{\delta}{C}). (7)

Notice that the above formula can be efficiently built from the instance Φ\Phi, which gives us a polynomial reduction from the Quantified-3-DNF. If Φ\Phi is a Yes-instance, then it follows from (6). Suppose Φ\Phi is a No-instance. Recall that (see condition (3) in Lemma 55) there exists α\alpha such that R1αδ𝐳R0𝐱δ𝐳SN𝐱δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{1}^{\alpha}\subseteq\prescript{\mathbf{z}}{\delta}{R}_{0}^{\mathbf{x}}\subseteq\prescript{\mathbf{z}}{\delta}{S}_{N}^{\mathbf{x}} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and 𝐱\mathbf{x}. Combining this with property (s5) for SNS_{N} and using Lemma 54 we obtain that

𝐳A|A|δΔ𝐳𝐱((Bδ𝐳×Cδ𝐳)SN+1𝐱δ𝐳=).\exists\mathbf{z}\in A^{|A|}\forall\delta\in\prescript{\mathbf{z}}{}{\Delta}\;\exists\mathbf{x}\;((\prescript{\mathbf{z}}{\delta}{B}\times\prescript{\mathbf{z}}{\delta}{C})\cap\prescript{\mathbf{z}}{\delta}{S}_{N+1}^{\mathbf{x}}=\varnothing).

Hence, (7) does not hold and the instance Φ\Phi is equivalent to (7). Thus we built a reduction from the Quantified-3-DNF and proved PSpace-hardness of QCSP({Q,D,B,C,Δ})\operatorname{QCSP}(\{Q,D,B,C,\Delta\}). ∎

7.3 Mighty tuples II, III, and IV

It this section we show that mighty tuples II, III, and IV are equivalent in the sense that any of them q-defines any other.

Below, RR is always a (𝐳,α)(\mathbf{z},\alpha)-parameterized binary relation, D,BD,B and CC are 𝐳\mathbf{z}-parameterized unary relation, where 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k}. The tuple (R,D,B,C)(R,D,B,C) is called a quadruple in this section. We will need the following properties of a quadruple:

  1. (κ\kappa)

    k=|A|k=|A| and Rκ𝐳Rα𝐳\prescript{\mathbf{z}}{}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{}{R}^{\alpha} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k};

  2. (d+d+)

    D𝐳+R𝐳=D𝐳\prescript{\mathbf{z}}{}{D}+\prescript{\mathbf{z}}{}{R}^{\forall\forall}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  3. (un)

    B𝐳\prescript{\mathbf{z}}{}{B}\neq\varnothing, C𝐳\prescript{\mathbf{z}}{}{C}\neq\varnothing, B𝐳D𝐳\prescript{\mathbf{z}}{}{B}\subseteq\prescript{\mathbf{z}}{}{D}, C𝐳D𝐳\prescript{\mathbf{z}}{}{C}\subseteq\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  4. (bcbc)

    R𝐳(B𝐳×C𝐳)\prescript{\mathbf{z}}{}{R}^{\forall}\cap(\prescript{\mathbf{z}}{}{B}\times\prescript{\mathbf{z}}{}{C})\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  5. (\varnothing)

    B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|};

  6. (b+b+)

    B𝐳+R𝐳=B𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{R}^{\forall\forall}=\prescript{\mathbf{z}}{}{B} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  7. (+c+c)

    R𝐳+C𝐳=C𝐳\prescript{\mathbf{z}}{}{R}^{\forall\forall}+\prescript{\mathbf{z}}{}{C}=\prescript{\mathbf{z}}{}{C} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  8. (t)

    Rα𝐳+Rα𝐳=Rα𝐳\prescript{\mathbf{z}}{}{R}^{\alpha}+\prescript{\mathbf{z}}{}{R}^{\alpha}=\prescript{\mathbf{z}}{}{R}^{\alpha} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k};

  9. (sd)

    pr1(Rα𝐳)=pr2(Rα𝐳)=D𝐳\operatorname{pr}_{1}(\prescript{\mathbf{z}}{}{R}^{\alpha})=\operatorname{pr}_{2}(\prescript{\mathbf{z}}{}{R}^{\alpha})=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k};

  10. (r)

    {(d,d)dD𝐳}Rα𝐳\{(d,d)\mid d\in\prescript{\mathbf{z}}{}{D}\}\subseteq\prescript{\mathbf{z}}{}{R}^{\alpha} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k};

  11. (bdbd)

    B𝐳+R𝐳=D𝐳\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{R}^{\forall}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  12. (cdcd)

    R𝐳+C𝐳=D𝐳\prescript{\mathbf{z}}{}{R}^{\forall}+\prescript{\mathbf{z}}{}{C}=\prescript{\mathbf{z}}{}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  13. (c+c+)

    C𝐳+R𝐳=C𝐳\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\forall\forall}=\prescript{\mathbf{z}}{}{C} for some 𝐳A|A|\mathbf{z}\in A^{|A|};

  14. (s)

    Rα𝐳\prescript{\mathbf{z}}{}{R}^{\alpha} is symmetric for every 𝐳A|A|\mathbf{z}\in A^{|A|} and αAk\alpha\in A^{k}.

Notice that a mighty tuple II is just a quadruple satisfying all the above properties except for (κ\kappa), a mighty tuple III (R,B,C)(R,B,C) forms a quadruple (R,A,B,C)(R,A,B,C), where D=AD=A, satisfying properties {un,bc,,b+,+c}\{\text{un},bc,\varnothing,b+,+c\}, a mighty tuple IV is a quadruple satisfying properties {d+,un,bc,,b+,bd}\{d+,\text{un},bc,\varnothing,b+,bd\}. Let II\mathrm{II} be the set of all the above properties except for (κ\kappa), III={un,bc,,b+,+c}\mathrm{III}=\{\text{un},bc,\varnothing,b+,+c\}, and IV={d+,un,bc,,b+,bd}\mathrm{IV}=\{d+,\text{un},bc,\varnothing,b+,bd\}.

Below we prove many claims that allow us to moderate the quadruple to satisfy more properties from the above list. Usually the claims are of the form P1P2P_{1}\vdash P_{2}, where P1P_{1} and P2P_{2} are some sets of properties of a quadruple, and should be understood as follows. Suppose a quadruple satisfies properties P1P_{1}, then there exists a quadruple q-definable from the first one and satisfying properties P2P_{2}. Also sometimes we add “+reduce 𝐳A|A||D𝐳|+\text{reduce }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|” meaning that the sum 𝐳A|A||D𝐳|\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}| calculated for the new quadruple is smaller than the sum calculated for the old one. We write increase or keep instead of reduce if the sum is increased or stays the same, respectively. Most of the properties are from the above list but some of them are given by a quantified formula.

First, we want to be able to add the additional property (κ\kappa) to existing properties from III or IV.

Claim 7.3.1.

Suppose PIIIIVP\subseteq\mathrm{III}\cup\mathrm{IV}. Then PP{κ}P\vdash P\cup\{\kappa\}.

Proof.

We change only the (𝐳,α)(\mathbf{z},\alpha)-parameterized relation RR. The new relation R0R_{0} is defined by

R0x1,,x|A|𝐳(y1,y2)=i1,,ik{1,2,,|A|}.Rxi1,,xik𝐳(y1,y2).\prescript{\mathbf{z}}{}{R}_{0}^{x_{1},\dots,x_{|A|}}(y_{1},y_{2})=\bigwedge\limits_{i_{1},\dots,i_{k}\in\{1,2,\dots,|A|\}.}\prescript{\mathbf{z}}{}{R}^{x_{i_{1}},\dots,x_{i_{k}}}(y_{1},y_{2}).

Then R0κ=R0=RR_{0}^{\kappa}=R_{0}^{\forall\forall}=R^{\forall\forall} and R0=RR_{0}^{\forall}=R^{\forall}. It is straightforward to check that the quadruple (R0,D,B,C)(R_{0},D,B,C) satisfies all the properties satisfied by (R,D,B,C)(R,D,B,C), which completes the proof. ∎

Notice that property (κ\kappa) implies that Rκ=RR^{\kappa}=R^{\forall\forall} and in the following claims we usually write RκR^{\kappa} instead of RR^{\forall\forall}.

Claim 7.3.2.

III{κ}III{κ,t}\mathrm{III}\cup\{\kappa\}\vdash\mathrm{III}\cup\{\kappa,t\}.

Proof.

Put R0β𝐳=NRβ𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\beta}=N\cdot\prescript{\mathbf{z}}{}{R}^{\beta}, where N=|A|!|A|2N=|A|!\cdot|A|^{2}. Note that we have R0𝐳NR𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\forall}\supseteq N\cdot\prescript{\mathbf{z}}{}{R}^{\forall}. We claim that R0R_{0}, BB, CC, and DD satisfy properties {κ,un,bc,,b+,+c,t}\{\kappa,\text{un},bc,\varnothing,b+,+c,\text{t}\}. For all the properties but (bcbc) and (t) it follows immediately from the same properties for RR. To prove (bcbc) we choose some (b1𝐳,c𝐳)R𝐳(B𝐳×C𝐳)(\prescript{\mathbf{z}}{}{b}_{1},\prescript{\mathbf{z}}{}{c})\in\prescript{\mathbf{z}}{}{R}^{\forall}\cap(\prescript{\mathbf{z}}{}{B}\times\prescript{\mathbf{z}}{}{C}). Since (b+b+), we can find a sequence bN𝐳bN1𝐳b2𝐳b1𝐳\prescript{\mathbf{z}}{}{b}_{N}-\prescript{\mathbf{z}}{}{b}_{N-1}-\dots-\prescript{\mathbf{z}}{}{b}_{2}-\prescript{\mathbf{z}}{}{b}_{1} such that each bi𝐳\prescript{\mathbf{z}}{}{b}_{i} is from B𝐳\prescript{\mathbf{z}}{}{B} and (bi+1𝐳,bi𝐳)Rκ𝐳R𝐳(\prescript{\mathbf{z}}{}{b}_{i+1},\prescript{\mathbf{z}}{}{b}_{i})\in\prescript{\mathbf{z}}{}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{}{R}^{\forall}. Then (bN,c)R0𝐳(b_{N},c)\in\prescript{\mathbf{z}}{}{R}_{0}^{\forall}, which implies (bcbc). Lemma 47 implies property (t). ∎

Claim 7.3.3.

IV{κ}IV{κ,t}\mathrm{IV}\cup\{\kappa\}\vdash\mathrm{IV}\cup\{\kappa,t\}.

Proof.

The proof repeats the proof of the previous claim word for word. Additional properties (bdbd) and (d+d+) follow from (bdbd) and (d+d+) for RR. ∎

Claim 7.3.4.

IV{κ,t}IV{κ,t,+c}\mathrm{IV}\cup\{\kappa,\text{t}\}\vdash\mathrm{IV}\cup\{\kappa,t,+c\}.

Proof.

Put C0𝐳=(Rκ𝐳+C𝐳)D𝐳\prescript{\mathbf{z}}{}{C}_{0}=(\prescript{\mathbf{z}}{}{R}^{\kappa}+\prescript{\mathbf{z}}{}{C})\cap\prescript{\mathbf{z}}{}{D} and R0α𝐳=Rα𝐳(D𝐳×D𝐳)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=\prescript{\mathbf{z}}{}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{}{D}\times\prescript{\mathbf{z}}{}{D}). We claim that R0R_{0}, BB, C0C_{0}, and DD satisfy the required properties. Restriction of RR does not affect any properties as we have property (un). Changing CC could affect only properties (un) and (\varnothing). (un) follows from (d+d+) for RR and property (un) for CC. By property (t) we have

C0𝐳=R0κ𝐳+C𝐳=R0κ𝐳+R0κ𝐳+C𝐳=R0κ𝐳+C0𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{R}_{0}^{\kappa}+\prescript{\mathbf{z}}{}{C}=\prescript{\mathbf{z}}{}{R}_{0}^{\kappa}+\prescript{\mathbf{z}}{}{R}_{0}^{\kappa}+\prescript{\mathbf{z}}{}{C}=\prescript{\mathbf{z}}{}{R}_{0}^{\kappa}+\prescript{\mathbf{z}}{}{C}_{0}

hence we have (+c+c). To prove property (\varnothing) we use this property for CC and consider 𝐳A|A|\mathbf{z}\in A^{|A|} such that B𝐳C𝐳=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing. Then using property (b+b+) for RR we derive

B𝐳C𝐳=(B𝐳+Rκ𝐳)C𝐳=B𝐳(Rκ𝐳+C𝐳)=B𝐳C0𝐳=.\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}=\varnothing\Rightarrow(\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{R}^{\kappa})\cap\prescript{\mathbf{z}}{}{C}=\varnothing\Rightarrow\prescript{\mathbf{z}}{}{B}\cap(\prescript{\mathbf{z}}{}{R}^{\kappa}+\prescript{\mathbf{z}}{}{C})=\varnothing\Rightarrow\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{C}_{0}=\varnothing.

Notice that IV{κ,t,+c}=III{κ,t,d+,bd}\mathrm{IV}\cup\{\kappa,\text{t},+c\}=\mathrm{III}\cup\{\kappa,\text{t},d+,bd\}.

Claim 7.3.5.

III{κ,t}III{κ,t,d+,r,sd}\mathrm{III}\cup\{\kappa,\text{t}\}\vdash\mathrm{III}\cup\{\kappa,\text{t},d+,\text{r},\text{sd}\}.

Proof.

Put D0𝐳(x)=Rκ𝐳(x,x)\prescript{\mathbf{z}}{}{D}_{0}(x)=\prescript{\mathbf{z}}{}{R}^{\kappa}(x,x), B0𝐳=B𝐳D0𝐳\prescript{\mathbf{z}}{}{B}_{0}=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{D}_{0}, C0𝐳=C𝐳D0𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{C}\cap\prescript{\mathbf{z}}{}{D}_{0}, R0α𝐳=R0α𝐳(D0𝐳×D0𝐳)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}\cap(\prescript{\mathbf{z}}{}{D}_{0}\times\prescript{\mathbf{z}}{}{D}_{0}).

Let us prove that R0R_{0}, B0B_{0}, C0C_{0}, and D0D_{0} satisfy the required properties. Properties (κ\kappa) and ()(\varnothing) follow from the corresponding properties for R,B,CR,B,C, and DD. Properties (r), (d+d+), and (sd) follow immediately from the definition.

Consider a tuple (b0,c0)R𝐳(b_{0},c_{0})\in\prescript{\mathbf{z}}{}{R}^{\forall}, which exists by property (bcbc). By property (b+b+) we can find a path bNbN1b1b0b_{N}-b_{N-1}-\dots-b_{1}-b_{0} of any length NN such that each bib_{i} is from B𝐳\prescript{\mathbf{z}}{}{B} and (bi+1,bi)Rκ𝐳(b_{i+1},b_{i})\in\prescript{\mathbf{z}}{}{R}^{\kappa}. Similarly, by property (+c+c) we can find c0c1cNc_{0}-c_{1}-\dots-c_{N} of length NN such that each cic_{i} is from C𝐳\prescript{\mathbf{z}}{}{C} and (ci,ci+1)Rκ𝐳(c_{i},c_{i+1})\in\prescript{\mathbf{z}}{}{R}^{\kappa}. If NN is large enough then both sequences will have repetitive elements. Let these elements be bib_{i} and cjc_{j}. By property (t), these repetitive elements bib_{i} and cjc_{j} should be from B0𝐳\prescript{\mathbf{z}}{}{B}_{0} and C0𝐳\prescript{\mathbf{z}}{}{C}_{0}, respectively, which implies (un). Again (t) for RR implies that (bi,cj)R𝐳(b_{i},c_{j})\in\prescript{\mathbf{z}}{}{R}^{\forall} and therefore (bi,cj)R0𝐳(b_{i},c_{j})\in\prescript{\mathbf{z}}{}{R}_{0}^{\forall}, which confirms (bcbc). Properties (b+b+) and (+c+c) for R0R_{0} follows from (b+b+) and (+c+c) for RR and (r) for R0R_{0}.

By reflexivity (property (r)) of R0α𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\alpha} we have Rα𝐳+Rα𝐳Rα𝐳\prescript{\mathbf{z}}{}{R}^{\alpha}+\prescript{\mathbf{z}}{}{R}^{\alpha}\supseteq\prescript{\mathbf{z}}{}{R}^{\alpha} and by property (t) for RR we have R0α𝐳+R0α𝐳R0α𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}+\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}\subseteq\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}. Thus, we have property (t) for R0R_{0}. ∎

Denote J={κ,d+,un,bc,,b+,+c,t,r,sd}J=\{\kappa,d+,\text{un},bc,\varnothing,b+,+c,\text{t},\text{r},\text{sd}\}. Then J=III{κ,d+,t,r,sd}=IV{κ,t,+c,r,sd}{bd}=II{κ}{bd,cd,c+,s}J=\mathrm{III}\cup\{\kappa,d+,\text{t},\text{r},\text{sd}\}=\mathrm{IV}\cup\{\kappa,\text{t},+c,\text{r},\text{sd}\}\setminus\{bd\}=\mathrm{II}\cup\{\kappa\}\setminus\{bd,cd,c+,\text{s}\}.

Claim 7.3.6.

J{¬bd}J{bd}+reduce 𝐳A|A||D𝐳|J\cup\{\neg bd\}\vdash J\cup\{bd\}+\text{reduce }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|.

Proof.

Put D0𝐳=B𝐳+R𝐳\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{B}+\prescript{\mathbf{z}}{}{R}^{\forall}, B0𝐳=B𝐳D0𝐳=B𝐳\prescript{\mathbf{z}}{}{B}_{0}=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{B}, C0𝐳=C𝐳D0𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{C}\cap\prescript{\mathbf{z}}{}{D}_{0}, R0α𝐳=Rα𝐳(D0𝐳×D0𝐳)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=\prescript{\mathbf{z}}{}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{}{D}_{0}\times\prescript{\mathbf{z}}{}{D}_{0}). Let us prove that R0R_{0}, B0B_{0}, C0C_{0}, D0D_{0} satisfy the required properties. Properties (κ\kappa), (d+d+), (\varnothing), (b+b+), (+c+c), and (r) follow immediately from the definition and the corresponding properties for RR. Property (t) follows from (t) and (r) for RR. By property (r) for RR we have B0𝐳=B𝐳\prescript{\mathbf{z}}{}{B}_{0}=\prescript{\mathbf{z}}{}{B}. Hence, properties (bdbd) and (bcbc) follow from the definition. Property (un) follows from (un) and (bcbc) for RR. ∎

Claim 7.3.7.

J{¬cd}J{cd}+reduce 𝐳A|A||D𝐳|J\cup\{\neg cd\}\vdash J\cup\{cd\}+\text{reduce }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|.

Proof.

Put D0𝐳=R𝐳+C𝐳\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{R}^{\forall}+\prescript{\mathbf{z}}{}{C}, B0𝐳=B𝐳D0𝐳\prescript{\mathbf{z}}{}{B}_{0}=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{D}_{0}, C0𝐳=C𝐳D0𝐳=C𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{C}\cap\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{C}, R0α𝐳=Rα𝐳(D0𝐳×D0𝐳)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=\prescript{\mathbf{z}}{}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{}{D}_{0}\times\prescript{\mathbf{z}}{}{D}_{0}) and repeat the proof of the previous claim switching BB and CC. ∎

Claim 7.3.8.

J{bd,cd,𝐳(C𝐳+Rκ𝐳)B𝐳,𝐳C𝐳+Rκ𝐳D𝐳}J+reduce 𝐳A|A||D𝐳|J\cup\{bd,cd,\forall\mathbf{z}(\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa})\cap\prescript{\mathbf{z}}{}{B}\neq\varnothing,\exists\mathbf{z}\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}\neq\prescript{\mathbf{z}}{}{D}\}\vdash J+\text{reduce }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|.

Proof.

Put D0𝐳=C𝐳+Rκ𝐳\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}, B0𝐳=B𝐳D0𝐳\prescript{\mathbf{z}}{}{B}_{0}=\prescript{\mathbf{z}}{}{B}\cap\prescript{\mathbf{z}}{}{D}_{0}, C0𝐳=C𝐳D0𝐳=C𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{C}\cap\prescript{\mathbf{z}}{}{D}_{0}=\prescript{\mathbf{z}}{}{C}, R0α𝐳=Rα𝐳(D0𝐳×D0𝐳)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=\prescript{\mathbf{z}}{}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{}{D}_{0}\times\prescript{\mathbf{z}}{}{D}_{0}). Notice that by (r) we have D0𝐳C𝐳\prescript{\mathbf{z}}{}{D}_{0}\supseteq\prescript{\mathbf{z}}{}{C}, and by the property 𝐳(C𝐳+Rκ𝐳)B𝐳\forall\mathbf{z}(\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa})\cap\prescript{\mathbf{z}}{}{B}\neq\varnothing we have B0𝐳\prescript{\mathbf{z}}{}{B}_{0}\neq\varnothing. Then properties (κ\kappa), (d+d+), (un), (\varnothing), (b+b+), (+c+c), (t), and (r) follow from the corresponding properties for RR. Property (bcbc) follows from (cdcd) for RR. ∎

Claim 7.3.9.

J{¬c+,𝐳(C𝐳+Rκ𝐳)B𝐳=}J+keep 𝐳A|A||D𝐳|+increase 𝐳A|A||C𝐳|J\cup\{\neg c+,\exists\mathbf{z}(\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa})\cap\prescript{\mathbf{z}}{}{B}=\varnothing\}\vdash J+\text{keep }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|+\text{increase }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{C}|.

Proof.

We put C0𝐳=C𝐳+Rκ𝐳\prescript{\mathbf{z}}{}{C}_{0}=\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}, C1𝐳=Rκ𝐳+C0𝐳\prescript{\mathbf{z}}{}{C}_{1}=\prescript{\mathbf{z}}{}{R}^{\kappa}+\prescript{\mathbf{z}}{}{C}_{0}, and claim that RR, DD, BB, and C1C_{1} satisfy the required properties. Since we only increased CC the only properties we need to check are (\varnothing) and (+c+c). Property (+c+c) follows from property (r) and (t) for RR. To prove property (\varnothing) choose 𝐳A|A|\mathbf{z}\in A^{|A|} from the property 𝐳(C𝐳+Rκ𝐳)B𝐳=\exists\mathbf{z}(\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa})\cap\prescript{\mathbf{z}}{}{B}=\varnothing. Then C0𝐳B𝐳=\prescript{\mathbf{z}}{}{C}_{0}\cap\prescript{\mathbf{z}}{}{B}=\varnothing. By property (b+b+) C1𝐳B𝐳=\prescript{\mathbf{z}}{}{C}_{1}\cap\prescript{\mathbf{z}}{}{B}=\varnothing, which gives us property (\varnothing). ∎

Claim 7.3.10.

J{bd,cd,𝐳C𝐳+Rκ𝐳=D𝐳}J{c+,s}+keep 𝐳A|A||D𝐳|J\cup\{bd,cd,\forall\mathbf{z}\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}=\prescript{\mathbf{z}}{}{D}\}\vdash J\cup\{c+,\text{s}\}+\text{keep }\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|.

Proof.

Put R0α𝐳(x,y)=Rα𝐳(x,y)Rα𝐳(y,x)\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}(x,y)=\prescript{\mathbf{z}}{}{R}^{\alpha}(x,y)\wedge\prescript{\mathbf{z}}{}{R}^{\alpha}(y,x) and prove the required properties for R0R_{0}, BB, CC, and DD. Properties (κ\kappa), (d+d+), (un), (\varnothing), (b+b+), (+c+c), (c+c+), (t), (r), and (s) follow from the definition and the respective properties for RR. It remains to prove property (bcbc).

Notice that it follows from (t) for RR that R𝐳\prescript{\mathbf{z}}{}{R}^{\forall} is transitive. Let us build an infinite path d0d1d2d3d4d5d_{0}-d_{1}-d_{2}-d_{3}-d_{4}-d_{5}\dots such that each d2id_{2i} is from B𝐳\prescript{\mathbf{z}}{}{B}, each d2i+1d_{2i+1} is from C𝐳\prescript{\mathbf{z}}{}{C}, each (di+1,di)(d_{i+1},d_{i}) is from R𝐳\prescript{\mathbf{z}}{}{R}^{\forall}. Choose some d0B𝐳d_{0}\in\prescript{\mathbf{z}}{}{B}. By the property 𝐳C𝐳+Rκ𝐳=D𝐳\forall\mathbf{z}\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}=\prescript{\mathbf{z}}{}{D}, there exists d1C𝐳d_{1}\in\prescript{\mathbf{z}}{}{C} such that (d1,d0)Rκ𝐳R𝐳(d_{1},d_{0})\in\prescript{\mathbf{z}}{}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{}{R}^{\forall}. By property (bdbd) there exists d2B𝐳d_{2}\in\prescript{\mathbf{z}}{}{B} such that (d2,d1)R𝐳(d_{2},d_{1})\in\prescript{\mathbf{z}}{}{R}^{\forall}. Proceeding this way we can make an infinite sequence. Since B𝐳\prescript{\mathbf{z}}{}{B} is finite, we have d2i=d2jd_{2i}=d_{2j} for some i<ji<j. By transitivity of R𝐳\prescript{\mathbf{z}}{}{R}^{\forall} we have (d2i,d2i+1),(d2i+1,d2i)R𝐳(d_{2i},d_{2i+1}),(d_{2i+1},d_{2i})\in\prescript{\mathbf{z}}{}{R}^{\forall}, which gives us property (bcbc). ∎

Claim 7.3.11.

J{bd,cd,c+}J{bd,cd,c+,s}J\cup\{bd,cd,c+\}\vdash J\cup\{bd,cd,c+,\text{s}\}.

Proof.

Put B0=BB_{0}=B and R0=RR_{0}=R. Define sequences Bi+1𝐳=Bi𝐳Rκ𝐳+Rκ𝐳\prescript{\mathbf{z}}{}{B}_{i+1}=\prescript{\mathbf{z}}{}{B}_{i}-\prescript{\mathbf{z}}{}{R}^{\kappa}+\prescript{\mathbf{z}}{}{R}^{\kappa} and Ri+1α𝐳=Riα𝐳Rα𝐳+Rα𝐳\prescript{\mathbf{z}}{}{R}_{i+1}^{\alpha}=\prescript{\mathbf{z}}{}{R}_{i}^{\alpha}-\prescript{\mathbf{z}}{}{R}^{\alpha}+\prescript{\mathbf{z}}{}{R}^{\alpha}.

Since Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa} is reflexive, these sequences of relations are growing. From the finiteness we conclude that these sequences will stabilize at some NN.

Let us prove that RNR_{N}, BNB_{N}, CC, and DD satisfy the required properties. Properties (κ\kappa), (d+d+), (un), (bc), (+c+c), (r), (bd), (cd), and (c+c+) easily follow from the corresponding properties for RR. Properties (b+b+) and (t) follow from the fact that sequences stabilized. By (c+c+) and (+c+c) for RR we derive that we can never escape from C𝐳\prescript{\mathbf{z}}{}{C} and therefore, by property (\varnothing) for RR, we can never come to B𝐳\prescript{\mathbf{z}}{}{B}. Hence we have (\varnothing). Property (s) follows from properties (r) and (t) for RR and from the fact that the sequences stabilized. ∎

Claim 7.3.12.

IIIII{κ}\mathrm{III}\vdash\mathrm{II}\cup\{\kappa\}.

Proof.

By Claim 7.3.1 we get property (κ\kappa). By Claim 7.3.2 we additionally get property (t). By Claim 7.3.5 we additionally get (d+d+), (r), and (sd). Thus, we get all the properties from JJ.

Iteratively applying Claims 7.3.6, 7.3.7, 7.3.8, and 7.3.9 whenever possible we either achieve additional properties (bdbd), (cdcd), and (c+c+), or we get additional properties (bdbd), (cdcd) and 𝐳C𝐳+Rκ𝐳=D𝐳\forall\mathbf{z}\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}=\prescript{\mathbf{z}}{}{D}. Notice that the process cannot last forever because at every step we either reduce 𝐳A|A||D𝐳|\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}| or increase 𝐳A|A||C𝐳|\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{C}|. If we get additional properties (bdbd), (cdcd), and (c+c+) then the statement follows from Claim 7.3.11. If we get additional properties (bdbd), (cdcd) and 𝐳C𝐳+Rκ𝐳=D𝐳\forall\mathbf{z}\prescript{\mathbf{z}}{}{C}+\prescript{\mathbf{z}}{}{R}^{\kappa}=\prescript{\mathbf{z}}{}{D} then we apply Claim 7.3.10. If the obtained quadruple satisfies (bdbd) and (cdcd) then we satisfied all the required properties. Otherwise we apply Claims 7.3.6 and 7.3.7, and reduce the sum 𝐳A|A||D𝐳|\sum_{\mathbf{z}\in A^{|A|}}|\prescript{\mathbf{z}}{}{D}|. Then we again apply Claims 7.3.6, 7.3.7, 7.3.8, and 7.3.9 whenever possible and so on. ∎

Note that properties (r),(t),(s), and (sd) imply that Rα𝐳\prescript{\mathbf{z}}{}{R}^{\alpha} is an equivalence relation on D𝐳\prescript{\mathbf{z}}{}{D}, and properties (b+b+) and (+c)(+c) imply that B𝐳\prescript{\mathbf{z}}{}{B} and C𝐳\prescript{\mathbf{z}}{}{C} are unions of some equivalence classes of Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa}.

Lemma 56.

Suppose a quadruple (R,D,B,C)(R,D,B,C) satisfies all the properties from II{κ}\mathrm{II}\cup\{\kappa\}. Then there exists a mighty tuple I q-definable from R,D,B,CR,D,B,C.

Proof.

Define a mighty tuple (R1,D1,B1,C1,Δ1)(R_{1},D_{1},B_{1},C_{1},\Delta_{1}) by

Δ1𝐳(u,v)=\displaystyle\prescript{\mathbf{z}}{}{\Delta}_{1}(u,v)= x(B𝐳(u)C𝐳(v)R𝐳(u,x)R𝐳(v,x))\displaystyle\exists x(\prescript{\mathbf{z}}{}{B}(u)\wedge\prescript{\mathbf{z}}{}{C}(v)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(u,x)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(v,x))
D1uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{D}_{1}(x)= B𝐳(u)C𝐳(v)R𝐳(u,x)R𝐳(v,x)\displaystyle\prescript{\mathbf{z}}{}{B}(u)\wedge\prescript{\mathbf{z}}{}{C}(v)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(u,x)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(v,x)
R1αuv𝐳=\displaystyle\prescript{\mathbf{z}}{uv}{R}_{1}^{\alpha}= Rα𝐳(D1uv𝐳×D1uv𝐳)\displaystyle\prescript{\mathbf{z}}{}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{uv}{D}_{1}\times\prescript{\mathbf{z}}{uv}{D}_{1})
B1uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{B}_{1}(x)= B𝐳(u)C𝐳(v)Rκ𝐳(u,x)R𝐳(v,x)\displaystyle\prescript{\mathbf{z}}{}{B}(u)\wedge\prescript{\mathbf{z}}{}{C}(v)\wedge\prescript{\mathbf{z}}{}{R}^{\kappa}(u,x)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(v,x)
C1uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{C}_{1}(x)= B𝐳(u)C𝐳(v)R𝐳(u,x)Rκ𝐳(v,x)\displaystyle\prescript{\mathbf{z}}{}{B}(u)\wedge\prescript{\mathbf{z}}{}{C}(v)\wedge\prescript{\mathbf{z}}{}{R}^{\forall}(u,x)\wedge\prescript{\mathbf{z}}{}{R}^{\kappa}(v,x)

By property (bcbc) for the quadruple we derive Δ1𝐳\prescript{\mathbf{z}}{}{\Delta}_{1}\neq\varnothing, D1𝐳\prescript{\mathbf{z}}{}{D}_{1}\neq\varnothing, B1𝐳\prescript{\mathbf{z}}{}{B}_{1}\neq\varnothing, and C1𝐳\prescript{\mathbf{z}}{}{C}_{1}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|}. Thus, we already satisfied first two properties of a mighty tuple. Property 3 from (r), (t), (s). Property 4 follows from the definition and the fact that R𝐳\prescript{\mathbf{z}}{}{R}^{\forall} is an equivalence relation. Property 5 follows from the definition, and property 6 follows from ((\varnothing) for RR. ∎

We will prove the following two lemmas from Section 5.4 simultaneously.

Lemma 15.

Suppose Σ\Sigma is a set of relations on AA. Then the following conditions are equivalent:

  1. 1.

    Σ\Sigma q-defines a mighty tuple II;

  2. 2.

    Σ\Sigma q-defines a mighty tuple III;

  3. 3.

    Σ\Sigma q-defines a mighty tuple IV.

Lemma 16.

Suppose TT is a mighty tuple of type II, III, or IV. Then relations of TT q-define a mighty tuple I.

Proof.

We want to prove that the existence of a mighty tuple II, III, or IV implies the existence of I, II, III, and IV. First, let us show that we can derive a mighty tuple III. A mighty tuple II is also a mighty tuple III, hence for II and III it is obvious. If (Q,D,B,C)(Q,D,B,C) is a mighty tuple IV, then (Q,D,B,C)(Q,D,B,C) satisfies conditions from IV. By Claims 7.3.1, 7.3.3 and 7.3.4 we derive a quadruple satisfying all the properties of III, which gives us a mighty tuple III.

Let (Q,B,C)(Q,B,C) be a mighty tuple III. Put D𝐳=A\prescript{\mathbf{z}}{}{D}=A for every 𝐳\mathbf{z}. Then (Q,D,B,C)(Q,D,B,C) satisfies all properties of III. Claim 7.3.12 implies the existence of a quadruple satisfying properties II{κ}\mathrm{II}\cup\{\kappa\}. Notice that this quadruple is simultaneously a mighty tuple II, III, and IV. Additionally, Lemma 56 implies that this quadruple q-defines a mighty tuple I. ∎

7.4 Mighty tuple V

First, let us define a modification of a mighty tuple V, which we call a mighty tuple V’.

A tuple (Q,D,Δ)(Q,D,\Delta), where Δ\Delta is a 𝐳\mathbf{z}-parameterized mm-ary relation, QQ is a(𝐳,δ,α)(\mathbf{z},\delta,\alpha)-parameterized binary relation, and DD is a (𝐳,δ)(\mathbf{z},\delta)-parameterized unary relation, is called a mighty tuple V’ if

  1. 1.

    Δ𝐳\prescript{\mathbf{z}}{}{\Delta}\neq\varnothing for every 𝐳A|A|\mathbf{z}\in A^{|A|};

  2. 2.

    Qκδ𝐳Qαδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\kappa}\subseteq\prescript{\mathbf{z}}{\delta}{Q}^{\alpha} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and αA|A|\alpha\in A^{|A|};

  3. 3.

    {(d,d)dDδ𝐳}Qδ𝐳\{(d,d)\mid d\in\prescript{\mathbf{z}}{\delta}{D}\}\subseteq\prescript{\mathbf{z}}{\delta}{Q}^{\forall} for every 𝐳A|A|\mathbf{z}\in A^{|A|} and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta};   (Qδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall} is reflexive)

  4. 4.

    pr1(Qαδ𝐳)=pr2(Qαδ𝐳)=Dδ𝐳\operatorname{pr}_{1}(\prescript{\mathbf{z}}{\delta}{Q}^{\alpha})=\operatorname{pr}_{2}(\prescript{\mathbf{z}}{\delta}{Q}^{\alpha})=\prescript{\mathbf{z}}{\delta}{D} for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and αA|A|\alpha\in A^{|A|}.

  5. 5.

    Qδ𝐳{(d,d)dA}=\prescript{\mathbf{z}}{\delta}{Q}^{\forall\forall}\cap\{(d,d)\mid d\in A\}=\varnothing for some 𝐳A|A|\mathbf{z}\in A^{|A|} and every δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}.  (Qδ𝐳\prescript{\mathbf{z}}{\delta}{Q}^{\forall\forall} has no loops)

Notice that we allow Δ\Delta to be of arity 0. Then condition 1 means that Δ={Λ}\Delta=\{\Lambda\}, where Λ\Lambda is an empty tuple/word. In this case we can omit a parameter δ\delta in relations.

Lemma 57.

Suppose (Q,D)(Q,D) is a mighty tuple V. Then {Q,D}\{Q,D\} q-defines a mighty tuple V’ (R,D,{Λ})(R,D,\{\Lambda\}).

Proof.

Define a mighty tuple V’ as follows. Let Δ\Delta be the relation of arity 0 containing the empty tuple. The relation RR is defined by

Rx1,,x|A|𝐳(y1,y2)=i1,,ik{1,2,,|A|}.Qxi1,,xik𝐳(y1,y2)(y1D𝐳)(y2D𝐳).\prescript{\mathbf{z}}{}{R}^{x_{1},\dots,x_{|A|}}(y_{1},y_{2})=\bigwedge\limits_{i_{1},\dots,i_{k}\in\{1,2,\dots,|A|\}.}\prescript{\mathbf{z}}{}{Q}^{x_{i_{1}},\dots,x_{i_{k}}}(y_{1},y_{2})\wedge(y_{1}\in\prescript{\mathbf{z}}{}{D})\wedge(y_{2}\in\prescript{\mathbf{z}}{}{D}).

Then Rκ=R=QR^{\kappa}=R^{\forall\forall}=Q^{\forall\forall} and R=QR^{\forall}=Q^{\forall}. It is straightforward to check that (R,D,Δ)(R,D,\Delta) is a mighty tuple V’. ∎

Lemma 58.

Suppose (R,D,Δ)(R,D,\Delta) is a mighty tuple V’, Rαδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha} is symmetric for every 𝐳A|A|\mathbf{z}\in A^{|A|}, δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, and α\alpha. Then there exists a mighty tuple I q-definable from RR, DD, and Δ\Delta.

Proof.

First, we assign a pair to every mighty tuple V’ and evaluations of 𝐳\mathbf{z} and δ\delta. Put ϕR,D,Δ(𝐳,δ)=(m,|Dδ𝐳|)\phi_{R,D,\Delta}(\mathbf{z},\delta)=(m,|\prescript{\mathbf{z}}{\delta}{D}|), where mm is the minimal odd positive integer such that Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} has cycles of length mm. By ϕR,D,Δ1(𝐳,δ)\phi^{1}_{R,D,\Delta}(\mathbf{z},\delta) we denote the first element of the pair, that is mm. Notice that mm can be \infty if Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} does not have odd cycles. Then we define a linear order on pairs by (m1,s1)(m2,s2)(m1<m2)(m1=m2s1s2)(m_{1},s_{1})\leqslant(m_{2},s_{2})\Leftrightarrow(m_{1}<m_{2})\vee(m_{1}=m_{2}\wedge s_{1}\geqslant s_{2}). We put ϕR,D,Δ=max𝐳A|A|minδΔ𝐳ϕR,D,Δ(𝐳,δ)\phi_{R,D,\Delta}=\max\limits_{\mathbf{z}\in A^{|A|}}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}}\phi_{R,D,\Delta}(\mathbf{z},\delta).

We prove the lemma by induction on ϕR,D,Δ\phi_{R,D,\Delta}. Assume that it does not hold. Choose a mighty tuple V’ (R,D,Δ)(R,D,\Delta) such that we cannot q-define a mighty tuple I from it and the pair ϕR,D,Δ\phi_{R,D,\Delta} is maximal. Thus, to complete the proof it is sufficent to q-define a mighty-tuple V’ with larger pair or q-define a mighty tuple I. Suppose (m,s)=ϕR,D,Δ(m,s)=\phi_{R,D,\Delta}. By property 5 of a mighty tuple V’ we have m3m\geqslant 3. We consider two cases.

Case 1 (base of the induction). m=m=\infty, i.e., for some 𝐳0Z\mathbf{z}_{0}\in Z and every δΔ𝐳0\delta\in\prescript{\mathbf{z}_{0}}{}{\Delta} the relation Rκδ𝐳0\prescript{\mathbf{z}_{0}}{\delta}{R}^{\kappa} has only cycles of an even length. Then define R0αδ𝐳=NRαδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0}=N\cdot\prescript{\mathbf{z}}{\delta}{R}^{\alpha}, where N=|A|!|A|2N=|A|!\cdot|A|^{2}. Since Rαδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha} is symmetric, the relation R0αδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0} is reflexive and symmetric. By Lemma 47 R0αδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0} is transitive, that is R0αδ𝐳+R0αδ𝐳=R0αδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0}+\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0}=\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0}. Therefore, R0αδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\alpha}_{0} is an equivalence relation on Dδ𝐳\prescript{\mathbf{z}}{\delta}{D} for every 𝐳\mathbf{z}, δ\delta, and α\alpha. This implies that R0δ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\forall}_{0} is also an equivalence relation. Since Rκδ𝐳0\prescript{\mathbf{z}_{0}}{\delta}{R}^{\kappa} has no cycles of an odd length, we have R0κδ𝐳0Rκδ𝐳0=\prescript{\mathbf{z}_{0}}{\delta}{R}^{\kappa}_{0}\cap\prescript{\mathbf{z}_{0}}{\delta}{R}^{\kappa}=\varnothing. By the reflexivity of Rδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\forall} we have Rκδ𝐳R0δ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa}\subseteq\prescript{\mathbf{z}}{\delta}{R}_{0}^{\forall}. Then a mighty tuple I (R1,D1,B1,C1,Δ1)(R_{1},D_{1},B_{1},C_{1},\Delta_{1}) can be defined as follows:

Δ1𝐳(δ,u,v)=\displaystyle\prescript{\mathbf{z}}{}{\Delta}_{1}(\delta,u,v)= Rκδ𝐳(u,v)Δ𝐳(δ)\displaystyle\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{}{\Delta}(\delta)
D1δuv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{\delta uv}{D}_{1}(x)= Rκδ𝐳(u,v)R0δ𝐳(u,x)\displaystyle\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{\delta}{R}_{0}^{\forall}(u,x)
R1αδuv𝐳=\displaystyle\prescript{\mathbf{z}}{\delta uv}{R}_{1}^{\alpha}= R0αδ𝐳(D1δuv𝐳×D1δuv𝐳)\displaystyle\prescript{\mathbf{z}}{\delta}{R}_{0}^{\alpha}\cap(\prescript{\mathbf{z}}{\delta uv}{D}_{1}\times\prescript{\mathbf{z}}{\delta uv}{D}_{1})
B1δuv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{\delta uv}{B}_{1}(x)= Rκδ𝐳(u,v)R0κδ𝐳(u,x)\displaystyle\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(u,x)
C1δuv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{\delta uv}{C}_{1}(x)= Rκδ𝐳(u,v)R0κδ𝐳(v,x)\displaystyle\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(v,x)

Since we can choose any tuple (a,b)Rκδ𝐳(a,b)\in\prescript{\mathbf{z}}{\delta}{R}^{\kappa} as (u,v)(u,v), we obtain Δ1𝐳\prescript{\mathbf{z}}{}{\Delta_{1}}\neq\varnothing, aB1δab𝐳D1δab𝐳a\in\prescript{\mathbf{z}}{\delta ab}{B}_{1}\subseteq\prescript{\mathbf{z}}{\delta ab}{D}_{1}, and bC1δab𝐳D1δab𝐳b\in\prescript{\mathbf{z}}{\delta ab}{C}_{1}\subseteq\prescript{\mathbf{z}}{\delta ab}{D}_{1}. The relation R1αδuv𝐳0\prescript{\mathbf{z}_{0}}{\delta uv}{R}_{1}^{\alpha} is an equivalence relation because it is just a restriction of the equivalence relation R0αδ𝐳0\prescript{\mathbf{z}_{0}}{\delta}{R}_{0}^{\alpha} to D1δuv𝐳\prescript{\mathbf{z}}{\delta uv}{D}_{1}. It follows from the definition of D1δ𝐳\prescript{\mathbf{z}}{\delta}{D}_{1} that R1δ𝐳=D1δ𝐳×D1δ𝐳\prescript{\mathbf{z}}{\delta}{R}_{1}^{\forall}=\prescript{\mathbf{z}}{\delta}{D}_{1}\times\prescript{\mathbf{z}}{\delta}{D}_{1}. The relations B1δuv𝐳\prescript{\mathbf{z}}{\delta uv}{B}_{1} and C1δuv𝐳\prescript{\mathbf{z}}{\delta uv}{C}_{1} are the equivalence classes of R1κδuv𝐳\prescript{\mathbf{z}}{\delta uv}{R}_{1}^{\kappa} containing uu and vv, respectively. Moreover, we have B1δuv𝐳0C1δuv𝐳0=\prescript{\mathbf{z}_{0}}{\delta uv}{B}_{1}\cap\prescript{\mathbf{z}_{0}}{\delta uv}{C}_{1}=\varnothing because otherwise we would get a path of an even length from uu to vv in Rκδ𝐳0\prescript{\mathbf{z}_{0}}{\delta}{R}^{\kappa}, which together with the edge (u,v)(u,v) would give us a cycle of an odd length from uu to uu and contradicts our assumption about 𝐳0\mathbf{z}_{0}.

Case 2 (inductive step). m<m<\infty. Then there exists 𝐳\mathbf{z} such that for any δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} the relation Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} has no cycles of length smaller than mm but for some δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} the relation Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} has cycles of length mm. Let R0αδ𝐳=m2Rαδ𝐳\prescript{\mathbf{z}}{\delta}{R}_{0}^{\alpha}=\lfloor\frac{m}{2}\rfloor\cdot\prescript{\mathbf{z}}{\delta}{R}^{\alpha}. Define new relations by

Δ1𝐳(δ,y)\displaystyle\prescript{\mathbf{z}}{}{\Delta}_{1}(\delta,y) =xxR0κδ𝐳(y,x)R0κδ𝐳(y,x)Rκδ𝐳(x,x)Δ(δ),\displaystyle=\exists x\exists x^{\prime}\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(y,x)\wedge\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(y,x^{\prime})\wedge\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(x,x^{\prime})\wedge\Delta(\delta),
D1δy𝐳(x)\displaystyle\prescript{\mathbf{z}}{\delta y}{D}_{1}(x) =xR0κδ𝐳(y,x)R0κδ𝐳(y,x)Rκδ𝐳(x,x),\displaystyle=\exists x^{\prime}\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(y,x)\wedge\prescript{\mathbf{z}}{\delta}{R}_{0}^{\kappa}(y,x^{\prime})\wedge\prescript{\mathbf{z}}{\delta}{R}^{\kappa}(x,x^{\prime}),
R1αδy𝐳\displaystyle\prescript{\mathbf{z}}{\delta y}{R}_{1}^{\alpha} =Rαδ𝐳(D1δy𝐳×D1δy𝐳).\displaystyle=\prescript{\mathbf{z}}{\delta}{R}^{\alpha}\cap(\prescript{\mathbf{z}}{\delta y}{D}_{1}\times\prescript{\mathbf{z}}{\delta y}{D}_{1}).

That is, Δ1𝐳(δ,y)\prescript{\mathbf{z}}{}{\Delta_{1}}(\delta,y) holds if Δ(δ)\Delta(\delta) holds and yy is on some cycle of Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} of length mm. By the definition of maximality of mm over 𝐳\mathbf{z} the relation Δ1𝐳\prescript{\mathbf{z}}{}{\Delta_{1}} is not empty for any 𝐳\mathbf{z}. Also, D1δy𝐳\prescript{\mathbf{z}}{\delta y}{D}_{1} is the set of all elements such that there exist paths from yy to it of lengths m2\lfloor\frac{m}{2}\rfloor and m2\lceil\frac{m}{2}\rceil. Hence, D1δ𝐳\prescript{\mathbf{z}}{\delta}{D}_{1} is not empty for any 𝐳\mathbf{z} and δΔ1𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}_{1}. Let us show that ϕR1,D1,Δ1>ϕR,D,Δ\phi_{R_{1},D_{1},\Delta_{1}}>\phi_{R,D,\Delta}. Notice that R1κδy𝐳\prescript{\mathbf{z}}{\delta y}{R}_{1}^{\kappa} is just a restriction of Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa}. Also if ϕR,D,Δ1(𝐳,δ)=m\phi^{1}_{R,D,\Delta}(\mathbf{z},\delta)=m then aD1δa𝐳a\notin\prescript{\mathbf{z}}{\delta a}{D}_{1} for any δaΔ1𝐳\delta a\in\prescript{\mathbf{z}}{}{\Delta}_{1}. Hence, Dδ𝐳D1δa𝐳\prescript{\mathbf{z}}{\delta}{D}\supsetneq\prescript{\mathbf{z}}{\delta a}{D}_{1} in this case and we have

𝐳δaΔ1𝐳(ϕR,D,Δ1(𝐳,δ)=mϕR,D,Δ(𝐳,δ)<ϕR1,D1,Δ1(𝐳,δa))\displaystyle\forall\mathbf{z}\;\forall\delta a\in\prescript{\mathbf{z}}{}{\Delta}_{1}\;\left(\phi^{1}_{R,D,\Delta}(\mathbf{z},\delta)=m\rightarrow\phi_{R,D,\Delta}(\mathbf{z},\delta)<\phi_{R_{1},D_{1},\Delta_{1}}(\mathbf{z},\delta a)\right) (8)

Let ZZ be the set of all 𝐳\mathbf{z} such that Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} has no cycle of length smaller than mm for every δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta}, i.e. minδΔ𝐳ϕR,D,Δ1(𝐳,δ)=m\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}}\phi^{1}_{R,D,\Delta}(\mathbf{z},\delta)=m. Let Δ𝐳\prescript{\mathbf{z}}{}{\Delta}^{\prime} be the set of all δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta} such that Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} has a cycle of length mm. Notice that Δ𝐳\prescript{\mathbf{z}}{}{\Delta}^{\prime} is a projection of Δ1𝐳\prescript{\mathbf{z}}{}{\Delta}_{1} onto all the coordinates but the last one. Then ϕR,D,Δ1(𝐳,δ)=m\phi^{1}_{R,D,\Delta}(\mathbf{z},\delta)=m for any 𝐳Z\mathbf{z}\in Z and δΔ𝐳\delta\in\prescript{\mathbf{z}}{}{\Delta^{\prime}}. By (8) we have

ϕR,D,Δ=max𝐳A|A|minδΔ𝐳ϕR,D,Δ(𝐳,δ)=max𝐳ZminδΔ𝐳ϕR,D,Δ(𝐳,δ)=max𝐳ZminδΔ𝐳ϕR,D,Δ(𝐳,δ)<\displaystyle\phi_{R,D,\Delta}=\max\limits_{\mathbf{z}\in A^{|A|}}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}}\phi_{R,D,\Delta}(\mathbf{z},\delta)=\max\limits_{\mathbf{z}\in Z}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}}\phi_{R,D,\Delta}(\mathbf{z},\delta)=\max\limits_{\mathbf{z}\in Z}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}^{\prime}}\phi_{R,D,\Delta}(\mathbf{z},\delta)<
max𝐳ZminδΔ1𝐳ϕR1,D1,Δ1(𝐳,δ)max𝐳A|A|minδΔ1𝐳ϕR1,D1,Δ1(𝐳,δ)=\displaystyle\max\limits_{\mathbf{z}\in Z}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}_{1}}\phi_{R_{1},D_{1},\Delta_{1}}(\mathbf{z},\delta)\leqslant\max\limits_{\mathbf{z}\in A^{|A|}}\min\limits_{\delta\in\prescript{\mathbf{z}}{}{\Delta}_{1}}\phi_{R_{1},D_{1},\Delta_{1}}(\mathbf{z},\delta)= ϕR1,D1,Δ1.\displaystyle\phi_{R_{1},D_{1},\Delta_{1}}.

It remains to check that (R1,D1,Δ1)(R_{1},D_{1},\Delta_{1}) is a mighty tuple V’. Property 1 was already mentioned. Properties 2 and 3 follow from the respective properties for (R,D,Δ)(R,D,\Delta). Property 5 follows from the fact that we only restrict the relation RR. To prove property 4 notice that by the definition of D1D_{1} for every element xx there is an element xx^{\prime} connected to xx in Rκδ𝐳\prescript{\mathbf{z}}{\delta}{R}^{\kappa} and both xx and xx^{\prime} are in D1δ𝐳\prescript{\mathbf{z}}{\delta}{D}_{1}. Hence, by the inductive assumption, (R1,D1,Δ1)(R_{1},D_{1},\Delta_{1}) q-defines a mighty tuple I, which completes the proof. ∎

Lemma 17.

Suppose (R,D)(R,D) is a mighty tuple V. Then there exists a mighty tuple I q-definable from {R,D}\{R,D\}.

Proof.

By Lemma 57 there exists a mighty tuple V’ (R,D,{Λ})(R,D,\{\Lambda\}) q-definable from QQ and DD. Put R0α𝐳=NRα𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}=N\cdot\prescript{\mathbf{z}}{}{R}^{\alpha}, where N=|A|!|A|2N=|A|!\cdot|A|^{2}. By Lemma 47, R0α𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\alpha} is transitive for any 𝐳\mathbf{z} and α\alpha.

Put D1𝐳(x)=R0κ𝐳(x,x)\prescript{\mathbf{z}}{}{D}_{1}(x)=\prescript{\mathbf{z}}{}{R}_{0}^{\kappa}(x,x). Since any element from a cycle of Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa} is in D1𝐳\prescript{\mathbf{z}}{}{D}_{1} and Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa} has cycles by property 4 of a mighty tuple V’, the set D1𝐳\prescript{\mathbf{z}}{}{D}_{1} is not empty.

Let R1α𝐳(x,y)=R0α𝐳(x,y)R0α𝐳(y,x)D1𝐳(x)D1𝐳(y)\prescript{\mathbf{z}}{}{R}_{1}^{\alpha}(x,y)=\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}(x,y)\wedge\prescript{\mathbf{z}}{}{R}_{0}^{\alpha}(y,x)\wedge\prescript{\mathbf{z}}{}{D}_{1}(x)\wedge\prescript{\mathbf{z}}{}{D}_{1}(y). Notice that the relation R1α𝐳\prescript{\mathbf{z}}{}{R}_{1}^{\alpha} is reflexive on D1𝐳\prescript{\mathbf{z}}{}{D}_{1}. Then R1α𝐳+R1α𝐳R1α𝐳\prescript{\mathbf{z}}{}{R}_{1}^{\alpha}+\prescript{\mathbf{z}}{}{R}_{1}^{\alpha}\supseteq\prescript{\mathbf{z}}{}{R}_{1}^{\alpha} and by transitivity of R0α𝐳\prescript{\mathbf{z}}{}{R}_{0}^{\alpha} we get the transitivity of R1α𝐳\prescript{\mathbf{z}}{}{R}_{1}^{\alpha}. Thus, R1α𝐳\prescript{\mathbf{z}}{}{R}_{1}^{\alpha} is an equivalence relation for every 𝐳\mathbf{z}, δ\delta, and α\alpha. Consider two cases.

Case 1. There exists 𝐳0\mathbf{z}_{0} such that we have R1κ𝐳0Rκ𝐳0=\prescript{\mathbf{z}_{0}}{}{R}_{1}^{\kappa}\cap\prescript{\mathbf{z}_{0}}{}{R}^{\kappa}=\varnothing. Then we define a mighty tuple I (R2,D2,B2,C2,Δ2)(R_{2},D_{2},B_{2},C_{2},\Delta_{2}) as follows:

Δ2𝐳(u,v)=\displaystyle\prescript{\mathbf{z}}{}{\Delta}_{2}(u,v)= Rκ𝐳(u,v)\displaystyle\prescript{\mathbf{z}}{}{R}^{\kappa}(u,v)
D2uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{D}_{2}(x)= Rκ𝐳(u,v)R1𝐳(x,u)\displaystyle\prescript{\mathbf{z}}{}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{}{R}_{1}^{\forall}(x,u)
R2αuv𝐳=\displaystyle\prescript{\mathbf{z}}{uv}{R}_{2}^{\alpha}= R1α𝐳(D2uv𝐳×D2uv𝐳)\displaystyle\prescript{\mathbf{z}}{}{R}_{1}^{\alpha}\cap(\prescript{\mathbf{z}}{uv}{D}_{2}\times\prescript{\mathbf{z}}{uv}{D}_{2})
B2uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{B}_{2}(x)= Rκ𝐳(u,v)R1κ𝐳(u,x)\displaystyle\prescript{\mathbf{z}}{}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{}{R}_{1}^{\kappa}(u,x)
C2uv𝐳(x)=\displaystyle\prescript{\mathbf{z}}{uv}{C}_{2}(x)= Rκ𝐳(u,v)R1κ𝐳(v,x)\displaystyle\prescript{\mathbf{z}}{}{R}^{\kappa}(u,v)\wedge\prescript{\mathbf{z}}{}{R}_{1}^{\kappa}(v,x)

Let us check that all the properties of a mighty tuple I are satisfied. Since we can take any (u,v)(u,v) on a cycle (of length at most |A||A|) in Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa}, we have Δ2𝐳\prescript{\mathbf{z}}{}{\Delta_{2}}\neq\varnothing, uB2uv𝐳D2uv𝐳u\in\prescript{\mathbf{z}}{uv}{B}_{2}\subseteq\prescript{\mathbf{z}}{uv}{D}_{2}, and vC2uv𝐳D2uv𝐳v\in\prescript{\mathbf{z}}{uv}{C}_{2}\subseteq\prescript{\mathbf{z}}{uv}{D}_{2}. Property B2uv𝐳0C2uv𝐳0=\prescript{\mathbf{z}_{0}}{uv}{B}_{2}\cap\prescript{\mathbf{z}_{0}}{uv}{C}_{2}=\varnothing follows from the definition of case 1. Other properties are straightforward.

Case 2. For every 𝐳\mathbf{z} we have R1κ𝐳Rκ𝐳\prescript{\mathbf{z}}{}{R}_{1}^{\kappa}\cap\prescript{\mathbf{z}}{}{R}^{\kappa}\neq\varnothing. This means that we have (b,c)Rκ𝐳(b,c)\in\prescript{\mathbf{z}}{}{R}^{\kappa} such that there exists a path from cc to bb of length NN. Hence, bb is on a cycle of length N+1N+1. Since a minimal cycle going through bb is of size at most |A||A|, by repeating this cycle we can get a cycle of length |A|!|A|!. Combining cycles of lengths |A|!|A|! and |A|!+1|A|!+1 we can build a cycle of any sufficiently large length. Let k1k\geqslant 1 be the minimal number such that for every 𝐳\mathbf{z} the graph Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa} has cycles of length 2k2^{k}. Since Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa} has no loops for some 𝐳\mathbf{z} and has all sufficiently large cycles, kk is well-defined. Put R3α𝐳=2k1Rα𝐳\prescript{\mathbf{z}}{}{R}_{3}^{\alpha}=2^{k-1}\cdot\prescript{\mathbf{z}}{}{R}^{\alpha}, D4𝐳(x)=yR3κ𝐳(x,y)R3κ𝐳(y,x)\prescript{\mathbf{z}}{}{D}_{4}(x)=\exists y\prescript{\mathbf{z}}{}{R}_{3}^{\kappa}(x,y)\wedge\prescript{\mathbf{z}}{}{R}_{3}^{\kappa}(y,x), R4α𝐳(x,y)=R3α𝐳(x,y)R3α𝐳(y,x)\prescript{\mathbf{z}}{}{R}_{4}^{\alpha}(x,y)=\prescript{\mathbf{z}}{}{R}_{3}^{\alpha}(x,y)\wedge\prescript{\mathbf{z}}{}{R}_{3}^{\alpha}(y,x). Notice that D4𝐳\prescript{\mathbf{z}}{}{D}_{4} is the set of all elements appearing in cycles of length 2k2^{k} in Rκ𝐳\prescript{\mathbf{z}}{}{R}^{\kappa}, which is nonempty by our assumptions. Then it is straightforward to verify that (R4,D4,{Λ})(R_{4},D_{4},\{\Lambda\}) is a mighty tuple V’. Since the relation R4α𝐳\prescript{\mathbf{z}}{}{R}_{4}^{\alpha} is symmetric, we can apply Lemma 58 to derive a mighty tuple I. ∎

7.5 Classification for constraint languages with all constants

Lemma 25.

Suppose Γ{x=aaA}\Gamma\supseteq\{x=a\mid a\in A\} is a set of relations on AA. Then the following conditions are equivalent:

  1. 1.

    Γ\Gamma q-defines a mighty tuple I;

  2. 2.

    Γ\Gamma q-defines a mighty tuple II;

  3. 3.

    there exist an equivalence relation σ\sigma on DAD\subseteq A and B,CAB,C\subsetneq A such that BC=AB\cup C=A and Γ\Gamma q-defines the relations (y1,y2D)(σ(y1,y2)(xB))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in B)) and (y1,y2D)(σ(y1,y2)(xC))(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in C)).

Proof.

Let us prove that 1 implies 3. By Lemma 48 there is a mighty tuple I’ (Q0,D0,B0,C0,Δ)(Q_{0},D_{0},B_{0},C_{0},\Delta) q-definable from Γ\Gamma. We derive the required relations in several steps.

Get rid of unnecessary parameters. Choose 𝐳0=(b1,,b|A|)\mathbf{z}_{0}=(b_{1},\dots,b_{|A|}) satisfying condition 6 of a mighty tuple I. Then choose any δ0Δ𝐳0\delta_{0}\in\prescript{\mathbf{z}_{0}}{}{\Delta}. We get rid of parameters 𝐳\mathbf{z} and δ\delta substituting the corresponding values: Q1=Q0δ0𝐳0Q_{1}=\prescript{\mathbf{z}_{0}}{\delta_{0}}{}Q_{0}, D1=D0δ0𝐳0D_{1}=\prescript{\mathbf{z}_{0}}{\delta_{0}}{}D_{0}.

Notice that we do not care about the sets B0B_{0} and C0C_{0} anymore because they are not necessary for the case with all constant relations. Later we only change Q1Q_{1} and D1D_{1}.

Every equivalence relation must be trivial. Assume that for some α\alpha the binary relation Q1αQ_{1}^{\alpha} is different from D1×D1D_{1}\times D_{1} and Q1κQ_{1}^{\kappa}. Then choose bD1b\in D_{1} such that {b}+Q1α\{b\}+Q_{1}^{\alpha} is not an equivalence class of Q1κQ_{1}^{\kappa} and not D1D_{1}. Put D2={b}+Q1αD_{2}=\{b\}+Q_{1}^{\alpha}. Notice that D2D_{2} is a unary relation q-definable from Γ\Gamma. Put Q2𝐱(y1,y2)=Q1𝐱(y1,y2)(y1D2)(y2D2)Q_{2}^{\mathbf{x}}(y_{1},y_{2})=Q_{1}^{\mathbf{x}}(y_{1},y_{2})\wedge(y_{1}\in D_{2})\wedge(y_{2}\in D_{2}) to reduce the domain to D1D_{1}. We can repeat this while some of the equivalence relation Q2αQ_{2}^{\alpha} is not D2×D2D_{2}\times D_{2} and not Q2κQ_{2}^{\kappa}. Thus, we assume that Q2αQ_{2}^{\alpha} is either D1×D1D_{1}\times D_{1} or Q2κQ_{2}^{\kappa} for any α\alpha.

Find appropriate BB and CC. Here we use the idea from the proof of Lemma 55 but for a much easier case. Let σ1,,σN\sigma_{1},\dots,\sigma_{N} be the set of all injective mappings from {1,2,,|A|}\{1,2,\dots,|A|\} to {1,2,,|A|2}\{1,2,\dots,|A|^{2}\}. Let

Unx1,,x|A|2=Q2xσ1(1),,xσ1(|A|)+Q2xσ2(1),,xσ2(|A|)++Q2xσn(1),,xσn(|A|)U_{n}^{x_{1},\dots,x_{|A|^{2}}}=Q_{2}^{x_{\sigma_{1}(1)},\dots,x_{\sigma_{1}(|A|)}}+Q_{2}^{x_{\sigma_{2}(1)},\dots,x_{\sigma_{2}(|A|)}}+\dots+Q_{2}^{x_{\sigma_{n}(1)},\dots,x_{\sigma_{n}(|A|)}}

Since at least |A||A| elements in the set x1,,x|A|2x_{1},\dots,x_{|A|^{2}} are equal, there exists i{1,2,,N}i\in\{1,2,\dots,N\} such that xσi(1)=xσi(2)==xσi(|A|)x_{\sigma_{i}(1)}=x_{\sigma_{i}(2)}=\dots=x_{\sigma_{i}(|A|)}. Since Q2=D2×D2Q_{2}^{\forall}=D_{2}\times D_{2} the relation UNx1,,x|A|2U_{N}^{x_{1},\dots,x_{|A|^{2}}} is equal to Dδ𝐳×Dδ𝐳\prescript{\mathbf{z}}{\delta}{D}\times\prescript{\mathbf{z}}{\delta}{D}. Consider maximal nn such that UnαD2×D2U_{n}^{\alpha}\neq D_{2}\times D_{2} for some α\alpha. Put L=UnL=U_{n} and Rx1,,x|A|2=Q2xσn+1(1),,xσn+1(|A|)R^{x_{1},\dots,x_{|A|^{2}}}=Q_{2}^{x_{\sigma_{n+1}(1)},\dots,x_{\sigma_{n+1}(|A|)}}. We know that LαD2×D2L^{\alpha}\neq D_{2}\times D_{2} for some α\alpha, RαD2×D2R^{\alpha}\neq D_{2}\times D_{2} for some α\alpha, but Lα+Rα=D2×D2L^{\alpha}+R^{\alpha}=D_{2}\times D_{2} for every α\alpha. Let B0A|A|2B_{0}\subseteq A^{|A|^{2}} be the set of all α\alpha such that Lα=D2×D2L^{\alpha}=D_{2}\times D_{2}, CA|A|2C\subseteq A^{|A|^{2}} be the set of all α\alpha such that Rα=D2×D2R^{\alpha}=D_{2}\times D_{2}. Thus, we have B,CAmB,C\subsetneq A^{m}, where m=|A|2m=|A|^{2}, such that BC=AmB\cup C=A^{m}, L𝐱(y1,y2)=(y1,y2D2)(Q2κ(y1,y2)(𝐱B))L^{\mathbf{x}}(y_{1},y_{2})=(y_{1},y_{2}\in D_{2})\wedge(Q_{2}^{\kappa}(y_{1},y_{2})\vee(\mathbf{x}\in B)), and R𝐱(y1,y2)=(y1,y2D2)(Q2κ(y1,y2)(𝐱C))R^{\mathbf{x}}(y_{1},y_{2})=(y_{1},y_{2}\in D_{2})\wedge(Q_{2}^{\kappa}(y_{1},y_{2})\vee(\mathbf{x}\in C)).

Reduce the arity of BB and CC. Let B,C,LB,C,L and RR be the relations of the minimal arity satisfying the above properties, that is, B,CAmB,C\subsetneq A^{m} for some mm, BC=AmB\cup C=A^{m}, L𝐱(y1,y2)=(y1,y2D2)(Q2κ(y1,y2)(𝐱B))L^{\mathbf{x}}(y_{1},y_{2})=(y_{1},y_{2}\in D_{2})\wedge(Q_{2}^{\kappa}(y_{1},y_{2})\vee(\mathbf{x}\in B)), and R𝐱(y1,y2)=(y1,y2D2)(Q2κ(y1,y2)(𝐱C))R^{\mathbf{x}}(y_{1},y_{2})=(y_{1},y_{2}\in D_{2})\wedge(Q_{2}^{\kappa}(y_{1},y_{2})\vee(\mathbf{x}\in C)). If m=1m=1 then LL and RR are two relations we needed to define. Thus, we assume that m>1m>1. Put

L0x1(y1,y2)\displaystyle L_{0}^{x_{1}}(y_{1},y_{2}) =x2xmLx1,,xm(y1,y2)\displaystyle=\forall x_{2}\dots\forall x_{m}L^{x_{1},\dots,x_{m}}(y_{1},y_{2})
R0x1(y1,y2)\displaystyle R_{0}^{x_{1}}(y_{1},y_{2}) =x2xmRx1,,xm(y1,y2)\displaystyle=\forall x_{2}\dots\forall x_{m}R^{x_{1},\dots,x_{m}}(y_{1},y_{2})
B0(x1)\displaystyle B_{0}(x_{1}) =x2xmB(x1,,xm)\displaystyle=\forall x_{2}\dots\forall x_{m}B(x_{1},\dots,x_{m})
C0(x1)\displaystyle C_{0}(x_{1}) =x2xmC(x1,,xm)\displaystyle=\forall x_{2}\dots\forall x_{m}C(x_{1},\dots,x_{m})

Consider two cases:

Case 1. B0C0=AB_{0}\cup C_{0}=A. Then L0L_{0} and R0R_{0} are ternary relations satisfying all the required properties, which contradicts our assumption about the minimality of mm.

Case 2. B0C0AB_{0}\cup C_{0}\neq A. Choose aA(B0C0)a\in A\setminus(B_{0}\cup C_{0}). Put

L1x2,,xm(y1,y2)\displaystyle L_{1}^{x_{2},\dots,x_{m}}(y_{1},y_{2}) =La,x2,xm(y1,y2)\displaystyle=L^{a,x_{2}\dots,x_{m}}(y_{1},y_{2})
R1x2,,xm(y1,y2)\displaystyle R_{1}^{x_{2},\dots,x_{m}}(y_{1},y_{2}) =Ra,x2,xm(y1,y2)\displaystyle=R^{a,x_{2}\dots,x_{m}}(y_{1},y_{2})
B1(x2,,xm)\displaystyle B_{1}(x_{2},\dots,x_{m}) =B(a,x2,,xm)\displaystyle=B(a,x_{2},\dots,x_{m})
C1(x2,,xm)\displaystyle C_{1}(x_{2},\dots,x_{m}) =C(a,x2,,xm)\displaystyle=C(a,x_{2},\dots,x_{m})

Notice that B1,C1Am1B_{1},C_{1}\subsetneq A^{m-1}, B1C1=Am1B_{1}\cup C_{1}=A^{m-1}, and the relations L1L_{1} and R1R_{1} again satisfy all the required properties but have smaller arity, which contradicts our assumptions.

2 implies 1 by Lemma 16. It remains to prove that 3 implies 1. Suppose we have B,CAB,C\subsetneq A, an equivalence relation σ\sigma on DD and two q-definable relations L(y1,y2,x)=(y1,y2D)(σ(y1,y2)(xB))L(y_{1},y_{2},x)=(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in B)) and R(y1,y2,x)=(y1,y2D)(σ(y1,y2)(xC))R(y_{1},y_{2},x)=(y_{1},y_{2}\in D)\wedge(\sigma(y_{1},y_{2})\vee(x\in C)). Let us define a mighty tuple II (Q,D,B,C)(Q,D^{\prime},B^{\prime},C^{\prime}). Choose two elements bb and cc from DD that are not equivalent modulo σ\sigma. Put Dδ𝐳(y)=D(y)\prescript{\mathbf{z}}{\delta}{D^{\prime}}(y)=D(y), and

Qx1,x2𝐳(y1,y2)\displaystyle\prescript{\mathbf{z}}{}{Q}^{x_{1},x_{2}}(y_{1},y_{2}) =yL(y1,y,x1)R(y,y2,x2)\displaystyle=\exists y\;L(y_{1},y,x_{1})\wedge R(y,y_{2},x_{2})
B𝐳(y)\displaystyle\prescript{\mathbf{z}}{}{B^{\prime}}(y) =yx(y=b)L(y,y,x)\displaystyle=\exists y^{\prime}\forall x\;(y^{\prime}=b)\wedge L(y,y^{\prime},x)
C𝐳(y)\displaystyle\prescript{\mathbf{z}}{}{C^{\prime}}(y) =yx(y=c)L(y,y,x)\displaystyle=\exists y^{\prime}\forall x\;(y^{\prime}=c)\wedge L(y,y^{\prime},x)

Notice that the parameter 𝐳\mathbf{z} is fictitious. Since BC=AB\cup C=A, we have Q𝐳=D×D\prescript{\mathbf{z}}{}{Q}^{\forall}=D\times D. Since BAB\neq A and CAC\neq A, we have Q𝐳=σ\prescript{\mathbf{z}}{}{Q}^{\forall\forall}=\sigma. Thus, (Q,D,B,C)(Q,D^{\prime},B^{\prime},C^{\prime}) is a mighty tuple II, which completes the proof. ∎

References

  • [1] Sanjeev Arora and Boaz Barak. Computational complexity: a modern approach. Cambridge University Press, 2009.
  • [2] Libor Barto, Andrei Krokhin, and Ross Willard. Polymorphisms, and how to use them. 2017. Preprint.
  • [3] Libor Barto and Michael Pinsker. The algebraic dichotomy conjecture for infinite domain constraint satisfaction problems. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, New York, NY, USA, July 5-8, 2016, pages 615–622, 2016.
  • [4] Ferdinand Börner, Andrei A. Bulatov, Hubie Chen, Peter Jeavons, and Andrei A. Krokhin. The complexity of constraint satisfaction games and QCSP. Inf. Comput., 207(9):923–944, 2009.
  • [5] Joshua Brakensiek and Venkatesan Guruswami. Promise constraint satisfaction: Structure theory and a symmetric boolean dichotomy. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 1782–1801, 2018.
  • [6] Andrei Bulatov, Peter Jeavons, and Andrei Krokhin. Classifying the complexity of constraints using finite algebras. SIAM J. Comput., 34(3):720–742, March 2005.
  • [7] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 319–330, 2017.
  • [8] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. CoRR, abs/1703.03021, 2017.
  • [9] Hubie Chen. A rendezvous of logic, complexity, and algebra. SIGACT News, 37(4):85–114, 2006.
  • [10] Hubie Chen. The complexity of quantified constraint satisfaction: Collapsibility, sink algebras, and the three-element case. SIAM J. Comput., 37(5):1674–1701, 2008.
  • [11] Hubie Chen. Quantified constraint satisfaction and the polynomially generated powers property. Algebra universalis, 65(3):213–241, 2011. An extended abstract appeared in ICALP B 2008.
  • [12] Hubie Chen. Meditations on quantified constraint satisfaction. In Logic and Program Semantics - Essays Dedicated to Dexter Kozen on the Occasion of His 60th Birthday, pages 35–49, 2012.
  • [13] Peter Jeavons. On the algebraic structure of combinatorial problems. Theoretical Computer Science, 200(1-2):185–204, 1998.
  • [14] Vladimir Kolmogorov, Andrei A. Krokhin, and Michal Rolínek. The complexity of general-valued CSPs. SIAM J. Comput., 46(3):1087–1110, 2017.
  • [15] Barnaby Martin. Quantified Constraints in Twenty Seventeen. In Andrei Krokhin and Stanislav Zivny, editors, The Constraint Satisfaction Problem: Complexity and Approximability, volume 7 of Dagstuhl Follow-Ups, pages 327–346. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 2017.
  • [16] Thomas J. Schaefer. The complexity of satisfiability problems. In Proceedings of the Tenth Annual ACM Symposium on Theory of Computing, STOC ’78, pages 216–226, New York, NY, USA, 1978. ACM.
  • [17] D. Zhuk. A proof of CSP dichotomy conjecture. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 331–342, Oct 2017.
  • [18] Dmitriy Zhuk. The size of generating sets of powers. Journal of Combinatorial Theory, Series A, 167:91–103, 2019.
  • [19] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. Journal of the ACM (JACM), 67(5):1–78, 2020.
  • [20] Dmitriy Zhuk. The complexity of the quantified CSP having the polynomially generated powers property, 2021.
  • [21] Dmitriy Zhuk. Strong subalgebras and the constraint satisfaction problem. Journal of Multiple-Valued Logic & Soft Computing, 36, 2021.
  • [22] Dmitriy Zhuk and Barnaby Martin. QCSP monsters and the demise of the chen conjecture. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, pages 91–104, 2020.
  • [23] Dmitriy Zhuk and Barnaby Martin. QCSP monsters and the demise of the chen conjecture. J. ACM, 69(5), oct 2022.