Abstract 1 Introduction 2 Preliminaries 3 Failure of preservation on graphs of cliquewidth 4 4 Extension preservation on strongly flip-flat classes 5 Conclusion References Appendix A The proof of Lemma 5 Appendix B The proof of Theorem 18

Extension Preservation on Dense Graph Classes

Ioannis Eleftheriadis ORCID Department of Computer Science and Technology, University of Cambridge, UK
Abstract

Preservation theorems provide a direct correspondence between the syntactic structure of first-order sentences and the closure properties of their respective classes of models. A line of work has explored preservation theorems relativised to combinatorially tame classes of sparse structures [Atserias et al., JACM 2006; Atserias et al., SiCOMP 2008; Dawar, JCSS 2010; Dawar and Eleftheriadis, MFCS 2024]. In this article we initiate the study of preservation theorems for dense classes of graphs. In contrast to the sparse setting, we show that extension preservation fails on most natural dense classes of low complexity. Nonetheless, we isolate a technical condition which is sufficient for extension preservation to hold, providing a dense analogue to a result of [Atserias et al., SiCOMP 2008].

Keywords and phrases:
Extension preservation, finite model theory, dense graphs, cliquewidth
Copyright and License:
[Uncaptioned image] © Ioannis Eleftheriadis; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Finite Model Theory
Funding:
The author is supported by a George and Marie Vergottis Scholarship awarded through Cambridge Trust, an Onassis Foundation Scholarship, and a Robert Sansom Studentship.
Editors:
Jörg Endrullis and Sylvain Schmitz

1 Introduction

The early days of finite model theory were considerably guided by attempts aiming to relativise theorems and techniques of classical model theory to the finite realm. While many of these were trivially shown to admit no meaningful relativisation, others were extended in a way that broadened their applicability and rendered them extremely useful tools in the study of finite models. Preservation theorems were at the heart of this approach. Most notably, the Łoś-Tarski preservation theorem which asserts that a first-order formula is preserved by extensions between all structures if and only if it is equivalent to an existential formula, was shown to fail in the finite from early on [28, 22]. On the contrary, the homomorphism preservation theorem asserting that a formula is preserved by homomorphisms if and only if it is existential-positive, was open for several years until it was surprisingly shown to extend to finite structures [27], leading to applications in constraint satisfaction problems and database theory.

Still, considering all finite structures allows for combinatorial complexity, giving rise to wildness from a model-theoretic perspective, and intractability from a computational perspective. Indeed, problems which are hard in general become tractable when restring to classes of finite structures which are, broadly-speaking, tame [12]. In the context of preservation theorems, restricting on a subclass weakens both the hypothesis and the conclusion, therefore leading to an entirely new question. A study of preservation properties for such restricted classes of finite structures was initiated in [4] and [3] for homomorphism and extension preservation respectively. This investigation led to the introduction of different notions of wideness, which allow for arguments based on the locality of first-order logic. However, as it was recently realised [14], these arguments require slightly restrictive closure assumptions which are not always naturally present. In particular, it was shown that homomorphism preservation holds over any hereditary quasi-wide class which is closed under amalgamation over bottlenecks.

Quasi-wideness is a Ramsey-theoretic condition which informally says that in any large enough structure in the class one can remove a bounded number of elements, called bottleneck points, so that there remains a large set of pairwise far-away elements. Here, the number of bottleneck points is allowed to dependent on the choice of distance. Hereditary quasi-wide classes were later identified with nowhere dense classes [24]. Over the years, a successful program was developed aiming to understand the combinatorial and model-theoretic features of nowhere dense classes, and exploit them for algorithmic purposes [25]. The culmination of this was the seminal result that first-order model checking is fixed-parameter tractable on nowhere dense classes [21].

In recent years, the focus has shifted towards extending this well understood theory to more general, possibly dense, well-behaved classes, which fall out of the classification provided by the sparsity program. In these efforts, the model-theoretic notions of monadic stability and monadic dependence have played central roles. Monadic stability, initially introduced by Baldwin and Shelah [5] in the context of classification of complete first-order theories, prohibits arbitrarily large definable orders in monadic expansions. In the language of first-order transductions, a class is monadically stable whenever it does not transduce the class of finite linear orders. More generally, a class is monadically dependent if it does not transduce the class of all graphs. In the context of monotone classes of graphs, Adler and Adler [1] first observed that the above notions coincide with nowhere density, a result which was also extended to arbitrary relational structures [7]. The generalisation of sparsity theory to dense classes eventually led to the result that first-order model checking is fixed-parameter tractable on all monadically stable graph classes [15], which in particular include transductions of nowhere dense classes. It is conjectured that the above result extends to all monadically dependent classes, while a converse was recently established for hereditary graph classes (under standard complexity-theoretic assumptions) [18].

The purpose of the present article is to initiate the investigation of preservation theorems on tame dense graph classes. Much like nowhere dense classes are equivalently characterised by quasi-wideness, monadically stable and monadically dependent graph classes also admit analogous wideness-type characterisations. In the case of monadic stability, the relevant condition is known as flip-flatness [17]; this may be viewed as a direct analogue of quasi-wideness which replaces the vertex deletion operation by flips, i.e. edge-complementations between subsets of the vertex set. For monadically dependent classes the relevant condition, known as flip-breakability [18], allows to find two large sets such that elements in one are far away from elements in the other, again after performing a bounded number of flips. However, unlike quasi-wideness which was introduced in the context of preservation and then shown to coincide with nowhere density, these conditions were introduced purely for the purpose of providing combinatorial characterisations of monadic stability and monadic dependence respectively. The immediate question thus becomes whether these conditions, or variants thereof, can be used to obtain preservation in restricted tame dense classes, in analogy to the use of wideness in [3, 4, 13, 14].

The first observation is that the arguments for homomorphism preservation are not directly adaptable in this context due to the nature of flips. Indeed, while the vertex-deletion operation respects the existence of a homomorphism between two structures, the flip operation is not at all rigid with respect to homomorphisms precisely because the latter do not reflect relations, e.g. the graph K1+K1 homomorphically maps to K2, but (K1+K1)¯=K2 does not map to K2¯=K1+K1. This issue evidently disappears if one considers embeddings. As it was observed in [14, Corollary 2.3], the extension preservation property implies the homomorphism preservation property in hereditary classes of finite structures, so considering extension preservation is more general for our purposes.

However, this generality comes at a cost. Indeed, the argument for extension preservation from [3] requires that the number of vertex-deletions is independent of the choice of radius, a condition known as almost-wideness. This is a more restrictive assumption which therefore applies to fewer sparse classes. It is not known whether extension preservation is obtainable for quasi-wide classes. At the same time, unlike [14, Theorem 4.2] whose proof is essentially a direct application of Gaifman’s locality theorem based on an argument of Ajtai and Gurevich [2], the proof of extension preservation [3, Theorem 4.3] is admittedly much more cumbersome. One explanation for this is that the homomorphism preservation argument relies on the fact that the disjoint union operation endows the category of graphs and homomorphisms with coproducts, i.e. for any graphs A,B,C if there are homomorphisms f:AC and g:BC then there is a homomorphism f+g:A+BC whose pre-compositions with the respective inclusion homomorphisms ιA:AA+B and ιB:BA+B are equal to f and g respectively. On the other hand, no construction satisfies the above property in the category of graphs with embeddings; in fact coproducts do not even exist in the category of graphs with strong homomorphisms (see [23, Corollary 4.3.15]).

Our first contribution is negative, showing that extension preservation can fail on tame dense classes of low complexity. In particular, we show that extension preservation fails on the class of all graphs of (linear) cliquewidth at most k, for all k4. This answers negatively a question of [14]. This is contrary to the sparse picture, where it was shown that extension preservation holds in the class of graphs of treewidth at most k, for every k [3, Theorem 5.2]. Interestingly, extension preservation holds for the class of all graphs of cliquewidth 2 as this class coincides with the class of cographs which is known to be well-quasi-ordered [11]. Our construction is based on the encoding of linear orders via the neighbourhoods of certain vertices. Orders are also central to the original counterexample for the failure of extension preservation in the finite due to Tait [28]. There, the orders are crucially presented over a signature with two relation symbols and one constant, which does not allow for a direct translation to undirected graphs. Sadly, the fact that orders appear to provide counterexamples rules out the possibility of using an argument based on flip-breakability to establish preservation.

