Graphs of bounded cliquewidth are polynomially χ-bounded

We prove that if C is a hereditary class of graphs that is polynomially χ-bounded, then the class of graphs that admit decompositions into pieces belonging to C along cuts of bounded rank is also polynomially χ-bounded. In particular, this implies that for every positive integer k, the class of graphs of cliquewidth at most k is polynomially χ-bounded.

1 Introduction χ-boundedness. A class of graphs C is χ-bounded if there exists a function f : N → N, called the χ-bounding function, such that χ(G) f (ω(G)) for every graph G ∈ C. Here, χ(G) is the chromatic number of G -the least number of colors needed for a proper coloring of G -and ω(G) is the clique number of G -the size of a largest set of pairwise adjacent vertices in G.
The notion of χ-boundedness was proposed by Gyárfás in [Gyá87] and is a natural generalization of the concept of perfect graphs. Since then, many classes of not necessarily perfect graphs have been shown to be χ-bounded: examples include circular arc graphs [Gyá87], intersection graphs of axis-parallel boxes in d-dimensional space [Gyá87], circle graphs [Gyá85,Gyá86], odd-hole-free graphs [SS16], long-holefree graphs [CSS17], and graphs excluding an induced subdivision of a fixed tree [Sco97]. Many of those classes have natural interpretations as intersection graphs of geometric objects, but χ-boundedness is not an ubiquitous phenomenon in the geometric setting; for instance, the class of intersection graphs of segments in the plane is not χ-bounded [PKK + 14]. We refer the reader to the recent survey of Scott and Seymour [SS18] for a broader introduction to the topic.
While in the topic of χ-boundedness many basic questions still remain open, even less is known about the optimum asymptotics of χ-bounding functions. Here, we say that a class is polynomially χ-bounded if the χ-bounding function can be chosen to be a polynomial; we can define e.g. linear or quadratic χ-boundedness in the same way. Curiously, we do not know any hereditary graph class that would be χ-bounded, but (provably) not polynomially χ-bounded [Esp17]. For several concrete hereditary graph classes one can establish polynomial χ-boundedness, see the recent survey of Schiermeyer and Randerath [SR19]. However, in many important cases, including the advances on variants of the Gyárfás-Sumner conjecture and other conjectures of Gyárfás [CSS17,Sco97,SS16], the known proofs lead only to exponential upper bounds. Also, while the χ-boundedness of circle graphs was known since 80s [Gyá85,Gyá86], their polynomial χ-boundedness was established only very recently [DM19].
Cliquewidth. The primary object of interest in this work is the class of graphs of cliquewidth at most k, for any fixed k ∈ N. The cliquewidth of a graph G is a parameter that measures the complexity of G in terms of the number of labels needed to construct G by means of certain algebraic operations. Roughly equivalently (up to a multiplicative factor of 2), one can imagine that a graph of cliquewidth at most k can be hierarchically decomposed into smaller and smaller pieces, up to single vertices, so that in each step of the decomposition we partition the current vertex set into two subsets so that vertices on each side of the partition have only at most k different neighborhoods on the other side. This view is closely related to the notion of rankwidth of G, where we measure the complexity of the partition as above not in terms of its diversity -the number of equivalence classes of the relation of having the same neighborhood on the other side -but in terms of its cutrank -the rank over F 2 of the adjacency matrix between the sides. Indeed, it is known that the cliquewidth of a graph of rankwidth r is between r and 2 r+1 − 1 [OS06]. Hence, a graph class has bounded rankwidth (i.e., the supremum of the rankwidth of its members is finite) if and only if it has bounded cliquewidth.
Dvořák and Král' proved in [DK12] that for every k ∈ N, the class of graphs of cliquewidth at most k is χ-bounded 1 . While the obtained χ-bounding function is not stated explicitly in [DK12], a careful examination of the proof shows that it is exponential in ω(G), even for constant k.
In fact, Dvořák and Král' in [DK12] prove a stronger claim, which can be informally stated as follows: if a graph class C is χ-bounded, then for every k ∈ N, the class of graphs that admit decompositions into pieces belonging to C along cuts of rank at most k is also χ-bounded. While the result for graphs of bounded cliquewidth follows by applying this statement for a trivial class C, one can also obtain other corollaries. For instance, by composing their main result with a decomposition theorem of Geelen for graphs excluding the wheel W 5 as a vertex minor [Gee95], Dvořák and Král' conclude that this graph class is χ-bounded. Here, the wheel W 5 consists of a cycle on 5 vertices plus one additional vertex connected to all of them.
Our results. In this work we prove that every graph class of bounded cliquewidth is not only χ-bounded, but in fact polynomially χ-bounded.
Theorem 1.1. For every k ∈ N, the class of graphs of cliquewidth at most k is polynomially χ-bounded.
Let us note that in Theorem 1.1, the degree of the χ-bounding polynomial for graphs of cliquewidth k grows with k. As we explain in Section 5.1 (see Lemma 5.2), this is unavoidable.
We also remark that independently of us, Nešetřil et al. proved that for every fixed k ∈ N, graphs of linear cliquewidth at most k are linearly χ-bounded [NORS]. In their work, the result comes as a byproduct in the proof of a statement about logical interpretability of graphs of bounded linear cliquewidth with no large half-graphs in graphs of bounded pathwidth. They provide two proofs of their main claims, one using the same tool as we do -Simon's factorization -and a second more direct and involved, but yielding better asymptotic bounds. In fact, a close inspection shows that their first proof restricted to arguing only linear χ-boundedness is essentially equivalent to our proof restricted to classes of bounded linear cliquewidth, with the exception that a suitable amortization argument (disguised as applying the fact that cographs are perfect) is used to argue that the χ-bounding function is linear, instead of just polynomial.
In fact, our work applies not only to classes of bounded cliquewidth. We prove a more general claim analogous to that of Dvořák and Král': if C is a polynomially χ-bounded graph class and k ∈ N, then the class of graphs that can be decomposed into pieces from C along cuts of diversity at most k is also polynomially χ-bounded. A formal statement of this result requires some technical definitions and will be presented in Section 2, see Theorem 2.5 there.
It seems that our main result may be applicable for establishing polynomial χ-boundedness of classes defined by forbidding fixed vertex-minors, similarly to the work of Dvořák and Král' [DK12]; we discuss these connections in Section 5.2. In particular, we generalize two related statements that were used in this context: the result of Chudnovsky et al. [CPST13] that the closure of a polynomially χ-bounded class under the substitution operation is also polynomially χ-bounded, and the recent result of Kim et al. [KKOS19] that the same holds also for the operation of taking 1-joins. Indeed, these two cases follow from taking k = 1 and k = 2 in our main theorem, respectively. In fact, in our proof we rely on the result of Chudnovsky et al. [CPST13].
Our techniques. The first ingredient of the proof of our main result is the deterministic variant of Simon's Factorization Forest Theorem due to Colcombet [Col07], which provides a factorization theorem for trees labelled with elements of a finite semigroup. The idea is that we can view a decomposition of a graph using cuts of diversity at most k as a tree labelled with elements of the semigroup of relabelings (functions) on a set of k labels. Thus, by applying Colcombet's result we can hierarchically factorize every such decomposition so that the following properties hold: • the factorization has "depth" 2 O(k log k) ; and • in every step we partition the current decomposition into factors (which will be factorized further in the following steps) so that the overall structure of factors is a tree that either has depth at most two, or satisfies a certain Ramsey-type condition.
Thus, we can reduce the original statement of the main result to 2 O(k log k) applications of a weaker statement, where the provided decomposition of the graph either has depth at most two or enjoys strong Ramsey properties. Decompositions of the former type are called shallow, and decompositions of the latter type are called splendid.
While the case of decompositions of depth two follows from a straightforward product argument, the case of splendid decompositions requires a non-trivial reasoning. For this, we use the aforementioned result of Chudnovsky et al. [CPST13] about closures of polynomially χ-bounded classes under the substitution operation. The splendidness of the decomposition implies that if we partition edges of the graph into those "introduced" at odd and even levels, in both cases we observe a subgraph that can be obtained from graphs from the base class C by a repeated application of substitutions. Hence, we can apply the result of Chudnovsky et al. [CPST13] to both these subgraphs and conclude by taking the product of the obtained colorings.
Graph terminology. In this work we consider only finite, undirected graphs. For a graph G, the vertex and edge sets of G are denoted by V (G) and E(G), respectively. The neighborhood of a vertex u consists of all vertices adjacent to u and is denoted by N G (u). For a graph G, we write ω(G) for the size of the largest clique in G, i.e., a set of pairwise adjacent vertices. A coloring of G is any function that maps vertices of G to some set of colors, and it is proper if for every edge e of G, the endpoints of e receive different colors in the coloring. For a graph G, the chromatic number of G, denoted χ(G), is the least number of colors needed for a proper coloring of G.
A graph class is just a set of graphs, usually infinite. A class of graphs C is hereditary if it is closed under taking induced subgraphs, that is, if G ∈ C then every graph obtained from G by deleting vertices also belongs to C. A graph class C is χ-bounded if there exists a function f : N → N such that χ(G) f (ω(G)) for every G ∈ C. If the function f can be chosen to be a polynomial, then we say that C is polynomially χ-bounded.
A rooted tree is a connected graph without cycles with one vertex designated to be the root. As all decompositions in this work will have a form of rooted trees, for distinguishment we usually use the term node for a vertex of a tree. If T is a rooted tree with nodes x and y, then we say that x is an ancestor of y, equivalently that y is a descendant of x, if x lies on the unique path in T from y to the root. Note that every node is considered its own ancestor and descendant. If additionally x and y are adjacent, we say that x is a parent of y and equivalently that y is a child of x. Note that while every node has a unique parent -except for the root which has none-a node may have arbitrarily many children.

