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

The Complexity of Network Satisfaction Problems for Symmetric Relation Algebras with a Flexible Atom

Manuel.Bodirsky ([email protected]) Institut für Algebra, TU Dresden, 01062 Dresden, Germany Simon Knäuer ([email protected]) Institut für Algebra, TU Dresden, 01062 Dresden, Germany
Abstract

Robin Hirsch posed in 1996 the Really Big Complexity Problem: classify the computational complexity of the network satisfaction problem for all finite relation algebras 𝐀\bf A. We provide a complete classification for the case that 𝐀\bf A is symmetric and has a flexible atom; in this case, the problem is NP-complete or in P. The classification task can be reduced to the case where 𝐀\bf A is integral. If a finite integral relation algebra has a flexible atom, then it has a normal representation 𝔅\mathfrak{B}. We can then study the computational complexity of the network satisfaction problem of 𝐀{\bf A} using the universal-algebraic approach, via an analysis of the polymorphisms of 𝔅\mathfrak{B}. We also use a Ramsey-type result of Nešetřil and Rödl and a complexity dichotomy result of Bulatov for conservative finite-domain constraint satisfaction problems.

1 Introduction

One of the earliest approaches to formalise constraint satisfaction problems over infinite domains is based on relation algebras [LM94, Hir97]. We think about the elements of a relation algebra as binary relations; the algebra has operations for intersection, union, complement, converse, and composition of relations, and constants for the empty relation, the full relation, and equality, and is required to satisfy certain axioms. Important examples of relation algebras are the Point Algebra, the Left Linear Point Algebra, Allen’s Interval Algebra, RCC5, and RCC8, just to name a few.

The most important computational problems related to relation algebras that have been studied are called network satisfaction problems (NSPs). A finite network is given in which the nodes are linked via the elements of a fixed relation algebra. Then the computational task of the NSP for this relation algebra is to decide whether the network satisfies a strong notion of consistency with respect to the laws of the fixed relation algebra. Such NSPs for a finite relation algebra can be used to model many computational problems in temporal and spatial reasoning  [Dün05, RN07, BJ17].

More than two decades ago, [Hir96] asked the Really Big Complexity Problem (RBCP): can we classify the computational complexity of the network satisfaction problem for every finite relation algebra? For example, the complexity of the network satisfaction problem for the Point Algebra and the Left Linear Point Algebra is in P [VKvB89, BK07], while it is NP-complete for all of the other examples mentioned above [All83, RN99]. There also exist relation algebras where the complexity of the network satisfaction problem is not in NP: Hirsch gave an example of a finite relation algebra with an undecidable network satisfaction problem [Hir99]. This result might be surprising at first sight; it is related to the fact that the representation of a finite relation algebra by concrete binary relations over some set can be quite complicated. We also mention that not every finite relation algebra has a representation [Lyn50]. There are even non-representable relation algebras that are symmetric [Mad06a]; a relation algebra is symmetric if every element is its own converse.

A simple condition that implies that a finite relation algebra 𝐀\mathbf{A} has a representation is the existence of a so-called flexible atom [Com84, Mad82]. A flexible atom is an element of 𝐀\mathbf{A} that is maximally unconstrained in its interaction with other elements of the relation algebra; the formal definitions can be found in Section 2.

Such relation algebras have been studied intensively, for example in the context of the so-called flexible atoms conjecture [Mad94, AMM08]. We will see that integral relation algebras with a flexible atom even have a normal representation, i.e., a representation which is fully universal, square, and homogeneous [Hir96]. The network satisfaction problem for a relation algebra with a normal representation can be seen as a constraint satisfaction problem for an infinite structure 𝔅\mathfrak{B} that is well-behaved from a model-theoretic point of view; in particular, we may choose 𝔅\mathfrak{B} to be homogeneous and finitely bounded.

Constraint satisfaction problems over finite domains have been studied intensively in the past two decades, and tremendous progress has been made concerning systematic findings about their computational complexity. As a highlighting result, [Bul17] and [Zhu17, Zhu20] proved the famous Feder-Vardi dichotomy conjecture which states that every finite-domain CSP is in P or NP-complete. Both proofs build on an important connection between the computational complexity of constraint satisfaction problems and universal algebra.

The universal-algebraic approach can also be applied to study the computational complexity of countably infinite homogeneous structures 𝔅\mathfrak{B} with finite relational signature [BN06]. For an introduction to the field, we refer to [Bod21]. If 𝔅\mathfrak{B} is finitely bounded, then CSP(𝔅)(\mathfrak{B}) is contained in NP (see, e.g., [Bod12]). If 𝔅\mathfrak{B} is homogeneous and finitely bounded then a complexity dichotomy has been conjectured, along with algebraic criteria that distinguish NP-complete from polynomial-time solvable problems [BPP21]. The exact formulation of the conjecture from [BPP21] in full generality requires concepts that we do not need to prove our results. In Theorem 9.1 we verify these conjectures for all normal representations of finite integral symmetric relation algebras with a flexible atom, and thereby also solve Hirsch’s RBCP for symmetric relation algebras with a flexible atom. Phrased in the terminology of relation algebras, our result is the following.

Theorem 1.1.

Let 𝐀\bf A be a finite symmetric representable relation algebra with a flexible atom, and let A0A_{0} be the set of atoms of 𝐀\bf A. Then

  • \bullet

    there exists an operation f:A06A0f\colon A_{0}^{6}\rightarrow A_{0} that preserves the allowed triples of 𝐀\mathbf{A}, satisfies

    x1,,x6A0.f(x1,,x6){x1,x6}\forall x_{1},\ldots,x_{6}\in A_{0}.~{}f(x_{1},\ldots,x_{6})\in\{x_{1},\ldots x_{6}\}

    and satisfies the Siggers identity

    x,y,zA0.f(x,x,y,y,z,z)=f(y,z,x,z,x,y);\forall x,y,z\in A_{0}.~{}f(x,x,y,y,z,z)=f(y,z,x,z,x,y);

    in this case the network satisfaction problem for 𝐀\mathbf{A} is in P, or

  • \bullet

    the network satisfaction problem for 𝐀\bf A is NP-complete.

Moreover, the satisfiability of the Siggers identity in Theorem 1.1 is a decidable criterion for 𝐀\mathbf{A} that is a sufficient condition for the polynomial-time tractability of the network satisfaction problem of 𝐀\bf A. We want to mention that there are several other equivalent criteria that could be used instead of the first item in the theorem, namely all characterizations of Taylor Algebras for finite conservative algebras (see, e.g., [Bul03]).

This article is a postprint version of an article that appeared in the Journal of Artificial Intelligence Research [BK22]; a conference version of the article appeared under the title “Network satisfaction for symmetric relation algebras with a flexible atom” in [BK21].

1.1 Proof Strategy

Every finite integral representable relation algebra 𝐀\mathbf{A} with a flexible atom has a normal representation 𝔅\mathfrak{B}; for completeness, and since we are not aware of a reference for this fact, we include a proof in Section 3. It follows that the classification question about the complexity of the network satisfaction problem of 𝐀\mathbf{A} can be translated into a question about the complexity of the constraint satisfaction problem for the relational structure 𝔅\mathfrak{B}.

We then associate a finite relational structure 𝔒\mathfrak{O} to 𝔅\mathfrak{B} and show that CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) can be reduced to CSP(𝔒)\operatorname{CSP}(\mathfrak{O}) in polynomial-time (Section 4). If the structure 𝔒\mathfrak{O} satisfies the condition of the first case in Theorem 1.1, then known results about finite-domain CSP\operatorname{CSP}s imply that CSP(𝔒)\operatorname{CSP}(\mathfrak{O}) is in P [Bul03, Bul16, Bar11], and hence CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is in P, too. If the first case in Theorem 1.1 does not apply, then known results about finite-domain algebras imply that there are a,bA0a,b\in A_{0} such that the canonical polymorphisms of 𝔅\mathfrak{B} act as a projection on {a,b}\{a,b\} [Bul03, Bul16, Bar11]. We first observe NP-hardness of CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) if 𝔅\mathfrak{B} does not have a binary injective polymorphism (Section 6). If 𝔅\mathfrak{B} has a binary injective polymorphism, we use results from structural Ramsey theory to show that 𝔅\mathfrak{B} must even have a binary injective polymorphism which is canonical (Section 7). This implies that none of a,ba,b equals IdA\operatorname{Id}\in A. We then prove that 𝔅{\mathfrak{B}} does not have a binary {a,b}\{a,b\}-symmetric polymorphism; also in this step, we apply Ramsey theory. In Section 8 we show that this in turn implies that all polymorphisms of 𝔅{\mathfrak{B}} must be canonical on {a,b}\{a,b\}. Finally, we show that 𝔅{\mathfrak{B}} cannot have a polymorphism which acts as a majority or as a minority on {a,b}\{a,b\}, and thus by Schaefer’s theorem all polymorphisms of 𝔅{\mathfrak{B}} act as a projection on {a,b}\{a,b\}. This is again implied by results from Section 7. Finally it follows that CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-hard. This concludes the proof of Theorem 1.1.

Our proof follows a strategy that was applied several times in the study of infinite-domain constraint satisfaction problems and recently described and generalized by [MP20]. We give some details about this in Section 10.

1.2 Organisation of the Article

Section 2 introduces all the basic concepts and tools that are used in this article. In Section 3 we define flexible atoms and obtain first results about representable relation algebras with a flexible atom. Section 4 is dedicated to the atom structure and the polynomial-time tractability results. In Section 5 we provide an additional perspective on the class of computational problems under consideration; in this section we define those problems completely without the use of the relation algebra framework. The reader can get better intuition of the class of problems studied in this article, however our results and proofs do not rely on that section. The Sections 6-8 contain the main parts of the proof as outlined in the previous paragraph. In Section 9 we put everything together and prove the main theorem. We end with a conclusion and a small discussion of our result.

2 Preliminaries

We recall some basic definitions and results about universal algebra, representable relation algebras, constraint satisfaction, model theory, and structural Ramsey theory.

2.1 Algebras and Structures

Let \mathbb{N} denote the natural numbers starting with 0 and define +:={0}\mathbb{N}_{+}:=\mathbb{N}\setminus\{0\}. A signature τ\tau is a set of relation symbols and function symbols. Each symbol is associated with a natural number, called the arity of the symbol. Function symbols of arity 0 are called constant symbols. A τ\tau-structure is a tuple 𝔄=(A;(Q𝔄)Qτ)\mathfrak{A}=(A;(Q^{\mathfrak{A}})_{Q\in\tau}) where AA is a set, called the domain of 𝔄\mathfrak{A}, such that for every QτQ\in\tau:

  • \bullet

    if QQ is a relation symbol of arity nn\in\mathbb{N}, then Q𝔄Q^{\mathfrak{A}} is a subset of AnA^{n},

  • \bullet

    if QQ is a function symbol of arity nn\in\mathbb{N}, then Q𝔄Q^{\mathfrak{A}} is an operation AnAA^{n}\rightarrow A.

Note that by A0={}A^{0}=\{\emptyset\} a subset of A0A^{0} can be seen as a Boolean value and the operation f:A0Af\colon A^{0}\rightarrow A can be interpreted as a constant. As long as there is no risk of confusion we will often use the function symbols for the corresponding functions, and the relation symbols for the corresponding relations, i.e., we use QQ instead of Q𝔄Q^{\mathfrak{A}}.

Let 𝔄\mathfrak{A} and 𝔅\mathfrak{B} be two τ\tau-structures. A homomorphism h from 𝔄\mathfrak{A} to 𝔅\mathfrak{B} is a function h:ABh\colon A\rightarrow B such that

  • \bullet

    for every relation symbol QQ of arity nn\in\mathbb{N} and every tuple (a1,,an)An(a_{1},\ldots,a_{n})\in A^{n}, we have that (a1,,an)Q𝔄(h(a1),,h(an))Q𝔅(a_{1},\ldots,a_{n})\in Q^{\mathfrak{A}}\Rightarrow(h(a_{1}),\ldots,h(a_{n}))\in Q^{\mathfrak{B}};

  • \bullet

    for every function symbol QQ of arity nn\in\mathbb{N} and every tuple (a1,,an)An(a_{1},\ldots,a_{n})\in A^{n}, we have that h(Q𝔄(a1,,an))=Q𝔅(h(a1),,h(an))h(Q^{\mathfrak{A}}(a_{1},\ldots,a_{n}))=Q^{\mathfrak{B}}(h(a_{1}),\ldots,h(a_{n})).

In the case that τ\tau contains only function symbols and hh is surjective, then 𝔅\operatorname{\mathfrak{B}} is called homomorphic image of 𝔄\operatorname{\mathfrak{A}}. In general, the homomorphism hh is called an embedding if hh is injective and satisfies

  • \bullet

    for every relation symbol QQ of arity nn\in\mathbb{N} and every tuple (a1,,an)An(a_{1},\ldots,a_{n})\in A^{n}, we have that (a1,,an)Q𝔄(h(a1),,h(an))Q𝔅(a_{1},\ldots,a_{n})\in Q^{\mathfrak{A}}\Leftrightarrow(h(a_{1}),\ldots,h(a_{n}))\in Q^{\mathfrak{B}}.

A surjective embedding is called an isomorphism. An endomorphism of a τ\tau-structure 𝔄\operatorname{\mathfrak{A}} is a homomorphism from 𝔄\operatorname{\mathfrak{A}} to 𝔄\operatorname{\mathfrak{A}} and an automorphism of 𝔄\operatorname{\mathfrak{A}} is an isomorphism from 𝔄\operatorname{\mathfrak{A}} to 𝔄\operatorname{\mathfrak{A}}. We denote by Aut(𝔄)\operatorname{Aut}(\mathfrak{A}) the group of all automorphisms of 𝔄\operatorname{\mathfrak{A}}.

A τ\tau-structure 𝔄\operatorname{\mathfrak{A}} is a substructure of a τ\tau-structure 𝔅\operatorname{\mathfrak{B}} if

  • \bullet

    ABA\subseteq B;

  • \bullet

    for every relation symbol QQ of arity nn\in\mathbb{N} and every tuple (a1,,an)An(a_{1},\ldots,a_{n})\in A^{n}, we have that (a1,,an)Q𝔄(a_{1},\ldots,a_{n})\in Q^{\mathfrak{A}} if and only if (a1,,an)Q𝔅(a_{1},\ldots,a_{n})\in Q^{\mathfrak{B}};

  • \bullet

    for every function symbol QQ of arity nn\in\mathbb{N} and every tuple (a1,,an)An(a_{1},\ldots,a_{n})\in A^{n}, we have that Q𝔄(a1,,an)=Q𝔅(a1,,an)Q^{\mathfrak{A}}(a_{1},\ldots,a_{n})=Q^{\mathfrak{B}}(a_{1},\ldots,a_{n}).

Note that for every subset ABA^{\prime}\subseteq B of the domain of a τ\tau-structure 𝔅\operatorname{\mathfrak{B}} there exists a unique substructure 𝔄\operatorname{\mathfrak{A}} of 𝔅\operatorname{\mathfrak{B}} with smallest domain AA and AAA^{\prime}\subseteq A. We call this the substructure of 𝔅\operatorname{\mathfrak{B}} induced by AA.

Let 𝔄\operatorname{\mathfrak{A}} and 𝔅\operatorname{\mathfrak{B}} be τ\tau structures. The direct product =𝔄×𝔅\operatorname{\mathfrak{C}}=\operatorname{\mathfrak{A}}\times\operatorname{\mathfrak{B}} is the τ\tau-structure where

  • \bullet

    A×BA\times B is the domain of \operatorname{\mathfrak{C}};

  • \bullet

    for every relation symbol QQ of arity nn\in\mathbb{N} and every tuple ((a1,b1),,(an,bn))(A×B)n((a_{1},b_{1}),\ldots,(a_{n},b_{n}))\in(A\times B)^{n}, we have that ((a1,b1),,(an,bn))Q((a_{1},b_{1}),\ldots,(a_{n},b_{n}))\in Q^{\mathfrak{C}} if and only if (a1,,an)Q𝔄(a_{1},\ldots,a_{n})\in Q^{\mathfrak{A}} and (b1,,bn)Q𝔅(b_{1},\ldots,b_{n})\in Q^{\mathfrak{B}};

  • \bullet

    for every function symbol QQ of arity nn\in\mathbb{N} and every tuple ((a1,b1),,(an,bn))(A×B)n((a_{1},b_{1}),\ldots,(a_{n},b_{n}))\in(A\times B)^{n}, we have that Q((a1,b1),,(an,bn))=(Q𝔄(a1,,an),Q𝔅(b1,,bn))Q^{\mathfrak{C}}((a_{1},b_{1}),\ldots,(a_{n},b_{n}))=(Q^{\mathfrak{A}}(a_{1},\ldots,a_{n}),Q^{\mathfrak{B}}(b_{1},\ldots,b_{n})).

We denote the direct product 𝔄×𝔄\operatorname{\mathfrak{A}}\times\operatorname{\mathfrak{A}} by 𝔄2\operatorname{\mathfrak{A}}^{2}. The kk-fold product 𝔄××𝔄\operatorname{\mathfrak{A}}\times\cdots\times\operatorname{\mathfrak{A}} is defined analogously and denoted by 𝔄k\operatorname{\mathfrak{A}}^{k}.

Structures with a signature that only contains function symbols are called algebras and structure with purely relational signature are called relational structures. Since we do not deal with signatures of mixed type in this article, we will from now on use the term structure for relational structures only.

2.2 Representable Relation Algebras and Network Satisfaction Problems

Relation algebras that are not representable have a trivial network satisfaction problem, namely the class of yes-instances of their network satisfaction problem is empty (see Definition 2.5). We thus omit the definition of relation algebras and start immediately with the simpler definition of representable relation algebras; here we basically follow the textbook by [Mad06b].

Definition 2.1.

Let DD be a set and ED2E\subseteq D^{2} an equivalence relation on DD.
Let (𝒫(E);,¯,0,1,Id,,)(\mathcal{P}(E);~{}\cup,~{}\bar{}~{},~{}0,~{}1,~{}\operatorname{Id},~{}^{\smile},~{}\circ) be an algebra with the following operations:

  1. 1.

    ab:={(x,y)(x,y)a(x,y)b}a\cup b:=\{(x,y)\mid(x,y)\in a\vee(x,y)\in b\},

  2. 2.

    a¯:=Ea\bar{a}:=E\setminus a,

  3. 3.

    0:=0:=\emptyset,

  4. 4.

    1:=E1:=E,

  5. 5.

    Id:={(x,x)xD}\operatorname{Id}:=\{(x,x)\mid x\in D\},

  6. 6.

    a:={(x,y)(y,x)a}a^{\smile}:=\{(x,y)\mid(y,x)\in a\},

  7. 7.

    ab:={(x,z)yD:(x,y)a and (y,z)b}a\circ b:=\{(x,z)\mid\exists y\in D:(x,y)\in a\textup{~{} and~{} }(y,z)\in b\}.

A subalgebra of (𝒫(E);,¯,0,1,Id,,)(\mathcal{P}(E);~{}\cup,~{}\bar{}~{},~{}0,~{}1,~{}\operatorname{Id},~{}^{\smile},~{}\circ) is called a proper relation algebra.

The class of representable relation algebras, denoted by RRA\operatorname{RRA}, consists of all algebras with signature τ={,¯,0,1,Id,,}\tau=\{~{}\cup,~{}\bar{}~{},~{}0,~{}1,~{}\operatorname{Id},~{}^{\smile},~{}\circ\} with corresponding arities 2,1,0,0,0,12,1,0,0,0,1 and 22 that are isomorphic to some proper relation algebra. We use bold letters (such as 𝐀\bf A) to denote algebras from RRA\operatorname{RRA} and the corresponding roman letter (such as AA) to denote the domain of the algebra. An algebra is called finite if its domain is finite. We call 𝐀RRA\mathbf{A}\in\operatorname{RRA} symmetric if all its elements are symmetric, i.e., a=aa^{\smile}=a for every aAa\in A.

According to the previous definition, an algebra 𝐀\mathbf{A} is in RRA\operatorname{RRA} if it has an isomorphism to a proper relation algebra. Such an isomorphism is usually called the representation of 𝐀\bf A. To link the theory of relation algebras with model theory it will be convenient to view representations of algebras in RRA\operatorname{RRA} as relational structures and to not use the classical notation here. However, it is easy to see that the existence of a representation is equivalent under both definitions.

Definition 2.2.

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA}. Then a representation of 𝐀\mathbf{A} is a relational structure 𝔅\mathfrak{B} such that

  • \bullet

    𝔅\mathfrak{B} is an AA-structure, i.e., the elements of AA are binary relation symbols of 𝔅{\mathfrak{B}};

  • \bullet

    The map aa𝔅a\mapsto a^{\mathfrak{B}} is an isomorphism between 𝐀\mathbf{A} and the proper relation algebra induced by the relations of 𝔅\mathfrak{B} in (𝒫(1𝔅);,¯,0,1,Id,,)(\mathcal{P}(1^{\mathfrak{B}});~{}\cup,~{}\bar{}~{},~{}0,~{}1,~{}\operatorname{Id},~{}^{\smile},~{}\circ).

Let 𝐀=(A;,¯,0,1,Id,,)\mathbf{A}=(A;~{}\cup,~{}\bar{}~{},~{}0,~{}1,~{}\operatorname{Id},~{}^{\smile},~{}\circ) be a representable relation algebra and let us define a new operation xy:=x¯y¯¯x\cap y:=\overline{\overline{x}\cup\overline{y}} on the set AA. Then the algebra (A;,,¯,0,1)(A;~{}\cup,~{}\cap,~{}\bar{}~{},~{}0,~{}1) is by definition a Boolean algebra and induces therefore a partial order \leq on AA, which is defined by xy:xy=yx\leq y:\Leftrightarrow x\cup y=y. Note that for proper relation algebras, this ordering coincides with the set-inclusion order. The minimal elements of this order in A{0}A\setminus\{0\} are called atoms. The set of atoms of 𝐀\bf A is denoted by A0A_{0}. A tuple (x,y,z)(A0)3(x,y,z)\in(A_{0})^{3} is called an allowed triple if zxyz\leq x\circ y. Otherwise, (x,y,z)(x,y,z) is called a forbidden triple and in this case z¯xy¯=1\overline{z}\cup\overline{x\circ y}=1. We say that a relational AA-structure 𝔅\mathfrak{B} induces a forbidden triple (from 𝐀\mathbf{A}) if there exists b1,b2,b3Bb_{1},b_{2},b_{3}\in B and (x,y,z)(A0)3(x,y,z)\in(A_{0})^{3} such that x(b1,b2),y(b2,b3)x(b_{1},b_{2}),y(b_{2},b_{3}) and z(b1,b3)z(b_{1},b_{3}) hold and (x,y,z)(x,y,z) is a forbidden triple. Note that a representation of 𝐀\bf A does not induce a forbidden triple.

Definition 2.3.

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA}. An 𝐀\mathbf{A}-network (V;f)(V;f) is a finite set VV together with a partial function f:EV2Af\colon E\subseteq V^{2}\rightarrow A, where EE is the domain of ff. An 𝐀\mathbf{A}-network (V;f)(V;f) is satisfiable in a representation 𝔅\mathfrak{B} of 𝐀\bf A if there exists an assignment s:VBs\colon V\rightarrow B such that for all (x,y)E(x,y)\in E the following holds:

(s(x),s(y))f(x,y)𝔅.(s(x),s(y))\in f(x,y)^{\mathfrak{B}}.

An 𝐀\mathbf{A}-network (V;f)(V;f) is satisfiable if there exists a representation 𝔅\mathfrak{B} of 𝐀\mathbf{A} such that (V;f)(V;f) is satisfiable in 𝔅\mathfrak{B}.

~{}\circ~{} Id~{}\operatorname{Id}~{} a~{}a~{} b~{}b~{}
Id\operatorname{Id} Id\operatorname{Id} aa bb
aa aa Idb\operatorname{Id}\cup b aba\cup b
bb bb aba\cup b Idab\operatorname{Id}\cup a\cup b
Figure 1: Multiplication table of the representable relation algebra #17\#17.

We give an example of an instance of the NSP\operatorname{NSP} for a representable relation algebra. The numbering of the representable relation algebra is by [AM94].