The second contribution of the article is positive. In particular, we provide a dense analogue to [3, Theorem 4.3]. For this, we introduce strongly flip-flat classes, i.e. those flip-flat classes such that the number of flips is independent of the choice of radius. Moreover, we formulate the dense analogue of the amalgamation construction, which we call the flip-sum, whose existence in the class is necessary for the argument to be carried out. The main theorem (Theorem 18 below) may thus be formulated as saying that extension preservation holds over any hereditary strongly flip-flat class which is closed under flip-sums over bottleneck partitions.

2 Preliminaries

We assume familiarity with the standard notions of finite model theory and structural graph theory, and refer to [19] and [25] for reference. In this article, graphs shall always refer to simple undirected graphs i.e. structures over the signature τE={E} where E is interpreted as a symmetric and anti-reflexive binary relation. For a graph G we write V(G) for its domain (or vertex set), and E(G) for its edge set. In general, for a τ-structure A and a relation symbol Rτ of arity r we write RAAr for the interpretation of R in A. We shall abuse notation and not distinguish between structures and their respective domains.

Given two structures A,B in the same relational signature τ, a homomorphism f:AB is a map that preserves all relations, i.e. for all Rτ and tuples a¯ from A we have a¯RAf(a¯)RB. A strong homomorphism is a homomorphism f:AB that additionally reflects all relations, i.e. f(a¯)RBa¯RA. An injective strong homomorphism is called an embedding or extension.

A τ-structure B is said to be a weak substructure of a τ-structure A if BA and the inclusion map ι:BA is a homomorphism. Likewise, B is an induced substructure of A if the inclusion map is an embedding; we write BA for this. Given a structure A and a subset SA we write A[S] for the unique induced substructure of A with domain S. An induced substructure B of A is said to be proper if BA; we write BA for this. We say that a class of structures in the same signature is hereditary if it is closed under induced substructures. Moreover a class is called addable if it is closed under taking disjoint unions, which we denote by A+B.

By the Gaifman graph of a structure A we mean the undirected graph 𝖦𝖺𝗂𝖿(A) with vertex set A such that two elements are adjacent if, and only if, they appear together in some tuple of a relation of A. Given a structure A, r, and aA, we write NrA(a) for the r-neighbourhood of a in A, that is, the set of elements of A whose distance from a in 𝖦𝖺𝗂𝖿(A) is at most r. We shall often abuse notation and write NrA(a) for the induced substructure A[NrA(a)] of A. For a set CA we define NrA(C):=aCNrA(a). A set SA is said to be r-independent if bNrA(a) for any a,bS.

For r, let dist(x,y)r be the first-order formula expressing that the distance between x and y in the Gaifman graph is at most r, and dist(x,y)>r its negation. Clearly, the quantifier rank of dist(x,y)r is at most r. A basic local sentence is a sentence

x1,,xn(ijdist(xi,xj)>2ri[n]ψNr(xi)(xi)),

where ψNr(xi)(xi) denotes the relativisation of ψ to the r-neighbourhood of xi, i.e. the formula obtained from ψ by replacing every quantifier xθ with x(dist(xi,x)rθ), and likewise every quantifier xθ with x(dist(xi,x)rθ). We call r the locality radius, n the width, and ψ the local condition of ϕ. Recall the Gaifman locality theorem [19, Theorem 2.5.1].

Theorem 1 (Gaifman Locality).

Every first-order sentence of quantifier rank q is equivalent to a Boolean combination of basic local sentences of locality radius 7q.

A class 𝒞 of structures is said to be quasi-wide if for every r there exist kr and fr: such that for all m and all A𝒞 of size at least fr(m) there exists SA such that AS contains an r-independent set of size m. Moreover, if kr:=k is independent of r, then 𝒞 is said to be almost-wide. Finally, we say that a class 𝒞 is uniformly quasi-wide (uniformly almost-wide respectively) if the hereditary closure of 𝒞 is quasi-wide (almost-wide respectively).

For a graph G and a pair of disjoint vertex subsets U and V, the subgraph semi-induced by U and V is the bipartite graph with sides U and V that contains all edges of G with one endpoint in U and second in V. By the half-graph of order n we mean the bipartite graph with vertices {ui,vi:i[n]} and edges {(ui,vj):ij}.

For first-order formulas δ(x) and ϕ(x,y) the interpretation Iδ,ϕ is defined to be the operation that maps a graph G to the graph H:=Iδ,ϕ(G) with vertex set V(H):={vV(G):Gδ(v)} and edge set

E(H):={(u,v)V(H)2:uvG(ϕ(u,v)ϕ(v,u))}.

For a graph class 𝒞, we write Iδ,ϕ(𝒞):={Iδ,ϕ(G):G𝒞}. We say that a class 𝒞 is an interpretation of a class 𝒟, or that 𝒟 interprets 𝒞, if there is some Iδ,ϕ such that 𝒞Iδ,ϕ(𝒟). We say that 𝒞 is a transduction of a class 𝒟, or 𝒟 transduces 𝒞, if there are k and unary predicates P1,,Pk and formulas δ(x) and ϕ(x,y) over the signature τE{P1,,Pk} such that 𝒞Iδ,ϕ(𝒟k), where 𝒟k is the class of all τE{P1,,Pk}-structures whose τE-reducts are in 𝒟. A graph class 𝒞 is monadically dependent if 𝒞 does not transduce the class of all graphs. 𝒞 is moreover monadically stable if 𝒞 does not transduce the class of all half-graphs.

We say that a formula ϕ is preserved by extensions over a class of structures 𝒞 if for all A,B𝒞 such that there is a embedding from B to A, Bϕ implies that Aϕ. We say that a class of structures 𝒞 has the extension preservation property if for every formula ϕ preserved by extensions over 𝒞 there is an existential formula ψ such that MϕMψ for all M𝒞. We analogously define the homomorphism preservation property, replacing “embeddings” with “homomorphisms” and “existential” with “existential positive” in the above.

Given a formula ϕ and a class of structures 𝒞, we say that M𝒞 is a minimal induced model of ϕ in 𝒞 if Mϕ and for any proper induced substructure N of M with N𝒞 we have N⊧̸ϕ. The relationship between minimal models and extensions preservation is highlighted by the following folklore lemma. We provide a proof for completeness.

Lemma 2.

Let 𝒞 be a hereditary class of finite structures. Then a sentence preserved by extensions in 𝒞 is equivalent to an existential sentence over 𝒞 if and only if it has finitely many minimal induced models in 𝒞.

Proof.

Suppose that ϕ has finitely many minimal induced models in 𝒞, say M1,,Mn. For each i[n], let ψi be the primitive sentence inducing a copy of Mi and write ψ:=i[n]ψi; evidently ψ is existential. We argue that ϕ is equivalent to ψ over 𝒞. Indeed, if A𝒞 models ϕ then A contains a minimal induced model B of ϕ as an induced substructure. By hereditariness B𝒞 and so B is isomorphic to some Mi. Since there is clearly an embedding BA it follows that Aψ. On the other hand if Aψ, then Aψi for some i[n] and so some Mi embeds into A. Since Miϕ and ϕ is preserved by extensions this implies that Aϕ as required.

Conversely, assume that ϕ is equivalent to an existential sentence over 𝒞. In particular, ϕ is equivalent to some disjunction i[n]ψi where each ψi is primitive. It follows that each ψi is the formula inducing one of finitely many structures M1i,,Mkii. Now, if A is a minimal induced model of ϕ then in particular Aψi for some i[n], i.e. there is some j[ki] and an embedding h:MjiA. If h is not surjective, then A[h[Mji]] is a proper induced substructure of A, which is in 𝒞 by hereditariness, and models ϕ; this contradicts the minimality of A. Hence, the size of every minimal induced model of ϕ in 𝒞 is bounded by maxi[n]maxj[ki]|Mji|. It follows that ϕ can have only finitely many minimal induced models in 𝒞.

3 Failure of preservation on graphs of cliquewidth 4

One consequence of Lemma 2 is that extension preservation holds over any class 𝒞 that is well-quasi-ordered by the induced substructure relation, i.e. classes for which there exists no infinite collection of members which pairwise do not embed into one another. In particular, this applies to the class of cographs [11], which are precisely the graphs of cliquewidth 2 (see [9] for background on cliquewidth). Hence, one may reasonably inquire whether extension preservation is generally true for the class 𝒞𝒲k of all graphs of cliquewidth at most k. This would in particular reflect an analogous phenomenon that is true in the sparse setting, that is, that extension preservation holds over the class 𝒯𝒲k of all graphs of treewidth at most k [3, Theorem 5.2].