Cliquewidth.
A k-labelled graph is a graph G together with a labelling λ : V (G) → [k]. On k-labelled graphs we define the following operations: • for i, j ∈ [k], i = j, the operation join i, j (·) adds all possible edges with one endpoint of label i and the other of label j; • for i, j ∈ [k], i = j, the operation rename i→ j (·) changes the label of each vertex labelled i to j; • the operation union(·, ·) outputs the disjoint union of two k-labelled graphs.
Note that join i, j (·) and rename i→ j (·) are unary operations, that is, they are applied to a single k-labelled graph, while union(·, ·) is a binary operation. The cliquewidth of an (unlabelled) graph G is the least integer k such that some k-labelling of G can be constructed using the operations described above from single-vertex k-labelled graphs. Note that the construction of a graph G of cliquewidth k, as described above, naturally gives rise to a term over an algebra of operations join i, j (·), rename i→ j (·), and union(·, ·) whose leaves are single-vertex k-labelled graphs. This term is called a k-expression that constructs G.
Decompositions. As outlined in Section 1, we will actually prove a result stronger than claimed in Theorem 1.1: whenever C is a hereditary class of graphs that is polynomially χ-bounded, the class of graphs that admit decompositions using cuts of bounded diversity into pieces that belong to C is also polynomially χ-bounded. To state this result formally, we need to introduce the notion of a decomposition that will be used. It is actually a rooted variant of G-bounded decompositions used by Dvořák and Král' [DK12], hence we use a similar terminology, but adjusted to the rooted setting.
Definition 2.1. A decomposition of a graph G is a rooted tree T together with a function η that maps vertices of G to nodes of T .
Note in the above definition, there are no requirements about surjectivity or injectivity of the mapping η. In particular, many vertices of G may be mapped to the same node of T . Also, there are no restrictions on the number of children of any node in T .
Whenever a decomposition T = (T, η) of a graph G = (V, E) is clear from the context, we use the following notation. For two nodes x, y of T , we write x y if x is an ancestor of y in T ; recall that we consider every node to be its own ancestor as well. For an edge e = uv of G, we write η(e) = the least common ancestor of η(u) and η(v) in T.
For a node x of T , we write If the decomposition T for which the above objects are defined is not clear from the context, we write it as the second argument in the brackets, i.e. we write V x, T , E x, T , G x, T . Let us remark that we believe that the graph G x , as defined above, may be the right analogue of the torso of a node of x from the context of classic tree decompositions. Note that for every child y of x, the vertices of V y form an independent set in G x .
For a node x of T , we introduce the following equivalence relation ∼ x on V x : In other words, u, v ∈ V x are considered equivalent if they have exactly the same neighborhood outside of V x . Note that if y is a descendant of x, then u ∼ y v entails u ∼ x v. Definition 2.3. Let (T, η) be a decomposition of a graph G. The diversity of a node x of T is the number of equivalence classes of ∼ x . The diversity of the decomposition (T, η) is the largest diversity among the nodes of T .
Finally, we define the depth of a decomposition.
Definition 2.4. Let (T, η) be a decomposition of a graph G. The depth of (T, η) is the maximum number of edges in a path from the root to a node in T . A decomposition is shallow if it has depth at most two.
Statement of the results. With all the terminology prepared, we can formally state the main result of this paper.
Theorem 2.5. Let C be a hereditary graph class that is polynomially χ-bounded. Then for every fixed k ∈ N, the class of graphs that admit C-governed decompositions of diversity at most k is also polynomially χ-bounded. Now, Theorem 1.1 is directly implied by Theorem 2.5 and the next lemma, which follows almost immediately from the definition of cliquewidth.
Lemma 2.6. For every k ∈ N, every graph of cliquewidth at most k admits a decomposition of diversity at most k governed by the class of bipartite graphs.
Proof. Let G be a graph of cliquewidth at most k and let τ be a k-expression constructing (some klabelling of) G. Let T be the rooted tree of the k-expression τ, i.e., the tree of the subterms of τ with the descendant relation defined by the subterm relation. Note that the vertices of G are in one-to-one correspondence with the leaves of τ where they are introduced, hence let η : V (G) → V (T ) map every vertex of G to the corresponding leaf of T . Then (T, η) is a decomposition of G.
Observe that for every node of x, say corresponding to a subterm τ x of τ, the set of vertices introduced in the descendants of x is exactly V x . By the definition of a k-expression, all vertices assigned the same label in the graph constructed by τ x have the same neighborhood outside of V x in G, hence ∼ x has at most k equivalence classes. It follows that (T, η) has diversity at most k.
To see that (T, η) is governed by the class of bipartite graphs, observe that every internal node x has either one child (if it corresponds to a rename operation) or two children (if it corresponds to a join operation) and in both cases η −1 (x) = / 0, hence G x is bipartite. On the other hand, if x is a leaf then G x has one vertex, hence it is bipartite as well.
As the proof of Theorem 2.5 spans the whole remainder of the paper, from now on we fix the integer k ∈ N and the hereditary graph class C. Also, we write C ♦ for the latter class considered in Theorem 2.5, i.e. the class of graphs that admit C-governed decompositions of diversity at most k.