Example 2.4 (An instance of NSP\operatorname{NSP} of representable relation algebra #17\#17).

Let 𝐀\mathbf{A} be the symmetric representable relation algebra with the set of atoms {Id,a,b}\{\operatorname{Id},a,b\} and the values for the composition operation \circ on these atoms be given by Table 1. Note that this determines the composition operation on the whole domain of 𝐀\mathbf{A}, which is the following set:

A={,Id,a,b,Ida,Idb,ab,Idab}.A=\{\emptyset,\operatorname{Id},a,b,\operatorname{Id}\cup a,\operatorname{Id}\cup b,a\cup b,\operatorname{Id}\cup a\cup b\}.

Let V:={x1,x2,x3}V:=\{x_{1},x_{2},x_{3}\} be a set. Consider the map f:V2Af\colon V^{2}\rightarrow A given by

f(xi,xi)=Id for all i{1,2,3}\displaystyle f(x_{i},x_{i})=\operatorname{Id}\text{~{}~{}for all }i\in\{1,2,3\}
f(x1,x2)=f(x2,x1)=a\displaystyle f(x_{1},x_{2})=f(x_{2},x_{1})=a
f(x1,x3)=f(x3,x1)=Ida\displaystyle f(x_{1},x_{3})=f(x_{3},x_{1})=\operatorname{Id}\cup a
f(x2,x3)=f(x3,x2)=ba.\displaystyle f(x_{2},x_{3})=f(x_{3},x_{2})=b\cup a.

The tuple (V;f)(V;f) is an example of an instance of NSP\operatorname{NSP} of 𝐀RRA\mathbf{A}\in\operatorname{RRA}.

We will in the following assume that for an 𝐀\mathbf{A}-network (V;f)(V;f) it holds that f(V2)A{0}f(V^{2})\subseteq A\setminus\{0\}. Otherwise, (V;f)(V;f) is not satisfiable. Note that every 𝐀\mathbf{A}-network (V;f)(V;f) can be viewed as an AA-structure \mathfrak{C} on the domain VV: for all x,yVx,y\in V and aAa\in A the relation a(x,y)a^{\mathfrak{C}}(x,y) holds if and only if f(x,y)=af(x,y)=a.

Definition 2.5.

The (general) network satisfaction problem for a finite representable relation algebra 𝐀\mathbf{A}, denoted by NSP(𝐀)\operatorname{NSP}(\bf A), is the problem of deciding whether a given 𝐀\mathbf{A}-network is satisfiable.

2.3 Normal Representations and CSPs

In this section we consider a subclass of RRA\operatorname{RRA} introduced by Hirsch in 1996. For representable relation algebras 𝐀\bf A from this class, NSP(𝐀)\operatorname{NSP}(\bf A) corresponds naturally to a constraint satisfaction problem (CSP). In the last two decades a rich and fruitful theory emerged to analyse the computational complexity of CSPs. We use this theory to obtain results about the computational complexity of NSPs.

In the following let 𝐀\mathbf{A} be in RRA\operatorname{RRA}. An 𝐀\mathbf{A}-network (V;f)(V;f) is called closed (transitively closed in the work by [Hir97]) if it is total and for all x,y,zVx,y,z\in V it holds that f(x,x)Idf(x,x)\leq\operatorname{Id}, f(x,y)=f(y,x)f(x,y)=f(y,x)^{\smile}, and f(x,z)f(x,y)f(y,z)f(x,z)\leq f(x,y)\circ f(y,z). It is called atomic if the range of ff only contains atoms from 𝐀\mathbf{A}.

Definition 2.6 (from [Hir96]).

Let 𝔅\mathfrak{B} be a representation of 𝐀\mathbf{A}. Then 𝔅\mathfrak{B} is called

  • \bullet

    fully universal, if every atomic closed 𝐀\mathbf{A}-network is satisfiable in 𝔅\mathfrak{B};

  • \bullet

    square, if 1𝔅=B21^{\mathfrak{B}}=B^{2};

  • \bullet

    homogeneous, if for every isomorphism between finite substructures of 𝔅\mathfrak{B} there exists an automorphism of 𝔅\mathfrak{B} that extends this isomorphism;

  • \bullet

    normal, if it is fully universal, square and homogeneous.

Definition 2.7.

Let τ\tau be a relational signature. A first-order formula φ(x1,,xn)\varphi(x_{1},\ldots,x_{n}) is called primitive positive (pp) if it has the form

xn+1,,xm.(φ1φs)\exists x_{n+1},\ldots,x_{m}.(\varphi_{1}\wedge\cdots\wedge\varphi_{s})

where φ1,,φs\varphi_{1},\ldots,\varphi_{s} are atomic formulas, i.e., formulas of the form R(y1,,yl)R(y_{1},\ldots,y_{l}) for RτR\in\tau and yi{x1,,xm}y_{i}\in\{x_{1},\ldots,x_{m}\}, of the form y=yy=y^{\prime} for y,y{x1,xm}y,y^{\prime}\in\{x_{1},\ldots x_{m}\}, or of the form false.

As usual, formulas without free variables are called sentences. A relational structure is called connected if it is not the disjoint union of two structures. A connected component of a relational structure \mathfrak{C} is a substructure 𝔅\mathfrak{B} of \mathfrak{C} that is maximal with respect to domain inclusion and is connected. For every primitive positive τ\tau-sentence φ\varphi with variable set XX the canonical database D(φ)D(\varphi) is defined as the τ\tau-structure on XX where xXmx\in X^{m} is in the relation RD(φ)R^{D(\varphi)} for RτR\in\tau if and only if R(x)R(x) is a conjunct from φ\varphi. Conversely every relational τ\tau-structure 𝔄\mathfrak{A} induces a primitive positive τ\tau-sentence on the variable set AA, the so-called conjunctive query, simply by taking the conjunction all atomic formulas that hold in 𝔄\mathfrak{A}. We say that the primitve positive τ\tau-sentences φ1,,φn\varphi_{1},\ldots,\varphi_{n} are the connected components of a primitive positive τ\tau-sentence φ\varphi if they are the conjunctive queries of the connected components of the canonical database D(φ)D(\varphi).

Definition 2.8.

Let τ\tau be a finite relational signature and let 𝔅\mathfrak{B} be a τ\tau-structure. Then the constraint satisfaction problem of 𝔅\mathfrak{B} (CSP(𝔅))(\operatorname{CSP}(\mathfrak{B})) is the computational problem of deciding whether a given primitive positive τ\tau-sentence holds in 𝔅\mathfrak{B}.

Consider the following translation which associates to each 𝐀\mathbf{A}-network (V;f)(V;f) a primitive positive AA-sentences φ\varphi as follows: the variables of φ\varphi are the elements of VV and φ\varphi contains for every (x,y)(x,y) in the domain of ff the conjunct a(x,y)a(x,y) if and only if f(x,y)=af(x,y)=a holds. For the other direction let φ\varphi be an AA-sentence with variable set XX and consider the 𝐀\mathbf{A}-network (X;f)(X;f) with the following definition: for every x,yXx,y\in X, if (x,y)(x,y) does not appear in any conjunct from φ\varphi we leave f(x,y)f(x,y) undefined, otherwise let a1(x,y),,an(x,y)a_{1}(x,y),\ldots,a_{n}(x,y) all the conjuncts from φ\varphi that contain (x,y)(x,y). We compute in 𝐀\mathbf{A} the element a:=a1ana:=a_{1}\cap\ldots\cap a_{n} and define f(x,y):=af(x,y):=a.

The following theorem, which subsumes the connection between network satisfaction problems and constraint satisfaction problems is based on this natural 1-to-1 correspondence between 𝐀\mathbf{A}-networks and AA-sentences.

Theorem 2.9 ([Bod12], see also [BJ17, Bod18]).

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA} be finite. Then the following holds:

  1. 1.

    𝐀\mathbf{A} has a representation 𝔅\operatorname{\mathfrak{B}} such that NSP(𝐀)\operatorname{NSP}(\mathbf{A}) and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) are the same problem up to the translation between 𝐀\mathbf{A}-networks and AA-sentences.

  2. 2.

    If 𝐀\mathbf{A} has a normal representation 𝔅\operatorname{\mathfrak{B}} the problems NSP(𝐀)\operatorname{NSP}(\mathbf{A}) and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) are the same up to the translation between 𝐀\mathbf{A}-networks and AA-sentences.

2.4 Model Theory

Let τ\tau be a finite relational signature. The class of finite τ\tau-structures that embed into a τ\tau-structure 𝔅\mathfrak{B} is called the age of 𝔅\mathfrak{B}, denoted by Age(𝔅)\operatorname{Age}(\mathfrak{B}). If \mathcal{F} is a class of finite τ\tau-structures, then Forb()\textup{Forb}(\mathcal{F}) is the class of all finite τ\tau-structures 𝔄\mathfrak{A} such that no structure from \mathcal{F} embeds into 𝔄\mathfrak{A}. A class 𝒞\mathcal{C} of finite τ\tau structures is called finitely bounded if there exists a finite set of finite τ\tau-structures \mathcal{F} such that 𝒞=Forb(){\mathcal{C}}=\textup{Forb}(\mathcal{F}) (see, e.g., [Mac11]). The structures from \mathcal{F} are called bounds or forbidden substructures. It is easy to see that a class 𝒞\mathcal{C} of τ\tau-structures is finitely bounded if and only if it is axiomatisable by a universal τ\tau-sentence. A structure 𝔅\mathfrak{B} is called finitely bounded if Age(𝔅)\operatorname{Age}(\mathfrak{B}) is finitely bounded.

Proposition 2.10 ([Bod18]).

Let 𝔅\mathfrak{B} be a normal representation of a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA}. Then the following holds:

  • \bullet

    𝔅\mathfrak{B} is finitely bounded by bounds of size at most three.

  • \bullet

    The A0{Id}A_{0}\setminus\{\operatorname{Id}\}-reduct of 𝔅\mathfrak{B} is finitely bounded by bounds of size at most three.

Definition 2.11.

A class of finite τ\tau-structures has the amalgamation property if for all structures 𝔄,𝔅1,𝔅2𝒞\mathfrak{A},\mathfrak{B}_{1},\mathfrak{B}_{2}\in\mathcal{C} with embeddings e1:𝔄𝔅1e_{1}\colon\mathfrak{A}\rightarrow\mathfrak{B}_{1} and e2:𝔄𝔅2e_{2}\colon\mathfrak{A}\rightarrow\mathfrak{B}_{2} there exist a structure 𝒞\mathfrak{C}\in\mathcal{C} and embeddings f1:𝔅1f_{1}\colon\mathfrak{B}_{1}\rightarrow\mathfrak{C} and f2:𝔅2f_{2}\colon\mathfrak{B}_{2}\rightarrow\mathfrak{C} such that f1e1=f2e2f_{1}\circ e_{1}=f_{2}\circ e_{2}. If additionally f1(B1)f2(B2)=f1(e1(A))=f2(e2(A))f_{1}(B_{1})\cap f_{2}(B_{2})=f_{1}(e_{1}(A))=f_{2}(e_{2}(A)), then we say that 𝒞\mathcal{C} has the strong amalgamation property.

Let 𝔅1,𝔅2\mathfrak{B}_{1},\mathfrak{B}_{2} be τ\tau-structures. Then 𝔅1𝔅2\mathfrak{B}_{1}\cup\mathfrak{B}_{2} is the τ\tau-structure on the domain B1B2B_{1}\cup B_{2} such that R𝔅1𝔅2:=R1𝔅R2𝔅R^{\mathfrak{B}_{1}\cup\mathfrak{B}_{2}}:=R^{\mathfrak{B}}_{1}\cup R^{\mathfrak{B}}_{2} for every RτR\in\tau. If Definition 2.11 holds with :=𝔅1𝔅2\mathfrak{C}:=\mathfrak{B}_{1}\cup\mathfrak{B}_{2} then we say that 𝒞\mathcal{C} has the free amalgamation property; note that the free amalgamation property implies the strong amalgamation property.

Theorem 2.12 (Fraïssé; see, e.g., [Hod97]).

Let τ\tau be a finite relational signature and let 𝒞\mathcal{C} be a class of finite τ\tau-structures that is closed under taking induced substructures and isomorphisms and has the amalgamation property. Then there exists an up to isomorphism unique countable homogeneous structure 𝔅\mathfrak{B} such that 𝒞=Age(𝔅)\mathcal{C}=\operatorname{Age}(\mathfrak{B}).

Definition 2.13.

Let 𝔅\mathfrak{B} be a relational structure. A set OBnO\subseteq B^{n} is called an nn-orbit of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) if OO is preserved by all αAut(𝔅)\alpha\in\operatorname{Aut}(\mathfrak{B}) and for all x,yOx,y\in O there exists αAut(𝔅)\alpha\in\operatorname{Aut}(\mathfrak{B}) such that α(x)=y\alpha(x)=y.

For a structure 𝔅\mathfrak{B} the automophism group Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) is called transitive if Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) has only one orbit. We want to remark that if 𝔅\mathfrak{B} is a normal representation of a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA} then the 2-orbits of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) are exactly the relations induced by the atoms A0A_{0} of 𝐀\mathbf{A}.

2.5 The Universal-Algebraic Approach

In this section we present basic notions for the so-called universal-algebraic approach to the study of CSP\operatorname{CSP}s.

Definition 2.14.

Let BB be some set. We denote by OB(n)O_{B}^{(n)} the set of all nn-ary operations on BB and by OB:=nOB(n)O_{B}:=\bigcup_{n\in\mathbb{N}}O_{B}^{(n)} the set of all operations on BB. A set 𝒞OB\mathscr{C}\subseteq O_{B} is called an operation clone on BB if it contains all projections of all arities and if it is closed under composition, i.e., for all f𝒞(n):=𝒞OB(n)f\in\mathscr{C}^{(n)}:=\mathscr{C}\cap O_{B}^{(n)} and g1,,gn𝒞OB(s)g_{1},\ldots,g_{n}\in\mathscr{C}\cap O_{B}^{(s)} it holds that f(g1,,gn)𝒞f(g_{1},\ldots,g_{n})\in\mathscr{C}, where f(g1,,gn)f(g_{1},\ldots,g_{n}) is the ss-ary function defined as follows

f(g1,,gn)(x1,,xs):=f(g1(x1,,xs),,gn(x1,,xs)).f(g_{1},\ldots,g_{n})(x_{1},\ldots,x_{s}):=f(g_{1}(x_{1},\ldots,x_{s}),\ldots,g_{n}(x_{1},\ldots,x_{s})).

An operation f:BnBf\colon B^{n}\to B is called conservative if for all x1,,xnBx_{1},\ldots,x_{n}\in B it holds that f(x1,,xn){x1,,xn}.f(x_{1},\ldots,x_{n})\in\{x_{1},\ldots,x_{n}\}. A clone is called conservative if all its operations are conservative. Note that an operation clone 𝒞\mathscr{C} on BB can be considered as an algebra with domain BB and an infinite signature that consists of symbols for all operations in 𝒞\mathscr{C} (cf. Section 2.1). In this sense a conservative operation clone 𝒞\mathscr{C} on BB induces on every set ABA\subseteq B a subalgebra. It is easy to see that this subalgebra corresponds to an operation clone on AA. We call this the restriction of 𝒞\mathscr{C} to AA. We later need the following classical result for clones over a two-element set.

Theorem 2.15 ([Pos41]).

Let 𝒞\mathscr{C} be a conservative operation clone on {0,1}\{0,1\}. Then either 𝒞\mathcal{C} contains only projections, or at least one of the following operations:

  1. 1.

    the binary function min\min,

  2. 2.

    the binary function max\max,

  3. 3.

    the minority function,

  4. 4.

    the majority function.

Operation clones occur naturally as polymorphism clones of relational structures. If x1,,xnBkx_{1},\dots,x_{n}\in B^{k} and f:BnBf\colon B^{n}\to B, then we write f(x1,,xn)f(x_{1},\ldots,x_{n}) for the kk-tuple obtained by applying ff component-wise to the tuples x1,,xnx_{1},\ldots,x_{n}.

Definition 2.16.

Let 𝔅\mathfrak{B} a structure with a finite relational signature τ\tau and let RτR\in\tau. An nn-ary operation preserves a relation R𝔅R^{\mathfrak{B}} if for all x1,,xnR𝔅x_{1},\ldots,x_{n}\in R^{\mathfrak{B}} it holds that

f(x1,,xn)R𝔅.f(x_{1},\ldots,x_{n})\in R^{\mathfrak{B}}.

If ff preserves all relations from 𝔅\mathfrak{B} then ff is called a polymorphism of 𝔅\mathfrak{B}.

In order to provide an additional view on polymorphisms we give the following definition.

Definition 2.17.

Let τ\tau be a relational signature and let 𝔅\mathfrak{B} be a τ\tau-structure. For n+n\in\mathbb{N}_{+} the structure 𝔅n\mathfrak{B}^{n} is the τ\tau-structure on the domain BnB^{n} defined as follows. Let RτR\in\tau be of arity ll. Then

(x1,,xl)R𝔅n:i{1,,n}:(xi1,,xil)R𝔅.(x^{1},\ldots,x^{l})\in R^{\mathfrak{B}^{n}}:\Leftrightarrow\forall i\in\{1,\ldots,n\}:(x^{1}_{i},\ldots,x^{l}_{i})\in R^{\mathfrak{B}}.

It is easy to see that the nn-ary polymorphisms of 𝔅\mathfrak{B} are precicely the homomorphisms from 𝔅n\mathfrak{B}^{n} to 𝔅\mathfrak{B}.

The set of all polymorphisms (of all arities) of a relational structure 𝔅\mathfrak{B} is an operation clone on BB, which is denoted by Pol(𝔅)\operatorname{Pol}(\mathfrak{B}). A Siggers operation is an operation that satisfies the Siggers identity (see Theorem 1.1). The following result can be obtained by combining known results from the literature.

Theorem 2.18 ([Sig10, Bul03]; see also [Bar11, Bul16]).

Let 𝔅\mathfrak{B} be a finite structure with a finite relational signature such that Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) is conservative. Then precisely one of the following holds:

  1. 1.

    There exist distinct a,bBa,b\in B such that for every fPol(𝔅)(n)f\in\operatorname{Pol}(\mathfrak{B})^{(n)} the restriction of ff to {a,b}n\{a,b\}^{n} is a projection. In this case, CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-complete.

  2. 2.

    Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains a Siggers operation; in this case, CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is in P.

We now discuss fundamental results about the universal-algebraic approach for constraint satisfaction problems of structures with an infinite domain.

Theorem 2.19 ([BN06]).

Let 𝔅\mathfrak{B} be a homogeneous structure with finite relational signature. Then a relation is preserved by Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) if and only if it is primitively positively definable in 𝔅\mathfrak{B}.

The following definition is a preparation to formulate the next theorem which is a well-known condition that implies NP-hardness of CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) for homogeneous structures with a finite relational signature.

Definition 2.20.

Let 𝒦\mathcal{K} be a class of algebras. Then we have

  • \bullet

    H(𝒦)\operatorname{H}(\mathcal{K}) is the class of homomorphic images of algebras from 𝒦\mathcal{K} and

  • \bullet

    S(𝒦)\operatorname{S}(\mathcal{K}) is the class of subalgebras of algebras from 𝒦\mathcal{K}.

  • \bullet

    Pfin(𝒦)\operatorname{P^{fin}}(\mathcal{K}) is the class of finite products of algebras from 𝒦\mathcal{K}.

An operation clone 𝒞\mathscr{C} on a set BB can also be seen as an algebra 𝐁\bf B with domain BB whose signature consists of the operations of 𝒞\mathscr{C} such that f𝐁:=ff^{\bf B}:=f for all f𝒞f\in{\mathscr{C}}.

The following is a classical condition for NP-Hardness, see for example Theorem 10 in the survey by [Bod08].

Theorem 2.21.

Let 𝔅\mathfrak{B} be a homogeneous structure with finite relational signature. If HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) contains a 2-element algebra where all operations are projections, then CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-hard.

In the following let 𝐀RRA\bf A\in\operatorname{RRA} be finite and with normal representation 𝔅\mathfrak{B}.

Definition 2.22.

Let a1,,anA0a_{1},\ldots,a_{n}\in A_{0} be atoms of 𝐀\mathbf{A}. Then the 2n2n-ary relation (a1,,an)𝔅(a_{1},\ldots,a_{n})^{\mathfrak{B}} is defined as follows:

(a1,,an)𝔅:={(x1,,xn,y1,,yn)B2ni{1,,n}ai𝔅(xi,yi)}.(a_{1},\ldots,a_{n})^{\mathfrak{B}}:=\big{\{}(x_{1},\dots,x_{n},y_{1},\dots,y_{n})\in B^{2n}\mid\bigwedge_{i\in\{1,\ldots,n\}}a_{i}^{\mathfrak{B}}(x_{i},y_{i})\big{\}}.

An operation f:BnBf\colon B^{n}\rightarrow B is called edge-conservative if it satisfies for all x,yBnx,y\in B^{n} and all a1,,anA0a_{1},\ldots,a_{n}\in A_{0}

(a1,,an)𝔅(x,y)(f(x),f(y))i{1,,n}ai𝔅.(a_{1},\ldots,a_{n})^{\mathfrak{B}}(x,y)\Rightarrow(f(x),f(y))\in\bigcup_{i\in\{1,\ldots,n\}}a_{i}^{\mathfrak{B}}.

Note that for every DA0D\subseteq A_{0} the structure 𝔅\mathfrak{B} contains the relation aiDai𝔅\bigcup_{a_{i}\in D}a_{i}^{\mathfrak{B}}. Therefore the next proposition follows immediately since polymorphisms of 𝔅\mathfrak{B} preserve all relations of 𝔅\mathfrak{B}.

Proposition 2.23.

All polymorphisms of 𝔅\mathfrak{B} are edge-conservative.

Definition 2.24.

Let XA0X\subseteq A_{0}. An operation f:BnBf\colon B^{n}\rightarrow B is called XX-canonical (with respect to 𝔅\mathfrak{B}) if there exists a function f¯:XnA0\bar{f}\colon X^{n}\rightarrow A_{0} such that for all a,bBna,b\in B^{n} and O1,,OnXO_{1},\ldots,O_{n}\in X, if (ai,bi)Oi(a_{i},b_{i})\in O_{i} for all i{1,,n}i\in\{1,\ldots,n\} then (f(a),f(b))f¯(O1,,On)𝔅.(f(a),f(b))\in\bar{f}(O_{1},\dots,O_{n})^{\mathfrak{B}}. An operation ff is called canonical (with respect to 𝔅\mathfrak{B}) if it is A0A_{0}-canonical. In this case we say that the behaviour f¯\bar{f} is total. If XA0X\subsetneq A_{0} we call f¯\bar{f} a partial behaviour. The function f¯\bar{f} is called the behaviour of ff on XX. If X=A0X=A_{0} then f¯\bar{f} is just called the behaviour of ff.

We denote by Polcan(𝔅)\operatorname{Pol^{can}}(\mathfrak{B}) the set of all polymorphisms of 𝔅\mathfrak{B} that are canonical with respect to 𝔅\mathfrak{B}. It will always be clear from the context what the domain of a behaviour f¯\bar{f} is. An operation f:S2Sf\colon S^{2}\to S is called symmetric if for all x,ySx,y\in S it holds that f(x,y)=f(y,x)f(x,y)=f(y,x). An XX-canonical function ff is called XX-symmetric if the behaviour of ff on XX is symmetric.

2.6 Ramsey Theory and Canonisation

We avoid giving an introduction to Ramsey theory, since the only usage of the Ramsey property is via Theorem 2.26, and rather refer to the survey by [Bod15] for an introduction.

