Extension Preservation on Dense Graph Classes
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, cliquewidth2012 ACM Subject Classification:
Theory of computation Finite Model TheoryFunding:
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 SchmitzSeries and Publisher:

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 homomorphically maps to , but does not map to . 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 if there are homomorphisms and then there is a homomorphism whose pre-compositions with the respective inclusion homomorphisms and are equal to and 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 , for all . 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 , for every [3, Theorem 5.2]. Interestingly, extension preservation holds for the class of all graphs of cliquewidth 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 where is interpreted as a symmetric and anti-reflexive binary relation. For a graph we write for its domain (or vertex set), and for its edge set. In general, for a -structure and a relation symbol of arity we write for the interpretation of in . We shall abuse notation and not distinguish between structures and their respective domains.
Given two structures in the same relational signature , a homomorphism is a map that preserves all relations, i.e. for all and tuples from we have . A strong homomorphism is a homomorphism that additionally reflects all relations, i.e. . An injective strong homomorphism is called an embedding or extension.
A -structure is said to be a weak substructure of a -structure if and the inclusion map is a homomorphism. Likewise, is an induced substructure of if the inclusion map is an embedding; we write for this. Given a structure and a subset we write for the unique induced substructure of with domain . An induced substructure of is said to be proper if ; we write 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 .
By the Gaifman graph of a structure we mean the undirected graph with vertex set such that two elements are adjacent if, and only if, they appear together in some tuple of a relation of . Given a structure , , and , we write for the -neighbourhood of in , that is, the set of elements of whose distance from in is at most . We shall often abuse notation and write for the induced substructure of . For a set we define . A set is said to be -independent if for any .
For , let be the first-order formula expressing that the distance between and in the Gaifman graph is at most , and its negation. Clearly, the quantifier rank of is at most . A basic local sentence is a sentence
where denotes the relativisation of to the -neighbourhood of , i.e. the formula obtained from by replacing every quantifier with , and likewise every quantifier with . We call the locality radius, 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 is equivalent to a Boolean combination of basic local sentences of locality radius .
A class of structures is said to be quasi-wide if for every there exist and such that for all and all of size at least there exists such that contains an -independent set of size . Moreover, if is independent of , 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 and a pair of disjoint vertex subsets and , the subgraph semi-induced by and is the bipartite graph with sides and that contains all edges of with one endpoint in and second in . By the half-graph of order we mean the bipartite graph with vertices and edges .
For first-order formulas and the interpretation is defined to be the operation that maps a graph to the graph with vertex set and edge set
For a graph class , we write . We say that a class is an interpretation of a class , or that interprets , if there is some such that . We say that is a transduction of a class , or transduces , if there are and unary predicates and formulas and over the signature such that , where is the class of all -structures whose -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 such that there is a embedding from to , implies that . 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 for all . 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 is a minimal induced model of in if and for any proper induced substructure of with we have . 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 . For each , let be the primitive sentence inducing a copy of and write ; evidently is existential. We argue that is equivalent to over . Indeed, if models then contains a minimal induced model of as an induced substructure. By hereditariness and so is isomorphic to some . Since there is clearly an embedding it follows that . On the other hand if , then for some and so some embeds into . Since and is preserved by extensions this implies that as required.
Conversely, assume that is equivalent to an existential sentence over . In particular, is equivalent to some disjunction where each is primitive. It follows that each is the formula inducing one of finitely many structures . Now, if is a minimal induced model of then in particular for some , i.e. there is some and an embedding . If is not surjective, then is a proper induced substructure of , which is in by hereditariness, and models ; this contradicts the minimality of . Hence, the size of every minimal induced model of in is bounded by . 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 (see [9] for background on cliquewidth). Hence, one may reasonably inquire whether extension preservation is generally true for the class of all graphs of cliquewidth at most . This would in particular reflect an analogous phenomenon that is true in the sparse setting, that is, that extension preservation holds over the class of all graphs of treewidth at most [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 . 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 . 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 be the formula that induces the graph of Figure 1 below. In the following, we treat the free variables of as constants for simplicity. The notation will denote the relativisation of the universal quantifier to the neighbours of that are not , i.e. is shorthand for . Likewise, the notation denotes the relativisation of the universal quantifier to the non-neighbours of that are not or , i.e. is shorthand for . Existential quantifiers relativised to and are defined analogously. Consider the auxiliary formulas:
In analogy, we define:
We then define:
Putting the above together we finally define:
Proposition 3.
The formula is preserved by extensions over the class of all finite graphs.
Proof.
Let be two graphs such that embeds into , and . Without loss of generality we assume that and that the identity map is an embedding. We shall argue that .
Since , we may fix (tuples of) vertices such that . Evidently, also models . If then ; we may therefore assume that . Let be the neighbours of in that are not , and be the non-neighbours of that are not or (in particular ). We call the vertices -elements. For each -element we write for the -neighbourhood of . We similarly define -elements and -neighbourhoods. From each of the conjuncts of we deduce that in :
- :
-
-elements have pairwise comparable -neighbourhoods;
- :
-
the only member of is ;
- :
-
if two adjacent -elements satisfy then .
We shall argue that items - are still true within , replacing with and with , and so . We write for the relativised -neighbourhoods. Clearly, items and are still true in . For item , suppose that are two adjacent -elements, such that . Since -elements in have pairwise comparable -neighbourhoods, we deduce that and therefore that as satisfies . In particular, it follows that as required, and so models and consequently .
Similarly, from each of the conjuncts of we deduce that in :
- :
-
-elements have pairwise comparable -neighbourhoods;
- :
-
the only element of is ;
- :
-
is equal to ;
- :
-
if two non-adjacent -elements satisfy then .
Arguing as before, we obtain that . Since and we deduce that , i.e. the following are true in :
- :
-
every -element that is not is adjacent to a -element of strictly greater -neighbourhood;
- :
-
every -element that is not is non-adjacent to a -element of strictly greater -neighbourhood.
We proceed to show that the above implies that and , and hence . In particular, this implies that as claimed.
Since is finite and satisfies we obtain some and a sequence of distinct elements of such that and for all . In particular, and for all . As satisfies we obtain that for all . Moreover, since satisfies and every element of is adjacent to , we obtain that and . In particular, we deduce that . Symmetrically, we obtain some and a sequence of elements of such that and for all . Hence, and for all . Once again, since satisfies , , and we obtain that , , and . It thus follows that . Putting the above together we have that
Consequently, while and as needed.
We now define the intended minimal induced models of our formula .
Definition 4.
For we define the graph with vertex and edge set
respectively. We also write for the subgraph of induced on the set
We aim to establish that the graphs are all minimal induced models of . Towards this, we first argue that the only embedding of in 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 and be an embedding. Then is the inclusion map.
Proposition 6.
For each the graphs are minimal induced models of .
Proof.
We fix some . We first argue that for every . Indeed, we clearly have that
Moreover, the set is precisely the set of neighbours of which are not , while the set is precisely the set of non-neighbours of which are not or . Evidently, we then have that for every vertex the vertex is adjacent to and its neighbourhood over strictly contains that of . Consequently . Likewise, for every vertex the vertex is non-adjacent to and its neighbourhood over strictly contains that of . It follows that , and so as required.
Now, suppose that is a proper induced subgraph of , and assume for a contradiction that , i.e. there are vertices of
Since these vertices induce a copy of , it follows by Lemma 5 that
and so . Moreover, letting and we see that
-
the elements in have pairwise comparable neighbourhoods over , and the elements of have pairwise comparable neighbourhoods over ;
-
the only neighbour of in is , and the only neighbour of in is ;
-
is adjacent to every element of ;
-
if are adjacent and the -neighbours of are strictly more than the -neighbours of then there is some such that and , and there is a unique vertex in that is adjacent to and not adjacent to , namely ;
-
if are adjacent and the -neighbours of are strictly more than the -neighbours of then there is some such that and , and there is a unique vertex in that is adjacent to and not adjacent to , namely .
It follows that . Since this implies that . However, since , there is some such that or . Assume the former, and let be maximal such that . It follows that there is no vertex in that is adjacent to and its neighbourhood over is strictly greater than that of , contradicting that . By a symmetric argument we obtain a contradiction if , and thus follows that .
Theorem 7.
Extension preservation fails on any hereditary graph class containing the graphs for arbitrarily large .
Proof.
Let be a class of graphs containing the graphs for arbitrarily large . 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 , it follows by Lemma 2 that is not equivalent to an existential formula over .
Finally, we observe that the graphs have bounded cliquewidth, which is easily seen to be at most . 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 have (linear) cliquewidth .
Corollary 9.
Extension preservation fails on for every .
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 be a graph and . A -partition of is a partition of the vertex set into labelled parts , i.e. and for . By a -flip we denote a symmetric subset of , i.e. a set of tuples such that . Given a -partition of and a -flip we define the graph on the same vertex set as and on the edge set
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 -flips by applying a sequence of at most atomic operations, each one switching the edges and non-edges between two arbitrary subsets of our vertex set. Evidently, these definitions are equivalent up to blowing up the number of flips by a value that only depends on , 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 there exist and a function satisfying that for every and every of size at least there is a -partition of , a -flip , and a set of size at least which is -independent in . If in the above does not depend on , 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 satisfying the following. Fix and a transduction involving colours and formulas of quantifier rank at most . Let be graphs such that . Then for every -partition of and -flip there exists a -partition of and a -flip such that for all :
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 witnessing this, so that for every there is satisfying that every of size at least in the hereditary closure of contains an -independent set of size after removing at most elements. Let a class such that there is a transduction satisfying . Let be the number of unary predicates used by , and be the maximum of the quantifier ranks of and . We argue that is strongly flip-flat with .
Indeed, fix and a graph of size at least . It follows that there exists some such that , and since , we obtain by uniform almost-wideness that contains a -independent set of size after removing a set of size at most . In particular, there is a -partition of and a -flip such that contains an -independent subset of size ; call this set . Consequently, Lemma 12 implies that there is a -partition of and a -flip such that for all
i.e. is an -independent set of size in . 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 such that no minimal induced model of in can contain an -independent set of size . In the second part, wideness is used to bound the size of minimal models of , as large enough models would have to contain -independent sets of size , 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 , a graph , a -partition of , and a -flip we write for the graph whose vertex set is the same as the disjoint union of two copies of , and whose edge set is
We call this the flip-sum of over .
We now introduce the relevant translation for the formulas.
Definition 15.
Given a -flip , consider the formula
over the signature , where denotes the consecutive application of the operator over all tuples . Given a -formula , we define the -formula obtained from by replacing every atom with the formula . Moreover, for every graph and -partition we write for the -expansion of where each predicate is interpreted by the respective part of . It is then clear from the definitions and the fact that the flip operation is involutive that
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 and the structures . However, as previously explained, 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 , a -partition of , and a -flip . If then
for any .
Proof.
Fix as in the statement above, and let . Write for the subgraph of induced on the vertex set of ; it follows that by hereditariness. As we obtain that , and since contains an induced copy of and is preserved by extensions over it follows that . Let be the natural -partition of inherited from , i.e. for each the -th part of contains the union of the -th parts of and . It follows from the definitions that the structure is isomorphic to . Finally, since we obtain that and so as claimed.
We shall also make use of the following observation, which simply says that the induced substructures of are the same as expansions of flips of induced substructures of .
Observation 17.
Let be a graph, a -partition of , and a -flip. Then for every the structure is equal to , where is the -partition of obtained by restricting each part of on .
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 such that for all there is a function satisfying that for every and every of size at least there is a -partition of , some -flip , and such that
-
1.
;
-
2.
is -independent in ;
-
3.
.
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 there exists such that for every every structure with at least -many elements contains an -independent set of size . Here, we replace wideness by strong flip-flatness by working with the formula 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 , write be the class of all graphs such that the maximum degree of is at most , or the maximum degree of , i.e. the complement graph of , is at most . Let and consider a graph of size at least . If has maximum degree , then must contain an -independent set of size . Consequently, letting and , we see that is simply the disjoint union of two copies of , which still has maximum degree and is therefore in . On the other hand if has maximum degree , then for and , we see that has an -independent set of size . Since is the complement of the disjoint union of two copies of and so has maximum degree , it follows that . Consequently, extension preservation holds over 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 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 as:
-
;
-
If and , then for and , i.e. is the graph obtained from by flipping the edges within .
Example 21.
Fix and let . Consider an -decomposition tree of , i.e. a labelled tree of height whose leaves are labelled by the vertices of , every non-leaf node is labelled by the graph where are the labels of its children, is a subset of , and the root is labelled by . Let , and suppose that . Since has height and its leaves correspond to the vertices of , there must exist some vertex of with at least children. Let be the unique path from the root of to , and for each let be the set coming from the label of . Letting the partition of into parts depending on the membership of a vertex within each of and be the flip that corresponds to complementing each of , it follows that contains at least 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 and connect them to . The labels are naturally carried from each original subtree to the copy. If the label of in was , then its label in is where each corresponds to the copy of , and corresponds to the set of copies of the vertices in . From there, we perform the same operation for , this time copying only the children of that are not . This completes the construction of . It is easy to then see than the root of corresponds to the graph , thus witnessing that . It follows that the class 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 . 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 open. It is also easily seen that the structures have twin-width (see [6] for definitions). The status of extension preservation on the class of all graphs of twin-width 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 , the class of all graphs of cliquewidth at most 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 induced on . Evidently, the map sending
is an embedding. We argue that this is the only non-trivial embedding of in .
Lemma 22.
Let and be an embedding. Then is either the inclusion map or equal to .
Proof.
As before, we write and . We shall consider the possible images of the vertex . Suppose that for some . Clearly, since the vertices are pairwise non-adjacent, we cannot have . We hence distinguish cases.
-
1.
Suppose that are all mapped to vertices in under . Since these are non-adjacent, we must have for some . Now, consider ; this must be some vertex in which is adjacent to only one of and not adjacent to . This necessarily implies that , while . Consider ; this must be a vertex non-adjacent to , and adjacent to and exactly one of . From this we deduce that , , and . Finally, the vertex must be adjacent to and non-adjacent to ; obviously no such vertex exists in , and we thus obtain a contradiction.
-
2.
Suppose that two of are mapped to vertices in and one is mapped to a vertex in . In this case we must have that for some . Consider ; this must be non-adjacent to and adjacent to exactly one of . This further results in two distinct cases. If , then we have and , which leads to a contradiction with an analogous argument to the above. If , then necessarily while . Considering , we now see that this vertex must be non-adjacent to and adjacent to and exactly one of ; evidently there is no such vertex in and we thus obtain a contradiction.
-
3.
Suppose that exactly one of is mapped to a vertex in and two are mapped to vertices of . This forces that for some and . Again, consider ; this is non-adjacent to and adjacent to exactly one of . Once again this leads to two options. If , then we have and , which leads to a contradiction as in Case . On the other hand, if then we necessarily obtain that while and . The vertex must then be non-adjacent to and adjacent to and exactly one of ; since there is no such vertex in we once again obtain a contradiction.
-
4.
Suppose that one of is mapped to or under . Since is adjacent to all of it must necessarily be that for some . The vertex must then be non-adjacent to , and adjacent to and exactly two of . As no such vertex exists in this case, we obtain a contradiction.
Since the above cases lead to a contradiction, we see that . Since no for has three neighbours which induce an independent set, this necessarily implies that is equal to or . Assume that . Again, since share no edges, we must necessarily have . Since is adjacent to all of we see that for some . As is non-adjacent to and adjacent to to exactly two of , we see that and , which in turn ensure that is the inclusion map. By similar reasoning, we deduce that if is equal to then as required.
Proof of Lemma 5.
Let be an embedding. It follows by Lemma 22 that either is the inclusion map, or it is the map given by swapping the two induced copies of , i.e. the map
Since is adjacent to , the latter case would imply that is adjacent to , which is a contradiction. Hence, 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 , and let be a -structure. By the -type of some we shall mean the set containing all the formulas of quantifier rank222Here both first-order and second-order quantifiers contribute to the quantifier rank. at most , up to logical equivalence, such that . When we speak of a -type over , without reference to a particular element in a structure, we shall mean a -type of some element in some -structure. We say that an element realises a -type whenever for all . Evidently, the number of -types is bounded by some depending only on and . Given a -structure , a set , and a -type , we say that is covered by in if all realising satisfy . For we also say that is -free over in if there is a -independent set of size such that each realises and .
Lemma 23.
Fix a relational signature and . Let be the number of -types over . Then for every -structure and , there exists a radius and a set of at most points such that each -type is either covered by or is -free over over .
Proof.
Fix an enumeration of all -types over . We shall define and inductively starting at and . Assuming and have been defined, we let . If all types are covered by or are -free over then we are done; otherwise, we let be minimal such that is neither covered by nor -free over . We then define a set inductively, starting with and at step adding to a realisation of if there exists one; this iteration must stop within steps, as otherwise would be -free over . In particular, and is covered by . We subsequently let and . It follows that the construction must stop within at most steps, since at each step we cover a previously uncovered type, which in addition, remains covered for the rest of the construction. Consequently, and 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 be as the in the statement of Theorem 18, we consider the formula from Definition 15. Using Gaifman’s locality theorem we rewrite into a boolean combination of basic local sentences, i.e. we may assume that there is some and -sentences for such that
where each is a basic local sentence. We henceforth fix the following constants:
-
is the maximum over all the locality radii of the ;
-
is the sum of all widths of the ;
-
is the maximum over all the quantifier ranks of the ;
-
;
-
;
-
is the number of -types over the signature ;
-
;
-
;
-
.
Our goal is to establish that any minimal induced model of in must have size less than , where is as in the statement of Theorem 18. So, assume that some has size at least . It follows by assumption that there is a -partition and a -flip such that contains an -independent set of size . We henceforth work with the structure , i.e. the expansion of with unary predicates corresponding to the parts of . By definition, we have that .
By Lemma 23 we obtain a radius and a set of at most vertices such that each -type in is either covered by or is -free over ; 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 , , and which satisfy the following conditions for every :
-
1.
;
-
2.
;
-
3.
;
-
4.
no disjoint extension of satisfies ;
-
5.
and are disjoint.
Clearly, this construction must terminate within steps. Indeed, assume for a contradiction that we have constructed and satisfying conditions 1-5 above. If so, then while is a disjoint extension of which satisfies by Lemma 16, therefore contradicting condition 4. At the end of the construction we will obtain some and some satisfying . Combining Definition 15 with 17, this will imply that , and hence that cannot be a minimal model of as required.
Initially, we set . Assume that and have been defined. Write for the disjoint union of with its substructure induced on . By our closure assumptions on and Lemma 16 we deduce that . In particular, there exists some such that , while due to property 4. We let and henceforth drop the reference to the index as it will remain fixed for the remaining of the argument, e.g. by writing and instead of and respectively.
As satisfies , it satisfies the basic local sentences with . For each , we may thus choose a minimal set of witnesses for the outermost existential quantifiers of the basic local sentence , and let be their union. As is the sum of the widths of all the ’s it follows that . We partition into those witnesses that appear in the disjoint copy of , and those that appear in the disjoint copy of , and write and for these respective parts.
Now, suppose that some satisfies ; we argue that we may replace with some witness such that . Indeed, we first choose some such that . Consequently, we have that . Property 5 then ensures that the -type (in ) of is frequent, and so it has realisations whose -neighbourhoods are pairwise disjoint and disjoint from . We may thus pick a realisation of such that . Let be the -type of , and consider the formula
Clearly, the quantifier rank of is bounded by , while with serving as the existential witness. Consequently is in , and as and have the same -type, it follows that . It follows that there is such that , while and have the same -type. In particular, their -neighbourhoods satisfy the same -formulas of quantifier rank . Finally, observe that and so ; we may thus replace by in as a witness.
After replacing all such witnesses in G, we can ensure that
Consider the induced substructure . We claim that satisfies . Indeed, notice that , while is disjoint from by property 5 and disjoint from by . It follows that is the disjoint union of and ; thus all the witnesses from and their -neighbourhoods can be found in , implying that for all as these are basic local sentences.
Now, observe that is a proper induced substructure of . This is because
and so, unlike , does not contain an -independent set of size . Consequently, if then we set and our construction terminates.
We hereafter assume that , and proceed with the definition of and . Since it must be that . We can therefore fix some such that . Suppose that
for some , , and a formula of quantifier rank . Fix a set of witnesses for the outermost existential quantifier of . Notice that if the -type in of every was rare then , implying that and thus as is a disjoint extension of and is a basic local sentence. We can thus fix some whose -type in , say , is frequent. As a result, there is a set of realisations of whose -neighbourhoods are pairwise disjoint and disjoint from . Now, since , , and , there exists a subset of at least elements which additionally satisfies .
Consider . Evidently, and so . For a set variable consider the formula obtained from by simultaneously relativising the quantifiers of to the -neighbourhoods of and to the set . Observe that the quantifier rank of is at most , and moreover . Since it follows that the formula is in . As every has the same -type in as , we may find sets for every such that . In particular, this implies that . We finally let:
We argue that these satisfy the properties 1-5. First, observe that . Moreover, as , , and we have . By the fact that every realises a frequent type we also have that . It remains to argue that no disjoint extension of satisfies .
Towards this, we note that is a disjoint extension of by the fact that and . Therefore, no disjoint extension of satisfies for . At the same time, every disjoint extension of contains witnesses for the outermost existential quantifiers of , namely the elements , which are pairwise at distance at least and satisfy and , and thus . It follows that every disjoint extension of satisfies , and so it cannot satisfy as needed. This complete our inductive construction of , and .