Stratifying the class C ♦
The first step in the proof of Theorem 2.5 is to stratify the inclusion C ⊆ C ♦ . That is, we introduce a sequence of classes C = D 0 ⊆ D 1 ⊆ . . . ⊆ D p = C ♦ , for some p ∈ N depending only on k, with the following property: for every i ∈ {1, . . . , p}, every graph G ∈ D i admits a D i−1 -governed decomposition of diversity at most k that is moreover somehow well-behaved, to be defined in a moment. Then Theorem 2.5 can be proved by an induction over the sequence D 1 , . . . , D p , where every step of the induction boils down to applying Theorem 2.5 under the additional supposition of well-behavedness of the decomposition. Thus, we reduce Theorem 2.5 to a weaker statement where we have an additional assumption about the decomposition.
To formally explain "well-behavedness" we need some additional terminology. We let F be the semigroup of all functions from [k] to [k], with composition being the semigroup action. That is, for f , g ∈ F we write f · g ∈ F for the function that maps every i ∈ [k] to f (g(i)).
With a tagging Λ of a decomposition (T, η) of G we associate a labelling Λ : E(T ) → F defined as follows: for every edge e of T , say e = xy where x is the parent of y, we set Λ(e) ∈ F to be the function that maps every i ∈ [k] to λ x (u) if there is some u ∈ V y satisfying λ y (u) = i and to 1 otherwise.
Note that every decomposition of diversity at most k has a tagging: any tagging can be obtained by enumerating the classes of ∼ x with numbers from 1 to k, in any way. We will, however, consider decompositions that admit taggings which give rise to somewhat restricted labellings, as explained next.
Definition 3.2. Let S be a semigroup. A set of elements A ⊆ S is forward Ramsey if for all e, f ∈ A we have e · f = e. In particular, each e ∈ A is an idempotent in S, that is, e · e = e. Definition 3.3. A decomposition (T, η) of a graph G of diversity at most k is called splendid if there exists a tagging Λ of (T, η) such that the set {Λ(e) : e ∈ E(T )} is forward Ramsey in F.
The next lemma formalizes the idea of stratification of the inclusion C ⊆ C ♦ and is the main result of this section.
Lemma 3.4. There exists p ∈ 2 O(k log k) and a sequence of hereditary graph classes , every graph G ∈ D i admits a D i−1 -governed decomposition of diversity at most k that is either splendid or shallow.
Using Lemma 3.4 and straightforward induction, the proof of Theorem 2.5 boils down to proving the statement under the additional assumption that the decomposition witnessing G ∈ C ♦ is either splendid or shallow. We treat this case in Section 4, while for the rest of this section we concentrate on proving Lemma 3.4.
Our main tool for the proof of Lemma 3.4 is the deterministic variant of Simon's Factorization Forest Theorem, due to Colcombet [Col07]. This result originates in the algebraic theory of formal languages, so to state it we need several auxiliary definitions.
Deterministic Simon's factorization. In the following, a word over a semigroup S is a (possibly empty) sequence of elements of S. The set of all words over S is denoted by S * , whereas S + denotes the set of all non-empty words over S. For a word w ∈ S + of length n and positions 0 x < y n, we write w[x, y] for the subword of w starting with the symbol at position x + 1 and ending with the symbol at position y, where positions are numbered from 1 to n.
The concatenation of two words u and v will be denoted by uv. Note that S + endowed with concatenation is an (infinite) semigroup, with a natural homomorphism φ : S + → S defined as follows: for w ∈ S + , φ (w) computes the product in S of the symbols appearing in w from left to right.
Suppose w is a word over S, say of length n. A split of w of height h is a mapping s : and s(z) s(x) for all x z y.
A split s of w is called forward Ramsey if the following condition is satisfied: for all quadruples of positions x, y, x, y ∈ {0, 1, . . . , n} that are pairwise s-equivalent and satisfy x < y and x < y , we have With this terminology introduced, we can state the result of Colcombet.
Theorem 3.5 (Theorem 1 of [Col07]). For every finite semigroup S there exists a mapping µ : S * → [|S|] satisfying the following property. For a word w ∈ S + , say of length n, define a split s w : . Then for every w ∈ S + , the split s w is forward Ramsey.
We remark that in [Col07] a stronger conclusion is provided, namely that the value of µ(w) can be computed by running a deterministic automaton with at most |S| |S| states over w. We will not use this property here.
Factorizing trees. As observed in [Col07], Theorem 3.5 is well-suited for the treatment of trees. Essentially, it proves that for any rooted tree whose edges are labelled with elements of a finite semigroup, we can find a bounded-depth hierarchy of forward Ramsey factorizations. This idea is formalized next.
Fix a finite semigroup S. An S-labelled tree is a rooted tree T together with a mapping ρ : E(T ) → S, called further the labelling. Similarly as before, an S-labelled tree (T, ρ) is splendid if the set of labels {ρ(e) : e ∈ E(T )} is forward Ramsey in S.
A factorization of a rooted tree T is a partition P of V (T ) such that every part of P induces a connected subtree of T . These subtrees are called the factors of P and for a factor F of P, we let top(F) be the top-most vertex of F. Thus, top(P) is the set of all top-most vertices of factors of P. If T is S-labelled, then we consider the factors of P to be S-labelled as well by restricting the labelling of T .
For a factorization P of a rooted tree T , we define the quotient tree T /P as follows: the node set of T /P is top(P) and the ancestor/descendant relation in T /P is the restriction of this relation from T to top(P). Note that this is equivalent to contracting every factor F of P into a single node named top(F), and setting the ancestor/descendant relation between contracted factors in the obvious manner.
If P is a factorization of T and T is S-labelled, say with a labelling ρ, then we can define a labelling ρ /P of T /P as follows. Take any edge e of T /P, say e = xy where x is the parent of y in T /P. Then x is an ancestor of y in T and let P be the path in T from x to y. If e 1 , e 2 , . . . , e m are the consecutive edges of T on P, then we let ρ /P(e) = ρ(e 1 ) · ρ(e 2 ) · . . . · ρ(e m ).
Now, from Theorem 3.5 we can derive the following Simon-like result for trees.
Lemma 3.6. For every finite semigroup S there exists a sequence of classes of S-labelled trees satisfying the following conditions: • H 0 consists only of one tree with one node, while H 3|S| is the class of all S-labelled trees; and • for every i ∈ [3|S|], every tree (T, ρ) ∈ H i has a factorization P such that all factors of P belong to H i−1 and ( T /P, ρ /P) is either splendid or shallow.
Proof. We will use the following notation. For an S-labelled tree (T, ρ) and node x of T , we write (T x , ρ x ) for the S-labelled tree induced in (T, ρ) by the descendants of x (including x itself); here ρ x is the restriction of ρ to edges between those descendants. More generally, if F is a subtree of T , then ρ| F is the restriction of ρ to the edges between the nodes of F. Also, we write P x for the (oriented) path in T that starts at the root of T and ends at x. Then w x ∈ S * is the word consisting of elements of S assigned by ρ to consecutive edges of P x . Note that if x is the root of T , then w x is the empty word.
For an S-labelled tree (T, ρ) and positive integer h, any function t : V (T ) → [h] will be called a split of (T, ρ) of height h. Such a split t is forward Ramsey if the following holds: for every node x of T , the split t restricted to the nodes on P x induces a forward Ramsey split of w x .
We define the level of (T, ρ) as follows: Level(T, ρ) = min { h : there exists a forward Ramsey split of (T, ρ) of height h }.
From Theorem 3.5 we easily deduce that the Level function has bounded range.
Proof. It suffices to construct a split of (T, ρ) of height at most |S|. Let µ : S * → [|S|] be the mapping provided by Theorem 3.5 for the semigroup S. Then let us define a split t : V (T ) → [|S|] as follows: for every x ∈ V (T ) we set t(x) = µ(w x ). Then Theorem 3.5 directly implies that t is a forward Ramsey split of (T, ρ).
On the other hand, we inductively define the notion of the complexity of an S-labelled tree (T, ρ) as follows: • If T has one node then Complexity(T, ρ) = 0.
• Otherwise, Complexity(T, ρ) is the least positive integer i such that (T, ρ) admits a factorization P where every factor of P has complexity smaller than i and ( T /P, ρ /P) is either splendid or shallow.
It is not hard to see that every S-labelled tree has a finite complexity; say, bounded by its depth. However, this will follow from the following statement, which is the core argument of the proof.
For every S-labelled tree (T, ρ) we have Complexity(T, ρ) 3 · Level(T, ρ). ( ) Note that establishing ( ) will conclude the proof, because we will define classes H 0 , H 1 , . . . , H 3|S| as follows: H i comprises of all S-labelled trees of complexity at most i. Then Claim 1 and ( ) ensure us that H 3|S| contains all S-labelled trees, while from the definition of the complexity we infer that H 0 consists only of the one-node tree and that the second condition from the lemma statement holds.
Therefore, from now on we focus on proving ( ). For this, we proceed by induction on the level of (T, ρ).
Base case. Suppose (T, ρ) has level 1, which means that it admits a forward Ramsey split t that such that t(x) = 1 for each node x of T . The following generic claim will be useful. Proof. We need to verify that for any e, f ∈ A ∪ B, we have e · f = e. If e, f ∈ A or e, f ∈ B then this follows from the assumption that A and B are forward Ramsey. Hence, by symmetry suppose that e ∈ A and f ∈ B. Take any g ∈ A ∩ B. Since A and B is forward Ramsey, we have e · g = e and g · f = g.
Let r be the root of T . For every child y of r, let A y be the set of all elements of S that are assigned by ρ to the edges of the subtree of T induced by the descendants of y.
Claim 3. For every child y of r, the set A y is forward Ramsey.
Proof. Since the split t is forward Ramsey, for every descendant z of y the set of elements appearing in w z is forward Ramsey. All these sets for different descendants z contain the element ρ(ry). Hence, by repeated application of Claim 2 we conclude that A y ∪ {ρ(ry)} is forward Ramsey, hence A y is forward Ramsey as well.
We observe that for every child y of r, the tree (T y , ρ y ) has complexity at most 1. Indeed, we can take its factorization P y into single-node factors, which have complexity 0, and then ( T y /P y , ρ y /P y ) = (T y , ρ y ) is splendid due to Claim 3. Then (T, ρ) has complexity at most 2, because we can take its factorization P that puts the root r as a one-node factor and each subtree T y , for y ranging over children of r, as a separate factor. Indeed, then ( T /P, ρ /P) has depth at most 2 so is shallow. As Complexity(T, ρ) 2 < 3, this concludes the base case of the induction.
Define an equivalence relation ∼ on V (T ) as follows: x, y ∈ V (T ) are ∼-equivalent if either both do not have an ancestor belonging to X, or they have the same least ancestor belonging to X. It is easy to see that the equivalence classes of ∼ induce connected subtrees of T , hence the partitioning P of V (T ) according to the equivalence classes of ∼ is a factorization of T . For each x ∈ X, we let P x be the factorization of (T x , ρ x ) consisting only of those factors of P that contain only descendants of x.
We first observe that a reasoning similar to that of Claim 3 shows that for "deep" elements y ∈ X, P y is already a good factorization of (T y , ρ y ).
Claim 4. Suppose a node y ∈ X has an ancestor that belongs to X and is different from y. Then ( T y /P y , ρ y /P y ) is splendid.
Proof. Let x be the least ancestor of y such that x ∈ X and x = y. Consider any descendant z of y that belongs to X and let Q xz be the path in T /P from x to z; then xy is the first edge of Q xz . Since t is forward Ramsey, t(x) = t(y) = t(z) = , and all values of t are not larger than , it follows that the set of elements of S assigned by ρ /P to the edges of Q xz is forward Ramsey; call this set B z . Observe that sets B z pairwise share the element ρ /P(xy), hence by repeated application of Claim 2 we conclude that z y, z∈X B z is forward Ramsey. Since this set contains { ρ y /P y (e) : e ∈ E( T y /P y )}, we conclude that ( T y /P y , ρ y /P y ) is splendid.
Claim 5. For every node y ∈ X that has an ancestor belonging to X but different from y, we have Complexity(T y , ρ y ) 3 − 1.
Proof. By Claim 4, (T y , ρ y ) admits factorization P y such that ( T y /P y , ρ y /P y ) is splendid. Therefore, it suffices to prove that each factor F of P y has complexity at most 3 − 2.
Observe that the only node of F mapped to by t is the root of F. Therefore, consider the factorization P F of F that puts the root of F into a one-node factor and every subtree F of F rooted at a child of the root into a separate factor. Observe that for every such subtree F , restricting t to F yields a forward Ramsey split of (F , ρ| F ) of height at most − 1, witnessing that Level(F , ρ| F ) − 1. By induction hypothesis we have Complexity(F , ρ| F ) 3 − 3. As F /P F is shallow and the root factor of P F has complexity 0, we conclude that F has complexity at most 3 − 2.
Let now R be the connected subtree of T induced by those nodes of T that have at most one ancestor belonging to X (including themselves). Note that R contains the root of T .
Proof. First observe that for every x ∈ R ∩ X, in the tree (R x , ρ| R x ) -the subtree of (T, ρ) induced by all descendants of x that belong to R -the only node mapped to by ρ is the root. Therefore, the same argument as in the proof of Claim 5 shows that Complexity(R x , ρ| R x ) 3 − 2.
Now if the root r of T belongs to X, then (R r , ρ| R r ) = (R, ρ| R ), hence Complexity(R, ρ| R ) 3 − 2 < 3 − 1, as claimed. Otherwise, let R be the connected subtree of R induced by all those nodes of R that have no ancestor in X (including themselves); then R contains r. Note that t restricted to R is a forward Ramsey split of (R , ρ| R ) of height at most − 1, hence by the induction hypothesis we have Complexity(R , ρ| R ) 3 − 3. Now consider a factorization R of R consisting of factor R and factors R x for all x ∈ X ∩ R. Since all these factors have complexity at most 3 − 2 and R /R has depth at most 2, we conclude that Complexity(R, ρ| R ) 3 − 1, as claimed. Now, construct a factorization Q of (T, ρ) as follows: the factors of Q consists of R and T y for each y ∈ X such that y has exactly one ancestor that belongs to X and is different from y. By Claims 5 and 6, each of the factors of Q has complexity at most 3 − 1. Furthermore, T /Q has depth at most 2. This implies that (T, ρ) has complexity at most 3 , which concludes the proof of ( ) and of Lemma 3.6.
With Lemma 3.6 established, the conclusion of the proof of Lemma 3.4 boils down to an easy verification.
Proof of Lemma 3.4. Apply Lemma 3.6 to the semigroup F -remember that F is the semigroup of all functions from [k] to [k], with composition being the semigroup action. This yields a suitable sequence of classes of S-labelled trees H 0 ⊆ H 1 ⊆ . . . ⊆ H 3|F| . We set p = 3|F| = 3 · k k and define graph classes D 0 ⊆ D 1 ⊆ . . . ⊆ D p as follows: a graph G ∈ C ♦ belongs to D i if and only if there exists a C-governed decomposition T = (T, η) of G of diversity at most k and its tagging Λ such that (T, Λ), treated as an F-labelled tree, belongs to H i . We now verify that classes D 0 , D 1 . . . , D p defined in this way satisfy all the required properties.
First, observe that graphs from C are exactly those that admit C-governed decompositions with a one-node decomposition tree. Thus D 0 = C. On the other hand, from Lemma 3.6 we conclude that D p = C ♦ . Also, since C is hereditary, so are all the classes D 0 , D 1 , . . . , D p . Now, fix any i ∈ {1, . . . , p} and consider any graph G ∈ D i . Let T = (T, η) be a decomposition and Λ be its tagging that witness the membership G ∈ D i . Then (T, Λ) ∈ H i . By Lemma 3.6 we infer that there exists a factorization P of T such that every factor of P belongs H i−1 and ( T /P, Λ /P) is either splendid or shallow.
Define a decomposition T /P = ( T /P, η /P) of G as follows: for every u ∈ V (G), we set η /P(u) to be the top vertex of the unique factor of P that contains η(u). Let Λ| P be the restriction of the tagging Λ to the nodes of top(P), which is then a tagging of T /P. The following claim then follows from definitions in a straightforward manner; here, Λ| P is the labelling induced by tagging Λ| P in T /P. Claim 1. It holds that Λ| P = Λ /P.
It now suffices to check that the decomposition T /P posesses all the properties asserted in the lemma statement. Note that for every node x of top(P) we have V x, T /P = V x, T , hence we use the shorthand V x for both.
Claim 2. T /P has diversity at most k.
Proof. Since for every node x ∈ top(P) we have V x, T /P = V x, T = V x , also the relation ∼ x over V x computed in T is the same as computed in T /P. As T has diversity at most k, this relation has always at most k equivalence classes, which implies that T /P also has diversity at most k.
Proof. Consider any node x of T /P. Then x = top(F) for some factor F of P. Let η F : V x → V (F) be defined as follows: for u ∈ V x we put • η F (u) = η(u), if η(u) belongs to F; and • η F (u) to be the least ancestor of η(u) that belongs to F, otherwise.
Let H = G x, T /P that is, the vertex set of H is V x and the edge set of H consist of all edges uv of G such that the least common ancestor of η(u) and η(v) in T belongs to F. Then (F, η F ) is a decomposition of H. A similar argument as in Claim 2 shows that the diversity of (F, η F ) is at most k. Also, (F, η F ) as a decomposition of H is C-governed, because H y, (F, η F ) = G y, T for each node y of F.
Moreover, if Λ| F is the restriction of the tagging Λ to the nodes of F and Λ| F is the restriction of the labelling Λ to the edges of F, then it is easy to see that Λ| F = Λ| F . Since (F, Λ| F ) ∈ H i−1 , we infer that (F, η F ) together with tagging Λ| F witnesses that H ∈ D i−1 . As x was taken arbitrarily, we conclude that T /P is D i−1 -governed.
Claim 4. T /P is either splendid or shallow.
Proof. Recall that ( T /P, Λ /P), as an F-labelled tree, is either splendid or shallow. In the latter case we can immediately conclude, because then the decomposition T /P has depth at most 2. In the former case, by Claim 1 we infer that ( T /P, Λ| P ) is splendid. This means that the tagging Λ| P witnesses that T /P is splendid.
The above three claims verify that T /P has the required properties and we are done.