Let 𝔄\mathfrak{A} be a homogeneous τ\tau-structure such that Age(𝔄)\operatorname{Age}({\mathfrak{A}}) has the strong amalgamation property. Then the class of all (τ{<})(\tau\cup\{<\})-structures 𝔄\mathfrak{A} such that <𝔄<^{\mathfrak{A}} is a linear order and whose τ\tau-reduct (i.e. the structure on the same domain, but only with the relations that are denoted by symbols from τ\tau, see e.g. the book by [Hod97]) is from Age(𝔄)\operatorname{Age}({\mathfrak{A}}) is a strong amalgamation class, too (see e.g. [Bod15]). By Theorem 2.12 there exists an up to isomorphism unique countable homogeneous structure of that age, which we denote by 𝔄<\mathfrak{A}_{<}. It can be shown by a straightforward back-and-forth argument that 𝔄<\mathfrak{A}_{<} is isomorphic to an expansion of 𝔄\mathfrak{A}, so we identify the domain of 𝔄\mathfrak{A} and of 𝔄<\mathfrak{A}_{<} along this isomorphism, and call 𝔄<\mathfrak{A}_{<} the expansion of 𝔄\mathfrak{A} by a generic linear order.

Theorem 2.25 ([NR89, HN16]).

Let 𝔄{\mathfrak{A}} be a relational τ\tau-structure such that Age(𝔄)\operatorname{Age}({\mathfrak{A}}) has the free amalgamation property. Then the expansion of 𝔄{\mathfrak{A}} by a generic linear order has the Ramsey property.

The following theorem gives a connection of the Ramsey property with the existence of canonical functions and plays a key role in our analysis.

Theorem 2.26 ([BP21]).

Let 𝔅\mathfrak{B} be a countable homogeneous structure with finite relational signature and the Ramsey property. Let h:BkBh\colon B^{k}\rightarrow B be an operation and let L:={(x1,,xk)α(h(β1(x1),,βk(xk))α,β1,βkAut(𝔅)}.L:=\big{\{}(x_{1},\dots,x_{k})\mapsto\alpha(h(\beta_{1}(x_{1}),\ldots,\beta_{k}(x_{k}))\mid\alpha,\beta_{1}\ldots,\beta_{k}\in\operatorname{Aut}(\mathfrak{B})\big{\}}.

Then there exists a canonical operation g:BkBg\colon B^{k}\rightarrow B such that for every finite FBF\subset B there exists gLg^{\prime}\in L such that g|Fk=g|Fkg^{\prime}|_{F^{k}}=g|_{F^{k}}.

Remark 2.27.

Let 𝔄\mathfrak{A} and 𝔅\mathfrak{B} be homogeneous structures with finite relational signatures. If 𝔄\mathfrak{A} and 𝔅\mathfrak{B} have the same domain and the same automorphism group, then 𝔄\mathfrak{A} has the Ramsey property if and only if 𝔅\mathfrak{B} has it (see, e.g., [Bod15]).

3 Representable Relation Algebras with a Flexible Atom

In this section we define the concept of a flexible atom and show how to reduce the classification problem for the network satisfaction problem for a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom to the situation where 𝐀\mathbf{A} is additionally integral (Proposition 3.3). A finite representable relation algebra 𝐀\mathbf{A} is called integral if the element Id\operatorname{Id} is an atom of 𝐀\mathbf{A} (cf. [Mad06b]).

Then we show that an integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom has a normal representation. Therefore, the universal-algebraic approach is applicable; in particular, we make heavy use of polymorphisms and their connection to primitive positive definability in later sections (cf. Theorem 2.19). Furthermore, we prove that every normal representation of a finite representable relation algebra with a flexible atom has a Ramsey expansion (Section 3.2). Therefore, the tools from Section 2.6 can be applied, too. Finally we give some examples of representable relation algebras with a flexible atom (Section 3.3). We start with the definition of a flexible atom.

Definition 3.1.

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA} and let I:={aAaId}I:=\{a\in A\mid a\leq\operatorname{Id}\}. An atom sA0Is\in A_{0}\setminus I is called flexible if for all a,bAIa,b\in A\setminus I it holds that sabs\leq a\circ b.

This definition can for example be found in the book by [HH02, Chapter 11, Exercise 1]. Note that this definition does not require the representable relation algebra 𝐀\mathbf{A} to be integral. This is slightly more general than the definition by [Mad94, Mad06b]. As mentioned before, we show in the following section that it is sufficient for our result to classify the computational complexity of NSP\operatorname{NSP}s for finite representable relation algebras with a flexible atom that are additionally integral. This means that readers who prefer this second definition by [Mad94, Mad06b] (assuming integrality) can perfectly skip the following section and read the article with this other definition in mind. In this case representable relation algebras with a flexible atom are always implicitly integral.

3.1 Integral Representable Relation Algebras

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA} and let I:={aAaId}I:=\{a\in A\mid a\leq\operatorname{Id}\}. The atoms in IA0I\cap A_{0} are called identity atoms. Therefore, 𝐀\mathbf{A} is integral if and only if 𝐀\mathbf{A} has exactly one identity atom. The first claim of the following lemma is a well-known fact about atoms of representable relation algebras. This fact is used to prove a second claim about representable relation algebras with a flexible atom. In simple terms, this claim states that a representation of a non-integral representable relation algebra with a flexible atom is only “square” on precisely those elements that are in one certain identity atom.

Lemma 3.2.

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA} be finite. Then there exists for every atom ss a unique e1A0e_{1}\in A_{0} with 0<e1Id0<e_{1}\leq\operatorname{Id} such that s=e1ss=e_{1}\circ s. Furthermore, if ss is a flexible atom then for all e2A0e_{2}\in A_{0} with 0<e2Id0<e_{2}\leq\operatorname{Id} and e2e1e_{2}\not=e_{1} we have that e2Id¯=0e_{2}\circ\overline{\operatorname{Id}}=0.

Proof.

Note that Ids=s\operatorname{Id}\circ s=s by definition and therefore esse\circ s\subseteq s for all eA0e\in A_{0} with 0<eId0<e\leq\operatorname{Id}. Since ss is an atom either es=0e\circ s=0 or es=se\circ s=s. By Id={eA00<eId}\operatorname{Id}=\bigcup\{e\in A_{0}\mid 0<e\leq\operatorname{Id}\} and Ids=s\operatorname{Id}\circ s=s there exists at least one 0<eId0<e\leq\operatorname{Id} with es=se\circ s=s. In the next step we prove uniqueness of such an element ee. Assume for contradiction that there exist distinct e1,e2A0e_{1},e_{2}\in A_{0} with 0<e1Id0<e_{1}\leq\operatorname{Id} and 0<e2Id0<e_{2}\leq\operatorname{Id} such that e1s=se_{1}\circ s=s and e2s=se_{2}\circ s=s. Note that e1e2=0e_{1}\circ e_{2}=0 since e1e_{1} and e2e_{2} are identity atoms. Therefore, we get

0=0s=(e1e2)s=e1(e2s)=e1s=s,0=0\circ s=(e_{1}\circ e_{2})\circ s=e_{1}\circ(e_{2}\circ s)=e_{1}\circ s=s,

which is a contradiction since ss is an atom. This proves the first statement.

For the second statement assume for contradiction that there exists e2A0{e1}e_{2}\in A_{0}\setminus\{e_{1}\} such that e2Ide_{2}\leq\operatorname{Id} and e2Id¯0e_{2}\circ\overline{\operatorname{Id}}\not=0. Let aa be an atom with ae2Id¯a\leq e_{2}\circ\overline{\operatorname{Id}}. Since e1e2=0e_{1}\circ e_{2}=0 we get e1ae1(e2Id¯)=(e1e2)Id¯=0Id¯=0e_{1}\circ a\leq e_{1}\circ(e_{2}\circ\overline{\operatorname{Id}})=(e_{1}\circ e_{2})\circ\overline{\operatorname{Id}}=0\circ\overline{\operatorname{Id}}=0. Since ss is a flexible atom it holds that saas\leq a\circ a^{\smile} and therefore

s=e1se1(aa)=(e1a)a=0a=0,s=e_{1}\circ s\leq e_{1}\circ(a\circ a^{\smile})=(e_{1}\circ a)\circ a^{\smile}=0\circ a^{\smile}=0,

which is a contradiction. ∎

Proposition 3.3.

Let 𝐀RRA\mathbf{A}\in\operatorname{RRA} be finite and with a flexible atom. Then there exists a finite integral 𝐀RRA\mathbf{A}^{\prime}\in\operatorname{RRA} with a flexible atom such that the following statements hold:

  1. 1.

    There exists a polynomial-time many-one reduction from NSP(𝐀)\operatorname{NSP}(\mathbf{A}) to NSP(𝐀)\operatorname{NSP}(\mathbf{A}^{\prime}).

  2. 2.

    There exists a polynomial-time many-one reduction from NSP(𝐀)\operatorname{NSP}(\mathbf{A}^{\prime}) to NSP(𝐀)\operatorname{NSP}(\mathbf{A}).

  3. 3.

    The atom structure of 𝐀\mathbf{A} has a polymorphism that satisfies the Siggers identity if and only if the atom structure of 𝐀\mathbf{A}^{\prime} has such a polymorphism (see Definition 4.1).

Proof.

If 𝐀\bf A is integral there is nothing to be shown. So assume that 𝐀\mathbf{A} is not integral and let ss be a flexible atom. Let 𝔅\mathfrak{B} be a representation of 𝐀\mathbf{A} such that NSP(𝐀)\operatorname{NSP}(\mathbf{A}) and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) are the same problem up to the translation between 𝐀\mathbf{A}-networks and AA-sentences. Such a representation exists by Theorem 2.9. Let (x,y)Id¯𝔅(x,y)\in\overline{\operatorname{Id}}^{\mathfrak{B}} and let e1A0e_{1}\in A_{0} be the unique element with e1Ide_{1}\leq\operatorname{Id} and s=e1ss=e_{1}\circ s that exists by Lemma 3.2. The second statement of Lemma 3.2 implies e1Id¯=Id¯e_{1}\circ\overline{\operatorname{Id}}=\overline{\operatorname{Id}} and therefore we have that (x,x)e1𝔅(x,x)\in e_{1}^{\mathfrak{B}} and (y,y)e1𝔅(y,y)\in e_{1}^{\mathfrak{B}}. Let \mathfrak{C}^{\prime} be the substructure of 𝔅\mathfrak{B} on the domain {xB(x,x)e1𝔅}\{x\in B\mid(x,x)\in e_{1}^{\mathfrak{B}}\}. The set of relations of \mathfrak{C}^{\prime} clearly induces a proper relation algebra which is integral. We denote this representable relation algebra by 𝐀\mathbf{A}^{\prime}. Note that we can also consider AA^{\prime} as a subset of AA. Let 𝔅\mathfrak{B^{\prime}} be the representation of 𝐀\mathbf{A}^{\prime} such that NSP(𝐀)\operatorname{NSP}(\mathbf{A}^{\prime}) and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}^{\prime}) are the same problem up to the translation between 𝐀\mathbf{A}^{\prime}-networks and AA^{\prime}-sentences. As before, such a representation exists by Theorem 2.9.

Proof of 1.: Note that if a connected instance of CSP(𝔅)\operatorname{CSP}(\operatorname{\mathfrak{B}}) is satisfiable, then either all variables are mapped to an atom from the subset of A0A_{0} that corresponds to A0A^{\prime}_{0} or all variables are mapped to one element xx with e(x,x)e^{*}(x,x) and e{eA0eId and ee1}e^{*}\in\{e\in A_{0}\mid e\leq\operatorname{Id}\text{~{}and~{}}e\not=e_{1}\}. This leads to the following polynomial-time many-one reduction from CSP(𝔅)\operatorname{CSP}(\operatorname{\mathfrak{B}}) to CSP(𝔅)\operatorname{CSP}(\operatorname{\mathfrak{B}}^{\prime}), which proves together with Theorem 2.9 the claim that there exists a polynomial-time many-one reduction from NSP(𝐀)\operatorname{NSP}(\mathbf{A}) to NSP(𝐀)\operatorname{NSP}(\mathbf{A}^{\prime}). Consider the following algorithm: For a given primitive positive AA-sentence φ\varphi it computes the connected components φ1,,φn\varphi_{1},\ldots,\varphi_{n} (see paragraph after Definition 2.7). Then it checks for every i{1,,n}i\in\{1,\ldots,n\} whether there exists e{eA0eId and ee1}e^{*}\in\{e\in A_{0}\mid e\leq\operatorname{Id}\text{~{}and~{}}e\not=e_{1}\} such that for every conjunct a(x,y)a(x,y) of φi\varphi_{i} it holds that eae^{*}\leq a. Let I{1,,n}I\subseteq\{1,\ldots,n\} be the set of indices for which this is not the case. Then the algorithm defines new AA^{\prime}-sentences φi\varphi_{i}^{\prime} from φi\varphi_{i} for every iIi\in I by replacing every conjunct a(x,y)a(x,y) with a(x,y)a^{\prime}(x,y) where a:=a{eA0eId and ee1}a^{\prime}:=a\setminus\{e\in A_{0}\mid e\leq\operatorname{Id}\text{~{}and~{}}e\not=e_{1}\}. Let φ\varphi^{\prime} be the conjunction of all φi\varphi_{i}^{\prime} for iIi\in I.

It is easy to see that φ\varphi^{\prime} is computable from φ\varphi in polynomial time and that φ\varphi is a satisfiable instance of CSP(𝔅)\operatorname{CSP}(\operatorname{\mathfrak{B}}) if and only if φ\varphi^{\prime} is a satisfiable instance of CSP(𝔅)\operatorname{CSP}(\operatorname{\mathfrak{B}}^{\prime}).

Proof of 2.: Consider now an 𝐀\mathbf{A}^{\prime}-network (V;f)(V;f^{\prime}). We claim that (V;f)(V;f^{\prime}) is satisfiable as an 𝐀\mathbf{A}^{\prime}-network if and only if it is satisfiable as an 𝐀\mathbf{A}-network. Suppose that (V;f)(V;f^{\prime}) is satisfiable in a representation 𝔇\mathfrak{D}^{\prime} of 𝐀\mathbf{A}^{\prime} by an assignment α\alpha. Let yiy_{i} be fresh elements for every atom eiIde_{i}\leq\operatorname{Id} with eie1e_{i}\not=e_{1}. We build the disjoint union of 𝔇\mathfrak{D}^{\prime} with one-element {ei}\{e_{i}\}-structures ({yi};{(yi,yi)})(\{y_{i}\};\{(y_{i},y_{i})\}) and then close the structure under union and intersection of binary relations. This results in a representation of 𝐀\mathbf{A} that satisfies (V;f)(V;f^{\prime}) again by the assignment α\alpha. For the other direction, if (V;f)(V;f^{\prime}) is satisfiable in a representation 𝔇\mathfrak{D} of 𝐀\mathbf{A} we can again consider the substructure on the domain (x,x)e1𝔇(x,x)\in e_{1}^{\mathfrak{D}} and get a representation of 𝐀\mathbf{A}^{\prime} that satisfies (V;f)(V;f^{\prime}).

Proof of 3.: Let gg be a polymorphism of the atom structure of 𝐀\mathbf{A} that satisfies the Siggers identity. By assumption gg satisfies

x1,,x6A0.g(x1,,x6){x1,x6}\forall x_{1},\ldots,x_{6}\in A_{0}.~{}g(x_{1},\ldots,x_{6})\in\{x_{1},\ldots x_{6}\}

and therefore the restriction of gg to (A0A)6(A_{0}\cap A^{\prime})^{6} is a polymorphism of the atom structure of 𝐀\mathbf{A}^{\prime} .

For the other direction choose an arbitrary ordering of the atoms {eA0eId and ee1}={l1,,lj}\{e\in A_{0}\mid e\leq\operatorname{Id}\text{~{}and~{}}e\not=e_{1}\}=\{l_{1},\ldots,l_{j}\}. If gg is a Siggers polymorphism of the atom structure of 𝐀\mathbf{A}^{\prime} one can extend gg to an operation g:A6Ag^{*}\colon A^{6}\rightarrow A by defining