Classes of bounded cliquewidth are not monadically stable, as even the class of cographs contains arbitrarily large semi-induced half-graphs, but they are monadically dependent. In fact, their structural properties imply tame behaviour going much beyond the context of first-order logic (see [10] for a survey). Still, as it turns out, extension preservation fails even at the level of cliquewidth 4. To show this, we produce a formula ϕ preserved by extensions over the class of all finite undirected graphs, which admits infinitely many minimal models of cliquewidth 4. In particular, Lemma 2 implies that extension preservation fails on any class that includes these minimal models. Our idea is based on encoding two interweaving linear orders on the two parts of a semi-induced graph. Two vertices on the same part are comparable in this ordering whenever their neighbourhoods in the other part are set-wise comparable. This effectively forces a semi-induced half-graph.

Our formula is in the form of an implication, proceeded by a primitive part which induces a gadget corresponding to the beginning and end of the two linear orders. The antecedent of the implication first makes sure that the above relation is a pre-ordering on each side of the semi-induced graph, while it imposes that the vertices of the gadget corresponding to the minimal and maximal elements are indeed minimal and maximal in this pre-ordering. Moreover, it essentially ensures that successors, i.e. vertices of the same part whose neighbourhoods over the other part differ by a single element, are adjacent on one part and non-adjacent on the other. The consequent then imposes that any vertex on the first side has an adjacent successor, while every vertex on the other side has a non-adjacent successor. Because each one of the two pre-orders precisely compares neighbourhoods over the other part, this forces the pre-orders to be anti-symmetric, and thus the two parts to have the same number of vertices.

Finally, two additional vertices are also added on one side of the semi-induced bipartite graph, which are part of the gadget and serve no role in this ordering. These make sure that our intended minimal models form an anti-chain in the embedding relation, as they crucially result in the existence of a unique embedding of the gadget into the models (Lemma 5 below).

We now turn to formal definitions. Let I(v1,v2,v3,v4,v5,v6,u1,u2,u3,u4,u5,u6,a,b) be the formula that induces the graph of Figure 1 below. In the following, we treat the free variables of I as constants for simplicity. The notation (xU) will denote the relativisation of the universal quantifier to the neighbours of v1 that are not v2, i.e. (xU)ψ(x) is shorthand for x(E(x,v1)xv2ψ(x)). Likewise, the notation (xV) denotes the relativisation of the universal quantifier to the non-neighbours of v1 that are not a or b, i.e. (xV)ψ(x) is shorthand for x(¬E(x,v1)xaxbψ(x)). Existential quantifiers relativised to U and V are defined analogously. Consider the auxiliary formulas:

xVy:=(zU)[E(z,x)E(z,y)];
x<Vy:=xVy¬(yVx);
χ1:=(xV)(yV)[xVyyVx];
χ2:=(xU)[E(x,v6)x=u6];
χ3:=(xV)(yV)[x<VyE(x,y)!(zU)(E(y,z)¬E(x,z))].

In analogy, we define:

xUy:=(zV)[E(z,x)E(z,y)];
x<Uy:=xUy¬(yUx);
ξ1:=(xU)(yU)[xUyyUx];
ξ2:=(xV)[E(x,u1)x=v1];
ξ2:=(xV)E(x,u6);
ξ3:=(xU)(yU)[x<Uy¬E(x,y)!(zV)(E(y,z)¬E(x,z))].

We then define:

ϕ1:=χ1χ2χ3;
ϕ2:=(xV)[xv1(yV)(E(x,y)x<Vy)];
ψ1:=ξ1ξ2ξ2ξ3;
ψ2:=(xU)[xu6(yU)(¬E(x,y)x<Uy)].

Putting the above together we finally define:

ϕ:=v¯,u¯,a,b(I(v¯,u¯,a,b)[ϕ1(v¯,u¯,a,b)ψ1(v¯,u¯,a,b)ϕ2(v¯,u¯,a,b)ψ2(v¯,u¯,a,b)])
Figure 1: The gadget induced by I(v¯,u¯,a,b).
Proposition 3.

The formula ϕ is preserved by extensions over the class of all finite graphs.

Proof.

Let G,H be two graphs such that G embeds into H, and Gϕ. Without loss of generality we assume that V(G)V(H) and that the identity map is an embedding. We shall argue that Hϕ.

Since Gϕ, we may fix (tuples of) vertices v¯,u¯,a,bV(G) such that GI(v¯,u¯,a,b). Evidently, H also models I(v¯,u¯,a,b). If H⊧̸(ϕ1(v¯,u¯,a,b)ψ1(v¯,u¯,a,b)) then Hϕ; we may therefore assume that H(ϕ1(v¯,u¯,a,b)ψ1(v¯,u¯,a,b)). Let U:=NH(v1){v2}V(H) be the neighbours of v1 in H that are not v2, and V:=V(H)(U{a,b})V(H) be the non-neighbours of v1 that are not a or b (in particular v1V). We call the vertices xV V-elements. For each V-element x we write Ux:={yU:HE(x,y)} for the U-neighbourhood of x. We similarly define U-elements and V-neighbourhoods. From each of the conjuncts χi of ϕ1 we deduce that in H:

χ1:

V-elements have pairwise comparable U-neighbourhoods;

χ2:

the only member of Uv6 is u6;

χ3:

if two adjacent V-elements x,y satisfy UxUy then |Uy|=|Ux|+1.

We shall argue that items (1)-(3) are still true within G, replacing V with V:=VV(G) and U with U:=UV(G), and so Gϕ1(v¯,u¯,a,b). We write Ux:=UxV(G) for the relativised U-neighbourhoods. Clearly, items (1) and (2) are still true in G. For item (3), suppose that x,yV are two adjacent V-elements, such that VxVy. Since V-elements in H have pairwise comparable U-neighbourhoods, we deduce that VxVy and therefore that |Vy|=|Vx|+1 as H satisfies χ3. In particular, it follows that |Vy|=|Vx|+1 as required, and so G models χ3(v¯,u¯,a,b) and consequently ϕ1(v¯,u¯,a,b).

Similarly, from each of the conjuncts ξi of ψ1 we deduce that in H:

ξ1:

U-elements have pairwise comparable V-neighbourhoods;

ξ2:

the only element of Vu1 is v1;

ξ2:

Vu6 is equal to V;

ξ3:

if two non-adjacent U-elements satisfy VxVy then |Vy|=|Vx|+1.

Arguing as before, we obtain that Gψ1(v¯,u¯,a,b). Since Gϕ and G(ϕ1(v¯,u¯,a,b)ψ1(v¯,u¯,a,b)) we deduce that G(ϕ2(v¯,u¯,a,b)ψ2(v¯,u¯,a,b)), i.e. the following are true in G:

ϕ2:

every V-element that is not v1 is adjacent to a V-element of strictly greater U-neighbourhood;

ψ2:

every U-element that is not u6 is non-adjacent to a U-element of strictly greater V-neighbourhood.

We proceed to show that the above implies that V=V and U=U, and hence G=H. In particular, this implies that Hϕ as claimed.

Since G is finite and satisfies ϕ2 we obtain some n and a sequence of distinct elements α1:=v6,α2,,αn:=v1 of V such that UαiUαi+1 and GE(αi,αi+1) for all i[n1]. In particular, UαiUαi+1 and HE(αi,αi+1) for all i[n]. As H satisfies χ3 we obtain that |Uαi+1|=|Uαi|+1 for all i. Moreover, since H satisfies χ2 and every element of U is adjacent to v1, we obtain that Uα1={u6} and Uαn=U. In particular, we deduce that n=|U||V|. Symmetrically, we obtain some k and a sequence of elements β1:=u1,β2,,βk:=u6 of U such that VβiVβi+1 and G¬E(βi,βi+1) for all i[k1]. Hence, VβiVβi+1 and H¬E(βi,βi+1) for all i[k1]. Once again, since H satisfies ξ2, ξ2, and ξ3 we obtain that Vβ1={v1}, Vβn=V, and |Vβi+1|=|Vβi|+1. It thus follows that k=|V||U|. Putting the above together we have that

|U||V||V||U||U|.

Consequently, n=k while V=V={α1,,αn} and U=U={β1,,βn} as needed.

We now define the intended minimal induced models of our formula ϕ.

Definition 4.

For n7 we define the graph n with vertex and edge set

V(n):={v1,,vn}{u1,,un}{a}{b};
E(n):={(vi,uj):ij}{(vi,vj):j=i+1}{(ui,uj):ji+1}
{(a,ui):i2}{(b,ui):in1}{(a,v2),(b,vn1)},