Treating shallow and splendid decompositions 4.1 Shallow decompositions
For shallow decompositions we may use a direct product argument.
Lemma 4.1. Let C be a class of graphs that is χ-bounded by a non-decreasing function g. Then the class of graphs that admit C-governed shallow decompositions is χ-bounded by the function g 2 .
Proof. Let G be a graph that admits a decomposition (T, η) that is C-governed and shallow. Let x be the root of T ; then V x = V (G). By assumption G x ∈ C and G y ∈ C for every child y of x. Hence, we can find a proper coloring φ x of G x with at most g(ω(G x )) g(ω(G)) colors, and, for every child y of x, a proper coloring φ y of G y with at most g(ω(G y )) g(ω(G)) colors. Then define a coloring φ of G as follows: for any u ∈ V (G), we let φ (u) = (φ x (u), φ η(u) (u)).
Clearly, φ uses at most g(ω(G)) 2 colors, hence it suffices to verify that φ is a proper coloring of G. Consider any edge e = uv of G. If η(u) = η(v), then also η(e) = η(u) = η(v) and the edge e is present in the graph G η(e) = G η(u) = G η(v) . As φ η(e) is a proper coloring of G η(e) , the second coordinates of φ (u) and φ (v) differ. Otherwise, if η(u) = η(v), then η(e) = x, because T has depth at most 2. Then the edge e is present in the graph G x and, since φ x is a proper coloring of G x , we conclude that the first coordinates of φ (u) and φ (v) differ. In both cases we have φ (u) = φ (v), hence φ is a proper coloring of G.