g(x1,,x6):={min({l1,,lj}{x1,,x6}) if {l1,,lj}{x1,,x6},g(x1,,x6)otherwise.g^{*}(x_{1},\ldots,x_{6}):=\left\{\begin{array}[]{ll}\min(\{l_{1},\ldots,l_{j}\}\cap\{x_{1},\ldots,x_{6}\})&\text{~{}if~{}}\{l_{1},\ldots,l_{j}\}\cap\{x_{1},\ldots,x_{6}\}\not=\emptyset,\\ g(x_{1},\ldots,x_{6})&\,\text{otherwise.}\\ \end{array}\right.

It is easy to see that this operation satisfies also the Siggers identity. Furthermore, since every atom ee from {eA0eId and ee1}\{e\in A_{0}\mid e\leq\operatorname{Id}\text{~{}and~{}}e\not=e_{1}\} is only contained in allowed triples of the form (e,e,e)(e,e,e) it follows that ff^{*} preserves the allowed triples from 𝐀\mathbf{A} (see after Definition 4.1).

3.2 Normal Representations

Let 𝐀RRA\mathbf{A\in\operatorname{RRA}} be for the rest of the section finite, integral, and with a flexible atom ss. We consider the following subset of AA:

As:={aAsa}.A-s:=\{a\in A\mid s\not\leq a\}.

Let (V,g)(V,g) be an 𝐀\mathbf{A}-network and let \mathfrak{C} be the corresponding AA-structure (see paragraph before Definition 2.5). Let s\mathfrak{C}-s be the (As)(A-s)-structure on the same domain VV as \mathfrak{C} such that for all x,yVx,y\in V and a(As){0}a\in(A-s)\setminus\{0\} we have

as(x,y) if and only if (a(x,y)(as)(x,y)).a^{\mathfrak{C}-s}(x,y)\text{~{} if and only if ~{}}(a^{\mathfrak{C}}(x,y)\vee(a\cup s)^{\mathfrak{C}}(x,y)).

We call s\mathfrak{C}-s the ss-free companion of an 𝐀\mathbf{A}-network (V,f)(V,f).

The next lemma follows directly from the definitions of flexible atoms and ss-free companions.

Lemma 3.4.

Let 𝒞\mathcal{C} be the class of ss-free companions of atomic closed 𝐀\mathbf{A}-networks. Then 𝒞\mathcal{C} has the free amalgamation property.

Proof.

Let 𝔄,𝔅1,\mathfrak{A},\mathfrak{B}_{1}, and 𝔅2\mathfrak{B}_{2} be structures in 𝒞\mathcal{C} with embeddings e1:𝔄𝔅1e_{1}\colon\mathfrak{A}\rightarrow\mathfrak{B}_{1} and e2:𝔄𝔅2e_{2}\colon\mathfrak{A}\rightarrow\mathfrak{B}_{2}. Since ss is a flexible atom and 𝒞\mathcal{C} is a class of ss-free companions we get that the structure :=𝔅1𝔅2\mathfrak{C}:=\mathfrak{B}_{1}\cup\mathfrak{B}_{2} is in 𝒞\mathcal{C}. Therefore, the natural embeddings f1:𝔅1f_{1}\colon\mathfrak{B}_{1}\rightarrow\mathfrak{C} and f2:𝔅2f_{2}\colon\mathfrak{B}_{2}\rightarrow\mathfrak{C} prove the free amalgamation property of 𝒞\mathcal{C}. ∎

As a consequence of this lemma we obtain the following.

Proposition 3.5.

𝐀\mathbf{A} has a normal representation 𝔅\mathfrak{B}.

Proof.

Let 𝒞\mathcal{C} be the class from Lemma 3.4. This class is closed under taking substructures and isomorphisms. By Lemma 3.4 it also has the amalgamation property and therefore we get by Theorem 2.12 a homogeneous structure 𝔅\mathfrak{B}^{\prime} with Age(𝔅)=𝒞\operatorname{Age}(\mathfrak{B}^{\prime})=\mathcal{C}. Let 𝔅′′\mathfrak{B}^{\prime\prime} be the expansion of 𝔅\mathfrak{B}^{\prime} by the following relation

s(x,y):aA0{s}¬a𝔅(x,y).s(x,y):\Leftrightarrow\bigwedge_{a\in A_{0}\setminus\{s\}}\neg a^{\mathfrak{B}^{\prime}}(x,y).

Let 𝔅\mathfrak{B} be the (homogeneous) expansion of 𝔅′′\mathfrak{B}^{\prime\prime} by all Boolean combinations of relations from 𝔅′′{\mathfrak{B}}^{\prime\prime}. Then 𝔅{\mathfrak{B}} is a representation of 𝐀RRA\mathbf{A}\in\operatorname{RRA}. Since Age(𝔅)\operatorname{Age}(\mathfrak{B}^{\prime}) is the class of all atomic closed 𝐀\mathbf{A}-networks, 𝔅\mathfrak{B} is fully universal. The definition of ss witnesses that 𝔅\mathfrak{B} is a square representation of 𝐀{\bf A}: for all elements x,yBx,y\in B there exists an atom aA0a\in A_{0} such that a𝔅(x,y)a^{\mathfrak{B}}(x,y) holds. ∎

The next theorem is another consequence of Lemma 3.4.

Theorem 3.6.

Let 𝔅\mathfrak{B} be a normal representation of 𝐀\mathbf{A}. Let 𝔅<\mathfrak{B}_{<} be the expansion of 𝔅\mathfrak{B} by a generic linear order. Then 𝔅<\mathfrak{B}_{<} has the Ramsey property.

Proof.

Let 𝔅\mathfrak{B}^{\prime} be the (A0{s})(A_{0}\setminus\{s\})-reduct of 𝔅\mathfrak{B}. The age of this structure has the free amalgamation property by Lemma 3.4. Therefore, Theorem 2.25 implies that the expansion of 𝔅\mathfrak{B}^{\prime} by a generic linear order has the Ramsey property. By Remark 2.27 the structure 𝔅<\mathfrak{B}_{<} also has the Ramsey property since 𝔅<\mathfrak{B}_{<} and (𝔅)<(\mathfrak{B}^{\prime})_{<} have the same automorphism group. ∎

Remark 3.7.

The binary first-order definable relations of 𝔅<\mathfrak{B}_{<} form a proper relation algebra since 𝔅<\mathfrak{B}_{<} has quantifier-elimination (see [Hod97]). By the definition of the generic order the atoms of this proper relation algebra are of the following form

  • \bullet

    a𝔅<<𝔅<a^{\mathfrak{B}_{<}}\cap<^{\mathfrak{B}_{<}} for aA0{Id}a\in A_{0}\setminus\{\operatorname{Id}\}, or

  • \bullet

    a𝔅<>𝔅<a^{\mathfrak{B}_{<}}\cap>^{\mathfrak{B}_{<}} for aA0{Id}a\in A_{0}\setminus\{\operatorname{Id}\}, or

  • \bullet

    Id\operatorname{Id},

where the relation >𝔅<>^{\mathfrak{B}_{<}} consists of all tuples (x,y)(x,y) such that (y,x)<𝔅<(y,x)\in<^{\mathfrak{B}_{<}} holds.

3.3 Examples

~{}\circ~{} Id~{}\operatorname{Id}~{} a~{}a~{} b~{}b~{}
Id\operatorname{Id} Id\operatorname{Id} aa bb
aa aa {Id,a,b}\{\operatorname{Id},a,b\} {a,b}\{a,b\}
bb bb {a,b}\{a,b\} {Id,a,b}\{\operatorname{Id},a,b\}
~{}\circ~{} Id~{}\operatorname{Id}~{} a~{}a~{} b~{}b~{}
Id\operatorname{Id} Id\operatorname{Id} aa bb
aa aa {Id,b}\{\operatorname{Id},b\} {a,b}\{a,b\}
bb bb {a,b}\{a,b\} {Id,a,b}\{\operatorname{Id},a,b\}
Figure 2: Multiplication tables of representable relation algebras #18\#18 (left) and #17\#17 (right).

We give two concrete examples of finite integral symmetric representable relation algebras with a flexible atom (Examples 3.8 and 3.9), and a systematic way of building such algebras from arbitrary representable relation algebras (Example 3.10). The numbering of the algebras in the examples is by [AM94].

Example 3.8 (Representable relation algebra #18\#18).

The representable relation algebra #18\#18 has three atoms, namely the identity atom Id\operatorname{Id} and two symmetric atoms aa and bb. The multiplication table for the atoms is given in Fig. 2. In this representable relation algebra the atoms aa and bb are flexible. Consider the countable, homogeneous, undirected graph =(V;E)\mathfrak{R}=(V;E^{\mathfrak{R}}), whose age is the class of all finite undirected graphs (see, e.g., [Hod97]), also called the Random graph. The expansion of \mathfrak{R} by all binary first-order definable relations is a normal representation of the algebra #18\#18. In this representation the atoms aa and bb are interpreted as the relation EE^{\mathfrak{R}} and the relation NN^{\mathfrak{R}}, where NN^{\mathfrak{R}} is defined as ¬E(x,y)xy\neg E(x,y)\wedge x\not=y.

Example 3.9 (Representable relation algebra #17\#17).

The representable relation algebra #17\#17 also consists of three symmetric atoms. The multiplication table in Fig. 2 shows that in this algebra the element bb is a flexible atom. To see that aa is not a flexible atom, note that aaa={Id,b}a\not\leq a\circ a=\{\operatorname{Id},b\}. Let 𝔑=(V;E𝔑)\mathfrak{N}=(V;E^{\mathfrak{N}}) be the countable, homogeneous, undirected graph, whose age is the class of all finite undirected graphs that do not embed the complete graph on three vertices (see, e.g., [Hod97]). This structure is called a Henson graph. If we expand 𝔑\mathfrak{N} by all binary first-order definable relations we get a normal representation of the algebra #17\#17. To see this note that we interpret aa as the relation E𝔑E^{\mathfrak{N}}. That 𝔑\mathfrak{N} is triangle free, i.e. triangles of E𝔑E^{\mathfrak{N}} are forbidden, matches with the fact that aaaa\not\leq a\circ a holds in the representable relation algebra.

Example 3.10.

Consider an arbitrary finite, integral 𝐀=(A;,¯,0,1,Id,,)RRA\mathbf{A}=(A;\cup,\bar{},0,1,\operatorname{Id},^{\smile},\circ)\in\operatorname{RRA}. Clearly 𝐀\mathbf{A} does not have a flexible atom ss in general. Nevertheless we can expand the domain of 𝐀\mathbf{A} to implement an “artificial” flexible atom.

Let ss be some symbol not contained in AA. Let us mention that every element in 𝐀\mathbf{A} can uniquely be written as a union of atoms from A0A_{0}. Let AA^{\prime} be the set of all subsets of A0{s}A_{0}\cup\{s\}. The set AA^{\prime} is the domain of our new algebra 𝐀\mathbf{A}^{\prime}. Note that on AA^{\prime} there exists the subset-ordering and AA^{\prime} is closed under set-union and complement (in A0{s}A_{0}\cup\{s\}) We define ss to be symmetric and therefore get the following unary function in 𝐀\mathbf{A}^{\prime} as follows. For an element xAx\in A^{\prime} we define

x:={y{s} if x=y{s} for yA,xotherwise.x^{*}:=\left\{\begin{array}[]{ll}y^{\smile}\cup\{s\}&\text{~{}if~{}}x=y\cup\{s\}\text{~{}for~{}}y\in A,\\ x^{\smile}&\,\text{otherwise.}\\ \end{array}\right.

The new function symbol A\circ_{A}^{\prime} in 𝐀\mathbf{A}^{\prime} is defined on the atoms A0{s}A_{0}\cup\{s\} as follows:

xAy:={A0{s} if {s}={x,y},(A0{Id}){s} if {s,a}={x,y} for aA0{s,Id},{a} if {Id,a}={x,y} for aA0{s},(xy){s}otherwise.x\circ_{A^{\prime}}y:=\left\{\begin{array}[]{ll}A_{0}\cup\{s\}&\text{~{}if~{}}\{s\}=\{x,y\},\\ (A_{0}\setminus\{\operatorname{Id}\})\cup\{s\}&\text{~{}if~{}}\{s,a\}=\{x,y\}\text{~{}for~{}}a\in A_{0}\setminus\{s,\operatorname{Id}\},\\ \{a\}&\text{~{}if~{}}\{\operatorname{Id},a\}=\{x,y\}\text{~{}for~{}}a\in A_{0}\cup\{s\},\\ (x\circ y)\cup\{s\}&\,\text{otherwise.}\\ \end{array}\right.

One can check that 𝐀=(A;,¯,,A0{s},Id,,A)\mathbf{A}^{\prime}=(A^{\prime};\cup,\bar{},\emptyset,A_{0}\cup\{s\},\operatorname{Id},^{*},\circ_{A^{\prime}}) is a finite integral representable relation algebra with a flexible atom ss. Note that the forbidden triples of 𝐀\mathbf{A}^{\prime} are exactly those of 𝐀\mathbf{A} together with triples which are permutations of (s,a,Id)(s,a,\operatorname{Id}) for some aA0a\in A_{0}.

4 Polynomial-time Tractability

In this section we introduce for every finite 𝐀RRA\mathbf{A}\in\operatorname{RRA} an associated finite structure, called the atom structure of 𝐀\bf A. Note that it is closely related, but not the same, as the type structure introduced by [BM16]. In the context of relation algebras the atom structure has the advantage that its domain is the set of atoms of 𝐀\mathbf{A}, rather than the set of 3-types, which would be the domain of the type structure of [BM16]; hence, our domain is smaller and has some advantages on which the main result of this section (Proposition 4.4) is based. Up to a some differences in the signature, our atom structure is the same as the atom structure introduced by [Lyn50] which was used there for different purposes (see also [Mad82, HH01, HJK19]).

Let 𝔅\mathfrak{B} be a normal representation of a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA}. We will reduce CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) to the CSP\operatorname{CSP} of the atom structure of 𝐀\bf A. This means that if the CSP\operatorname{CSP} of the atom structure is in P, then so are CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) and NSP(𝐀)\operatorname{NSP}(\bf A). For our main result we will show later that every network satisfaction problem for a finite integral symmetric representable relation algebra with a flexible atom that cannot be solved in polynomial time by this method is NP-complete.

Definition 4.1.

The atom structure of 𝐀RRA\bf A\in\operatorname{RRA} is the finite relational structure 𝔒\mathfrak{O} with domain A0A_{0} and the following relations:

  • \bullet

    for every xAx\in A the unary relation x𝔒:={aA0ax}x^{\mathfrak{O}}:=\{a\in A_{0}\mid a\leq x\},

  • \bullet

    the binary relation E𝔒:={(a1,a2)A02a1=a2}E^{\mathfrak{O}}:=\{(a_{1},a_{2})\in A_{0}^{2}\mid a_{1}^{\smile}=a_{2}\},

  • \bullet

    the ternary relation H𝔒:={(a1,a2,a3)A03a3a1a2}H^{\mathfrak{O}}:=\{(a_{1},a_{2},a_{3})\in A_{0}^{3}\mid a_{3}\leq a_{1}\circ a_{2}\}.

Note that the relation H𝔒H^{\mathfrak{O}} consists of the allowed triples of 𝐀RRA\bf A\in\operatorname{RRA}. We say that an operation preserves the allowed triples if it preserves the relation H𝔒H^{\mathfrak{O}}.

Proposition 4.2.

Let 𝔅\mathfrak{B} be a fully universal representation of a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA}. There is a polynomial-time reduction from CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) to CSP(𝔒)\operatorname{CSP}(\mathfrak{O}).

Proof.

Let Ψ\Psi be an instance of CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) with variable set X={x1,,xn}X=\{x_{1},\ldots,x_{n}\}. We construct an instance Φ\Phi of CSP(𝔒)\operatorname{CSP}(\mathfrak{O}) as follows. The variable set YY of Φ\Phi is given by Y:={(xi,xj)X2ij}Y:=\{(x_{i},x_{j})\in X^{2}\mid i\leq j\}. The constraints of Φ\Phi are of the two kinds:

  1. 1.

    Let aAa\in A be an element of 𝐀RRA\mathbf{A}\in\operatorname{RRA} and let a((xi,yj))a((x_{i},y_{j})) be an atomic formula of Ψ\Psi. If i<ji<j, then we add the atomic (unary) formula a((xi,xj))a((x_{i},x_{j})) to Φ\Phi; otherwise we add the atomic formula a((xj,xi))a^{\smile}((x_{j},x_{i})). If j=ij=i we additionally add Id((xi,xj))\operatorname{Id}((x_{i},x_{j})).

  2. 2.

    Let xi,xj,xlXx_{i},x_{j},x_{l}\in X be such that ijli\leq j\leq l. Then we add the atomic formula
    H((xi,xj),(xj,xl),(xi,xl))H((x_{i},x_{j}),(x_{j},x_{l}),(x_{i},x_{l})) to Φ\Phi.

It remains to show that this reduction is correct. Let s:XBs\colon X\rightarrow B be a satisfying assignment for Ψ\Psi. This assignment maps every pair of variables xix_{i} and xjx_{j} to a unique atom in A0A_{0} and therefore induces a map s:YA0s^{\prime}\colon Y\rightarrow A_{0}. The map ss^{\prime} clearly satisfies all atomic formulas introduced by (1.). To see that it also satisfies all formulas introduced by (2.) note that ss maps the elements xi,xj,xlXx_{i},x_{j},x_{l}\in X to a substructure of 𝔅\mathfrak{B}, which does not induces a forbidden triple.

For the other direction assume that s:YA0s^{\prime}\colon Y\rightarrow A_{0} is a satisfying assignment for Φ\Phi. This induces an AA-structure 𝔛\mathfrak{X} on XX (maybe with some identification of variables) as follows: we add (xi,xj)(x_{i},x_{j}) to the relation a𝔛a^{\mathfrak{X}} if iji\leq j and s((xi,xj))=as^{\prime}((x_{i},x_{j}))=a; if otherwise j<ij<i and s((xj,xi))=as^{\prime}((x_{j},x_{i}))=a we add (xi,xj)(x_{i},x_{j}) to the relation (a)𝔛(a^{\smile})^{\mathfrak{X}}. It is clear that no forbidden triple from 𝐀\mathbf{A} is induced by 𝔛\mathfrak{X}. Also note that 𝔛\mathfrak{X} satisfies Ψ\Psi by the choice of the (unary) constraints of the first kind. Since 𝔅\mathfrak{B} is a fully universal representation the structure 𝔛\mathfrak{X} is a substructure of 𝔅\mathfrak{B}. Hence, the instance Ψ\Psi is satisfiable in 𝔅\mathfrak{B}. ∎

The atom structure has another property which is fundamental for our proof of Theorem 1. Recall that every canonical polymorphism ff induces a behaviour f¯:A0nA0\bar{f}\colon A_{0}^{n}\rightarrow A_{0}. In the next proposition we show that then f¯\bar{f} is a polymorphism of 𝔒\mathfrak{O}. Moreover the other direction also holds. Every gPol(𝔒)g\in\operatorname{Pol}(\mathfrak{O}) is the behaviour of a canonical polymorphism of 𝔅\mathfrak{B}.

Proposition 4.3.

Let 𝔅\mathfrak{B} be a normal representation of a finite 𝐀RRA\mathbf{A}\in\operatorname{RRA}.

  1. 1.

    Let gPol(𝔅)(n)g\in\operatorname{Pol}(\mathfrak{B})^{(n)} be canonical and let g¯:A0nA0\overline{g}\colon A_{0}^{n}\rightarrow A_{0} be its behaviour. Then g¯Pol(𝔒)(n)\overline{g}\in\operatorname{Pol}(\mathfrak{O})^{(n)}.

  2. 2.

    Let fPol(𝔒)(n)f\in\operatorname{Pol}(\mathfrak{O})^{(n)}. Then there exists a canonical gPol(𝔅)(n)g\in\operatorname{Pol}(\mathfrak{B})^{(n)} whose behaviour equals ff.

Proof.

For (1): Let gPol(𝔅)(n)g\in\operatorname{Pol}(\mathfrak{B})^{(n)} be canonical and let c1,,cnH𝔒c^{1},\ldots,c^{n}\in H^{\mathfrak{O}}. Then by the definition of H𝔒H^{\mathfrak{O}} there exist tuples x1,,xnB3x^{1},\ldots,x^{n}\in B^{3} such that for all i{1,,n}i\in\{1,\ldots,n\} we have

c1i𝔅(x1i,x2i),c2i𝔅(x2i,x3i), and c3i𝔅(x1i,x3i).{c_{1}^{i}}^{\mathfrak{B}}(x^{i}_{1},x^{i}_{2}),~{}{c_{2}^{i}}^{\mathfrak{B}}(x^{i}_{2},x^{i}_{3}),\textup{~{}and~{}}{c_{3}^{i}}^{\mathfrak{B}}(x^{i}_{1},x^{i}_{3}).

We apply the canonical polymorphism gg and get y:=g(x1,,xn)B3y:=g(x^{1},\ldots,x^{n})\in B^{3}. Then there exists an allowed triple (d1,d2,d3)A03(d_{1},d_{2},d_{3})\in A_{0}^{3} such that

d1𝔅(y1,y2),d2𝔅(y2,y3), and d3𝔅(y1,y3).d_{1}^{\mathfrak{B}}(y_{1},y_{2}),~{}d_{2}^{\mathfrak{B}}(y_{2},y_{3}),\text{~{}and~{}}d_{3}^{\mathfrak{B}}(y_{1},y_{3}).

We have that d=(d1,d2,d3)H𝔒d=(d_{1},d_{2},d_{3})\in H^{\mathfrak{O}} and by the definition of the behaviour of a canonical function we get g¯(c1,,cn)=d\overline{g}(c^{1},\ldots,c^{n})=d. The other relations in 𝔒\mathfrak{O} are preserved trivially and therefore g¯Pol(𝔒)(n)\overline{g}\in\operatorname{Pol}(\mathfrak{O})^{(n)} .

For (2): Since 𝔅\mathfrak{B} is fully universal and homogeneous it follows by a compactness argument (see e.g., Lemma 2 by [BD13]) that every countable A0A_{0}-structure which does not induce a forbidden triple and is square has a homomorphism to 𝔅\mathfrak{B}. It is therefore enough to show that every operation h:BnBh\colon B^{n}\rightarrow B with behaviour ff does not induce a forbidden triple in the image. Let x1,,xnB3x^{1},\ldots,x^{n}\in B^{3} be such that the application of a canonical function with behaviour ff on x1,,xnx^{1},\ldots,x^{n} would give a tuple yB3y\in B^{3} with d=(d1,d2,d3)A03d=(d_{1},d_{2},d_{3})\in A_{0}^{3} such that

d1𝔅(y1,y2),d2𝔅(y2,y3), and d3𝔅(y1,y3).d_{1}^{\mathfrak{B}}(y_{1},y_{2}),\;d_{2}^{\mathfrak{B}}(y_{2},y_{3}),\text{~{}and~{}}d_{3}^{\mathfrak{B}}(y_{1},y_{3}).

Since ff preserves H𝔒H^{\mathfrak{O}} the triple dd is not forbidden. ∎

Recall from Proposition 2.23 that polymorphisms of 𝔅\mathfrak{B} are edge-conservative. Note that this implies that polymorphisms of 𝔒\mathfrak{O} are conservative. In fact, Theorem 2.18 and the Proposition 4.3 imply the following.

Proposition 4.4.

If Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains a canonical polymorphism ss whose behaviour s¯\overline{s} is a Siggers operation in Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) then CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is in P.

We demonstrate how this result can be used to prove polynomial-time tractability of NSP(𝐀)\operatorname{NSP}(\mathbf{A}) for a symmetric, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom.

Example 4.5 (Polynomial-time tractability the NSP of representable relation algebra #18\#18).

The polynomial-time tractability of the NSP of the representable relation algebra #18\#18 (see Example 3.8) was first shown by [CH04] (see also Section 8.4 of [BP15]). Here we consider the following function s¯:{Id,a,b}6{Id,a,b}\bar{s}\colon\{\operatorname{Id},a,b\}^{6}\rightarrow\{\operatorname{Id},a,b\}.

s¯(x1,,x6):={a if a{x1,,x6},b if b{x1,,x6} and a{x1,,x6},Id otherwise.\bar{s}(x_{1},\ldots,x_{6}):=\left\{\begin{array}[]{ll}a&\text{~{}if~{}}a\in\{x_{1},\ldots,x_{6}\},\\ b&\text{~{}if~{}}b\in\{x_{1},\ldots,x_{6}\}\text{~{}and~{}}a\not\in\{x_{1},\ldots,x_{6}\},\\ \operatorname{Id}&\text{~{}otherwise.}\end{array}\right.

Let \mathfrak{R}^{\prime} be the normal representation of the algebra #18\#18 given in Example 3.8. Note that s¯\bar{s} is the behaviour of an injective, canonical polymorphism of \mathfrak{R}. The injectivity follows from the last line of the definition; if s¯(x1,,x6)=Id\bar{s}(x_{1},\ldots,x_{6})=\operatorname{Id} then {x1,,x6}={Id}\{x_{1},\ldots,x_{6}\}=\{\operatorname{Id}\}. Therefore s¯\bar{s} preserves all allowed triples, since in the algebra #18\#18 the only forbidden triples involve Id\operatorname{Id}. One can check that s¯\bar{s} is a Siggers operation and therefore we get by Proposition 4.4 that NSP(#18)\operatorname{NSP}(\#18) is in P.

Example 4.6.

Consider the construction of representable relation algebras with a flexible atom from Example 3.10. It is easy to see that NSP(𝐀)\operatorname{NSP}(\mathbf{A}) for a finite integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} has a polynomial-time reduction to NSP(𝐀)\operatorname{NSP}(\mathbf{A^{\prime}}) where 𝐀\mathbf{A^{\prime}} is the representable relation algebra with a flexible atom that is constructed in Example 3.10. We get as a consequence that if a normal representation of 𝐀\mathbf{A^{\prime}} satisfies the condition of Proposition 4.4 then NSP(𝐀)\operatorname{NSP}(\mathbf{A}) is in P.

Theorem 2.18 has additionally to Proposition 4.4 another important consequence.

Corollary 4.7.

If Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) does not have a Siggers operation then there exist elements a1,a2A0a_{1},a_{2}\in A_{0} such that the restriction of every operation from Pol(𝔒)(n)\operatorname{Pol}(\mathfrak{O})^{(n)} to {a1,a2}n\{a_{1},a_{2}\}^{n} is a projection.

5 Network Consistency Problems

The purpose of this section is to give an additional perspective on the class of network satisfaction problems of finite symmetric integral representable relation algebras with a flexible atom. Even more, we define these computational problems in this section completely without the use of the relation algebra framework. Our classification result for these problems does not depend on the content of this section and the reader may skip it.

We introduce a class of computational decision problems which we call network consistency problems (NCPs). It is easy to see that NCPs are in a 1-to-1 correspondence with NSPs of finite, symmetric, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom.

Definition 5.1.

Let AA be a finite set and RA3R\subseteq A^{3}. Then RR is called totally symmetric if for all bijections π:{1,2,3}{1,2,3}\pi\colon\{1,2,3\}\rightarrow\{1,2,3\} we have

(a1,a2,a3)R(aπ(1),aπ(2),aπ(3))R.(a_{1},a_{2},a_{3})\in R~{}\Rightarrow~{}(a_{\pi(1)},a_{\pi(2)},a_{\pi(3)})\in R.

We call an element pAp\in A identity element if for all x,yAx,y\in A the following holds:

(p,x,y)Rx=y.(p,x,y)\in{R}\Leftrightarrow x=y.

A structure (A;R)(A;R) is called a stencil if RR is totally symmetric and it contains an identity element.

Definition 5.2.

Let (G;F)(G;F) be an undirected graph and let QQ be a set. We call a map c:FQc\colon F\rightarrow Q an edge QQ-coloring of (G;F)(G;F) if for all x,yGx,y\in G with (x,y)F(x,y)\in F it holds that c((x,y))=c((y,x))c((x,y))=c((y,x)).

For each fixed stencil, we define an NCP as follows.

Definition 5.3.

Let (A,R)(A,R) be a stencil. The network completion problem of (A,R)(A,R), denoted by NCP(A,R)\operatorname{NCP}(A,R), is the following problem. Given a finite undirected graph (G;F)(G;F) with an edge 𝒫(A)\mathcal{P}(A)-coloring ff the task is to decide whether there exists an edge AA-coloring ff^{\prime} of (G;F)(G;F) such that

  1. 1.

    for all x,yGx,y\in G with (x,y)F(x,y)\in F it holds that f((x,y))f((x,y))f^{\prime}((x,y))\in f((x,y)).

  2. 2.

    for all x,y,zGx,y,z\in G with (x,y),(y,z),(x,z)F(x,y),(y,z),(x,z)\in F we have

    (f((x,y)),f((y,z)),f((x,z)))R.(f^{\prime}((x,y)),f^{\prime}((y,z)),f^{\prime}((x,z)))\in R.

The following proposition illustrates how NCPs correspond to a certain class of NSPs.

Proposition 5.4.

The class of NCPs and the class of NSPs for finite symmetric integral representable relation algebras with a flexible atom are in a natural 1-to-1 correspondence such that corresponding problems are polynomial-time equivalent.

Proof.

Let (A,R)(A^{\prime},R^{\prime}) be a stencil with pAp\in A^{\prime} according to (2) in Definition 5.1 and let ss be new element with sAs\not\in A^{\prime}. We define a relational structure 𝔇\mathfrak{D} as follows. The domain of 𝔇\mathfrak{D} is the set A{s}A^{\prime}\cup\{s\}. We assume that 𝔇\mathfrak{D} has every subset of its domain as a unary relation. Furthermore 𝔇\mathfrak{D} contains the binary relation E𝔇:={(x,x)xA{s}}E^{\mathfrak{D}}:=\{(x,x)\mid x\in A^{\prime}\cup\{s\}\} and the ternary relation H𝔇H^{\mathfrak{D}} which is defined as follows:

(x,y,z)H𝔇:\displaystyle(x,y,z)\in H^{\mathfrak{D}}:\Leftrightarrow ((x,y,z)R\displaystyle~{}\bigl{(}(x,y,z)\in R^{\prime}
(s{x,y,z}p{x,y,z})\displaystyle~{}\vee(s\in\{x,y,z\}\wedge p\not\in\{x,y,z\})
((x,y,z){(p,s,s),(s,p,s),(s,s,p)})).\displaystyle~{}\vee((x,y,z)\in\{(p,s,s),(s,p,s),(s,s,p)\})\bigr{)}.

One can find a finite symmetric integral algebra 𝐀RRA\mathbf{A}\in\operatorname{RRA} with domain 𝒫(A{s})\mathcal{P}(A^{\prime}\cup\{s\}) and a flexible atom ss such that 𝔇\mathfrak{D} is the atom structure of 𝐀\mathbf{A} (see, e.g., Theorem 2.2 and Theorem 2.6 in the article by [Mad82]).

Furthermore, given a finite symmetric integral algebra 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom ss let 𝔇\mathfrak{D} be the atom structure of 𝐀\mathbf{A}. Let (A;R)(A^{\prime};R^{\prime}) be the substructure of the {R}\{R\}-reduct of 𝔇\mathfrak{D} induced by D{s}D\setminus\{s\}. By the properties of 𝔇\mathfrak{D} we get that (A;R)(A^{\prime};R^{\prime}) is a stencil.

We show that the instances of NCP(A,R)\operatorname{NCP}(A^{\prime},R^{\prime}) and NSP(𝐀)\operatorname{NSP}(\mathbf{A}) are in a natural 1-to-1 correspondence that preserves the acceptance condition of the computational problems. Let (G;F)(G;F) be a finite undirected graph with an edge 𝒫(A)\mathcal{P}(A^{\prime})-coloring ff. We define an 𝐀\mathbf{A}-network (G;g)(G;g) by defining

g(x,y)={f(x,y)(x,y)F,{p}(x,y)F and x=y{s}else.g(x,y)=\left\{\begin{array}[]{ll}f(x,y)&~{}~{}(x,y)\in F,\\ \{p\}&~{}~{}(x,y)\not\in F\text{~{}and~{}}x=y\\ \{s\}&~{}~{}\,\textrm{else.}\\ \end{array}\right.

It is easy to see that (G;F)(G;F) is an accepted instance of NCP(A,R)\operatorname{NCP}(A^{\prime},R^{\prime}) if and only if (G;g)(G;g) is an accepted instance of NSP(𝐀)\operatorname{NSP}(\mathbf{A}). Since we can reverse this and find for every 𝐀\mathbf{A}-network (G;g)(G;g) a finite undirected graph (G;F)(G;F) with an edge 𝒫(A)\mathcal{P}(A^{\prime})-coloring ff such that each of them is an accepted instance if and only if the other one is. These to reductions show that the computational decision problems NCP(A,R)\operatorname{NCP}(A^{\prime},R^{\prime}) and NSP(𝐀)\operatorname{NSP}(\mathbf{A}) are polynomial-time equivalent.

We end this section by providing a rich source of examples for NCP\operatorname{NCP}s.

Example 5.5 (“Distance problems”).

Let AA\subset\mathbb{Q} be an arbitrary finite set that contains 0. We define the relation RA3R\subseteq A^{3} of all tuples which satisfy all instantiations of the triangle inequality, i.e.

(a1,a2,a3)R:(a1a2+a3)(a2a1+a3)(a3a1+a2),(a_{1},a_{2},a_{3})\in R~{}:\Leftrightarrow~{}(a_{1}\leq a_{2}+a_{3})~{}\wedge~{}(a_{2}\leq a_{1}+a_{3})~{}\wedge~{}(a_{3}\leq a_{1}+a_{2}),

where the addition is meant to be the usual one on rational numbers. The relation RR is by definition totally symmetric and the element 0 is an identity element. Therefore, (A;R)(A;R) is a stencil.

Now consider a finite undirected graph (G;F)(G;F) with an edge 𝒫(A)\mathcal{P}(A)-coloring ff. This can be seen as a labeling of each edge in the graph by a set of possible (or allowed) distances. The computational task of NCP(A,R)\operatorname{NCP}(A,R) is to decide whether one can choose for each edge (x,y)(x,y) one of the possible distance such that in the end this choice satisfies on each triangle of edges the triangle inequalities of metric spaces.

By Proposition 5.4 there exists a finite symmetric integral algebra 𝐀RRA\mathbf{A^{\prime}}\in\operatorname{RRA} with a flexible atom ss such that NCP(A,R)\operatorname{NCP}(A,R) and NSP(𝐀)\operatorname{NSP}(\mathbf{A^{\prime}}) are polynomial-time equivalent. By the proof of Proposition 5.4 we have that the domain of 𝐀\mathbf{A^{\prime}} is equal to 𝒫(A{s})\mathcal{P}(A\cup\{s\}). It is easy to observe that A{s}A\cup\{s\} is the set of atoms A0A^{\prime}_{0} from 𝐀\mathbf{A^{\prime}}.

We define an operation f:A06A0f\colon{A^{\prime}_{0}}^{6}\rightarrow A^{\prime}_{0} as follows:

f(x1,,x6)={ss{x1,,x6},max{x1,,x6}otherwise,f(x_{1},\ldots,x_{6})=\left\{\begin{array}[]{ll}s&~{}~{}s\in\{x_{1},\ldots,x_{6}\},\\ \max\{x_{1},\ldots,x_{6}\}&~{}~{}\text{otherwise},\\ \end{array}\right.

where the max\max operation is the usual from in \mathbb{Q}.

The allowed triples of 𝐀\mathbf{A^{\prime}} are, up to triples that involve the flexible atom ss, those which arise from valid triangle inequalities. For this reason the operation ff preserves the allowed triples of 𝐀\mathbf{A^{\prime}}. Moreover, one can check that ff satisfies the Siggers identity. This implies that all these “distance problems” satisfy the first condition in Theorem 1.1 and are therefore solvable by a polynomial-time algorithm. Furthermore, if the normal representation of 𝐀\bf{A}^{\prime} induces a proper relation algebra 𝐀\bf{A} on the set AA, then 𝐀\bf{A} is a representable relation algebra with a normal representation. This follows from Proposition 2.7.4 in the thesis of [Con15] (see also [DLPS07]), since the composition operation of 𝐀\bf{A} is associative. We get that if the representable relation algebra 𝐀\bf{A} exists then the argument from Example 3.10 implies that NSP(𝐀)\operatorname{NSP}(\bf{A}) is also in P.

6 Binary Injective Polymorphisms

We give in this section a proof of the following proposition.

Proposition 6.1.

Let 𝔅\mathfrak{B} be a normal representation of a finite, symmetric, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom ss. If HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) does not contain a 2-element algebra where all operations are projections, then 𝔅\mathfrak{B} has a binary injective polymorphism.

This statement is a consequence of well known results that can be found in the book by [Bod21] and results by [MP20] applied to the class of normal representations of finite, symmetric, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom ss. An operation fPol(𝔅)f\in\operatorname{Pol}(\mathfrak{B}) is called essentially unary if it depends on at most one of its variables and ff is called essential otherwise.

Following the terminology of [MP20], we now define free 2-orbits. The existence of a free 2-orbit appeared under the name ‘orbital extension property’ for example in the habilitation thesis of [Bod12].

Definition 6.2.

Let 𝔅\mathfrak{B} be a structure. A 2-orbit OO of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) is called free if for all elements x,yBx,y\in{B} there exists zBz\in B with (z,x)O(z,x)\in O and (z,y)O(z,y)\in O.

Note that if Aut(𝔅)\operatorname{Aut}({\mathfrak{B}}) has a free 2-orbit then it is transitive. The following theorem generalises a fact that was first proved for first-order reducts of (;<)({\mathbb{Q}};<) by [BK09].

Proposition 6.3 (Lemma 5.3.10 in [Bod12]).

Let 𝔅\mathfrak{B} be a structure such that 𝔅\mathfrak{B} has a free 2-orbit. If Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains an essential operation then it contains a binary essential operation.

The following is essentially taken from the article by [MP20].

Definition 6.4.

Let 𝔅\mathfrak{B} be a structure. Then the canonical binary structure of 𝔅\mathfrak{B} is the structure with domain BB and a binary relation for each 2-orbit OO of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) such that (x,y)O(x,y)\in O implies xyx\neq y.

Definition 6.5.

A τ\tau-structure 𝔅\mathfrak{B} has finite duality if there exists a finite set \mathcal{F} of finite τ\tau-structures such that a τ\tau-structure \mathfrak{I} has a homomorphism to 𝔅\mathfrak{B} if and only if no element of \mathcal{F} has a homomorphism to \mathfrak{I}.

We establish finite duality for the class of structures which is important for our classification purposes.

Lemma 6.6.

Let 𝔅\mathfrak{B} be a normal representation of a finite, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom ss. Then the canonical binary structure of 𝔅\mathfrak{B} has finite duality.

Proof.

Let τ:=A0{Id}\tau:=A_{0}\setminus\{\operatorname{Id}\}. Note that since 𝐀\mathbf{A} is integral and 𝔅\mathfrak{B} is homogeneous, the canonical binary structure \mathfrak{C} of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) is precisely the τ\tau-reduct of 𝔅\mathfrak{B}. Let \mathcal{F} be the set of all τ\tau-structures with domain {1,2,3}\{1,2,3\} that do not have a homomorphism to \mathfrak{C}. We show that the set \mathcal{F} witnesses the finite duality of the canonical binary structure \mathfrak{C} of 𝔅\mathfrak{B}. Let \mathfrak{I} be a τ\tau-structure with a homomorphism to \mathfrak{C}. If there exists 𝔉\mathfrak{F}\in\mathcal{F} with a homomorphism to \mathfrak{I}, then 𝔉\mathfrak{F} also has a homomorphism to \mathfrak{C}, contradicting the choice of \mathcal{F}. For the other direction assume that no element from \mathcal{F} has a homomorphism to \mathfrak{I}. Let \mathfrak{I}^{\prime} be the τ\tau-expansion of the (τ{s})(\tau\setminus\{s\})-reduct of \mathfrak{I} where the relation ss^{\mathfrak{I}^{\prime}} is defined by

s:={(x,y)I2(x,y)s(xyaτ{s}.(x,y)a)}.s^{\mathfrak{I}^{\prime}}:=\{(x,y)\in I^{2}\mid(x,y)\in s^{\mathfrak{I}}\vee(x\neq y\wedge\forall a\in\tau\setminus\{s\}.\,(x,y)\notin a^{\mathfrak{I}})\}.

By the definition of the flexible atom ss it follows that no element from \mathcal{F} has a homomorphism to \mathfrak{I}^{\prime}. This implies that for all distinct elements x,yx,y from \mathfrak{I}^{\prime} the tuple (x,y)(x,y) is in at most one relation from τ\tau. The definition of \mathfrak{I}^{\prime} ensures that (x,y)(x,y) is in at least one relation from τ\tau. Recall that Proposition 2.10 states that \mathfrak{C} is finitely bounded by τ\tau-structures of size at most three. Assume that one of those bounds 𝔑\mathfrak{N} embeds into \mathfrak{I}^{\prime}. This implies by what we noted before that all elements of 𝔑\mathfrak{N} are in precisely one relation from τ\tau. On the other hand 𝔑\mathfrak{N} is not in \mathcal{F} and therefore has a homomorphism to \mathfrak{C}. Since all elements of 𝔑\mathfrak{N} are related by precisely one relation from τ\tau, this homomorphism needs to be a embedding, contradicting our assumption on 𝔑\mathfrak{N} to be a bound. Therefore, none of the bounds of \mathfrak{C} embeds into \mathfrak{I}^{\prime}, which means that \mathfrak{I}^{\prime} is a substructure of \mathfrak{C}. Clearly, there exists a homomorphism from \mathfrak{I} to \mathfrak{I}^{\prime} which proves the lemma. ∎

The following proposition about the existence of injective operations is from [MP20], building on ideas of [BP15] and [BMPP19].

Proposition 6.7 ([MP20]).

Let 𝔅\mathfrak{B} be a homogeneous structure such that Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) is transitive and such that the canonical binary structure of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) has finite duality. If Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains a binary essential operation that preserves \neq then it contains a binary injective operation.