respectively. We also write n for the subgraph of n induced on the set

V(n):={v1,v2,v3,vn2,vn1,vn,u1,u2,u3,un2,un1,un,a,b}V(n).
Figure 2: The graph 7.

We aim to establish that the graphs n are all minimal induced models of ϕ. Towards this, we first argue that the only embedding of n in n is the inclusion map. While this lemma is not conceptually difficult, it requires analysing and ruling out different cases corresponding to potential images of the gadget. Its proof may be found in Appendix A.

Lemma 5.

Let n7 and f:nn be an embedding. Then f is the inclusion map.

Proposition 6.

For each n7 the graphs n are minimal induced models of ϕ.

Proof.

We fix some n7. We first argue that nϕ for every n7. Indeed, we clearly have that

nI(v1,v2,v3,vn2,vn1,vn,u1,u2,u3,un2,un1,un,a,b).

Moreover, the set U:={u1,,un}V(n) is precisely the set of neighbours of v1 which are not v2, while the set V:={v1,,vn}V(n) is precisely the set of non-neighbours of v1 which are not a or b. Evidently, we then have that for every vertex viV{v1} the vertex vi1V is adjacent to vi and its neighbourhood over U strictly contains that of vi. Consequently nϕ2(v¯,u¯,a,b). Likewise, for every vertex uiU{un} the vertex ui+1U is non-adjacent to ui and its neighbourhood over V strictly contains that of ui. It follows that nψ2(v¯,u¯,a,b), and so nϕ as required.

Now, suppose that H is a proper induced subgraph of n, and assume for a contradiction that Hϕ, i.e. there are vertices x1,,x6,y1,,y6,α,β of H

H(I(x¯,y¯,α,β)[ϕ1(x¯,y¯,α,β)ψ1(x¯,y¯,α,β)ϕ2(x¯,y¯,α,β)ψ2(x¯,y¯,α,β)]).

Since these vertices induce a copy of n, it follows by Lemma 5 that

(x1,x2,x3,x4,x5,x6,y1,y2,y3,y4,y5,y6,α,β)=(v1,v2,v3,vn2,vn1,vn,u1,u2,u3,un2,un1,un,a,b),

and so nHn. Moreover, letting U:=UV(H) and V:=VV(H) we see that

  • the elements in V have pairwise comparable neighbourhoods over U, and the elements of U have pairwise comparable neighbourhoods over V;

  • the only neighbour of vn in U is un, and the only neighbour of u1 in V is v1;

  • un is adjacent to every element of V;

  • if x,yV are adjacent and the U-neighbours of y are strictly more than the U-neighbours of x then there is some i[n1] such that y=vi and x=vi+1, and there is a unique vertex in U that is adjacent to y and not adjacent to x, namely ui;

  • if x,yU are adjacent and the V-neighbours of y are strictly more than the V-neighbours of x then there is some i[n1] such that y=vi+1 and y=vi, and there is a unique vertex in V that is adjacent to y and not adjacent to x, namely vi.

It follows that H(ϕ1(v¯,u¯,a,b)ψ1(v¯,u¯,a,b)). Since Hϕ this implies that H(ϕ2(v¯,u¯,a,b)ψ2(v¯,u¯,a,b)). However, since V(H)V(n), there is some i[4,n3] such that viV(H) or uiV(H). Assume the former, and let i[4,n3] be maximal such that viV(H). It follows that there is no vertex in xV that is adjacent to vi+1 and its neighbourhood over U is strictly greater than that of vi+1, contradicting that Hψ1(v¯,u¯,a,b). By a symmetric argument we obtain a contradiction if uiV(H), and thus follows that H⊧̸ϕ.

Theorem 7.

Extension preservation fails on any hereditary graph class containing the graphs n for arbitrarily large n.

Proof.

Let 𝒞 be a class of graphs containing the graphs n for arbitrarily large n. Since the formula ϕ is preserved under extensions over the class of all finite graphs, it is in particular preserved under extensions over 𝒞. Since 𝒞 is hereditary and ϕ has infinitely many minimal induced models in 𝒞, namely the graphs n, it follows by Lemma 2 that ϕ is not equivalent to an existential formula over 𝒞.

Finally, we observe that the graphs n have bounded cliquewidth, which is easily seen to be at most 4. For this, we crucially use the fact that successive pairs are adjacent on one side and non-adjacent on the other. One could simplify the construction, e.g. by using adjacency to denote succession on both sides, but this would slightly increase the cliquewidth.

Observation 8.

The graphs n have (linear) cliquewidth 4.

Corollary 9.

Extension preservation fails on 𝒞𝒲k for every k4.

As witnessed by the above, orders appear to provide strong counterexamples to extension preservation. In the next section we explore preservation in certain monadically stable classes, where no such issues are expected to arise.

4 Extension preservation on strongly flip-flat classes

Local information on dense graphs can be as complicated as global information, as for instance is the case with cliques. This fact seemingly renders locality useless in the context of dense graph classes. Nonetheless, our understanding of tame classes indicates that it is still possible to recover meaningful local information, after possibly “sparsifying” our graphs in a controlled manner. The flip operation, which is central to the emerging theory of dense graph classes, plays precisely this role. We introduce it in the following definition.

Definition 10.

Let G be a graph and k. A k-partition P of G is a partition of the vertex set into k labelled parts P1,,Pk, i.e. V(G)=i[k]Pi and PiPj= for ij. By a k-flip F we denote a symmetric subset of [k]2, i.e. a set of tuples F={(i,j):i,j[k]} such that (i,j)F(j,i)F. Given a k-partition P of G and a k-flip F we define the graph GFP on the same vertex set as G and on the edge set

E(GFP):=E(G){(u,v):uv,uPi,vPj, and (i,j)F}.

where denotes the symmetric difference operation.

We note that the notation for flips existing in the literature uses the notation rather than (e.g. in [17]); here we have opted for the latter as the symbol was used in [3] and [14] to denote the amalgamation operation. Moreover, instead of partitioning our graph, we may define k-flips by applying a sequence of at most k atomic operations, each one switching the edges and non-edges between two arbitrary subsets A,B of our vertex set. Evidently, these definitions are equivalent up to blowing up the number of flips by a value that only depends on k, while we have opted for the partition definition here to simplify our construction in Definition 14 below.

Definition 11.

We say that a hereditary class of graphs 𝒞 is flip-flat111The original definition of flip-flatness in [17] is the uniform variant of the definition we have provided here. A simple analysis of the obstructions to monadic stability from [16], reveals that these definitions are equivalent for hereditary classes of graphs. if for every r there exist kr and a function fr: satisfying that for every m and every G𝒞 of size at least fr(m) there is a kr-partition P of G, a kr-flip F[kr]2, and a set AV(G) of size at least m which is r-independent in GFP. If in the above kr:=k does not depend on r, then we say that 𝒞 is strongly flip-flat.

It was established in [17, Theorem 1.3] that a hereditary class of graphs is flip-flat if, and only if, it is monadically stable. In particular, every transduction of a quasi-wide class is flip-flat. The qualitative difference between strong flip-flatness and flip-flatness is precisely the same as that of almost-wideness and quasi-wideness. We make this idea precise in the following straightforward proposition, which establishes that every transduction of a uniformly almost-wide class is strongly flip-flat. For this, we use the following lemma from [29, Lemma H.3], which follows easily from Gaifman’s locality theorem.

Lemma 12 (Flip transfer lemma, [29]).

There exists a (computable) function Ξ:3 satisfying the following. Fix k,c,q1 and 𝒯δ,ϕ a transduction involving c colours and formulas of quantifier rank at most q. Let G,H be graphs such that HTδ,ϕ(G). Then for every k-partition P of G and k-flip F there exists a Ξ(k,c,q)-partition PH of H and a Ξ(k,c,q)-flip FH such that for all u,vV(H):

distGFP(u,v)2qdistHFHPH(u,v).
Proposition 13.

Every transduction of a uniformly almost-wide graph class is strongly flip-flat.

Proof.

Let 𝒞 be a uniformly almost-wide graph class and fix k𝒞 witnessing this, so that for every r,m there is fr(m) satisfying that every G of size at least fr(m) in the hereditary closure of 𝒞 contains an r-independent set of size m after removing at most k𝒞 elements. Let 𝒟 a class such that there is a transduction Tδ,ϕ satisfying 𝒟Tδ,ϕ(𝒞). Let c be the number of unary predicates used by T, and q be the maximum of the quantifier ranks of δ and ϕ. We argue that 𝒟 is strongly flip-flat with k:=Ξ(2k𝒞,c,q).