Splendid decompositions
For splendid decompositions, the main tool will be a result of Chudnovsky et al. [CPST13], which treats of the closure of classes of graphs under the operation of substitution, defined as follows. Suppose that G is a graph and α is a mapping that associates with each vertex u of G some graph α(u). Then we define the graph G[α] as follows: • The vertex set of G[α] consists of pairs of the form (u, v), where u is a vertex of G and v is a vertex of α(u).
• Two vertices (u, v) and (u , v ) are adjacent in G[α] if either u = u and uu is an edge in G, or u = u and vv is an edge in α(G).
Informally speaking, G[α] is obtained from G by replacing every vertex u with the graph α(u), and putting a complete join between graphs α(u) and α(u ) whenever uu was an edge of G. For a graph class C, let C be the closure of C under the substitution operation. That is, C is the smallest class that contains C and whenever G ∈ C and the image of α is contained in C , then G[α] ∈ C as well. The following claim links the operation of substitution with our terminology and is easy to verify; we leave it without a proof, as we will not use it later on.
Lemma 4.2. For every hereditary graph class C closed under substituting vertices with edgeless graphs, the class C is exactly the class of all graphs that admit a C-governed decomposition of diversity 1.
Chudnovsky et al. [CPST13] proved the following. Thus, by Lemma 4.2, Chudnovsky et al. in fact essentially proved Theorem 2.5 for k = 1. We will now use this result to prove Theorem 2.5 in the case when the provided decomposition is splendid.
Lemma 4.4. Let C be a hereditary class of graphs that is polynomially χ-bounded. Then the class of graphs that admit splendid C-governed decompositions of diversity at most k is also polynomially χ-bounded.
Proof. First, we need to understand forward Ramsey sets in the semigroup F. Proof. Fix any e ∈ A and define the equivalence relation ∼ = as follows: for i, j ∈ [k], we have i ∼ = j if and only if e(i) = e( j). To verify that ∼ = defined in this way has the required property, consider any f ∈ A and any i, j ∈ [k] such that i ∼ = j, that is, e(i) = e( j). Since f · e = f due to A being forward Ramsey, we have Similarly we have e · f = e, hence e(i) = (e · f )(i) = e( f (i)), We proceed to the main proof. We may assume that C contains all edgeless graphs, because adding all such graphs to C does not spoil the assumption that C is hereditary and polynomially χ-bounded.
Consider any graph G that admits a splendid C-governed decomposition T = (T, η) of diversity at most k. Let Λ = (λ x ) x∈V (T ) be a tagging of T that witnesses that T is splendid, that is, the set {Λ(e) : E(T )} is forward Ramsey. Let ∼ = be the equivalence relation on [k] provided by Claim 1 for this set.
Claim 2. For every u ∈ V (G) and x, y ∈ V (T ) satisfying u ∈ V x and u ∈ V y , we have λ x (u) ∼ = λ y (u).
Proof. Note that the nodes z ∈ V (T ) satisfying u ∈ V z are exactly the ancestors of η(u). As these ancestors induce a path in T , by the transitivity of ∼ = it suffices to prove the claim in the case when x and y are adjacent in T , say x is the parent of y.
By Claim 2, with every vertex u ∈ V (G) we can associate an equivalence class τ(u) of ∼ = with the following property: λ x (u) ∈ τ(u) for every node x such that u ∈ V x .
Note that (T, η κ ) is a decomposition of G κ of diversity at most |κ| k. Furthermore, tagging Λ restricted to the vertices of G κ witnesses that (T, η κ ) is splendid. Finally, since C is hereditary, we conclude that (T, η κ ) is C-governed. We now argue that from now on we can focus on the case when ∼ = has only one equivalence class. Indeed, suppose that under this assumption we are able to prove that χ(G) h(ω(G)), for some nondecreasing polynomial h. Then in the general case, we may apply this reasoning to the graph G κ , for every equivalence class κ of ∼ =, thus showing that G κ can be properly colored with h(ω(G κ )) h(ω(G)) colors. It now suffices to take the union of these colorings, using a different set of h(ω(G)) colors for each of them, in order to see that G can be properly colored with k · h(ω(G)) colors.
Hence, from now on we assume that ∼ = has only one equivalence class, which is equivalent to the following assertion: for each e ∈ E(T ), the mapping Λ(e) is a constant function. (4.1) For a node x of T , the depth of x is the number of nodes on the path from the root of T to x. We now partition the edge set of G into E 0 and E 1 as follows: Also, we define subgraphs G 0 and G 1 of G as follows: The intuition now is that we would like to color each of the graphs G 0 , G 1 separately and superpose the obtained two colorings. The following claim, which is the core argument of the proof, reduces this task to a direct application of Theorem 4.3.
Proof. We prove the statement for G 0 , as the proof for G 1 is the same. By a bottom-up induction on T we argue the following statement: for every node x, the graph G 0 x := G 0 [V x ] belongs to C . Then the claim follows from applying this statement to the root of T .
Consider first the case when the depth of x is odd. Then G 0 x consists of the disjoint union of: graphs G 0 y for y ranging over children of x; and vertices v satisfying η(v) = x, which are isolated in G 0 x . By the induction assumption, graphs G 0 y belong to C . Thus, G 0 x can be obtained from an edgeless graph by substituting some of its vertices with graphs from C . Since we assumed that C contains all edgeless graphs, we conclude that G 0 x ∈ C as well. Consider now the case when the depth of x is even. Take any grandchild z of x; that is, z is a child of some child y of x. We claim that To see this, observe the following. First, by the construction of G 0 x , in this graph u and v have no neighbors in V y −V z . Next, by (4.1) applied to the edge yz, we have λ y (u) = Λ(yz)(λ z (u)) = Λ(yz)(λ z (v)) = λ y (v).
By the definition of tagging, this implies that u ∼ y v, or equivalently This, in turn, entails which together with u and v having no neighbors in V y −V z establishes (4.2). Observe that by the definition of G x , the set V y is independent in this graph. Therefore, by (4.3), we can also conclude that Then by (4.2) we conclude that H[α] and G 0 x are isomorphic. (4.5) Since (T, η) is C-governed, we have G x ∈ C, which entails H ∈ C because C is hereditary. Further, all the graphs in the image of α belong to C by the induction assumption. Then by (4.5) we may conclude that G 0 x ∈ C, as claimed.
Since C is polynomially χ-bounded, by Theorem 4.3 we conclude that C is polynomially χ-bounded as well, say by a nondecreasing polynomial g(·). Therefore, by Claim 3 we conclude that there are proper colorings φ 0 and φ 1 of G 0 and G 1 , respectively, where φ 0 uses at most g(ω(G 0 )) g(ω(G)) colors and φ 1 uses at most g(ω(G 1 )) g(ω(G)) colors. Since every edge of G belongs either to G 0 or to G 1 , we conclude that φ defined as φ (u) = (φ 0 (u), φ 1 (u)) is a proper coloring of G with g(ω(G)) 2 colors. Keeping in mind the multiplicative factor of k incurred by the reduction to the case when ∼ = has one equivalence class, we conclude that the class of graphs that admit splendid C-governed decompositions of diversity at most k is χ-bounded by the polynomial t → k · g(t) 2 .