We are now able to prove the main result of this section.

Proof of Proposition 6.1.

Note that since 𝐀\mathbf{A} is integral and 𝔅\mathfrak{B} is homogeneous, the flexible atom ss is a free 2-orbit of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}). Furthermore, Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) is transitive. Suppose that HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) does not contain a 2-element algebra where all operations are projections. Since all operations of Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) are edge conservative, it follows that Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains an operation that does not behave as a projection on {s,Id}\{s,\operatorname{Id}\}. This implies that Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains an essential operation. By Proposition 6.3, Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) must also contain a binary essential operation. Since the canonical binary structure of 𝔅\mathfrak{B} has finite duality by Lemma 6.6 we can apply Proposition 6.7 and get that Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains a binary injective operation. ∎

The following shows how to use Proposition 6.1 to obtain a hardness result for the concrete 𝐀RRA\mathbf{A}\in\operatorname{RRA} from Example 3.9.

Example 6.8 (Hardness of representable relation algebra #17\#17, see [BMPP19, BK20]).

Let 𝔑\mathfrak{N}^{\prime} be the normal representation of the algebra #17\#17 mentioned in Example 3.9. We claim that the structure 𝔑\mathfrak{N}^{\prime} does not have a binary injective polymorphism. To see this, consider a substructure of 𝔑2\mathfrak{N}^{\prime 2} on elements x,y,zV2x,y,z\in V^{2} such that (E,=)(x,y)(E,=)(x,y), (=,E)(y,x)(=,E)(y,x), and (E,E)(x,z)(E,E)(x,z). Assume 𝔑\mathfrak{N}^{\prime} has a binary injective polymorphism ff. This means that f¯(E,Id)=E=f¯(Id,E)\overline{f}(E,\operatorname{Id})=E=\overline{f}(\operatorname{Id},E) holds. Then we get that E(f(x),f(y))E(f(x),f(y)), E(f(y),f(z))E(f(y),f(z)), and E(f(x),f(z)E(f(x),f(z) hold in 𝔑\mathfrak{N}^{\prime}, which is a contradiction, since in 𝔑\mathfrak{N}^{\prime} triangles of this form are forbidden. By the contraposition of Proposition 6.1 it follows that HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) contains a 2-element algebra where all operations are projections. We conclude with Theorem 2.21 that NSP(#17)\operatorname{NSP}(\#17) is an NP-hard problem.

7 From Partial to Total Canonical Behaviour

In this section we prove that in many cases the existence of a polymorphism with a certain partial behaviour implies the existence of a canonical polymorphism with the same partial behaviour. Following this idea we start in Section 7.1 with the proof that the existence of an injective polymorphism implies the existence of a canonical injective polymorphism. In some cases the existence of an {a,b}\{a,b\}-canonical polymorphism implies the existence of a canonical polymorphism with the same behaviour on {a,b}\{a,b\}. We prove this separately for binary (Section 7.2) and ternary (Section 7.3) operations, making use of the binary injective polymorphism that exists by the results from Section 6 and Section 7.1.

Let us remark that most proofs of this section would fail if the representable relation algebra 𝐀\mathbf{A} was not symmetric. Indeed, every representable relation algebra that contains a non-symmetric atom a normal representation would not satisfy Proposition 7.2 below, since the stated behaviour is not well-defined.

We assume for this section that 𝔅\mathfrak{B} is a normal representation of a finite, symmetric, integral 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom ss. Let furthermore 𝔅<\mathfrak{B}_{<} be the expansion of 𝔅\mathfrak{B} by the generic linear order. The structure 𝔅<\mathfrak{B}_{<} exists by the observations in Section 3.2.

Proposition 7.1.

Let fPol(𝔅)(n)f\in\operatorname{Pol}(\mathfrak{B})^{(n)} be injective. Then there exists a polymorphism f<f_{<} of 𝔅<\mathfrak{B}_{<} and an injective endomorphism ee of 𝔅\mathfrak{B} such that

f=ef<f=e\circ f_{<}

as mappings from BnB^{n} to BB.

Proof.

Let U:=f(Bn)U:=f(B^{n}) and consider the substructure 𝔘\mathfrak{U} induced by 𝔅\mathfrak{B} on UU. There exists a linear ordering on BnB^{n}, namely the lexicographic order given by the linear order of 𝔅<\mathfrak{B}_{<} on each coordinate.

Let 𝔘<\mathfrak{U}_{<} be the expansion of 𝔘\mathfrak{U} by the linear order that is induced by the lexicographic linear order of 𝔅<\mathfrak{B}_{<} on the preimage. This is well defined since ff is injective. By the definition of 𝔅<\mathfrak{B}_{<} and a compactness argument the structure 𝔘<\mathfrak{U}_{<} embeds into 𝔅<\mathfrak{B}_{<}. In this way we obtain a homomorphism f<f_{<} from 𝔅<n\mathfrak{B}_{<}^{n} to 𝔅<\mathfrak{B}_{<}. Again by a compactness argument also an endomorphism ee with the desired properties exists. ∎

7.1 Canonical Binary Injective Polymorphisms

We prove in this section that the existence of an injective polymorphism implies the existence of a canonical injective polymorphism. We say that a polymorphism ff of 𝔅<\mathfrak{B}_{<} is canonical with respect to 𝔅<\mathfrak{B}_{<} if ff satisfies Definition 2.24, where the underlying representable relation algebra is the proper relation algebra induced by the binary first-order definable relations (i.e., unions of 2-orbits) of 𝔅<\mathfrak{B}_{<}. Note that in a normal representation the set of 22-orbits equals the set of the interpretations of the atoms of the representable relation algebra.

Proposition 7.2.

Let ff be a binary polymorphism of 𝔅<\mathfrak{B}_{<} that is canonical with respect to 𝔅<\mathfrak{B}_{<}. Let h:A02A0h\colon A_{0}^{2}\rightarrow A_{0} be the map such that for all x,y,zA0x,y,z\in A_{0}

h(x,y)=zf¯(x𝔅<𝔅<,y𝔅<𝔅<)=z𝔅<𝔅<,h(x,y)=z\Leftrightarrow\bar{f}(x^{\mathfrak{B}_{<}}\cap\leq^{\mathfrak{B}_{<}},y^{\mathfrak{B}_{<}}\cap\leq^{\mathfrak{B}_{<}})=z^{\mathfrak{B}_{<}}\cap\leq^{\mathfrak{B}_{<}},

(cf. Remark 3.7). Then hh is well defined and there exists a canonical binary polymorphism of 𝔅\mathfrak{B} with behaviour hh.

Proof.

The function hh is well defined since all atoms are symmetric. We show that there exists a canonical polymorphism of 𝔅\mathfrak{B} that has hh as a behaviour. Consider the following structure 𝔄\mathfrak{A} on the domain B2B^{2}. Let x,yB2x,y\in B^{2} and let a,a1,a2A0a,a_{1},a_{2}\in A_{0} be atoms of 𝐀\mathbf{A} with a1𝔅(x1,y1)a_{1}^{\mathfrak{B}}(x_{1},y_{1}) and a2𝔅(x2,y2)a_{2}^{\mathfrak{B}}(x_{2},y_{2}). Then we define that a𝔄(x,y)a^{\mathfrak{A}}(x,y) holds if and only if h(a1,a2)=ah(a_{1},a_{2})=a.

We show in the following that 𝔄\mathfrak{A} has a homomorphism to 𝔅\mathfrak{B}. This is enough to prove the statement, because a homomorphism from 𝔄\mathfrak{A} to 𝔅\mathfrak{B} is a canonical polymorphism of 𝔅\mathfrak{B}. Since 𝔅\mathfrak{B} is homogeneous is suffices to show that every finite substructure of 𝔄\mathfrak{A} homomorphically maps to 𝔅\mathfrak{B}. Let 𝔉\mathfrak{F} be a finite substructure of 𝔄\mathfrak{A} and assume for contradiction that 𝔉\mathfrak{F} does not homomorphically map to 𝔅\mathfrak{B}. We can view 𝔉\mathfrak{F} as an atomic 𝐀\mathbf{A}-network. Since 𝔅\mathfrak{B} is fully universal 𝔉\mathfrak{F} is not closed. There must exist elements b1,b2,b3B2b^{1},b^{2},b^{3}\in B^{2} of 𝔉\mathfrak{F} and atoms a1,a2,a3A0a_{1},a_{2},a_{3}\in A_{0} such that a1a2a3a_{1}\not\leq a_{2}\circ a_{3} holds in 𝐀\mathbf{A} and

a1𝔉(b1,b3),a2𝔉(b1,b2), and a3𝔉(b2,b3).a_{1}^{\mathfrak{F}}(b^{1},b^{3}),~{}a_{2}^{\mathfrak{F}}(b^{1},b^{2}),\text{~{}and~{}}a_{3}^{\mathfrak{F}}(b^{2},b^{3}).

This means that the substructure induced on the elements b1,b2,b3b^{1},b^{2},b^{3} by 𝔉\mathfrak{F} contains a forbidden triple.

Now we consider the substructures that are induced on b11,b12,b13b_{1}^{1},b_{1}^{2},b_{1}^{3} and b21,b22,b23b_{2}^{1},b_{2}^{2},b_{2}^{3} by 𝔅\mathfrak{B}. Our goal is to order these elements such that for all i,j{1,2,3}i,j\in\{1,2,3\}

¬(b1i<b1jb2i>b2j).\neg(b_{1}^{i}<b_{1}^{j}\wedge b_{2}^{i}>b_{2}^{j}). (1)

If we achieve this we know that there exist elements in 𝔅<\mathfrak{B}_{<} that induce isomorphic copies of the induced structures of the elements b11,b12,b13b_{1}^{1},b_{1}^{2},b_{1}^{3} and b21,b22,b23b_{2}^{1},b_{2}^{2},b_{2}^{3} with the additional ordering. Now the application of the polymorphism ff on these elements results in a structure whose A0A_{0}-reduct is isomorphic to the substructure induced by b1,b2b^{1},b^{2} and b3b^{3} on 𝔉\mathfrak{F} by the definition of the canonical behaviour hh. This contradicts our assumption because a polymorphism can not have a forbidden substructure in its image.

It remains to show that we can choose orderings on the elements b11,b12,b13b_{1}^{1},b_{1}^{2},b_{1}^{3} and b21,b22,b23b_{2}^{1},b_{2}^{2},b_{2}^{3} such that (1) holds. Without loss of generality we can assume that {b11,b12,b13}{b21,b22,b23}=\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}\cap\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}=\emptyset holds. Now consider the following cases:

  1. 1.

    |{b11,b12,b13}|=3|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=3 and |{b21,b22,b23}|=3|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=3.

    We can obviously choose linear orders on both sets such that (1) holds.

  2. 2.

    |{b11,b12,b13}|=2|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=2 and |{b21,b22,b23}|=3|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=3.

    Assume that Id𝔅(b11,b12)\operatorname{Id}^{\mathfrak{B}}(b_{1}^{1},b_{1}^{2}) holds then the possible orders are

    b11=b12<b13 and b21<b22<b23.b_{1}^{1}=b_{1}^{2}<b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}<b_{2}^{2}<b_{2}^{3}.
  3. 3.

    |{b11,b12,b13}|=2|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=2 and |{b21,b22,b23}|=2|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=2.

    First consider the case that Id𝔅(b11,b12)\operatorname{Id}^{\mathfrak{B}}(b_{1}^{1},b_{1}^{2}) and Id𝔅(b21,b22)\operatorname{Id}^{\mathfrak{B}}(b_{2}^{1},b_{2}^{2}) hold. Then we choose as orders

    b11=b12<b13 and b21=b22<b23.b_{1}^{1}=b_{1}^{2}<b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}=b_{2}^{2}<b_{2}^{3}.

    In the second possible case we can assume without loss of generality that Id𝔅(b11,b12)\operatorname{Id}^{\mathfrak{B}}(b_{1}^{1},b_{1}^{2}) and Id𝔅(b22,b23)\operatorname{Id}^{\mathfrak{B}}(b_{2}^{2},b_{2}^{3}) hold. Note that otherwise we could change the role of two of the tuples b1,b2b^{1},b^{2} and b3b^{3} and get this case. The compatible order is then

    b11=b12<b13 and b21<b22=b23.b_{1}^{1}=b_{1}^{2}<b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}<b_{2}^{2}=b_{2}^{3}.
  4. 4.

    |{b11,b12,b13}|=1|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=1 and |{b21,b22,b23}|=3|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=3.
    In this case we choose the order

    b11=b12=b13 and b21<b22<b23.b_{1}^{1}=b_{1}^{2}=b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}<b_{2}^{2}<b_{2}^{3}.
  5. 5.

    |{b11,b12,b13}|=1|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=1 and |{b21,b22,b23}|=2|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=2.
    Assume that Id𝔅(b21,b22)\operatorname{Id}^{\mathfrak{B}}(b_{2}^{1},b_{2}^{2}) holds and that we have

    b11=b12=b13 and b21=b22<b23.b_{1}^{1}=b_{1}^{2}=b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}=b_{2}^{2}<b_{2}^{3}.
  6. 6.

    |{b11,b12,b13}|=1|\{b_{1}^{1},b_{1}^{2},b_{1}^{3}\}|=1 and |{b21,b22,b23}|=1|\{b_{2}^{1},b_{2}^{2},b_{2}^{3}\}|=1.
    For this case we trivially get

    b11=b12=b13 and b21=b22=b23.b_{1}^{1}=b_{1}^{2}=b_{1}^{3}\textup{~{}and~{}}b_{2}^{1}=b_{2}^{2}=b_{2}^{3}.

Note that up to the symmetry of the arguments for both coordinates these are all the possible cases. This completes the proof of the proposition. ∎

Corollary 7.3.

Suppose that 𝔅\mathfrak{B} has a binary injective polymorphism. Then 𝔅\mathfrak{B} also has a canonical binary injective polymorphism.

Proof.

By Proposition 7.1 we may assume that there exists also an injective polymorphism of 𝔅<\mathfrak{B}_{<}. The structure 𝔅<\mathfrak{B}_{<} has the Ramsey property by Theorem 3.6. Therefore, Theorem 2.26 implies that there also exists an injective canonical polymorphism gg of 𝔅<\mathfrak{B}_{<}. According to Proposition 7.2 the restriction of the behaviour g¯\bar{g} to the 2-orbits that satisfy xyx\leq y induces the behaviour of a canonical polymorphism of 𝔅\mathfrak{B} which is also injective. ∎

7.2 Canonical {a,b}\{a,b\}-symmetric Polymorphisms

We will now use the results about binary injective polymorphism from Section 7.1 to show the existence of a canonical {a,b}\{a,b\}-symmetric polymorphism in case there exists an {a,b}\{a,b\}-symmetric polymorphism.

Lemma 7.4.