Indeed, fix r,m and a graph H𝒟 of size at least f2qr(m). It follows that there exists some G𝒞 such that HTδ,ϕ(G), and since f2qr(m)|V(H)|, we obtain by uniform almost-wideness that G[V(H)] contains a (2qr)-independent set of size m after removing a set of size at most k𝒞. In particular, there is a 2k𝒞-partition P of G and a 2k𝒞-flip F such that (GFP)[V(H)] contains an (2qr)-independent subset of size m; call this set A. Consequently, Lemma 12 implies that there is a k-partition P of H and a k-flip F such that for all a,bAV(H)

r=2qr2qdistGFP(a,b)2qdistHFHPH(a,b),

i.e. A is an r-independent set of size m in HFHPH. It follows that 𝒟 is strongly flip-flat.

In particular, transductions of bounded degree classes, classes of bounded shrub-depth [20], and transductions of proper minor-closed classes [4, Theorem 5.3] are all strongly flip-flat. However, obtaining preservation via locality and wideness in the style of [3, 4, 13, 14] additionally requires subtle closure assumptions. The proofs of the above articles are essentially structured into two parts. The first part argues via locality that for every formula ϕ preserved by extensions (or homomorphisms in the case of [4, 13, 14]) over a class 𝒞 closed under substructures and disjoint unions there exist r,m such that no minimal induced model of ϕ in 𝒞 can contain an r-independent set of size m. In the second part, wideness is used to bound the size of minimal models of ϕ, as large enough models would have to contain r-independent sets of size m, under the proviso that a bounded number of bottleneck points have been removed. To account for the removal of these points, we have to work with an adjusted formula ϕ in an expanded vocabulary, together with suitably adjusted structures ([2] called these plebian companions) on which we apply the argument of the first part. Working with ϕ, however, has translated the requirement of closure under disjoint unions to closure under a more involved operation which depends on the choice of bottlenecks. Consequently, preservation can fail on natural tame classes which do not satisfy this closure condition, e.g. for planar graphs [14, Theorem 5.8].

In the context of vertex deletions, the corresponding operation was amalgamation over bottlenecks [14, Theorem 4.2]. Here, we must formulate a different operation to account for the fact that flips are required to witness wideness. This is precisely the construction below.

Definition 14.

Given k, a graph G, a k-partition P of G, and a k-flip F[k2] we write G(F,P)G for the graph whose vertex set V(G(F,P)G):=V(G+G) is the same as the disjoint union of two copies of G, and whose edge set is

E(G(F,P)G):=E(G+G){(u,v):u,v are in distinct copies of G,uPi,vPj,(i,j)F}

We call this the flip-sum of G over (F,P).

Figure 3: The graph H(F,P)H, where H is the half-graph of order 4, P is the partition into red (top) and blue (bottom) vertices and F={(1,2),(2,1)}.

We now introduce the relevant translation for the formulas.

Definition 15.

Given a k-flip F[k]2, consider the formula

EF(x,y):=E(x,y)(i,j)F(Pi(x)Pj(y)).

over the signature τEk:=τE{P1,,Pk}, where (i,j)F denotes the consecutive application of the 𝖷𝖮𝖱 operator over all tuples (i,j)F. Given a τE-formula ϕ, we define the τEk-formula ϕk obtained from ϕ by replacing every atom E(x,y) with the formula EF(x,y). Moreover, for every graph G and k-partition P we write G(F,P) for the {P1,,Pk}-expansion of GFP where each predicate is interpreted by the respective part of P. It is then clear from the definitions and the fact that the flip operation is involutive that

GϕG(F,P)ϕk.

Our goal in Theorem 18 is to start with a strongly flip-flat class and a formula ϕ and apply the argument of [3, Theorem 4.3] to the formula ϕk and the structures G(F,P). However, as previously explained, ϕk is not necessarily preserved under embeddings over 𝒞. We can nonetheless use the following easy lemma in case that the class is closed under the desired flip-sums, which will be sufficient for our purposes.

Lemma 16.

Let 𝒞 be a hereditary class of graphs and ϕ a formula preserved under extensions over 𝒞. Fix a graph G𝒞, a k-partition P of G, and a k-flip F[k]2. If G(F,P)G𝒞 then

G(F,P)ϕkG(F,P)+G(F,P)[S]ϕk

for any SV(G).

Proof.

Fix 𝒞,ϕ,G,P,F as in the statement above, and let SV(G). Write G for the subgraph of G(F,P)G induced on the vertex set of G+G[S]; it follows that G𝒞 by hereditariness. As G(F,P)ϕk we obtain that Gϕ, and since G contains an induced copy of G and ϕ is preserved by extensions over 𝒞 it follows that Gϕ. Let P be the natural k-partition of G inherited from G, i.e. for each i[k] the i-th part Pi of P contains the union of the i-th parts of G and G[S]. It follows from the definitions that the structure G(F,P) is isomorphic to G(F,P)+G(F,P)[S]. Finally, since Gϕ we obtain that G(F,P)ϕk and so G(F,P)+G(F,P)[S]ϕk as claimed.

We shall also make use of the following observation, which simply says that the induced substructures of G(F,P) are the same as expansions of flips of induced substructures of G.

Observation 17.

Let G be a graph, P a k-partition of G, and F a k-flip. Then for every SV(G) the structure G(F,P)[S] is equal to G[S](F,PS), where PS is the k-partition of G[S] obtained by restricting each part of P on S.

We are now ready to state the main theorem of this section.

Theorem 18.

Fix a hereditary class of graphs 𝒞. Suppose that there is some k such that for all r there is a function fr: satisfying that for every m and every G𝒞 of size at least f(m) there is a k-partition P of V(G), some k-flip F, and AV(G) such that

  1. 1.

    |A|m;

  2. 2.

    A is r-independent in GFP;

  3. 3.

    G(F,P)G𝒞.

Then extension preservation holds over 𝒞.

The proof of Theorem 18 is an adaptation of the proof of [3, Theorem 4.3], which established that extension preservation holds over any class closed under weak substructures and disjoint unions which is wide, i.e. for every r there exists fr: such that for every m every structure with at least fr(m)-many elements contains an r-independent set of size m. Here, we replace wideness by strong flip-flatness by working with the formula ϕk of Definition 15. Moreover, as previously explained, addability is replaced by assumption 3 above. Preservation is then ensured by Lemma 22. Finally, going from closure under weak substructures to closure under induced substructures follows by analysing [3, Theorem 4.3]. The detailed proof can be found in Appendix B.

Example 19.

For d, write 𝒟d be the class of all graphs G such that the maximum degree of G is at most d, or the maximum degree of G¯, i.e. the complement graph of G, is at most d. Let fr(m)=(m1)(d+1)r+1 and consider a graph G𝒟d of size at least fr(m). If G has maximum degree d, then G must contain an r-independent set of size m. Consequently, letting P={V(G)} and F=, we see that G(F,P)G is simply the disjoint union of two copies of G, which still has maximum degree d and is therefore in 𝒟d. On the other hand if G¯ has maximum degree d, then for P={V(G)} and F={(1,1)}, we see that G¯=GFP has an r-independent set of size m. Since G(F,P)G is the complement of the disjoint union of two copies of G¯ and so G(F,P)G¯ has maximum degree d, it follows that G(F,P)G𝒟d. Consequently, extension preservation holds over 𝒟d by Theorem 18.

As mentioned above, Lemma 2 implies that any well-quasi-ordered class has the extension preservation property. In particular, this applies to classes of bounded shrubdepth [20, Corollary 3.9]. Still, in the following example we indirectly show that the class of all graphs of 𝒮𝒞-depth at most k has extension preservation by showing that it satisfies the requirements of Theorem 18, as an illustration that, although closure under flip-sums is a technical condition, it can be present in interesting tame dense classes.

Definition 20 ([20], Definition 3.5).

We inductively define the class 𝒮𝒞(k) as:

  • 𝒮𝒞(0)={K1};

  • If G1,,Gn𝒮𝒞(k),H:=G1++Gn and XV(H), then H¯X:=HFP𝒮𝒞(k+1) for P1:=X,P2:=V(H)X and F={(1,1)}, i.e. H¯X is the graph obtained from H by flipping the edges within X.

Example 21.