Concluding the proof
We may now formally conclude the proof of our main result.
Proof of Theorem 2.5. Let C = D 0 ⊆ D 1 ⊆ . . . ⊆ D p = C ♦ be the sequence of hereditary classes provided by Lemma 3.4. By induction on i we prove that each class D i is polynomially χ-bounded, with the base case provided by the assumption that C = D 0 is polynomially χ-bounded. By Lemma 3.4, the class D i is contained in the union of two graph classes: the class of graphs admitting shallow D i−1governed decompositions of diversity at most k, and the class of graphs admitting splendid D i−1 -governed decompositions of diversity at most k. The induction assumption and Lemma 4.1 imply that the former class is polynomially χ-bounded, and similarly from Lemma 4.4 we conclude that the latter class is polynomially χ-bounded. As the union of two polynomially χ-bounded classes is polynomially χbounded, we infer that D i is polynomially χ-bounded, which proves the induction step. Thus D p = C ♦ is polynomially χ-bounded and we are done.

Discussion of the asymptotics
As stated, our main result only asserts that if the class C is polynomially χ-bounded then C ♦ is polynomially χ-bounded as well. However, we find it instructive to trace the explosion of χ-bounding polynomials throughout the proof.
The proof of Theorem 4.3 in [CPST13] shows that if C is χ-bounded by the polynomial t → t A , for a positive integer A, then C is χ-bounded by the polynomial t → t 3A+11 . Thus, Lemma 4.4 incurs a blow-up of the χ-bounding polynomial from t → t A (for C) to t → k ·t 6A+22 (for the class in the conclusion of the lemma). Similarly, Lemma 4.1 incurs a blow-up of the χ-bounding function from t → t A to t → t 2A . Thus, in the proof of Theorem 2.5 we may conclude that if D i−1 is χ-bounded by the polynomial t → t A , then D i is χ-bounded by t → k · t 6A+22 . Along the induction this blow-up occurs 2 O(k log k) times, hence we can reach the following conclusion.
Corollary 5.1. If C is χ-bounded by the polynomial t → t A for some positive integer A, then C ♦ is χ-bounded by a polynomial of the form t → t A·2 2 O(k log k) .
For the case of graphs of cliquewidth at most k, which were the primary motivation of this work, this gives an upper bound of t → t 2 2 O(k log k) on the χ-bounding polynomial, because, by Lemma 2.6, the base class C is formed by bipartite graphs, which are perfect (i.e., A = 1).
On the other hand, in the proof of Proposition 2.4 of [CPST13], Chudnovsky et al. argued that if F is a triangle-free graph with fractional chromatic number larger than 2 d , and we inductively define F 1 = F and F i+1 as F with every vertex substituted with F i , then • ω(F i ) = 2 i ; and It is easy to see that each graph F i has cliquewidth at most |V (F)|. As a graph F with properties as above can be chosen so that it has O(2 2d ) vertices, see the discussion in [CPST13], this proves the following corollary.
Lemma 5.2. For every k ∈ N, if g is a χ-bounding polynomial for the class of graphs of cliquewidth at most k, then the degree of g is at least Ω(log k).
While Lemma 5.2 ensures us that the degree of the χ-bounding polynomial for graphs of cliquewidth at most k needs to grow with k, there is still a significant gap between the upper bound -two-fold exponential in k -and the lower bound -logarithmic in k.