Let a,bA0{Id}a,b\in A_{0}\setminus\{\operatorname{Id}\} be atoms. Then every binary {a,b}\{a,b\}-symmetric polymorphism of 𝔅\mathfrak{B} is injective.

Proof.

Let ff be an {a,b}\{a,b\}-symmetric polymorphism. Without loss of generality f¯(a,b)=a=f¯(b,a)\bar{f}(a,b)=a=\bar{f}(b,a). Assume for contradiction that ff is not injective. This means that there exist cA0c\in A_{0} and x,yB2x,y\in B^{2} with (c,Id)(x,y)(c,\operatorname{Id})(x,y) (for the notation see Definition 2.22) such that Id(f(x),f(y))\operatorname{Id}(f(x),f(y)) holds.

Case 1: s{a,b}s\not\in\{a,b\}. Since ss is a flexible atom we may choose zB2z\in B^{2} such that (a,b)(z,x)(a,b)(z,x) and (s,b)(z,y)(s,b)(z,y) hold. By the choice of the polymorphism ff we get a(f(z),f(x))a(f(z),f(x)) and (sb)(f(z),f(y))(s\cup b)(f(z),f(y)) which induces either the forbidden triple (Id,s,a)(\operatorname{Id},s,a) or the forbidden triple (Id,b,a)(\operatorname{Id},b,a) on f(x),f(y)f(x),f(y), and f(z)f(z).

Case 2: s=as=a. We choose zB2z\in B^{2} such that (a,b)(z,x)(a,b)(z,x) and (b,b)(z,y)(b,b)(z,y). This is possible since aa is the flexible atom. We obtain a(f(z),f(x))a(f(z),f(x)) and b(f(z),f(y))b(f(z),f(y)) which again induces a forbidden triple on f(x),f(y)f(x),f(y), and f(z)f(z).

Case 3: s=bs=b. We choose zB2z\in B^{2} such that (a,b)(z,x)(a,b)(z,x) and (b,b)(z,y)(b,b)(z,y). This is possible since aa is the flexible atom. We obtain a(f(z),f(x))a(f(z),f(x)) and b(f(z),f(y))b(f(z),f(y)) which again induces a forbidden triple on f(x),f(y)f(x),f(y), and f(z)f(z).

Since we obtained in all cases a contradiction we conclude that ff is injective.∎

Proposition 7.5.

Let a,bA0{Id}a,b\in A_{0}\setminus\{\operatorname{Id}\} be atoms. If 𝔅\mathfrak{B} has a binary {a,b}\{a,b\}-symmetric polymorphism, then 𝔅\mathfrak{B} has also a binary canonical {a,b}\{a,b\}-symmetric polymorphism.

Proof.

Let ff be the binary {a,b}\{a,b\}-symmetric polymorphism. By Lemma 7.4 we know that ff is injective. By Proposition 7.1 it induces a polymorphism f<f_{<} on 𝔅<\mathfrak{B}_{<}. The structure 𝔅<\mathfrak{B}_{<} has the Ramsey property by Theorem 3.6. Let gg be the canonization of f<f_{<} that exists by Theorem 2.26. The restriction of the behaviour g¯\bar{g} to the 2-orbits that satisfy xyx\leq y induces by Proposition 7.2 the behaviour of a canonical polymorphism hh of 𝔅\mathfrak{B}. The way we obtained hh ensures that hh is {a,b}\{a,b\}-symmetric with the same behaviour on {a,b}\{a,b\} as ff. ∎

The following is an easy observation about {a,Id}\{a,\operatorname{Id}\}-symmetric polymorphisms that we will use several times.

Observation 7.6.

Let aIda\not\leq\operatorname{Id} be an atom and ff an {a,Id}\{a,\operatorname{Id}\}-symmetric polymorphism of 𝔅\mathfrak{B}. Then f¯(a,Id)=a=f¯(Id,a)\bar{f}(a,\operatorname{Id})=a=\bar{f}(\operatorname{Id},a).

Proof.

Suppose for contradiction that f¯(a,Id)=Id=f¯(Id,a)\bar{f}(a,\operatorname{Id})=\operatorname{Id}=\bar{f}(\operatorname{Id},a). Let x,y,zB2x,y,z\in B^{2} be such that

(a,Id)(x,y),(Id,a)(y,z), and (a,a)(x,z)(a,\operatorname{Id})(x,y),~{}(\operatorname{Id},a)(y,z),\text{~{} and ~{}}(a,a)(x,z)

and consider the substructure of 𝔅\mathfrak{B} that is induced by f(x),f(y)f(x),f(y) and f(z)f(z). This structure induces a forbidden triple (Id,Id,a)(\operatorname{Id},\operatorname{Id},a) which contradicts the assumption 𝐀RRA.\mathbf{A}\in\operatorname{RRA}.

In the remainder of the section we combine canonical {a,b}\{a,b\}-symmetric polymorphisms to obtain a single “maximal-symmetric” polymorphism.

Definition 7.7.

We call a subset {a,b}A0\{a,b\}\subseteq A_{0} an edge of Polcan(𝔅)\operatorname{Pol^{can}}(\mathfrak{B}) and we call the elements in

Q:={{a,b}A0gPolcan(𝔅) such that g¯ is symmetric on {a,b}}Q:=\big{\{}\{a,b\}\subseteq A_{0}\mid\exists g\in\operatorname{Pol^{can}}(\mathfrak{B})\text{~{}such that~{}}\bar{g}\text{~{}is symmetric on~{}}\{a,b\}\big{\}}

the red edges of Polcan(𝔅)\operatorname{Pol^{can}}(\mathfrak{B}).

The terminology of the colored edges as well as the following lemma are from [Bul16].

Lemma 7.8.

There exists a binary canonical polymorphism that is symmetric on all red edges and behaves on each non-red edge like a projection. We call this function maximal-symmetric.

Proof.

For each {a,b}Q\{a,b\}\in Q let fa,bf_{a,b} be a canonical polymorphism such that its behaviour is symmetric on {a,b}\{a,b\}. We prove the lemma by an induction on the size of subsets of QQ, i.e., we show that for every subset FQF\subseteq Q of size nn there exists a polymorphism fFPolcan(𝔅)f_{F}\in\operatorname{Pol^{can}}(\mathfrak{B}) that is symmetric on all edges from FF. For each subset {a}\{a\} of QQ of size one, there exists by the definition of red edges a canonical polymorphism fa,af_{a,a} with a behaviour that is symmetric on {a}\{a\}. Let FQF\subseteq Q and suppose there exists a canonical polymorphism gg with symmetric behaviour on elements from FF. Let {a1,a2}QF\{a_{1},a_{2}\}\in Q\setminus F. We want to show that there exists a canonical polymorphism with a behaviour that is symmetric on all elements from F{a1,a2}F\cup\{a_{1},a_{2}\}. We may assume that this does not hold for gg, otherwise we are done. Therefore, and since gg is edge-conservative, we have

g¯(a1,a2)g¯(a2,a1) and g¯(a1,a2),g¯(a2,a1){a1,a2}.\bar{g}(a_{1},a_{2})\not=\bar{g}(a_{2},a_{1})\text{~{}and ~{}}\bar{g}(a_{1},a_{2}),~{}\bar{g}(a_{2},a_{1})\in\{a_{1},a_{2}\}.

With this it is easy to see that fa1,a2(g(x,y),g(y,x))f_{a_{1},a_{2}}(g(x,y),g(y,x)) is a polymorphism with a behaviour that is symmetric on all elements from F{a1,a2}F\cup\{a_{1},a_{2}\}.

This proves the first part of the statement. For the second part note that for a binary canonical edge-conservative polymorphism there are only 4 possibilities for the behaviour on a set {a1,a2}\{a_{1},a_{2}\}. If {a1,a2}\{a_{1},a_{2}\} is not a red edge then every binary canonical edge-conservative polymorphism behaves like a projection on {a1,a2}\{a_{1},a_{2}\} . ∎

7.3 Canonical Ternary Polymorphisms

We obtain in this section a result that states that the existence of a ternary {a,b}\{a,b\}-canonical polymorphism ff implies the existence of a canonical polymorphism with the same behaviour on {a,b}\{a,b\} as ff (Corollary 7.11). This is done similarly as in Section 7.2.

Lemma 7.9.

Let sPolcan(𝔅)s^{\prime}\in\operatorname{Pol^{can}}(\mathfrak{B}) be a binary, injective, maximal-symmetric polymorphism. Then the function s:𝔅3𝔅3s^{*}\colon\mathfrak{B}^{3}\rightarrow\mathfrak{B}^{3} where s(x1,x2,x3)s^{*}(x_{1},x_{2},x_{3}) is defined by

(s(s(x1,x2),s(x2,x3)),s(s(x2,x3),s(x3,x1)),s(s(x3,x1),s(x1,x2)))(s^{\prime}(s^{\prime}(x_{1},x_{2}),s^{\prime}(x_{2},x_{3})),s^{\prime}(s^{\prime}(x_{2},x_{3}),s^{\prime}(x_{3},x_{1})),s^{\prime}(s^{\prime}(x_{3},x_{1}),s^{\prime}(x_{1},x_{2})))

is a homomorphism. Moreover, for all x,yB3x,y\in B^{3} with xyx\not=y it holds that

Id¯𝔅3(s(x),s(y)).\overline{\operatorname{Id}}^{\mathfrak{B}^{3}}(s^{*}(x),s^{*}(y)).

Note that this means that two distinct tuples in the image of ss^{*} have distinct entries in each coordinate.

Proof.

Let x,yB3x,y\in B^{3} and suppose that a𝔅3(x,y)a^{\mathfrak{B}^{3}}(x,y) holds for aAa\in A. By the definition of the product structure a𝔅(xi,yi)a^{\mathfrak{B}}(x_{i},y_{i}) holds for all i{1,2,3}i\in\{1,2,3\}. Since ss^{\prime} is a polymorphism clearly a𝔅(s(x)i,s(y)i)a^{\mathfrak{B}}(s^{*}(x)_{i},s^{*}(y)_{i}) holds by the definition of ss^{*}. Now we use again the definition of a product structure and get a𝔅3(s(x),s(y))a^{\mathfrak{B}^{3}}(s^{*}(x),s^{*}(y)) which shows that ss^{*} is a homomorphism.

For the second part of the statement let x,yB3x,y\in B^{3} distinct. Suppose that a1𝔅(x1,y1)a_{1}^{\mathfrak{B}}(x_{1},y_{1}), a2𝔅(x2,y2)a_{2}^{\mathfrak{B}}(x_{2},y_{2}) and a3𝔅(x3,y3)a_{3}^{\mathfrak{B}}(x_{3},y_{3}) hold for some a1,a2,a3A0a_{1},a_{2},a_{3}\in A_{0}, where at least one atom is different from Id\operatorname{Id}. Since ss^{\prime} is injective we have

Id¯𝔅(s(x1,x2),s(y1,y2)) or Id¯𝔅(s(x2,x3),s(y2,y3)).\overline{\operatorname{Id}}^{\mathfrak{B}}({s^{\prime}}(x_{1},x_{2}),{s^{\prime}}(y_{1},y_{2}))\text{~{}or~{} }{\overline{\operatorname{Id}}}^{\mathfrak{B}}({s^{\prime}}(x_{2},x_{3}),{s^{\prime}}(y_{2},y_{3})).

Again by the injectivity of ss^{\prime} we get

Id¯𝔅(s(s(x1,x2),s(x2,x3)),s(s(y1,y2),s(y2,y3))).\overline{\operatorname{Id}}^{\mathfrak{B}}(s^{\prime}({s^{\prime}}(x_{1},x_{2}),{s^{\prime}}(x_{2},x_{3})),s^{\prime}({s^{\prime}}(y_{1},y_{2}),s^{\prime}(y_{2},y_{3}))).

By the definition of ss^{*} this shows that Id¯𝔅(s(x)1,s(y)1)\overline{\operatorname{Id}}^{\mathfrak{B}}(s^{*}(x)_{1},s^{*}(y)_{1}) holds. It is easy to see by analogous arguments that the same is true for the other coordinates. Therefore, the statement follows. ∎

Proposition 7.10.

Let aIda\not\leq\operatorname{Id} and bIdb\not\leq\operatorname{Id} be atoms of 𝐀\mathbf{A} such that {a,b}Q\{a,b\}\not\in Q. Let mPol(𝔅)m\in\operatorname{Pol}(\mathfrak{B}) be ternary {a,b}\{a,b\}-canonical and sPol(𝔅)s^{\prime}\in\operatorname{Pol}(\mathfrak{B}) be injective, maximal-symmetric. Then there exists a canonical mPol(𝔅)m^{\prime}\in\operatorname{Pol}(\mathfrak{B}) with the same behaviour as mm on {a,b}\{a,b\}.

Proof.

By Lemma 7.8 we may assume that ss^{\prime} behaves on {a,b}\{a,b\} like the projection to the first coordinate since {a,b}Q\{a,b\}\not\in Q. Let ss^{*} be the function defined in Lemma 7.9 and consider the function m:B3Bm^{\prime}\colon B^{3}\rightarrow B which is defined by m(x):=m(s(x))m^{*}(x):=m(s^{*}(x)).

Claim 1: mm^{*} is injective. Let x,yB3x,y\in B^{3} be two distinct elements. By Lemma 7.9 we know that Id¯𝔅3(s(x),s(y))\overline{\operatorname{Id}}^{\mathfrak{B}^{3}}(s^{*}(x),s^{*}(y)) holds. Since mm is a polymorphism of 𝔅\mathfrak{B} we directly get that Id¯𝔅(m(x),m(y))\overline{\operatorname{Id}}^{\mathfrak{B}}(m^{*}(x),m^{*}(y)) holds, which proves the injectivity of mm^{*}.

Claim 2: mm^{*} is {a,b}\{a,b\}-canonical and behaves on {a,b}\{a,b\} like mm.

Let x,yB3x,y\in B^{3} with (q1,q2,q3)(x,y)(q_{1},q_{2},q_{3})(x,y) such q1,q2,q3{a,b}q_{1},q_{2},q_{3}\in\{a,b\}. Since ss behaves like the first projection on {a,b}\{a,b\} it follows that (q1,q2,q3)(s(x),s(y))(q_{1},q_{2},q_{3})(s^{*}(x),s^{*}(y)). Together with the {a,b}\{a,b\}-canonicity of mm this proves Claim 2.

Since mm^{*} is injective there exists by Proposition 7.1 a polymorphism m<m^{*}_{<} of 𝔅<\mathfrak{B}_{<}. Since 𝔅<\mathfrak{B}_{<} is a Ramsey structure we can apply Theorem 2.26 to m<m^{*}_{<}. Let gg be the resulting polymorphism that is canonical with respect to 𝔅<\mathfrak{B}_{<}. Note that if we consider gg as a polymorphism of 𝔅\mathfrak{B} it behaves on {a,b}\{a,b\} like mm^{*} and therefore like mm. Now we consider the induced behaviour of gg on all 2-orbits that satisfy x<yx<y. Since all atoms of 𝐀\mathbf{A} are symmetric and g¯\bar{g} is conservative this induces a function h:(A0{Id})3A0{Id}h\colon(A_{0}\setminus\{\operatorname{Id}\})^{3}\rightarrow A_{0}\setminus\{\operatorname{Id}\}.

Claim 3: The partial behaviour hh does not induce a forbidden triple.

We would like to note that we prove this claim with similar arguments as in the proof of Proposition 7.2. Assume for contradiction that there exist x,y,zB3x,y,z\in B^{3} such that the application of an operation with behaviour hh would induce a forbidden triple.Without loss of generality we can order the elements of each coordinate of x,y,zx,y,z strictly with xi<yi<zix_{i}<y_{i}<z_{i} for i{1,2,3}i\in\{1,2,3\}. Note that if on some coordinate there would be the relation Id\operatorname{Id} then we are out of the domain of the behaviour hh.

If we choose such an order we can find isomorphic copies 𝔄\mathfrak{A} of this structure (with the order) in 𝔅<\mathfrak{B}_{<}. If we apply the polymorphism gg to this copy and forget the order of the structure g(𝔄)g(\mathfrak{A}) we get a structure that is by definition isomorphic to the forbidden triple.This proves Claim 3.

To finish the proof of the lemma note that the composition of ss^{*} with the projection to the ii-th coordinate for i{1,2,3}i\in\{1,2,3\} is a canonical, injective polymorphism (for injectivity see Lemma 7.9) and therefore induces a behaviour fi:A03A0{Id}f_{i}\colon A_{0}^{3}\rightarrow A_{0}\setminus\{\operatorname{Id}\}. We define f:A03(A0{Id})3f\colon A_{0}^{3}\rightarrow(A_{0}\setminus\{\operatorname{Id}\})^{3} by f(a1,a2,a3):=(f1(a1),f2(a2),f3(a3))f(a_{1},a_{2},a_{3}):=(f_{1}(a_{1}),f_{2}(a_{2}),f_{3}(a_{3})). The composition hf:A03A0h\circ f\colon A_{0}^{3}\rightarrow A_{0} is the behaviour of a canonical function of 𝔅\mathfrak{B}. If hfh\circ f would induce a forbidden triple then also hh would induce a forbidden triple, which contradicts Claim 3. ∎

Corollary 7.11.

Let 𝔅\mathfrak{B} have a binary injective polymorphism. Let a,bA0a,b\in A_{0} be such that no {a,b}\{a,b\}-symmetric polymorphism exists. Let mm be a ternary {a,b}\{a,b\}-canonical polymorphism. Then there exists a canonical polymorphism mm^{\prime} with the same behaviour on {a,b}\{a,b\} as mm.

Proof.

By assumption there is no canonical {a,b}\{a,b\}-symmetric polymorphism and therefore {a,b}Q\{a,b\}\not\in Q. By Corollary 7.3 𝔅\mathfrak{B} has a canonical binary injective polymorphism. This polymorphism is a witness that {c,Id}Q\{c,\operatorname{Id}\}\in Q for all cA0{Id}c\in A_{0}\setminus\{\operatorname{Id}\}. With Lemma 7.8 we get a maximal symmetric polymorphism hh. Since {c,Id}Q\{c,\operatorname{Id}\}\in Q we get that hh is {c,Id}\{c,\operatorname{Id}\}-symmetric for all cA0c\in A_{0}. By Observation 7.6 it follows h¯(c,Id)=c=h¯(Id,c)\bar{h}(c,\operatorname{Id})=c=\bar{h}(\operatorname{Id},c), which implies that hh is injective. Now Proposition 7.10 implies the statement. ∎

8 The Independence Lemma and How To Use It

The central result of this section is Proposition 8.2 which states that the absence of an {a,b}\{a,b\}-symmetric polymorphism implies that all polymorphism are canonical on {a,b}\{a,b\}. The main ingredients of our proof of this proposition are the fact that 𝐀RRA\mathbf{A}\in\operatorname{RRA} has a flexible atom and the following “Independence Lemma” (Lemma 8.1).

8.1 The Independence Lemma

The following lemma transfers the absence of a special partially canonical polymorphism to the existence of certain relations of arity 44 that are primitively positively definable in 𝔅\mathfrak{B}. A lemma of a similar type appeared as Lemma 42 in an article by [BP14].

Lemma 8.1 (Independence Lemma).

Let 𝔅\mathfrak{B} be a homogeneous structure with finite relational signature. Let aa and bb be 2-orbits of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) such that aa, bb, and (ab)(a\cup b) are primitively positively definable in 𝔅\mathfrak{B}. Then the following are equivalent:

  1. 1.

    𝔅\mathfrak{B} has an {a,b}\{a,b\}-canonical polymorphism gg that is {a,b}\{a,b\}-symmetric with g¯(a,b)=g¯(b,a)=a\overline{g}(a,b)=\overline{g}(b,a)=a.

  2. 2.

    For every primitive positive formula φ\varphi such that φa(x1,x2)b(y1,y2)\varphi\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2}) and φb(x1,x2)a(y1,y2)\varphi\wedge b(x_{1},x_{2})\wedge a(y_{1},y_{2}) are satisfiable over 𝔅\mathfrak{B}, the formula φa(x1,x2)a(y1,y2)\varphi\wedge a(x_{1},x_{2})\wedge a(y_{1},y_{2}) is also satisfiable over 𝔅\mathfrak{B}.

  3. 3.

    For every finite FB2F\subset B^{2} there exists a homomorphism hFh_{F} from the substructure of 𝔅2\mathfrak{B}^{2} induced by FF to 𝔅\mathfrak{B} that is {a,b}\{a,b\}-canonical with hF¯(a,b)=hF¯(b,a)=a\overline{h_{F}}(a,b)=\overline{h_{F}}(b,a)=a.

Proof.

The implication from (1) to (2) follows directly by applying the symmetric polymorphisms to tuples from the relation defined by φ\varphi.

For the implication from (2) to (3) let FF be a finite subset of B2B^{2}. Let {e1,,en}\{e_{1},\ldots,e_{n}\} with nn\in\mathbb{N} be an enumeration of FF. To construct hFh_{F} consider the formula φ0\varphi_{0} with variables xi,jx_{i,j} for 1i,jn1\leq i,j\leq n that is the conjunction of all atomic formulas R(xi1,j1,,xik,jk)R(x_{i_{1},j_{1}},\ldots,x_{i_{k},j_{k}}) such that R(ei1,,eik)R(e_{i_{1}},\ldots,e_{i_{k}}) and R(ej1,,ejk)R(e_{j_{1}},\ldots,e_{j_{k}}) hold in 𝔅\mathfrak{B}. Note that this formula states exactly which relations hold on FF in 𝔅2\mathfrak{B}^{2}. Let PP be the set of pairs ((i1,i2),(j1,j2))((i_{1},i_{2}),(j_{1},j_{2})) such that

(ab)(ei1,ei2)\displaystyle(a\cup b)(e_{i_{1}},e_{i_{2}})
and (ab)(ej1,ej2)\displaystyle(a\cup b)(e_{j_{1}},e_{j_{2}})
and (a(ei1,ei2)a(ej1,ej2))\displaystyle(a(e_{i_{1}},e_{i_{2}})\vee a(e_{j_{1}},e_{j_{2}}))
and (b(ei1,ei2)b(ej1,ej2)).\displaystyle(b(e_{i_{1}},e_{i_{2}})\vee b(e_{j_{1}},e_{j_{2}})).

If we show that the formula

ψ:=φ0((i1,i2),(j1,j2))Pa(xi1,j1,xi2,j2)\psi:=\varphi_{0}\wedge\bigwedge_{((i_{1},i_{2}),(j_{1},j_{2}))\in P}a(x_{i_{1},j_{1}},x_{i_{2},j_{2}})

is satisfiable by an assignment α\alpha, we get the desired homomorphism by setting hF(ei,ej):=α(xi,j)h_{F}(e_{i},e_{j}):=\alpha(x_{i,j}). We prove the satisfiability of ψ\psi by induction over the size of subsets II of PP. For the inductive beginning consider an element ((i1,i2),(j1,j2))P((i_{1},i_{2}),(j_{1},j_{2}))\in P. Without loss of generality we have that a(i1,i2)a(i_{1},i_{2}) holds. Therefore the assignment α(xi,j):=ei\alpha(x_{i,j}):=e_{i} witnesses the satisfiability of the formula φ0a(xi1,j1,xi2,j2)\varphi_{0}\wedge a(x_{i_{1},j_{1}},x_{i_{2},j_{2}}). For the inductive step let IPI\subseteq P be of size mm and assume that the statement is true for subsets of size m1m-1. Let p1=((u1,u2),(v1,v2))p_{1}=((u_{1},u_{2}),(v_{1},v_{2})) and p2=((u1,u2),(v1,v2))p_{2}=((u_{1}^{\prime},u_{2}^{\prime}),(v_{1}^{\prime},v_{2}^{\prime})) be two elements from II. We define the following formula

ψ0:=φ0((i1,i2),(j1,j2))I{p1,p2}a(xi1,j1,xi2,j2).\psi_{0}:=\varphi_{0}\wedge\bigwedge_{((i_{1},i_{2}),(j_{1},j_{2}))\in I\setminus\{p_{1},p_{2}\}}a(x_{i_{1},j_{1}},x_{i_{2},j_{2}}).