Fix k and let G𝒮𝒞(k). Consider an 𝒮𝒞-decomposition tree of G, i.e. a labelled tree 𝒯 of height k+1 whose leaves are labelled by the vertices of G, every non-leaf node is labelled by the graph (G1+Gn)¯X where Gi are the labels of its children, X is a subset of i[n]V(Gi), and the root ρ is labelled by G. Let f(m)=mk+1, and suppose that |G|>f(m). Since 𝒯 has height k+1 and its leaves correspond to the vertices of G, there must exist some vertex t of 𝒯 with at least m children. Let t1:=ρ,t2,,t:=t be the unique path from the root of 𝒯 to t, and for each i[] let XiV(G) be the set coming from the label of ti. Letting P the partition of V(G) into 2 parts depending on the membership of a vertex within each of X1,,X and F[2]2 be the flip that corresponds to complementing each of X1,,X, it follows that GFP contains at least m distinct connected components. Let 𝒯 be the tree obtained from 𝒯 by the following operation. We first create a copy of each subtree of 𝒯 rooted at a child of t and connect them to t. The labels are naturally carried from each original subtree to the copy. If the label of t in 𝒯 was (G1++Gm)¯X, then its label in 𝒯 is (G1+G1++Gm+Gm)¯XX where each Gi corresponds to the copy of Gi, and X corresponds to the set of copies of the vertices in X. From there, we perform the same operation for i=1,,1, this time copying only the children of ti that are not ti+1. This completes the construction of 𝒯. It is easy to then see than the root of 𝒯 corresponds to the graph G(F,P)G, thus witnessing that G(F,P)G𝒮𝒞(k). It follows that the class 𝒮𝒞(k) satisfies the requirements of Theorem 18, and thus extension preservation holds over this class.

5 Conclusion

We conclude with some questions and remarks. Firstly, it would be of independent interest to provide a characterisation of strongly flip-flat classes, akin to the characterisation of almost-wide classes via shallow minors given in [24, Theorem 3.21]. This could either be a characterisation via excluded induced subgraphs occurring in flips, in analogy to the one of monadic stability provided in [15], or in terms of shallow vertex minors, in analogy to the one in [8].

Moreover, it is unclear whether one can produce a formula preserved by extensions with minimal induced models of cliquewidth 3. The issue with interweaving definable orders is that one simultaneously requires for two sets to semi-induce a half-graph while (non-)adjacency is used to mark successors; this requires to keep track of at least four colours classes in a clique decomposition. We therefore leave the question of whether extension preservation holds over graphs of cliquewidth 3 open. It is also easily seen that the structures n have twin-width 2 (see [6] for definitions). The status of extension preservation on the class of all graphs of twin-width 1 is also unknown.

The role of orders was crucial in our construction in Section 3. In the context of undirected graphs, orders are instantiated through half-graphs. It natural to then inquire if, for every fixed k,, the class of all graphs of cliquewidth at most k which omit semi-induced half-graphs of size larger than has the extension preservation property. Every such class is known to be equal to a transduction of a class of bounded treewidth by [26], and so by Proposition 13, it is strongly flip-flat. It would therefore be interesting to provide a direct combinatorial argument witnessing this, so as to be able to verify if such classes satisfy the closure requirements of Theorem 18.

References

  • [1] Hans Adler and Isolde Adler. Interpreting nowhere dense graph classes as a classical notion of model theory. European Journal of Combinatorics, 36:322–330, 2014. doi:10.1016/j.ejc.2013.06.048.
  • [2] Miklos Ajtai and Yuri Gurevich. Datalog vs first-order logic. Journal of Computer and System Sciences, 49(3):562–588, 1994. 30th IEEE Conference on Foundations of Computer Science. doi:10.1016/S0022-0000(05)80071-6.
  • [3] Albert Atserias, Anuj Dawar, and Martin Grohe. Preservation under extensions on well-behaved finite structures. SIAM Journal on Computing, 38(4):1364–1381, 2008. doi:10.1137/060658709.
  • [4] Albert Atserias, Anuj Dawar, and Phokion G Kolaitis. On preservation under homomorphisms and unions of conjunctive queries. Journal of the ACM (JACM), 53(2):208–237, 2006. doi:10.1145/1131342.1131344.
  • [5] John T Baldwin and Saharon Shelah. Second-order quantifiers and the complexity of theories. Notre Dame Journal of Formal Logic, 26(3):229–303, 1985. doi:10.1305/NDJFL/1093870870.
  • [6] Édouard Bonnet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width I: tractable fo model checking. ACM Journal of the ACM (JACM), 69(1):1–46, 2021. doi:10.1145/3486655.
  • [7] Samuel Braunfeld, Anuj Dawar, Ioannis Eleftheriadis, and Aris Papadopoulos. Monadic nip in monotone classes of relational structures. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023.
  • [8] Hector Buffière, Eun Jung Kim, and Patrice Ossona de Mendez. Shallow vertex minors, stability, and dependence. arXiv preprint arXiv:2405.00408, 2024.
  • [9] Bruno Courcelle and Stephan Olariu. Upper bounds to the clique width of graphs. Discrete Applied Mathematics, 101(1):77–114, 2000. doi:10.1016/S0166-218X(99)00184-5.
  • [10] Konrad K. Dabrowski, Matthew Johnson, and Daniël Paulusma. Clique-width for hereditary graph classes, pages 1–56. London Mathematical Society Lecture Note Series. Cambridge University Press, 2019. doi:10.1017/9781108649094.002.
  • [11] Peter Damaschke. Induced subgraphs and well-quasi-ordering. Journal of Graph Theory, 14(4):427–435, 1990. doi:10.1002/JGT.3190140406.
  • [12] Anuj Dawar. Finite model theory on tame classes of structures. In International Symposium on Mathematical Foundations of Computer Science, pages 2–12. Springer, 2007. doi:10.1007/978-3-540-74456-6_2.
  • [13] Anuj Dawar. Homomorphism preservation on quasi-wide classes. Journal of Computer and System Sciences, 76(5):324–332, 2010. doi:10.1016/J.JCSS.2009.10.005.
  • [14] Anuj Dawar and Ioannis Eleftheriadis. Preservation theorems on sparse classes revisited. arXiv preprint arXiv:2405.10887, 2024. doi:10.48550/arXiv.2405.10887.
  • [15] Jan Dreier, Ioannis Eleftheriadis, Nikolas Mählmann, Rose McCarty, Michał Pilipczuk, and Szymon Toruńczyk. First-order model checking on monadically stable graph classes. arXiv preprint arXiv:2311.18740, 2023.
  • [16] Jan Dreier, Nikolas Mählmann, and Sebastian Siebertz. First-order model checking on structurally sparse graph classes. In STOC 2023, pages 567–580. ACM, 2023. doi:10.1145/3564246.3585186.
  • [17] Jan Dreier, Nikolas Mählmann, Sebastian Siebertz, and Szymon Toruńczyk. Indiscernibles and Flatness in Monadically Stable and Monadically NIP Classes. In Kousha Etessami, Uriel Feige, and Gabriele Puppis, editors, 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261 of Leibniz International Proceedings in Informatics (LIPIcs), pages 125:1–125:18, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2023.125.
  • [18] Jan Dreier, Nikolas Mählmann, and Szymon Toruńczyk. Flip-breakability: A combinatorial dichotomy for monadically dependent graph classes. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, pages 1550–1560, 2024. doi:10.1145/3618260.3649739.
  • [19] H-D. Ebbinghaus and J. Flum. Finite Model Theory. Springer, 2nd edition, 1999.
  • [20] Robert Ganian, Petr Hliněnỳ, Jaroslav Nešetřil, Jan Obdržálek, and Patrice Ossona De Mendez. Shrub-depth: Capturing height of dense graphs. Logical Methods in Computer Science, 15, 2019.
  • [21] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order properties of nowhere dense graphs. J. ACM, 64(3), June 2017. doi:10.1145/3051095.
  • [22] Yuri Gurevich. Toward logic tailored for computational complexity. Computation and Proof Theory, pages 175–216, 1984.
  • [23] Ulrich Knauer and Kolja Knauer. Algebraic Graph Theory: Morphisms, Monoids and Matrices. De Gruyter, Berlin, Boston, 2019. doi:doi:10.1515/9783110617368.
  • [24] Jaroslav Nešetřil and Patrice Ossona De Mendez. First order properties on nowhere dense structures. The Journal of Symbolic Logic, 75(3):868–887, 2010. URL: http://www.jstor.org/stable/20799288, doi:10.2178/JSL/1278682204.
  • [25] Jaroslav Nešetřil and Patrice Ossona De Mendez. Sparsity: graphs, structures, and algorithms, volume 28. Springer Science & Business Media, 2012.
  • [26] Jaroslav Nešetřil, Patrice Ossona de Mendez, Michał Pilipczuk, Roman Rabinovich, and Sebastian Siebertz. Rankwidth meets stability. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2014–2033. SIAM, 2021.
  • [27] Benjamin Rossman. Homomorphism preservation theorems. Journal of the ACM (JACM), 55(3):1–53, 2008. doi:10.1145/1379759.1379763.
  • [28] W. W. Tait. A counterexample to a conjecture of Scott and Suppes. Journal of Symbolic Logic, 24(1):15–16, 1959. doi:10.2307/2964569.
  • [29] Szymon Toruńczyk. Flip-width: Cops and robber on dense graphs. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 663–700. IEEE, 2023.