1-joins and graphs with excluded vertex-minor
For two graphs G 1 and G 2 with distinguished vertices u 1 and u 2 , respectively, their 1-join is the graph obtained from their disjoint union by removing u 1 and u 2 and making every former neighbor of u 1 adjacent to every former neighbor of u 2 . If C is a class of graphs, then by C & we denote the closure of C under repeated application of the 1-join operation. As observed by Dvořák and Král' in [DK12], such closure under 1-joins corresponds to having a decomposition of diversity at most 2 in the following sense.

Lemma 5.3 ([DK12]
). If C is a hereditary class of graphs closed under adding isolated vertices and substituting vertices with edgeless graphs, then every graph from C & admits a C-governed decomposition of diversity at most 2.
We remark that Dvořák and Král' speak about C-bounded decompositions of rank at most 1, which in our terminology are C-governed decompositions of diversity at most 2. We refrain from giving a formal proof of Lemma 5.3 here, because a reasoning leading to it can be found essentially verbatim in the proofs of Theorems 2 and 3 of [DK12].
The main result of Dvořák and Král' states (in our terminology) that if a hereditary graph class C is χ-bounded, then for every fixed k ∈ N the class of graphs that admit a C-governed decomposition of diversity at most k is also χ-bounded. Thus, by combining Lemma 5.3 with the main result of [DK12] on one side, and with our Theorem 2.5 on the other side, both for k = 2, we obtain the following corollary.
Corollary 5.4. If C is a hereditary graph class that is χ-bounded, then C & is also χ-bounded. If C is moreover polynomially χ-bounded, then so is C & as well.
The first part of Corollary 5.4 was explicitely proved by Dvořák and Král' in [DK12], while the second was proved by Kim et al. [KKOS19] using an argument tailored to 1-joins; hence, this is not a new result.
Corollary 5.4 is particularly useful when working with classes of graphs defined by forbidding vertexminors. Recall here that H is a vertex-minor of a graph G if H can be obtained from G by a sequence of operations: vertex deletion and local complementation, which amounts to swapping the adjacency and non-adjacency relations in the neighborhood of a vertex. It turns out that for some simple graphs H we have decomposition results of the following type: every H-vertex-minor-free graph either can be obtained as a 1-join of two smaller graphs, or belongs to a simpler class of graphs. For instance, for the case when H is the wheel W 5 , Geelen [Gee95] gave such a decomposition theorem where the simpler class of graphs comprises of all circle graphs and a few graphs on at most 8 vertices. By combining this result with the first part of the statement of Corollary 5.4 and the fact that circle graphs are χ-bounded [Gyá85, Gyá86], Dvořák and Král' concluded in [DK12] that the class of W 5 -vertex-minor-free graphs is χ-bounded. Note here that by using the second part of statement of Corollary 5.4 and the recent result of Davies and McCarty that circle graphs are quadratically χ-bounded [DM19], we can in the same manner argue that W 5 -vertex-minor-free graphs are polynomially χ-bounded. In a similar manner -by using the second part of statement of Corollary 5.4 together with a suitable decomposition result using 1-joins -Kim et al. [KKOS19] proved that the class of C -vertex-minor-free graphs is polynomially χ-bounded, for every 3. It seems naive to assume that a suitable structural result involving just 1-joins would hold in the class of H-vertex-minor-free graphs, for every fixed graph H. However, it is believed that graphs with a fixed excluded vertex-minor should admit a decomposition theorem of a form analogous to the decomposition theorem for proper minor-closed classes of Robertson and Seymour [RS03], where instead of 1-joins we use cuts of larger diversity. That is, if D is a class closed under taking vertex-minors that does not contain all graphs, then there exists k ∈ N such that every graph from D admits a C-governed decomposition of diversity at most k, where C is some class that generalizes circle graphs in a similar way as nearly embeddable graphs generalize planar graphs. Thus, the work of Dvořák and Král' [DK12] suggests a possible route towards proving the following conjecture attributed to Geelen: Conjecture 5.5. For every graph H, the class of graphs that exclude H as a vertex-minor is χ-bounded.
More precisely, the main result of Dvořák and Král' [DK12] reduces proving χ-boundedness of the class D to proving χ-boundedness of C, which may follow from a lift of the reasoning for circle graphs. Similarly, our Theorem 2.5 reduces proving polynomial χ-boundedness of D to proving polynomial χ-boundedness of C. Together with the quadratic χ-boundedness of circle graphs [DM19], this suggests that in Conjecture 5.5 one might expect even polynomial χ-boundedness. This question was also posed by Kim  Very recently, Geelen et al. [GKMW19] proved that for any circle graph H, the class of graphs that exclude H as a vertex-minor has bounded rankwidth. Together with our result, this implies that such a class is polynomially χ-bounded.