Then by the inductive assumption the formulas ψ0a(xu1,v1,xu2,v2)\psi_{0}\wedge a(x_{u_{1},v_{1}},x_{u_{2},v_{2}}) and ψ0a(xu1,v1,xu2,v2)\psi_{0}\wedge a(x_{u_{1}^{\prime},v_{1}^{\prime}},x_{u_{2}^{\prime},v_{2}^{\prime}}) are satisfiable. The assumptions on the elements in PP give us that also

ψ0a(xu1,v1,xu2,v2)b(xu1,v1,xu2,v2)\psi_{0}\wedge a(x_{u_{1},v_{1}},x_{u_{2},v_{2}})\wedge b(x_{u_{1}^{\prime},v_{1}^{\prime}},x_{u_{2}^{\prime},v_{2}^{\prime}})

and

ψ0b(xu1,v1,xu2,v2)a(xu1,v1,xu2,v2)\psi_{0}\wedge b(x_{u_{1},v_{1}},x_{u_{2},v_{2}})\wedge a(x_{u_{1}^{\prime},v_{1}^{\prime}},x_{u_{2}^{\prime},v_{2}^{\prime}})

are satisfiable; since aba\cup b is a primitive positive definable relation we are done otherwise. But then we can apply the assumption of (2) and get that also ψ0a(xu1,v1,xu2,v2)a(xu1,v1,xu2,v2)\psi_{0}\wedge a(x_{u_{1},v_{1}},x_{u_{2},v_{2}})\wedge a(x_{u_{1}^{\prime},v_{1}^{\prime}},x_{u_{2}^{\prime},v_{2}^{\prime}}) is satisfiable, which proves the inductive step.

The direction from (3) to (1) is a standard application of König’s tree lemma. For a reference see for example Lemma 42 in the article by [BP14]. ∎

8.2 Absence of {a,b}\{a,b\}-symmetric Polymorphisms

We are now able to prove the main result of this section, which will be a corner stone in the proof of Theorem 1.1. Our proof of this proposition makes use of a 44-ary relation Ea,bE_{a,b} with the following first-order definition:

(x1,x2,x3,x4)Ea,b:((ab)(x1,x2)(ab)(x3,x4)a(x1,x2)a(x3,x4)).\displaystyle(x_{1},x_{2},x_{3},x_{4})\in E_{a,b}:\Leftrightarrow((a\cup b)(x_{1},x_{2})\wedge(a\cup b)(x_{3},x_{4})\wedge a(x_{1},x_{2})\leftrightarrow a(x_{3},x_{4})).

It is an easy observation that the {a,b}\{a,b\}-canonical polymorphisms of 𝔅\mathfrak{B} are precisely those that preserve the relation Ea,bE_{a,b}. By Theorem 2.19 we get that whenever Ea,bE_{a,b} is primitively positively definable in 𝔅\mathfrak{B} then all polymorphisms of 𝔅\mathfrak{B} preserve Ea,bE_{a,b} and are therefore {a,b}\{a,b\}-canonical. In the following proof we use the 44-ary relations that are provided by the second item of the Independence Lemma 8.1 to provide a primitive positive definition of Ea,bE_{a,b}.

Proposition 8.2.

Let 𝔅\mathfrak{B} be a normal representation of a finite integral symmetric relation algebra with a flexible atom ss. Suppose that 𝔅\mathfrak{B} has a binary injective polymorphism. Let aIda\not\leq\operatorname{Id} and bIdb\not\leq\operatorname{Id} be two atoms such that 𝔅\mathfrak{B} has no {a,b}\{a,b\}-symmetric polymorphism. Then all polymorphisms are canonical on {a,b}\{a,b\}.

Proof.

By Corollary 7.3 there exists a canonical binary injective polymorphism of 𝔅\mathfrak{B}. Therefore, for every aA0a^{\prime}\in A_{0} the edge {a,Id}\{a^{\prime},\operatorname{Id}\} is red and the maximal symmetric polymorphism tt that exists by Lemma 7.8 is symmetric on all these edges. Observation 7.6 implies that tt is injective. Note that tt behaves like a projection on {a,b}\{a,b\} since there exists no {a,b}\{a,b\}-symmetric polymorphism.

Let ψ\psi be the formula defined as follows:

ψ(x1,x2,y1,y2):=Id¯(x1,y1)Id¯(x1,y2)Id¯(x2,y1)Id¯(x2,y2).\psi(x_{1},x_{2},y_{1},y_{2}):=\overline{\operatorname{Id}}(x_{1},y_{1})\wedge\overline{\operatorname{Id}}(x_{1},y_{2})\wedge\overline{\operatorname{Id}}(x_{2},y_{1})\wedge\overline{\operatorname{Id}}(x_{2},y_{2}).

We use ψ\psi to formulate and prove the following claim:

Claim 1: a) There exists a formula φa(x1,x2,y1,y2)\varphi_{a}(x_{1},x_{2},y_{1},y_{2}) such that

φaψ(x1,x2,y1,y2)a(x1,x2)b(y1,y2) is satisfiable in 𝔅,\displaystyle\varphi_{a}\wedge\psi(x_{1},x_{2},y_{1},y_{2})\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2})\textup{~{} is satisfiable in }\mathfrak{B},
φaψ(x1,x2,y1,y2)b(x1,x2)a(y1,y2) is satisfiable in 𝔅,\displaystyle\varphi_{a}\wedge\psi(x_{1},x_{2},y_{1},y_{2})\wedge b(x_{1},x_{2})\wedge a(y_{1},y_{2})\textup{~{} is satisfiable in }\mathfrak{B},
φaa(x1,x2)a(y1,y2) is not satisfiable in 𝔅.\displaystyle\varphi_{a}\wedge a(x_{1},x_{2})\wedge a(y_{1},y_{2})\textup{~{} is not satisfiable in }\mathfrak{B}.

b) There exists a formula φb(x1,x2,y1,y2)\varphi_{b}(x_{1},x_{2},y_{1},y_{2}) that has the same property with aa and bb in exchanged roles.

Proof of Claim 1. There exists a formula φa′′\varphi_{a}^{\prime\prime} that witnesses the negation of (2) in the Independence Lemma (Lemma 8.1) since 𝔅\mathfrak{B} does not have an {a,b}\{a,b\}-symmetric polymorphism hh with h¯(a,b)=a\bar{h}(a,b)=a. Let φb′′\varphi_{b}^{\prime\prime} be the formula that witnesses in the same way the non-existence of an {a,b}\{a,b\}-symmetric polymorphism hh of 𝔅\mathfrak{B} with h¯(a,b)=b\bar{h}(a,b)=b. We define for c{a,b}c\in\{a,b\} the formula φc\varphi_{c}^{\prime} as follows:

φc(x1,x2,y1,y2):=φc′′(x1,x2,y1,y2)(ab)(x1,x2)(ab)(y1,y2).\varphi^{\prime}_{c}(x_{1},x_{2},y_{1},y_{2}):=\varphi^{\prime\prime}_{c}(x_{1},x_{2},y_{1},y_{2})\wedge(a\cup b)(x_{1},x_{2})\wedge(a\cup b)(y_{1},y_{2}). (2)

If φa\varphi_{a}^{\prime} and φb\varphi_{b}^{\prime} witness a) and b) in Claim 1, we are done. So suppose that they do not. Note that if we have c{a,b}c\in\{a,b\} and d{a,b}{c}d\in\{a,b\}\setminus\{c\} such that

φc(x1,x2,y1,y2)c(x1,x2)d(y1,y2)Id(x2,y1) is satisfiable in 𝔅 and\displaystyle\varphi^{\prime}_{c}(x_{1},x_{2},y_{1},y_{2})\wedge c(x_{1},x_{2})\wedge d(y_{1},y_{2})\wedge\operatorname{Id}(x_{2},y_{1})\textup{~{} is satisfiable in }\mathfrak{B}\textup{~{}and} (3)
φc(x1,x2,y1,y2)d(x1,x2)c(y1,y2)Id¯(x2,y1) is satisfiable in 𝔅,\displaystyle\varphi^{\prime}_{c}(x_{1},x_{2},y_{1},y_{2})\wedge d(x_{1},x_{2})\wedge c(y_{1},y_{2})\wedge\overline{\operatorname{Id}}(x_{2},y_{1})\textup{~{} is satisfiable in }\mathfrak{B}, (4)

then φc\varphi^{\prime}_{c} would satisfy the statement about φc\varphi_{c} in Claim 1, a) or in Claim 1, b). To see this note that we can apply the injective, maximal symmetric polymorphism tt that behaves like a projection on {a,b}\{a,b\} to the tuples uu and vv that witness (3) and (4). The first tuple satisfies Id¯(x1,y1)\overline{\operatorname{Id}}(x_{1},y_{1}), Id¯(x2,y2)\overline{\operatorname{Id}}(x_{2},y_{2}) and Id¯(x1,y2)\overline{\operatorname{Id}}(x_{1},y_{2}) since Id(x2,y1){\operatorname{Id}}(x_{2},y_{1}) and cdc\neq d. The second tuple satisfies Id¯(x2,y1)\overline{\operatorname{Id}}(x_{2},y_{1}). Then the injectivity of tt ensures that the tuples t(u,v)t(u,v) and t(v,u)t(v,u) witness Claim 1, a) or Claim 1, b). Figure 3 illustrates this situation.

))(())((==))(())((ttttttttuuvvt(u,v)t(u,v)φc\in\varphi_{c}^{\prime}φc\in\varphi_{c}^{\prime}φc\in\varphi_{c}^{\prime}
Figure 3: Application of the injective operation tt on tuples uu and vv. Orange and black edges correspond to atoms cc and dd, the dotted edge to atom Id\operatorname{Id}, and the dashed lines denote Id¯\overline{\operatorname{Id}}.

By our assumption that Claim 1 is not satisfied by φa\varphi_{a}^{\prime} and φb\varphi_{b}^{\prime} we conclude that for at least one c{a,b}c\in\{a,b\} it holds that for d{a,b}{c}d\in\{a,b\}\setminus\{c\}

φc(x1,x2,y1,y2)c(x1,x2)d(y1,y2)Id(x2,y1) is satisfiable in 𝔅 and\displaystyle\varphi^{\prime}_{c}(x_{1},x_{2},y_{1},y_{2})\wedge c(x_{1},x_{2})\wedge d(y_{1},y_{2})\wedge\operatorname{Id}(x_{2},y_{1})\textup{~{} is satisfiable in }\mathfrak{B}\text{~{}and} (5)
φc(x1,x2,y1,y2)d(x1,x2)c(y1,y2)Id(x2,y1) is satisfiable in 𝔅.\displaystyle\varphi^{\prime}_{c}(x_{1},x_{2},y_{1},y_{2})\wedge d(x_{1},x_{2})\wedge c(y_{1},y_{2})\wedge\operatorname{Id}(x_{2},y_{1})\textup{~{} is satisfiable in }\mathfrak{B}. (6)

We distinguish the following different cases.

  1. 1.

    φa\varphi^{\prime}_{a} satisfies a) in Claim 1 and (5) and (6) hold for c=bc=b and d=ad=a.

  2. 2.

    (5) and (6) hold for c=ac=a and d=bd=b and φb\varphi^{\prime}_{b} satisfies b) in Claim 1.

  3. 3.

    (5) and (6) hold for c=ac=a and d=bd=b as well as for c=bc=b and d=ad=a.

Case 1: Consider the following formula φb\varphi_{b} with

φb(x1,x2,y1,y2):=z1,z2.(φb(x1,x2,x2,z1)φa(x2,z1,z2,y1)φb(z2,y1,y1,y2)).\varphi_{b}(x_{1},x_{2},y_{1},y_{2}):=\exists z_{1},z_{2}.(\varphi_{b}^{\prime}(x_{1},x_{2},x_{2},z_{1})\wedge\varphi_{a}^{\prime}(x_{2},z_{1},z_{2},y_{1})\wedge\varphi_{b}^{\prime}(z_{2},y_{1},y_{1},y_{2})).

We claim that φb\varphi_{b} satisfies b) in Claim 1. This proves Claim 1, because φa\varphi_{a}^{\prime} satisfies a) in Claim 1. To see that φb\varphi_{b} fulfills the two satisfiability statements in Claim 1, b) we can first amalgamate the structure 𝔅1\mathfrak{B}_{1} induced (as a substructure of 𝔅\operatorname{\mathfrak{B}}) by the elements of a satisfying tuple for φb\varphi_{b}^{\prime} with the structure 𝔅2\mathfrak{B}_{2} induced by the elements of a satisfying tuple for φa\varphi_{a}^{\prime} (see Figure 4 for an illustration). We amalgamate these two structures over their common substructure 𝔄\mathfrak{A} induced by the variables x2x_{2} and z1z_{1}, with the variable names from the definition of φb\varphi_{b}. In this amalgamation step all missing edges are filled with the flexible atom ss. In a second amalgamation step we amalgamate the resulting structure with another copy of the structure 𝔅1\mathfrak{B}_{1}, but now with the common substructure on the variables z1z_{1} and y1y_{1} (again with refer to the names used in the definition of φb\varphi_{b}). As before the missing edges are filled with the flexible atom ss. Figure 4 illustrates the situation. It follows from the choice of φa\varphi_{a}^{\prime} and φb\varphi_{b}^{\prime} and the definition of φb\varphi_{b} that φbb(x1,x2)b(y1,y2)\varphi_{b}\wedge b(x_{1},x_{2})\wedge b(y_{1},y_{2}) is not satisfiable in 𝔅\mathfrak{B}.

x1x_{1}x2x_{2}y2y_{2}y1y_{1}z2z_{2}z1z_{1}
Figure 4: φb\varphi_{b} build from φb\varphi_{b}^{\prime} (red), φa\varphi_{a}^{\prime} (blue), the atom bb (black), the atom aa (dashed) and the flexible atom ss (dotted). The roles of aa and bb can be changed.

Case 2: This case is analogous to Case 1.

Case 3: Consider the formula φa\varphi_{a} with

φa(x1,x2,y1,y2):=z.(\displaystyle\varphi_{a}(x_{1},x_{2},y_{1},y_{2}):=\exists z.( φa(x1,x2,x2,z)φb(x2,z,z,y1)φa(z,y1,y1,y2)).\displaystyle\varphi_{a}^{\prime}(x_{1},x_{2},x_{2},z)\wedge\varphi_{b}^{\prime}(x_{2},z,z,y_{1})\wedge\varphi_{a}^{\prime}(z,y_{1},y_{1},y_{2})).

We show that φaψ(x1,x2,y1,y2)a(x1,x2)b(y1,y2)\varphi_{a}\wedge\psi(x_{1},x_{2},y_{1},y_{2})\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2}) is satisfiable in 𝔅\mathfrak{B}. Since (5) holds for c=ac=a and d=bd=b and since aa and bb are distinct, there exists p1A0{Id}p_{1}\in A_{0}\setminus\{\operatorname{Id}\} such that

φa(x1,x2,y1,y2)a(x1,x2)b(y1,y2)Id(x2,y1)p1(x1,y2)\displaystyle\varphi_{a}^{\prime}(x_{1},x_{2},y_{1},y_{2})\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2})\wedge\operatorname{Id}(x_{2},y_{1})\wedge p_{1}(x_{1},y_{2})

is satisfiable in 𝔅\mathfrak{B}. Similarly, since (5) holds for c=bc=b and d=ad=a, there exists p2A0{Id}p_{2}\in A_{0}\setminus\{\operatorname{Id}\} such that

and φb(x1,x2,y1,y2)b(x1,x2)a(y1,y2)Id(x2,y1)p2(x1,y2).\displaystyle\varphi_{b}^{\prime}(x_{1},x_{2},y_{1},y_{2})\wedge b(x_{1},x_{2})\wedge a(y_{1},y_{2})\wedge\operatorname{Id}(x_{2},y_{1})\wedge p_{2}(x_{1},y_{2}).

Note that there are u1,,u5Bu_{1},\ldots,u_{5}\in B such that the following atomic formulas hold:

a(u1,u2),p1(u1,u3),s(u1,u4),s(u1,u5),\displaystyle a(u_{1},u_{2}),p_{1}(u_{1},u_{3}),s(u_{1},u_{4}),s(u_{1},u_{5}),
b(u2,u3),p2(u2,u4),s(u2,u5),\displaystyle b(u_{2},u_{3}),p_{2}(u_{2},u_{4}),s(u_{2},u_{5}),
a(u3,u4),p1(u3,u5),\displaystyle a(u_{3},u_{4}),p_{1}(u_{3},u_{5}),
b(u4,u5).\displaystyle b(u_{4},u_{5}).

If we choose for the existentially quantified variable zz in the definition of φa\varphi_{a} the element u3u_{3} then the tuple (u1,u2,u4,u5)(u_{1},u_{2},u_{4},u_{5}) satisfies the formula

φaψ(x1,x2,y1,y2)a(x1,x2)b(y1,y2).\varphi_{a}\wedge\psi(x_{1},x_{2},y_{1},y_{2})\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2}).

By an analogous argument also φaψ(x1,x2,y1,y2)b(x1,x2)a(y1,y2)\varphi_{a}\wedge\psi(x_{1},x_{2},y_{1},y_{2})\wedge b(x_{1},x_{2})\wedge a(y_{1},y_{2}) is satisfiable. It follows again from the choice of φa\varphi_{a}^{\prime} and φb\varphi_{b}^{\prime} and the definition of φa\varphi_{a} that φaa(x1,x2)a(y1,y2)\varphi_{a}\wedge a(x_{1},x_{2})\wedge a(y_{1},y_{2}) is not satisfiable in 𝔅\mathfrak{B}. By an analogous definition we can find a formula φb\varphi_{b} that satisfies b) in Claim 1. Therefore, we are done with Case 3. Altogether this proves Claim 1.

Let φa\varphi_{a} and φb\varphi_{b} be the two formulas that exist by Claim 1. We define the following formulas

φa(x1,x2,y1,y2):=φa(x1,x2,y1,y2)(ab)(x1,x2)(ab)(y1,y2)\displaystyle\varphi^{\prime}_{a}(x_{1},x_{2},y_{1},y_{2}):=\varphi_{a}(x_{1},x_{2},y_{1},y_{2})\wedge(a\cup b)(x_{1},x_{2})\wedge(a\cup b)(y_{1},y_{2})
φb(x1,x2,y1,y2):=φb(x1,x2,y1,y2)(ab)(x1,x2)(ab)(y1,y2).\displaystyle\varphi^{\prime}_{b}(x_{1},x_{2},y_{1},y_{2}):=\varphi_{b}(x_{1},x_{2},y_{1},y_{2})\wedge(a\cup b)(x_{1},x_{2})\wedge(a\cup b)(y_{1},y_{2}).
x2x_{2}x1x_{1}x3x_{3}x4x_{4}y1y_{1}y2y_{2}y3y_{3}y4y_{4}z1z_{1}z2z_{2}z3z_{3}z4z_{4}
Figure 5: The formula δ\delta build from φa\varphi_{a}^{\prime} (red), φb\varphi_{b}^{\prime} (blue), and the flexible atom ss (dotted).

We also define a formula δ\delta as follows (see also Figure 5):

δ(x1,x2,x3,x4):=\displaystyle\delta(x_{1},x_{2},x_{3},x_{4}):=~{} s(x1,x3)s(x1,x4)s(x2,x3)s(x2,x4)\displaystyle s(x_{1},x_{3})\wedge s(x_{1},x_{4})\wedge s(x_{2},x_{3})\wedge s(x_{2},x_{4})
y1,y2,y3,y4.(φa(x1,x2,y1,y2)φb(y1,y2,y3,y4)\displaystyle\wedge\exists y_{1},y_{2},y_{3},y_{4}.(\varphi_{a}^{\prime}(x_{1},x_{2},y_{1},y_{2})\wedge\varphi_{b}^{\prime}(y_{1},y_{2},y_{3},y_{4})
φa(y3,y4,x3,x4))\displaystyle\wedge\varphi_{a}^{\prime}(y_{3},y_{4},x_{3},x_{4}))
z1,z2,z3,z4.(φb(x1,x2,z1,z2)φa(z1,z2,z3,z4)\displaystyle\wedge\exists z_{1},z_{2},z_{3},z_{4}.(\varphi_{b}^{\prime}(x_{1},x_{2},z_{1},z_{2})\wedge\varphi_{a}^{\prime}(z_{1},z_{2},z_{3},z_{4})
φb(z3,z4,x3,x4)).\displaystyle\wedge\varphi_{b}^{\prime}(z_{3},z_{4},x_{3},x_{4})).

Analogously to Case 1, an amalgam of the structures that are induced by tuples that satisfy φa\varphi_{a}^{\prime} and φb\varphi_{b}^{\prime} shows that the formulas δa(x1,x2)b(x3,x4)\delta\wedge a(x_{1},x_{2})\wedge b(x_{3},x_{4}) and δb(x1,x2)a(x3,x4)\delta\wedge b(x_{1},x_{2})\wedge a(x_{3},x_{4}) are satisfiable in 𝔅\mathfrak{B}. Note that this is possible since we ensured in Claim 1 that there exist tuples that additionally satisfy ψ\psi. It also holds that a tuple xx that satisfies δ\delta also satisfies

(a(x1,x2)b(x3,x4))(b(x1,x2)a(x3,x4)).\displaystyle(a(x_{1},x_{2})\wedge b(x_{3},x_{4}))\vee(b(x_{1},x_{2})\wedge a(x_{3},x_{4})). (7)

Assume that for a tuple xx that satisfies δ\delta it holds that a(x1,x2)a(x3,x4)a(x_{1},x_{2})\wedge a(x_{3},x_{4}). Then there exist y1,y2,y3,y4y_{1},y_{2},y_{3},y_{4} such that φa(x1,x2,y1,y2)φa(y3,y4,x3,x4)\varphi_{a}^{\prime}(x_{1},x_{2},y_{1},y_{2})\wedge\varphi_{a}^{\prime}(y_{3},y_{4},x_{3},x_{4}) holds. But this is by the definition of φa\varphi_{a}^{\prime} only possible if b(y1,y2)b(y_{1},y_{2}) and b(y3,y4)b(y_{3},y_{4}) hold, in contradiction to φb(y1,y2,y3,y4)\varphi_{b}^{\prime}(y_{1},y_{2},y_{3},y_{4}). The same argument works for proving that ¬(b(x1,x2)b(x3,x4))\neg(b(x_{1},x_{2})\wedge b(x_{3},x_{4})) holds.

We complete the proof with a primitive positive definition of Ea,bE_{a,b}. We have the following primitive positive formula

δ(x1,x2,x3,x4):=y1,y2.(δ(x1,x2,y1,y2)δ(y1,y2,x3,x4)),\delta^{\prime}(x_{1},x_{2},x_{3},x_{4}):=~{}\exists y_{1},y_{2}.(\delta(x_{1},x_{2},y_{1},y_{2})\wedge\delta(y_{1},y_{2},x_{3},x_{4})),

and define Ea,bE_{a,b} by

(x1,x2,x3,x4)Ea,bδ(x1,x2,x3,x4).(x_{1},x_{2},x_{3},x_{4})\in E_{a,b}~{}\Leftrightarrow~{}\delta^{\prime}(x_{1},x_{2},x_{3},x_{4}).

For the forward direction of this equivalence, let xx be a tuple from Ea,bE_{a,b} such that c(x1,x2)c(x_{1},x_{2}) holds for c{a,b}c\in\{a,b\}. Let d{a,b}{c}d\in\{a,b\}\setminus\{c\} and let y1y_{1} and y2y_{2} be two elements from 𝔅\mathfrak{B} such that d(y1,y2)d(y_{1},y_{2}) and s(xi,yj)s(x_{i},y_{j}) for every i{1,,4}i\in\{1,\ldots,4\} and every j{1,2}j\in\{1,2\} holds. Such elements exists since in the substructure of 𝔅\mathfrak{B} that is induced by {x1,x2,x3,x4,y1,y2}\{x_{1},x_{2},x_{3},x_{4},y_{1},y_{2}\} all appearing triangles are allowed by the definition of the flexible atom ss. The elements y1y_{1} and y2y_{2} witness that xx satisfies the formula δ\delta^{\prime}.