Appendix A The proof of Lemma 5

Here we provide a proof of Lemma 5, which we now restate.

See 5

This is achieved in two steps. First, we consider the subgraph of n induced on {v1,v2,v3,u1,u2,u3,a}. Evidently, the map gn:n sending

(v1,v2,v3,u1,u2,u3,a)(vn2,vn1,vn,un2,un1,un,b)

is an embedding. We argue that this is the only non-trivial embedding of in n.

Lemma 22.

Let n7 and f:n be an embedding. Then f is either the inclusion map or equal to gn.

Proof.

As before, we write V:={v1,,vn}V(n) and U:={u1,,un}V(n). We shall consider the possible images of the vertex v2. Suppose that f(v2)=ui for some i[n]. Clearly, since the vertices v1,v3,a are pairwise non-adjacent, we cannot have f[{v1,v3,a}]U. We hence distinguish cases.

  1. 1.

    Suppose that v1,v3,a are all mapped to vertices in V under f. Since these are non-adjacent, we must have f[{v1,v3,a}]={vm,vr,v} for some m+2<r+1<i. Now, consider f(u1); this must be some vertex in n which is adjacent to only one of vm,vr,v and not adjacent to ui. This necessarily implies that f(u1)=vi+1, f(v1)=v while =i. Consider f(u2); this must be a vertex non-adjacent to vi+1, and adjacent to ui,vi and exactly one of {vm,vr}. From this we deduce that f(u2)=vi1, f(a)=vr, and r=i2. Finally, the vertex f(u3) must be adjacent to vm,vi2,vi,ui,vi+1 and non-adjacent to vi1; obviously no such vertex exists in n, and we thus obtain a contradiction.

  2. 2.

    Suppose that two of v1,v3,a are mapped to vertices in V and one is mapped to a vertex in U. In this case we must have that f[{v1,v3,a}]={um,vr,v} for some m+1<r+1<i. Consider f(u1); this must be non-adjacent to vi and adjacent to exactly one of um,vr,v. This further results in two distinct cases. If f(u1)=vi+1, then we have f(v1)=v and =i, which leads to a contradiction with an analogous argument to the above. If f(u1)=ui1, then necessarily f(v1)=vr while m=i2,r=i1,=i. Considering f(u2), we now see that this vertex must be non-adjacent to ui1 and adjacent to ui,vi1 and exactly one of {ui2,vi}; evidently there is no such vertex in n and we thus obtain a contradiction.

  3. 3.

    Suppose that exactly one of v1,v3,a is mapped to a vertex in V and two are mapped to vertices of U. This forces that f[{v1,v3,a}]={um1,um,v} for some m<i and m+1<i. Again, consider f(u1); this is non-adjacent to ui and adjacent to exactly one of {um,um+1,v}. Once again this leads to two options. If f(u1)=vi+1, then we have f(v1)=v and =i, which leads to a contradiction as in Case 1. On the other hand, if f(u1)=ui1 then we necessarily obtain that f(v1)=um1 while m=i2 and =i. The vertex f(u2)n must then be non-adjacent to ui1 and adjacent to ui1,ui and exactly one of ui2,vi; since there is no such vertex in n we once again obtain a contradiction.

  4. 4.

    Suppose that one of v1,v3,a is mapped to a or b under f. Since u3 is adjacent to all of v1,v2,v3,a it must necessarily be that f(u3)=um for some m>i+1. The vertex f(u2) must then be non-adjacent to um, and adjacent to ui and exactly two of f(v1),f(v3),f(a). As no such vertex exists in this case, we obtain a contradiction.

Since the above cases lead to a contradiction, we see that f(v2)U. Since no vi for i[n]{2,n1} has three neighbours which induce an independent set, this necessarily implies that f(v2) is equal to v2 or vn1. Assume that f(v2)=v2. Again, since v1,v3,a share no edges, we must necessarily have f[{v1,v3,a}]={v1,v3,a}. Since u3 is adjacent to all of v1,v2,v3,a we see that f(u3)=um for some m3. As u2 is non-adjacent to u3 and adjacent to v2 to exactly two of v1,v3,a, we see that f(u3)=u3 and f(u2)=u2, which in turn ensure that f is the inclusion map. By similar reasoning, we deduce that if f(v2) is equal to vn1 then f=gn as required.

Proof of Lemma 5.

Let f:nn be an embedding. It follows by Lemma 22 that either f is the inclusion map, or it is the map given by swapping the two induced copies of , i.e. the map

(v1,v2,v3,u1,u2,u3,a)(vn2,vn1,vn,un2,un1,un,b);
(vn2,vn1,vn,un2,un1,un,b)(v1,v2,v3,u1,u2,u3,a).

Since un2 is adjacent to v2, the latter case would imply that u1 is adjacent to vn1, which is a contradiction. Hence, f is the inclusion map as claimed.

Appendix B The proof of Theorem 18

Before proceeding with Theorem 18 we introduce some relevant definitions. Fix a relational signature τ and q,d, and let A be a τ-structure. By the (q,d)-type of some aA we shall mean the set containing all the 𝖬𝖲𝖮 formulas θ(x) of quantifier rank222Here both first-order and second-order quantifiers contribute to the quantifier rank. at most q, up to logical equivalence, such that NdA(a)θ(a). When we speak of a (q,d)-type t over τ, without reference to a particular element in a structure, we shall mean a (q,d)-type of some element in some τ-structure. We say that an element aA realises a (q,d)-type t whenever NdA(a)θ(a) for all θ(x)t. Evidently, the number of (q,d)-types is bounded by some p depending only on τ and q. Given a τ-structure A, a set CA, and a (q,d)-type t, we say that t is covered by C in A if all aA realising t satisfy NdA(a)C. For n we also say that t is n-free over C in A if there is a 2d-independent set SA of size n such that each aS realises t and NdA(a)C=.

Lemma 23.

Fix a relational signature τ and q,d. Let p be the number of (q,d)-types over τ. Then for every τ-structure A and n, there exists a radius e2dp and a set DA of at most (n1)p points such that each (q,d)-type is either covered by NeA(D) or is n-free over over NeA(D).

Proof.

Fix an enumeration t1,,tp of all (q,d)-types over τ. We shall define D and e inductively starting at D0= and e0=0. Assuming Di and ei have been defined, we let C=NeiA(Di). If all types are covered by C or are n-free over C then we are done; otherwise, we let j[p] be minimal such that tj is neither covered by C nor n-free over C. We then define a set EA inductively, starting with E0:= and at step +1 adding to E a realisation aAN2dA(CE) of tj if there exists one; this iteration must stop within n1 steps, as otherwise tj would be n-free over C. In particular, |E|n1 and tj is covered by Nei+2dA(DiE). We subsequently let Di+1=DiE and ei+1=ei+2d. It follows that the construction must stop within at most p steps, since at each step we cover a previously uncovered type, which in addition, remains covered for the rest of the construction. Consequently, |D|(n1)p and e2dp as claimed.

See 18

Proof.

Fix 𝒞 as above, and let ϕ be a formula preserved by extensions overs 𝒞. We shall obtain a bound on the size of the minimal induced models of ϕ, by arguing that any large enough model of ϕ contains a proper induced substructure which also models ϕ. We can then conclude that ϕ is equivalent to an existential formula over 𝒞 using Lemma 2.

Letting k be as the in the statement of Theorem 18, we consider the formula ϕk from Definition 15. Using Gaifman’s locality theorem we rewrite ϕk into a boolean combination of basic local sentences, i.e. we may assume that there is some and τEk-sentences ψi for i[] such that

ϕk=iψi and ψi=jAiχijjBi¬χij,

where each χij is a basic local sentence. We henceforth fix the following constants:

  • ρ is the maximum over all the locality radii of the χij;

  • s is the sum of all widths of the χij;

  • γ is the maximum over all the quantifier ranks of the χij;

  • q:=γ+3ρ+3;

  • d:=2(ρ+1)(+1)s+6ρ+2;

  • p is the number of (q,d)-types over the signature τEk;

  • n:=(+2)s;

  • m:=(n1)q+s+s+1;

  • r:=4dp+2ρ+1.

Our goal is to establish that any minimal induced model of ϕ in 𝒞 must have size less than fr(m), where f is as in the statement of Theorem 18. So, assume that some Gϕ has size at least fr(m). It follows by assumption that there is a k-partition P and a k-flip F such that GFP contains an r-independent set of size m. We henceforth work with the structure G:=G(F,P), i.e. the expansion of GFP with unary predicates corresponding to the parts of P. By definition, we have that Gϕk.

By Lemma 23 we obtain a radius e2dp and a set DV(G) of at most (n1)p vertices such that each (q,d)-type in G is either covered by NeG(D) or is n-free over NeG(D); we henceforth refer to types of the former kind as rare, and to types of the latter kind as frequent.

We proceed to inductively construct increasing sequences of sets S0S1V(G), C0C1V(G), and I0I1I which satisfy the following conditions for every i:

  1. 1.

    SiNρG(Ci);

  2. 2.

    |Ci|is;

  3. 3.

    |Ii|=i;

  4. 4.

    no disjoint extension of G[Si] satisfies jIiψj;

  5. 5.

    NeG(D) and NdG(Ci) are disjoint.

Clearly, this construction must terminate within steps. Indeed, assume for a contradiction that we have constructed S,C, and I satisfying conditions 1-5 above. If so, then I=I while G+G[S] is a disjoint extension of G[S] which satisfies ϕk=iIψi by Lemma 16, therefore contradicting condition 4. At the end of the construction we will obtain some N< and some SNV(G) satisfying G[SN]ϕk. Combining Definition 15 with 17, this will imply that G[SN]ϕ, and hence that G cannot be a minimal model of ϕ as required.

Initially, we set S0=C0=I0=. Assume that Si,Ci, and Ii have been defined. Write H:=G+G[Si] for the disjoint union of G with its substructure induced on Si. By our closure assumptions on 𝒞 and Lemma 16 we deduce that Hϕk. In particular, there exists some iI such that Hψi, while iIi due to property 4. We let Ii+1=Ii{i} and henceforth drop the reference to the index i as it will remain fixed for the remaining of the argument, e.g. by writing ψ and χj instead of ψi and χij respectively.

As H satisfies ψ=(jAχjjB¬χj), it satisfies the basic local sentences χj with jA. For each jA, we may thus choose a minimal set WjV(H) of witnesses for the outermost existential quantifiers of the basic local sentence χj, and let W:=jAWj be their union. As s is the sum of the widths of all the χ’s it follows that |W|s. We partition W into those witnesses that appear in the disjoint copy of G, and those that appear in the disjoint copy of G[Si], and write WG and WH for these respective parts.

Now, suppose that some vWG satisfies Nρ+1G(Ci)NρG(v); we argue that we may replace v with some witness vV(G) such that Nρ+1G(Ci)NρG(v)=. Indeed, we first choose some uCi such that Nρ+1G(u)NρG(v). Consequently, we have that NρG(v)N3ρ+1G(u)NdG(u). Property 5 then ensures that the (q,d)-type t (in G) of u is frequent, and so it has n>(+1)s|WCi| realisations whose d-neighbourhoods are pairwise disjoint and disjoint from NeG(D). We may thus pick a realisation uV(G) of t such that Nρ+1G(WCi)N3ρ+1G(u)=. Let τ be the (γ,ρ)-type of v, and consider the formula

θ(x):=y[z(dist(y,z)ρdist(x,z)3ρ+1)ητηNr(y)(y)].

Clearly, the quantifier rank of θ is bounded by 3ρ+3+γq, while NdG(u)θ(u) with v serving as the existential witness. Consequently θ(x) is in t, and as u and u have the same (q,d)-type, it follows that NdG(u)θ(u). It follows that there is vV(G) such that NρG(v)N3ρ+1G(u)NdG(u), while v and v have the same (γ,ρ)-type. In particular, their ρ-neighbourhoods satisfy the same 𝖥𝖮-formulas of quantifier rank γ. Finally, observe that Nρ+1G(WCi)N3ρ+1G(v)= and so Nρ+1G(Ci)NρG(v)=; we may thus replace v by v in WG as a witness.

After replacing all such witnesses in G, we can ensure that

|{vWG:Nρ+1G(Ci)NρG(v)}|=0

Consider the induced substructure U:=G[NeG(D)NρG(WG)Si]. We claim that U satisfies jAχj. Indeed, notice that SiNρG(Ci), while Nρ+1G(Ci) is disjoint from NeG(D) by property 5 and disjoint from NρG(WG) by (). It follows that U is the disjoint union of G[NeG(D)NρG(WG)] and G[Si]; thus all the witnesses from W and their ρ-neighbourhoods can be found in U, implying that Uχj for all jA as these are basic local sentences.

Now, observe that U is a proper induced substructure of G. This is because

|DWGCi|(n1)p+s+s<m;
NeG(D)NρG(WG)SiN2dp+ρG(DWGCi)Nr/2G(DWGCi),

and so, unlike G, U does not contain an r-independent set of size m. Consequently, if Uϕk then we set SN:=NeG(D)NρG(WG)Si and our construction terminates.

We hereafter assume that U⊧̸ϕk, and proceed with the definition of Si+1 and Ci+1. Since UjAχj it must be that U⊧̸jB¬χj. We can therefore fix some jB such that Uχj. Suppose that

χj=x1,,xs[abdist(xa,xb)>2ρaξNρ(xa)(xa)]

for some ρρ, ss, and a formula ξ of quantifier rank γγ. Fix a set V={w1,,ws}U of witnesses for the outermost existential quantifier of χj. Notice that if the (q,d)-type in G of every wV was rare then NρG(V)NeG(D)V(G), implying that Gχj and thus Hχj as H is a disjoint extension of G and χj is a basic local sentence. We can thus fix some wV whose (q,d)-type in G, say tw, is frequent. As a result, there is a set ZV(G) of n realisations of tw whose d-neighbourhoods are pairwise disjoint and disjoint from NeG(D). Now, since 4ρ+3d, n=(+2)s, and |Ci|s, there exists a subset ZZ of at least s elements which additionally satisfies Nρ+1G(Ci)NρG(Z)=.

Consider F:=NρU(w). Evidently, U[F]=G[F] and so G[F]ξNρ(x)(w). For a set variable X consider the formula ξNρ(x)X(x,X) obtained from ξ by simultaneously relativising the quantifiers of ξ to the r-neighbourhoods of x and to the set X. Observe that the quantifier rank of ξNρ(x)X(x,X) is at most γ+ρ<q, and moreover GξNρ(x)X(w,F). Since ρ<d it follows that the 𝖬𝖲𝖮 formula XξNρ(x)X(x,X) is in tw. As every ωZ has the same (q,d)-type in G as w, we may find sets FωNρG(ω) for every ωZ such that GξNρ(x)X(ω,Fω). In particular, this implies that G[Fω]ξNρ(x)(ω). We finally let:

Ci+1=CiZ;Si+1=SiωZFω.

We argue that these satisfy the properties 1-5. First, observe that |Ci+1|=|Ci|+sis+s=(i+1)s. Moreover, as FωNρG(ω), ωCi+1, and ρρ we have Si+1NρG(Ci+1). By the fact that every ωZ realises a frequent type we also have that NeG(D)NdG(Ci+1)=. It remains to argue that no disjoint extension of G[Si+1] satisfies jIi+1ψj.

Towards this, we note that G[Si+1] is a disjoint extension of G[Si] by the fact that SiNρG(Ci) and Nρ+1G(Ci)NρG(Z)=. Therefore, no disjoint extension of G[Si+1] satisfies ψj for jIi. At the same time, every disjoint extension of G[Si+1] contains witnesses for the outermost existential quantifiers of χij, namely the elements ωZ, which are pairwise at distance at least 2d>2ρ and satisfy G[Fω]ξNρ(x)(ω) and NρG[Si+1](ω)=Fω, and thus G[Si+1]ξNρ(x)(ω). It follows that every disjoint extension of G[Si+1] satisfies χij, and so it cannot satisfy ψi as needed. This complete our inductive construction of Si+1,Ci+1, and Ii+1.