For the other direction assume that a tuple xx satisfies δ\delta^{\prime}. Then there exist y1y_{1} and y2y_{2} such that δ(x1,x2,y1,y2)δ(y1,y2,x3,x4)\delta(x_{1},x_{2},y_{1},y_{2})\wedge\delta(y_{1},y_{2},x_{3},x_{4}) is satisfied. Since we observed that the tuples (x1,x2,y1,y2)(x_{1},x_{2},y_{1},y_{2}) and (y1,y2,x3,x4)(y_{1},y_{2},x_{3},x_{4}) both satisfy (7) we can assume that c(x1,x2)c(x_{1},x_{2}) holds for c{a,b}c\in\{a,b\}. It follows also from (7) that d(y1,y2)d(y_{1},y_{2}) holds for d{a,b}{c}d\in\{a,b\}\setminus\{c\} and then (7) implies that c(x3,x4)c(x_{3},x_{4}) holds, which proves the backward direction of the stated equivalence.

9 Proof of the Result

In this section we prove the main results of this article. We first obtain a dichotomy theorem for a class of CSPs (Theorem 9.1). This is used in combination with the observations in Section 3 to conclude the proof of Theorem 1.1.

Theorem 9.1.

Let 𝐀RRA\bf A\in\operatorname{RRA} be finite integral symmetric and with a flexible atom ss and let A0A_{0} be the set of atoms of 𝐀\bf A. Then either

  • \bullet

    there exists an operation f:A06A0f\colon A_{0}^{6}\rightarrow A_{0} that preserves the allowed triples of 𝐀\mathbf{A}, satisfies

    x1,,x6A0.f(x1,,x6){x1,x6}\forall x_{1},\ldots,x_{6}\in A_{0}.~{}f(x_{1},\ldots,x_{6})\in\{x_{1},\ldots x_{6}\}

    and satisfies the Siggers identity

    x,y,zA0.f(x,x,y,y,z,z)=f(y,z,x,z,x,y);\forall x,y,z\in A_{0}.~{}f(x,x,y,y,z,z)=f(y,z,x,z,x,y);

    in this case, CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is in P, or

  • \bullet

    HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) contains a 2-element algebra where all operations are projections; in this case, CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-complete.

Proof.

Let 𝔅\mathfrak{B} be a normal representation of 𝐀\mathbf{A} that exists by Proposition 3.5. The finite boundedness of 𝔅\mathfrak{B} implies that CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is in NP. Let 𝔒\mathfrak{O} be the atom structure of 𝐀\mathbf{A}. We can assume that 𝔅\mathfrak{B} has a binary injective polymorphism, because otherwise Proposition 6.1 would directly imply the second item. The existence of a binary injective polymorphism implies by Corollary 7.3 the existence of a canonical binary injective polymorphism gg.

If the first item of the theorem is satisfied then the operation ff is a Siggers polymorphism of 𝔒\mathfrak{O} and the statement follows by the Propositions 4.3 and 4.4.

Assume therefore that the first item in the theorem does not hold. By Corollary 4.7 there exist elements a,bA0a,b\in A_{0} such that the subalgebra of Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) on {a,b}\{a,b\} contains only projections. It holds that Id{a,b}\operatorname{Id}\not\in\{a,b\}, since gg is a witness that Id\operatorname{Id} can not be in the domain of a subalgebra that contains only projections. Since all operations from Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) are projections on {a,b}\{a,b\} there exists no canonical polymorphism of 𝔅\mathfrak{B} that is {a,b}\{a,b\}-symmetric. By Proposition 7.5 there exists also no {a,b}\{a,b\}-symmetric polymorphism of 𝔅\mathfrak{B}. Since 𝔅\mathfrak{B} has a binary injective polymorphism we can apply Proposition 8.2 and get that all polymorphisms of 𝔅\mathfrak{B} are {a,b}\{a,b\}-canonical. The last step is to show that all polymorphisms of 𝔅\mathfrak{B} behave like projections on {a,b}\{a,b\}.

Assume for contradiction that there exists a ternary, {a,b}\{a,b\}-canonical polymorphism mm that behaves on {a,b}\{a,b\} like a majority or like a minority. By Corollary 7.11 there exists a canonical polymorphism that is also a majority or minority on {a,b}\{a,b\} (here we use again the existence of an injective polymorphism). This contradicts our assumption that Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) is trivial on {a,b}\{a,b\}. We get that every polymorphism of 𝔅\mathfrak{B} does not behave on {a,b}\{a,b\} as an operation from Post’s theorem (Theorem 2.15) and therefore must behave as a projection on {a,b}\{a,b\} by Theorem 2.15. Thus, HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) contains a 22-element algebra whose operations are projections and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-hard, according to Theorem 2.21. ∎

We can prove the main result.

Proof of Theorem 1.1.

Let 𝐀\mathbf{A} be as in the assumptions of the theorem and let 𝐀\bf A^{\prime} be the finite symmetric integral representable relation algebra that exists by Proposition 3.3. Suppose that 𝐀\mathbf{A} satisfies the first condition of Theorem 1.1. By Item 3) in Proposition 3.3, we get that then 𝐀\mathbf{A}^{\prime} satisfies the first condition in Theorem 9.1 and therefore CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) for the normal representation 𝔅\mathfrak{B} of 𝐀\bf A^{\prime} is in P. By Section 2.3 we know that NSP(𝐀)\operatorname{NSP}(\bf A^{\prime}) and CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) are polynomial-time equivalent. This, together with the Turing reduction from NSP(𝐀)\operatorname{NSP}(\bf A) to NSP(𝐀)\operatorname{NSP}(\bf A^{\prime}) by Item 1) in Proposition 3.3 implies that NSP(𝐀)\operatorname{NSP}(\bf A) is in P. This proves the first part of the theorem.

Assume that 𝐀\mathbf{A} does not satisfy the first condition of Theorem 1.1. Item 3) in Proposition 3.3 again implies that 𝐀\mathbf{A}^{\prime} does not satisfy the first condition in Theorem 9.1 and therefore CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) for the normal representation 𝔅\mathfrak{B} of 𝐀\bf A^{\prime} is NP-complete. As before we get that NSP(𝐀)\operatorname{NSP}(\bf A^{\prime}) is NP-complete and the many-one reduction from NSP(𝐀)\operatorname{NSP}(\bf A) to NSP(𝐀)\operatorname{NSP}(\bf A^{\prime}) by Item 2) in Proposition 3.3 implies the NP-hardness of NSP(𝐀)\operatorname{NSP}(\bf A). The containment in NP follows by Item 1) in Proposition 3.3. This concludes the proof of Theorem 1.1. ∎

Corollary 9.2.

For a given finite, symmetric 𝐀RRA\bf A\in\operatorname{RRA} with a flexible atom it is decidable which of the two items in Theorem 1.1 holds. In particular, it is decidable whether NSP(𝐀)\operatorname{NSP}(\bf A) is solvable in polynomial time.

Proof.

Since A0A_{0} is a finite set one can go through all possible operations f:A06A0f\colon A_{0}^{6}\rightarrow A_{0} that preserve all the allowed triples of 𝐀\bf A and check whether the Siggers identity is satisfied. If PNP\text{P}\not=\text{NP}, it follows from Theorem 1.1 that it is decidable whether NSP(𝐀)\operatorname{NSP}(\bf A) is in P. In the case of P=NP\text{P}=\text{NP} this is a trivial task. ∎

The problem of deciding whether certain identities hold in the polymorphism clone of a structure is well known problem in the study of CSPs. The computational complexity is known to be in NP [CL17]. The precise complexity of deciding whether a polymorphism clone of an explicitly given structure has a conservative operation that satisfies the Siggers identity is open [CL17].

10 Connection to Smooth Approximations

We discuss the relationship of our results to the techniques developed by [MP20]. The main invention of [MP20] are smooth approximations which are equivalence relations on sets of nn-tuples. The purpose of these equivalence relations is to approximate the prominent orbit-equivalence relation. We have seen the importance of these relations in the present article: the polymorphisms which preserve the orbit-equivalence relation are precisely the canonical ones and they store the information about possible finite-domain algorithms that can be used to solve the infinite-domain CSP (cf. Section 4).

We start by rearranging the results of Section 8 such that we get the following theorem. In order to repeat the key steps of our main proof with a focus on the similarities to [MP20] the assumptions in this theorem are a natural starting point.

Theorem 10.1.

Let 𝔅\mathfrak{B} be a normal representation of a finite integral symmetric relation algebra with a flexible atom ss and let 𝔒\mathfrak{O} be the atom structure of 𝔅\mathfrak{B}. Suppose that Pol(𝔅)\operatorname{Pol}(\mathfrak{B}) contains a binary injective polymorphism and Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) does not have a Siggers operation. Then there exists two atoms aIda\not\leq\operatorname{Id} and bIdb\not\leq\operatorname{Id} such that one of the following holds:

  1. 1.

    The orbit-equivalence relation Ea,bE_{a,b} is primitively positively definable in 𝔅\mathfrak{B}.

  2. 2.

    For all x,y{a,b}x,y\in\{a,b\} and every primitive positive formula φ\varphi such that φx(x1,x2)y(y1,y2)\varphi\wedge x(x_{1},x_{2})\wedge y(y_{1},y_{2}) and φy(x1,x2)x(y1,y2)\varphi\wedge y(x_{1},x_{2})\wedge x(y_{1},y_{2}) are satisfiable over 𝔅\mathfrak{B}, the formula φx(x1,x2)x(y1,y2)\varphi\wedge x(x_{1},x_{2})\wedge x(y_{1},y_{2}) is also satisfiable over 𝔅\mathfrak{B}.

This theorem is similar to the “Loop lemma of approximations” (Theorem 10 in [MP20]), even though it does not make proper use of the approximation idea (Ea,bE_{a,b} approximates itself). The first case in the theorem leads to the hardness condition that HSPfin({Pol(𝔅)})\operatorname{HSP^{fin}}(\{\operatorname{Pol}(\mathfrak{B})\}) contains a 22-element algebra whose operations are projections and therefore CSP(𝔅)\operatorname{CSP}(\mathfrak{B}) is NP-complete.

However, the second case is “stronger” than the second case in Theorem 10 by [MP20]. The strength in the statement relies on the special class of problems in our article. To see what we mean by this, we continue with the strategy of [MP20]. As a next step we can restrict the “Independence Lemma” (Lemma 8.1) as follows:

Lemma 10.2.

Let 𝔅\mathfrak{B} be a homogeneous structure with finite relational signature. Let aa and bb be 2-orbits of Aut(𝔅)\operatorname{Aut}(\mathfrak{B}) such that aa, bb, and (ab)(a\cup b) are primitively positively definable in 𝔅\mathfrak{B}.

Assume that for every primitive positive formula φ\varphi such that φa(x1,x2)b(y1,y2)\varphi\wedge a(x_{1},x_{2})\wedge b(y_{1},y_{2}) and φb(x1,x2)a(y1,y2)\varphi\wedge b(x_{1},x_{2})\wedge a(y_{1},y_{2}) are satisfiable over 𝔅\mathfrak{B}, the formula φa(x1,x2)a(y1,y2)\varphi\wedge a(x_{1},x_{2})\wedge a(y_{1},y_{2}) is also satisfiable over 𝔅\mathfrak{B}. Then 𝔅\mathfrak{B} has an {a,b}\{a,b\}-canonical polymorphism gg that is {a,b}\{a,b\}-symmetric with g¯(a,b)=g¯(b,a)=a\overline{g}(a,b)=\overline{g}(b,a)=a.

Note that the assumptions in this lemma are precisely what we get from case 2) in Theorem 10.1. A lemma of similar style can be also found as Lemma 13 in the article of [MP20]. They obtain in this lemma a weakly commutative operation. The {a,b}\{a,b\}-symmetric operations from our article are a special case of weakly commutative operations. The difference between these two properties seems crucial for the next step of our proof: while {a,b}\{a,b\}-symmetric operations can often be “lifted” to canonical {a,b}\{a,b\}-symmetric operations this seems not clear in general for weakly commutative operations. This last step is necessary in order to obtain a contradiction to our assumption that Pol(𝔒)\operatorname{Pol}(\mathfrak{O}) does not have a Siggers operation.

In order to apply the results of [MP20] directly to obtain the dichotomy results of our article one would have to find a way to canonize the weakly commutative operations in a suitable way. It seems that this can be done by a similar proof as for Lemma 56 of [MP20] were the authors used among other things arguments which are also incorporated in our proof of the loop lemma (Theorem 10.1).

11 Conclusion

We classified the computational complexity of the network satisfaction problem for finite symmetric 𝐀RRA\mathbf{A}\in\operatorname{RRA} with a flexible atom and obtained a P versus NP-complete dichotomy. We gave a decidable criterion for 𝐀\mathbf{A} that is a sufficient condition for the membership of NSP(𝐀)\operatorname{NSP}(\bf A) in P, which is also necessary unless P=NP. We want to mention that if we drop the assumptions on 𝐀\bf A to be symmetric and to have a flexible atom then the statement of Theorem 1.1 is false. An example for this is the Point Algebra; even though the NSP\operatorname{NSP} of this representable relation algebra is in P [VKvB89], the first condition of Theorem 1.1 does not apply. However, if we only drop the symmetry assumption we conjecture that Theorem 1.1 still holds; yet it is not clear how to obtain the results of Section 7 in this case. Similarly, if we only drop the flexible atom assumption we conjecture that the statement also remains true. For this generalization it would be necessary to obtain Ramsey-type results like Theorem 3.6 without the assumption of the existence of a flexible atom.

Acknowledgements

The first author has received funding from the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007-2013 Grant Agreement no. 681988, CSP-Infinity). The second author is supported by DFG Graduiertenkolleg 1763 (QuantLA).

References

  • [All83] James F. Allen. Maintaining knowledge about temporal intervals. Communications of the ACM, 26(11):832–843, 1983.
  • [AM94] Hajnal Andréka and Roger D. Maddux. Representations for small relation algebras. Notre Dame Journal of Formal Logic, 35(4):550–562, 1994.
  • [AMM08] Jeremy F. Alm, Roger D. Maddux, and Jacob Manske. Chromatic graphs, Ramsey numbers and the flexible atom conjecture. The Electronic Journal of Combinatorics, 15(1), March 2008.
  • [Bar11] Libor Barto. The dichotomy for conservative constraint satisfaction problems revisited. In Proceedings of the Symposium on Logic in Computer Science (LICS), Toronto, Canada, 2011.
  • [BD13] Manuel Bodirsky and Víctor Dalmau. Datalog and constraint satisfaction with infinite templates. Journal on Computer and System Sciences, 79:79–100, 2013. A preliminary version appeared in the proceedings of the Symposium on Theoretical Aspects of Computer Science (STACS’05).
  • [BJ17] Manuel Bodirsky and Peter Jonsson. A model-theoretic view on qualitative constraint reasoning. Journal of Artificial Intelligence Research, 58:339–385, 2017.
  • [BK07] Manuel Bodirsky and Martin Kutz. Determining the consistency of partial tree descriptions. Artificial Intelligence, 171:185–196, 2007.
  • [BK09] Manuel Bodirsky and Jan Kára. The complexity of temporal constraint satisfaction problems. Journal of the ACM, 57(2):1–41, 2009. An extended abstract appeared in the Proceedings of the Symposium on Theory of Computing (STOC).
  • [BK20] Manuel Bodirsky and Simon Knäuer. Hardness of network satisfaction for relation algebras with normal representations. In Relational and Algebraic Methods in Computer Science, pages 31–46. Springer International Publishing, 2020.
  • [BK21] Manuel Bodirsky and Simon Knäuer. Network satisfaction for symmetric relation algebras with a flexible atom. In Proceedings of AAAI, 2021. Preprint https://arxiv.org/abs/2008.11943.
  • [BK22] Manuel Bodirsky and Simon Knäuer. The complexity of network satisfaction problems for symmetric relation algebras with a flexible atom. Journal of Artificial Intelligence Research, 75, 2022.
  • [BM16] Manuel Bodirsky and Antoine Mottet. Reducts of finitely bounded homogeneous structures, and lifting tractability from finite-domain constraint satisfaction. In Proceedings of the 31th Annual IEEE Symposium on Logic in Computer Science (LICS), pages 623–632, 2016. Preprint available at ArXiv:1601.04520.
  • [BMPP19] Manuel Bodirsky, Barnaby Martin, Michael Pinsker, and András Pongrácz. Constraint satisfaction problems for reducts of homogeneous graphs. SIAM Journal on Computing, 48(4):1224–1264, 2019. A conference version appeared in the Proceedings of the 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, pages 119:1-119:14.
  • [BN06] Manuel Bodirsky and Jaroslav Nešetřil. Constraint satisfaction with countable homogeneous templates. Journal of Logic and Computation, 16(3):359–373, 2006.
  • [Bod08] Manuel Bodirsky. Constraint satisfaction problems with infinite templates. In Heribert Vollmer, editor, Complexity of Constraints (a collection of survey articles), volume 5250 of Lecture Notes in Computer Science, pages 196–228. Springer, 2008.
  • [Bod12] Manuel Bodirsky. Complexity classification in infinite-domain constraint satisfaction. Mémoire d’habilitation à diriger des recherches, Université Diderot – Paris 7. Available at arXiv:1201.0856v8, 2012.
  • [Bod15] Manuel Bodirsky. Ramsey classes: Examples and constructions. In Surveys in Combinatorics. London Mathematical Society Lecture Note Series 424. Cambridge University Press, 2015. Invited survey article for the British Combinatorial Conference; ArXiv:1502.05146.
  • [Bod18] Manuel Bodirsky. Finite relation algebras with normal representations. In Relational and Algebraic Methods in Computer Science - 17th International Conference, RAMiCS 2018, Groningen, The Netherlands, October 29 - November 1, 2018, Proceedings, pages 3–17, 2018.
  • [Bod21] Manuel Bodirsky. Complexity of Infinite-Domain Constraint Satisfaction. Lecture Notes in Logic (52). Cambridge University Press, 2021.
  • [BP14] Manuel Bodirsky and Michael Pinsker. Minimal functions on the random graph. Israel Journal of Mathematics, 200(1):251–296, 2014.
  • [BP15] Manuel Bodirsky and Michael Pinsker. Schaefer’s theorem for graphs. Journal of the ACM, 62(3):52 pages (article number 19), 2015. A conference version appeared in the Proceedings of STOC 2011, pages 655-664.
  • [BP21] Manuel Bodirsky and Michael Pinsker. Canonical functions: a proof via topological dynamics. Homogeneous Structures, A Workshop in Honour of Norbert Sauer’s 70th Birthday, Contributions to Discrete Mathematics, 16(2):36–45, 2021.
  • [BPP21] Manuel Bodirsky, Michael Pinsker, and András Pongrácz. Projective clone homomorphisms. Journal of Symbolic Logic, 86(1):148–161, 2021.
  • [Bul03] Andrei A. Bulatov. Tractable conservative constraint satisfaction problems. In Proceedings of the Symposium on Logic in Computer Science (LICS), pages 321–330, Ottawa, Canada, 2003.
  • [Bul16] Andrei A. Bulatov. Conservative constraint satisfaction re-revisited. Journal Computer and System Sciences, 82(2):347–356, 2016. ArXiv:1408.3690.
  • [Bul17] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 319–330, 2017.
  • [CH04] Matteo Cristiani and Robin Hirsch. The complexity of the constraint satisfaction problem for small relation algebras. Artificial Intelligence Journal, 156:177–196, 2004.
  • [CL17] Hubie Chen and Benoît Larose. Asking the metaquestions in constraint tractability. TOCT, 9(3):11:1–11:27, 2017.
  • [Com84] Stephen D. Comer. Combinatorial aspects of relations. Algebra Universalis, 18(1):77–94, February 1984.
  • [Con15] Gabriel J. Conant. Model Theory and Combinatorics of Homogeneous Metric Spaces. PhD thesis, University of Illinois at Chicago, 10 2015.
  • [DLPS07] Christian Delhommé, Claude Laflamme, Maurice Pouzet, and Norbert Sauer. Divisibility of countable metric spaces. European Journal of Combinatorics, 28(6):1746–1769, 2007.
  • [Dün05] Ivo Düntsch. Relation algebras and their application in temporal and spatial reasoning. Artificial Intelligence Review, 23:315–357, 2005.
  • [HH01] R. Hirsch and I. Hodkinson. Strongly representable atom structures of relation algebras. Transactions of the American Mathematical Society, 130(6):1819–1831), 2001.
  • [HH02] Robin Hirsch and Ian Hodkinson. Relation Algebras by Games. North Holland, 2002.
  • [Hir96] Robin Hirsch. Relation algebras of intervals. Artificial Intelligence Journal, 83:1–29, 1996.
  • [Hir97] Robin Hirsch. Expressive power and complexity in algebraic logic. Journal of Logic and Computation, 7(3):309 – 351, 1997.
  • [Hir99] Robin Hirsch. A finite relation algebra with undecidable network satisfaction problem. Logic Journal of the IGPL, 7(4):547–554, 1999.
  • [HJK19] Robin Hirsch, Marcel Jackson, and Tomasz Kowalski. Algebraic foundations for qualitative calculi and networks. Theor. Comput. Sci., 768:99–116, 2019.
  • [HN16] J. Hubička and J. Nešetřil. All those Ramsey classes (Ramsey classes with closures and forbidden homomorphisms). arXiv:1606.07979v2, 2016.
  • [Hod97] Wilfrid Hodges. A shorter model theory. Cambridge University Press, Cambridge, 1997.
  • [LM94] Peter B. Ladkin and Roger D. Maddux. On binary constraint problems. Journal of the Association for Computing Machinery, 41(3):435–469, 1994.
  • [Lyn50] R. Lyndon. The representation of relational algebras. Annals of Mathematics, 51(3):707–729, 1950.
  • [Mac11] Dugald Macpherson. A survey of homogeneous structures. Discrete Mathematics, 311(15):1599–1634, 2011.
  • [Mad82] Roger Maddux. Some varieties containing relation algebras. Transactions of the American Mathematical Society, 272(2):501–501, February 1982.
  • [Mad94] Roger D. Maddux. A perspective on the theory of relation algebras. Algebra Universalis, 31(3):456–465, September 1994.
  • [Mad06a] Roger D. Maddux. Finite symmetric integral relation algebras with no 3-cycles. In Renate A. Schmidt, editor, Relations and Kleene Algebra in Computer Science, 9th International Conference on Relational Methods in Computer Science and 4th International Workshop on Applications of Kleene Algebra, RelMiCS/AKA 2006, Manchester, UK, August 29-September 2, 2006, Proceedings, volume 4136 of Lecture Notes in Computer Science, pages 2–29. Springer, 2006.
  • [Mad06b] Roger Duncan Maddux. Relation Algebras: Volume 150. Studies in logic and the foundations of mathematics. Elsevier Science, London, England, May 2006.
  • [MP20] Antoine Mottet and Michael Pinsker. Smooth approximations and CSPs over finitely bounded homogeneous structures, 2020. Preprint arXiv:2011.03978.
  • [NR89] Jaroslav Nešetřil and Vojtěch Rödl. The partite construction and Ramsey set systems. Discrete Mathematics, 75(1-3):327–334, 1989.
  • [Pos41] Emil L. Post. The two-valued iterative systems of mathematical logic, volume 5. Princeton University Press, Princeton, 1941.
  • [RN99] Jochen Renz and Bernhard Nebel. On the complexity of qualitative spatial reasoning: A maximal tractable fragment of the region connection calculus. Artificial Intelligence, 108(1-2):69–123, 1999.
  • [RN07] Jochen Renz and Bernhard Nebel. Qualitative spatial reasoning using constraint calculi. In M. Aiello, I. Pratt-Hartmann, and J. van Benthem, editors, Handbook of Spatial Logics, pages 161–215. Springer Verlag, Berlin, 2007.
  • [Sig10] Mark H. Siggers. A strong Mal’cev condition for varieties omitting the unary type. Algebra Universalis, 64(1):15–20, 2010.
  • [VKvB89] Marc Vilain, Henry Kautz, and Peter van Beek. Constraint propagation algorithms for temporal reasoning: A revised report. Reading in Qualitative Reasoning about Physical Systems, pages 373–381, 1989.
  • [Zhu17] Dmitriy N. Zhuk. A proof of CSP dichotomy conjecture. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 331–342, 2017. https://arxiv.org/abs/1704.01914.
  • [Zhu20] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. J. ACM, 67(5):30:1–30:78, 2020.