Abstract 1 Introduction 2 Preliminaries 3 Graph decompositions with restricted reusability 4 Homomorphism indistinguishability and logical equivalence 5 A comonadic account of requantification 6 Conclusion References

Homomorphism Indistinguishability and Game Comonads for Restricted Conjunction and Requantification

Georg Schindling ORCID TU Darmstadt, Germany
Abstract

The notion of homomorphism indistinguishability offers a combinatorial framework for characterizing equivalence relations of graphs, in particular equivalences in counting logics within finite model theory. That is, for certain graph classes, two structures agree on all homomorphism counts from the class if and only if they satisfy the same sentences in a corresponding logic. This perspective often reveals connections between the combinatorial properties of graph classes and the syntactic structure of logical fragments. In this work, we extend this perspective to logics with restricted requantification, refining the stratification of logical resources in finite-variable counting logics. Specifically, we generalize Lovász-type theorems for these logics with either restricted conjunction or bounded quantifier-rank and present new combinatorial proofs of existing results. To this end, we introduce novel path and tree decompositions that incorporate the concept of reusability and develop characterizations based on pursuit-evasion games. Leveraging this framework, we establish that classes of bounded pathwidth and treewidth with reusability constraints are homomorphism distinguishing closed. Finally, we develop a comonadic perspective on requantification by constructing new comonads that encapsulate restricted-reusability pebble games. We show a tight correspondence between their coalgebras and path/tree decompositions, yielding categorical characterizations of reusability in graph decompositions. This unifies logical, combinatorial, and categorical perspectives on the notion of reusability.

Keywords and phrases:
homomorphism indistinguishability, game comonads, finite variable counting logic, restricted conjunction, restricted requantification, tree decomposition, path decomposition
Copyright and License:
[Uncaptioned image] © Georg Schindling; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Finite Model Theory
; Mathematics of computing Graph theory
Related Version:
Full Version: https://arxiv.org/abs/2506.19746 [34]
Acknowledgements:
I would like to thank Irene Heinrich, Gaurav Rattan, and Pascal Schweitzer for valuable discussions.
Funding:
The research leading to these results has received funding from the German Research Foundation DFG (SFB-TRR 195 “Symbolic Tools in Mathematics and their Application”).
Editors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak

1 Introduction

A fundamental result in graph theory due to Lovász [25] states that two graphs G and H are isomorphic if and only if for every graph F it holds hom(F,G)=hom(F,H), where hom(F,G) denotes the number of homomorphisms from F to G. More generally, G and H are said to be homomorphism indistinguishable over a graph class , denoted by GH, if hom(F,G)=hom(F,H) for all F. In this formulation, the seminal result of Lovász states that the equivalence relation 𝒢 is the same as graph isomorphism, where 𝒢 is the class of all graphs. Understanding characterizations of the homomorphism indistinguishability relation  not only deepens our understanding of various graph invariants but also informs algorithmic approaches to problems like graph isomorphism [32], subgraph counting [9], and counting answers to conjunctive queries [19]. In recent years, the relation  was characterized for several graph classes  as a natural equivalence relation arising from logic and algebra. Notable examples include graphs of bounded treewidth [12, 13], bounded pathwidth [21, 27], bounded tree-depth [20, 21], and planar graphs [26]. Two central questions have emerged in this line of research and attract ongoing interest:

  1. (1)

    How do structural properties of the class  relate to the semantics of the relation ?

This first question often admits elegant characterizations in terms of mathematical logic, particularly when the graph classes are defined via graph decompositions. In this context, logical equivalence provides a natural way to express homomorphism indistinguishability. For a logic on graphs 𝖫, two graphs G and H are said to be 𝖫-equivalent if they satisfy exactly the same sentences from 𝖫. In [13] Dvořák shows that two graphs are homomorphism indistinguishable over the class of graphs of treewidth at most k if and only if they are equivalent in the k-variable fragment 𝖢k of first-order counting logic 𝖢. The techniques developed in [13] have been refined in [17] to prove that homomorphism indistinguishability over the class 𝒯qk of graphs admitting tree-decompositions of width k and depth q is the same as equivalence in 𝖢qk, the fragment of 𝖢k of quantifier-rank at most q. The general technique is to directly translate between formulas in 𝖢qk and graphs from 𝒯qk by induction on the structure of formulas and tree decompositions in both directions.

Beyond the characterization of homomorphism indistinguishability relations, the following natural question is fundamental to understand these relations:

  1. (2)

    When do different graph classes  induce the same indistinguishability relation ?

This second question was approached methodically by Roberson [31] via introducing the notion of homomorphism distinguishing closedness. A graph class  is called homomorphism distinguishing closed (also h.d. closed) if for every graph F there exist graphs G,H with GH and hom(F,G)hom(F,H), i.e., if no graphs can be added to  without changing the relation . The significance of this notion is that any two distinct homomorphism distinguishing closed classes must induce distinct homomorphism indistinguishability relations. In turn, equivalence relations on graphs characterized by homomorphism indistinguishability can be separated by separating the underlying graph classes, given they are homomorphism distinguishing closed. In general, it appears to be a hard task to establish that a given class is homomorphism distinguishing closed, leading to only a short list of known examples. These include the class of graphs of bounded degree [31], bounded tree-depth [17], bounded treewidth [29], bounded depth treewidth [5], and essentially profinite classes [35]. Beyond the investigation of specific graph classes, in [35] the relation between closure properties of and preservation properties of was studied systematically guided by the two aforementioned main questions. In [31] Roberson conjectures that every graph class which is closed under taking disjoint unions and minors is homomorphism distinguishing closed. For certain such graph classes , homomorphism distinguishing closedness has been successfully proven when  is characterized by a model-comparison game and membership in  is determined by a pursuit-evasion game. A key tool in such proofs is the CFI-construction [8], which has been instrumental in separating the homomorphism indistinguishability relations of 𝖢k-equivalence and 𝖢k+1-equivalence. For a graph G, the construction yields two CFI-graphs X(G) and X~(G) for which their distinguishability by 𝖢k depends on the structural complexity of G. Crucial technical challenges arise, particularly in proving the connection between pursuit-evasion and model-comparison games for the CFI-construction (see [29]) and establishing the monotonicity of pursuit-evasion games (see [5]). The monotonicity of a game ensures that when searchers have a winning strategy, the reachable positions for the evading player only decreases as the game progresses.

For many logics of interest in finite model theory, like 𝖢qk, their equivalence can be characterized in terms of model-comparison games such as Ehrenfeucht–Fraïssé or pebble games (see [15]). This correspondence was utilized in [2] to give a novel approach to logical resources in terms of game comonads. The central observation is that model-comparison games induce comonads on categories of relational structures. In this framework, several essential constructions from finite model theory can be given a categorical account, see [3] for a survey. In particular, coalgebras for some game comonads encode combinatorial parameters of structures [4] leading to a uniform approach to homomorphism indistinguishability developed in [11]. There, the first characterization of 𝖢qk-equivalence by homomorphism counts was shown for graphs admitting pebble forest covers. The comonadic approach was recently used to show a categorical characterization of the graph parameter pathwidth and prove that homomorphism indistinguishability over graphs of pathwidth at most k is logical equivalence in the restricted conjunction logic 𝖢k [27] by building on previous work of Dalmau [10].

The concept of requantification, recently introduced in [30], allows for a more refined view on stratification by logical resources in finite variable counting logics. The logic 𝖢(k1,k2) is defined as the fragment of 𝖢 using at most k1+k2 distinct variables of which only k1 may be requantified, i.e. quantified within scopes of their own quantification. To analyze the expressive power of 𝖢(k1,k2), the bijective (k1,k2)-pebble game BP(k1,k2) and the q-round (k1,k2)-cops-and-robber game CRq(k1,k2) were introduced, incorporating reusability into model-comparison and pursuit-evasion games, respectively. In the context of Question (1), it is only natural to ask whether logics with restricted conjunction and requantification admit homomorphism indistinguishability characterizations. Subsequently, Question (2) asks whether the corresponding graph classes are homomorphism distinguishing closed.

Contribution

In this work, we extend the study of homomorphism indistinguishability to graph classes with restricted reusability and thereby provide characterizations by counting logics with restricted requantification. A central contribution of our work is to show that decomposition-based techniques provide flexible tools for characterizing homomorphism indistinguishability relations, giving novel answers to Question (1). Furthermore, we use these techniques for establishing homomorphism distinguishing closedness, giving new answers to Question (2). By embedding these results into the broader framework of game comonads, we provide a unified categorical perspective on requantification in finite variable logics. In the following, we give a more detailed description of our contribution in terms of techniques and results:

Graph decompositions.

We answer an open question from [30] by characterizing the class of graphs 𝒯q(k1,k2) where the cops have a winning strategy for CRq(k1,k2) by various graph decompositions, which adapt the concept of reusability (Theorem 3.8). Furthermore, we introduce the node-searching game NS(k1,k2) where only k1 of the k1+k2 searchers may be reused and characterize the class of searcher-win graphs 𝒫(k1,k2) by novel path decompositions (Theorem 3.7). We demonstrate a new effect that differentiates pathwidth from treewidth in the context of reusability. Namely, for bounded pathwidth, non-reusable resources can be employed uniformly for the full decomposition while for bounded treewidth their usage highly depends on intermediate parts of the decomposition (Proposition 3.4). Moreover, we prove that both games CRq(k1,k2) and NS(k1,k2) are monotone by showing that reusability is compatible with monotonicity of the non-restricted games (Proposition 3.5).

Characterizations by logical equivalence.

The newly defined decompositions for 𝒫(k1,k2) and 𝒯q(k1,k2) form the basis of our homomorphism indistinguishability results, providing more fine-grained answers to Question (1). By imposing constraints on requantification in the restricted conjunction logic 𝖢k we obtain the new fragment 𝖢(k1,k2) and show that 𝖢(k1,k2)-equivalence is exactly the same as homomorphism indistinguishability over 𝒫(k1,k2) (Theorem 4.5). This extends the Lovász-type theorem for 𝒫(k,0) from [27] to the setting of restricted reusability. Interestingly, this also reproves the previous result in a purely combinatorial manner by adapting the constructive techniques from [13, 17]. We further underline the versatility of this strategy by proving that 𝖢q(k1,k2)-equivalence is homomorphism indistinguishability over 𝒯q(k1,k2) (Theorem 4.6). Also here we show how the interplay of requantification and restricted conjunction differentiates the two logics: We prove a normal form result for 𝖢ω(k1,k2) with respect to requantification (Proposition 4.2) which in stark contrast was ruled out for the logic 𝖢(k1,k2) in [30].

Homomorphism distinguishing closedness.

We utilize the established framework for counting homomorphisms from the class 𝒫(k1,k2) to prove our main technical result: For every graph G𝒫(k1,k2) the CFI-graphs X(G),X~(G) are 𝖢(k1,k2)-equivalent (Theorems 4.8 and 4.9). Using a similar argument for the class 𝒯q(k1,k2), we obtain that the classes 𝒫(k1,0), the closure of 𝒫(k1,k2) under disjoint unions, and 𝒯q(k1,k2) are homomorphism distinguishing closed (Theorems 4.10 and 4.11). This gives new answers to Question (2) and further exemplifies the technique of using games to establish homomorphism distinguishing closedness. In the light of Roberson’s conjecture, Theorem 4.10 is particularly interesting as the class of graphs of pathwidth at most k must exclude a fixed forest as a minor [33]. Next, we employ an argument from [29] to give an exact characterization which subgraph counts are recognized by the logics 𝖢(k1,k2) and 𝖢q(k1,k2). For the logic 𝖢q(k1,k2), this characterizes the ability of a reusability-restricted Weisfeiler-Leman variant to detect subgraph counts (Remark 4.14). Note: Recently, Lemma 4.9 and a part of its consequence Theorem 4.10 were independently obtained for the case without constraints on reusability in the PhD thesis [36].

A comonadic perspective.

Finally, we give a comonadic account of requantification as a logical resource. The pebbling comonad [2] and pebble-relation comonad [27] were constructed from organizing the respective pebble games as endofunctors on categories of relational structures. We use reusability-restricted variants of these pebble games from [30] and this work to obtain similar constructions, namely the comonads (k1,k2) and (k1,k2). By proving close correspondences between coalgebras of these comonads and our newly defined path and tree decompositions, we obtain categorical characterizations of reusability in graph decompositions (Theorem 5.4). Finally, we show that coKleisli isomorphisms correspond to Duplicator winning strategies in the corresponding pebble games and hence characterize equivalence for the logics 𝖢(k1,k2) and 𝖢q(k1,k2) (Theorem 5.5). We also devise restricted pebble games to capture coKleisli morphisms and thereby characterize preservation in counting-free logics with restricted requantification (Theorem 5.8).

2 Preliminaries

We write ={0,1,2,} for the set of natural numbers, +={0} for the set of positive integers, and for n+ we define [n]{1,,n}. Unless stated explicitly otherwise, we let k1,k2 throughout the paper. We fix the variable sets (also called pebble sets[xk1]{x1,,xk1}, [yk2]{y1,,yk2}, and [xk1,yk2]{x1,,xk1,y1,,yk2}. For the following definitions we let V be a set. We write 2V for the power set of V and set (V2)={U2V:|U|=2}. A partial function α:[xk1,yk2]V assigns to every variable z[xk1,yk2] at most one element α(z)V. If α does not assign an element to z, we write α(z)=. Also, we write im(α) and dom(α) for the image and domain of α respectively. We write V+, Vn and Vn for the sets of non-empty finite sequences, sequences of length n, and sequences of length at most n over V respectively. We denote sequences of elements s1,,snV by s¯=[s1,,sn]Vn and for s¯,t¯V+ we write s¯t¯ if s¯ is a prefix of t¯. The concatenation of s¯ and t¯ is denoted by s¯t¯. For i,j[n] with ij we define s¯[i,j][si,si+1,,sj] and s¯[i]s[i,i]. Also, we indicate that si occurs in s¯ by writing sis¯. For a variable z[xk1,yk2] and vV we write α[z/v] for the partial function that is obtained from α by replacing the image α(z) by v. Given a sequence s¯=[(z1,v1),,(zn,vn)]([xk1,yk2]×V)n and z[xk1,yk2] we denote by lastz(s¯) the vi with the largest index i such that (z,vi)s¯. We call the first entry of each element in s¯ a pebble index or variable index. For a proposition P, we use the Iverson bracket [P]{0,1} to indicate whether P is satisfied.

Finite model theory.

We fix a finite signature σ of relation symbols and associate to each Rσ an arity ar(R)+. A σ-structure 𝒜 consists of a universe of elements V(𝒜) and interpretations R𝒜V(𝒜)ar(R) for each Rσ. For σ-structures 𝒜 and we say that is a substructure of 𝒜 if V()V(𝒜) and RR𝒜 for each Rσ. Every set of elements AV(𝒜) induces a substructure of 𝒜 with universe A and relations R𝒜Aar(R) for Rσ. A homomorphism between σ-structures 𝒜 and is a function h:V(𝒜)V() such that for all Rσ we have that (v1,,var(R))R𝒜 implies (h(v1),,h(var(R)))R. The function h is called an isomorphism if it is a bijective homomorphism and h1 is a homomorphism. Let 𝖫 be a logic over the signature σ with variable set 𝒱 (for a formal definition see [14]). For a formula φ𝖫 we write φ(v1,,vn) to indicate that the set of free variables of φ, which we denote by free(φ), is a subset of {v1,,vn}. Given a σ-structure 𝒜 and an assignment α:𝒱V(𝒜) we write 𝒜,αφ to indicate that 𝒜 satisfies φ with free(φ) interpreted according to α. For a tuple a¯V(𝒜)n we write 𝒜,a¯φ by assigning viai. For σ-structures 𝒜, we write A𝖫 if 𝒜 and satisfy exactly the same sentences from 𝖫. We write A𝖫 if every sentence from 𝖫 satisfied by 𝒜 is also satisfied by . First-order counting logic 𝖢 extends first-order logic 𝖥𝖮 by counting quantifiers nφ for φ𝖢. We say that a variable xi is requantified in a logical formula if it either occurs free and bound or if it is quantified within the scope of a quantification over xi. The logic 𝖢(k1,k2) is obtained from 𝖢 by fixing the variable set [xk1,yk2] and requiring that only variables from [xk1] are requantified. Finally, 𝖢q(k1,k2) is the fragment of 𝖢(k1,k2) with quantifier-rank at most q (see [30] for details).

Graphs.

A finite graph is a pair G=(V(G),E(G)) consisting of a finite set V(G) of vertices and a set E(G)(V(G)2) of edges. For an edge {u,v}E(G) we also write uvE(G). Given a set WV(G) we define the induced subgraph G[W]=(W,{uvE(G):u,vW}). For a graph G and vV(G) we write E(v) for the set of edges incident to v. We denote the set of vertex sets of connected components (i.e. maximal connected subgraphs) of G by 𝒞G. A rooted tree is a pair (T,r) such that T is a tree and rV(T) is a designated vertex, called the root of T. With a rooted tree we associate a partial order T on the vertices of T by setting sTt exactly if s is on the unique path from r to t. The height of a rooted tree is the maximal number of vertices on a path from the root to a leaf. A rooted forest is a pair (F,r¯) such that if F1,,Fp are the connected components of F we have r¯=(r1,,rp) and (Fi,ri) is a rooted tree for each i[p]. A labeled graph is a graph G together with a finite set of labels L and a partial labeling function νG:LV(G). We write LGdom(ν) for the set of labels occurring in G. A labeled graph is called fully labeled if the labeling function is surjective. We denote the class of all [xk1,yk2]-labeled graphs by 𝒢[xk1,yk2]. The product of two labeled graphs G1,G2𝒢[xk1,yk2] is the graph G1G2 obtained by taking the disjoint union of G1 and G2, identifying vertices with the same label, and suppressing any loops or parallel edges that might be created. Note that for a graph G𝒢[xk1,yk2] the labeling νG is a partial variable assignment and hence we may write Gφ for G,νGφ if free(φ)LG.

Two central concepts in this work are tree decompositions and path decompositions, which we briefly introduce next. For a more detailed exposition, we refer the reader to [7].

Definition 2.1.

Let G be a graph. A tree decomposition of G is a tuple (T,β) such that T is a tree and β:V(T)2V(G) is a function such that

  • tV(T)β(t)=V(G),

  • for all uvE(G) there exists a tV(T) with u,vβ(t), and

  • for all vV(G) the set of vertices β1({v})={tV(T):vβ(t)} is connected in T.

The width of (T,β) is maxtV(T)|β(t)|1 and the treewidth of G is the minimal width of a tree decomposition of G. If T is a rooted tree with root rV(T) we call (T,r,β) a rooted tree decomposition. A path decomposition of G is a tree decomposition (P,β) such that the underlying tree P is a path. If the decomposition is rooted, then we define the root to be an endpoint of P. The width of (P,β) is again maxpV(P)|β(p)|1 and the pathwidth of G is the minimal width of a path decomposition of G.

The CFI-construction.

We use the CFI-construction introduced in [8] in the variant presented in [31]. Let G be a connected graph and UV(G). For each vV(G) we set δv,U|{v}U|. The CFI-graph XU(G) is defined by

V(XU(G)) {(v,S):vV(G),SE(v),|S|δv,Umod2},
E(XU(G)) {(v,S)(u,T):uvE(G),uvST}.

The connected graph G is called the base graph of XU(G). We also define ρ:V(XU(G))G,(u,S)u. For vV(G) we also denote FU(v){(v,S):SE(v),|S|δv,Umod2} for the vertices in XU(G) associated with v. These vertices are also referred to as gadget vertices of v and FU(v) as the corresponding gadget.

Lemma 2.2 ([8, Lemma 6.2], [31, Lemma 3.2]).

For all sets of base vertices S,TV(G), the graphs XT(G) and XS(G) are isomorphic if and only if |S||T|mod2.

Thus, we set X(G)X(G) and X~(G)X{v}(G) for some vV(G) as the isomorphism type only depends on the parity of |U|. Note that the vertex sets of the graphs X(G) and X~u(G) only differ in F(u) and Fu(u).

Lemma 2.3 ([29, Lemma 11]).

Let G be a connected graph, u,vV(G), and P be a path from u to v in G. Then there exists an isomorphism φu,v:X{u}(G)X{v}(G) such that for all (w,S)V(X{u}(G)) it holds that

  1. 1.

    ρ(φu,v(w,S))=w, and

  2. 2.

    if wV(G)P then φu,v(w,S)=(w,S).

Homomorphism indistinguishability.

We denote the number of homomorphisms from a possibly labeled graph F to a graph G by hom(F,G). For a class of labeled graphs we write for the class of all formal finite linear combinations with real coefficients of graphs in . For a linear combination 𝔉=iciFi and a labeled graph G we define hom(𝔉,G)icihom(Fi,G) and L𝔉 to be the set of labels occurring in 𝔉.

For a class of graphs we say that two graphs G and H are homomorphism indistinguishable over if for all F it holds that hom(F,G)=hom(F,H). In this case we write GH. The homomorphism distinguishing closure of is defined as the class

cl(){F𝒢:G,H𝒢GHhom(F,G)=hom(F,H)}.

The class is called homomorphism distinguishing closed if cl()=.

Lemma 2.4 ([16, Proposition 47]).

Let be a graph class that is closed under taking disjoint unions and summands (i.e. F1˙F2 exactly if F1,F2). If for every connected graph G it holds that X(G)X~(G), then is homomorphism distinguishing closed.

Category theory.

We assume only very basic background in category theory, see [1] for details. For a category 𝐂 we denote its objects by Obj(𝐂) and its morphisms (or arrows) by Ar(𝐂). We denote the category of σ-structures with their homomorphisms by 𝐒𝐭𝐫(σ).

A comonad (in coKleisli form) on a category is given by:

  • an object map 𝔾:Obj(𝐂)Obj(𝐂),

  • a counit morphism ε𝒜:𝔾𝒜𝒜 for every 𝒜Obj(𝐂),

  • and a coextension operation () associating with each morphism f:𝔾𝒜 another morphism f:𝔾𝒜𝔾 for 𝒜,Obj(𝐂)

such that for all morphisms f:𝔾𝒜, g:𝔾𝒞 we have ε𝒜=id𝔾𝒜, εf=f, and (gf)=gf. From this, a comonad in standard form (𝔾,ε,δ) on the category 𝐂 can be obtained by setting 𝔾f(fε𝒜) (turning 𝔾 into a functor) and δ𝒜id𝔾𝒜 for 𝒜Obj(𝐂). For a comonad in standard form, a coalgebra over 𝔾 is a pair (𝒜,α) where 𝒜Obj(𝐂) and Ar(𝐂)α:𝒜𝔾𝒜 such that δ𝒜α=𝔾αα and ε𝒜α=id𝒜.

For a comonad (𝔾,ε,()) in coKleisli form we define the coKleisli category 𝒦(𝔾):

  • Obj(𝒦(𝔾)) is the class of objects Obj(𝐂).

  • Ar(𝒦(𝔾)) are all morphisms f:𝔾𝒜 for 𝒜,Obj(𝐂).

  • The composition 𝒦 is defined by setting g𝒦fgf.

  • The identity morphisms are given by the counit morphisms ε𝒜 for 𝒜Obj(𝐂).

3 Graph decompositions with restricted reusability

In this section, we introduce several graph decompositions that incorporate constraints on reusability of vertices within the parts of each decomposition. Specifically, we define four distinct types of decompositions, each of which comes in two variants corresponding to two underlying structural models: the path model and the (bounded-depth) tree model. Each decomposition is parameterized by two values: k1, representing the number of reusable resources, and k2, representing the number of non-reusable resources. Our goal is to show that, for each of the two models, the corresponding decompositions define the same graph class with aligned parameters. This equivalence allows us to explore the concept of reusability in graph decompositions from multiple, yet consistent, perspectives. The motivation for each decomposition arises from its significance in homomorphism indistinguishability over the associated graph class, establishing a unifying theme for our study. In Table 1 we summarize the significance of the various decompositions introduced in this section for our results on homomorphism indistinguishability.

Table 1: Utilization of graph decompositions for homomorphism indistinguishability and game comonads.
graph class
homomorphism
indistinguishability
h.d. closedness game comonads
path
𝒫(k1,k2) defined by
path decompositions
𝖢(k1,k2)-equivalence
via construction caterpillars
𝒫(k1,k2)
only for ˙𝒫(k1,k2)
via NS(k1,k2)
coalgebras over (k1,k2)
correspond to linear
component forest covers
tree
𝒯q(k1,k2) defined by
bounded depth
tree decompositions
𝖢q(k1,k2)-equivalence
via construction trees
𝒯q(k1,k2)
true via
CRq(k1,k2)
coalgebras over (k1,k2)q
correspond to
forest covers

We begin by introducing the notion of exception sets for tree decompositions of bounded depth and for path decompositions. The key idea is to generalize the concept of a tree decomposition of width k1 by permitting up to k2 exceptions along each branch of the underlying tree. However, there is an important restriction: if a vertex is designated as an exception at some node t in the rooted tree decomposition, then it must remain fixed, i.e., cannot be replaced by a different vertex at any descendant of t. In this sense, the exception status is not reusable along the subtree rooted at t.

Definition 3.1.

Let G be a graph, k2, k1{[k2>0]}, and k1+k2,q+. A rooted tree decomposition (T,r,β) of G has

  • width (k1,k2) if for each leaf V(T) there exists a set of exceptions SV(G) with |S|k2 such that maxtT|β(t)S|1k1,

  • and depth maxvV(T)|tTvβ(t)|.

We write 𝒯(k1+1,k2) for the class of all graphs admitting a tree decomposition of width (k1,k2) and 𝒯q(k1+1,k2) for the subclass admitting such a cover of depth q.

If (P,r,β) is a path decomposition, we define that (P,r,β) has component width (k1,k2) if for each connected component CV(G) there is an exception set SCC with |SC|k2 such that maxpV(P)|β(p)C𝒞GSC|1k1.

We write 𝒫(k1+1,k2) for the class of graphs admitting a path decomposition of width (k1,k2).

For k2=0 we recover the class 𝒯(k1+1,0) of graphs of treewidth at most k1 but for k2>0 we allow the technical nuisance of having k1=1 in order to avoid a case distinction.

Note that for the width of a path decomposition we only require the existence of one single set S of exceptions. Thus, for fixed k1 the class of graphs admitting a path decomposition of width (k1,k2) can be seen as an approximation of the class of graphs of pathwidth at most k1 up to deleting k2 vertices.

Next, we extend the notion of pebble forest covers to incorporate the concept of reusability. Originally introduced in [2] as k-traversals, these structures provide a combinatorial characterization of coalgebras over the pebbling comonad k, finally demonstrating how the comonadic structure of k can be used to characterize treewidth. Our aim is to follow a similar approach to characterize reusability (specifically, width (k1,k2)) within tree decompositions of bounded depth via comonadic methods. To this end, we use non-reusable pebbles y1,,yk2, which mark fixed positions in a forest cover that cannot be reassigned, thereby encoding the non-reusability constraint directly into the structure.

Definition 3.2.

Let G be a graph and k1+k2+. A (k1,k2)-pebble forest cover of G is a tuple (F,r¯,p) where (F,r¯) is a rooted forest with V(F)=V(G) and p:V(G)[xk1,yk2] is a pebbling function such that

  1. 1.

    if uvE(G), then uFv or vFu,

  2. 2.

    if uvE(G) and uFv, then for all wV(G) with uFwFv it holds that p(u)p(w), and

  3. 3.

    if uV(G) and p(u)[yk2], then for all wV(G) with uFw it holds that p(u)p(w).

The forest cover (F,r¯,p) has depth q+ if (F,r¯) has height q.

We call (F,r¯,p) a linear forest cover if it additionally holds that

  1. 1.

    every connected component of F is a path, and

  2. 2.

    if uV(G) and p(u)[yk2], then for every wV(G){u} it holds that p(u)p(w).

If we relax Item 2 such that for uV(G) with p(u)[yk2] only for every w in the same path of F as u it must hold p(u)p(w), we say that (F,r¯,p) is a linear component forest cover.

The tree-depth of a graph G is the minimum q such that G has a forest cover of depth at most q (see [28]). The class of graphs of tree-depth at most q is denoted by 𝒯q.

The classes 𝒫(k,0), 𝒯(k,0), and 𝒯q admit characterizations in terms of pursuit-evasion games by [37], [6, 22], and [18] respectively. The characterization of 𝒯(k,0) was refined to 𝒯q(k,0) in [17]. In [30] a cops-and-robber game with constraints on the reusability of cops and the number of rounds was introduced. We recall its definition and also modify it to match the game-theoretic characterization of 𝒫(k,0).

Definition 3.3.

Let G be a graph and let k1+k2,q+. The cops-and-robber game CRq(k1,k2)(G) is defined as follows: The game is played between a group of k1+k2 cops denoted by the elements in [xk1,yk2] and one robber. The position of the cops is given by a function γ:[xk1,yk2]V(G) and the position of the robber is a vertex vV(G). We denote the connected component of v in the graph Gim(γ) by Cvγ. In one round of the game, the following steps are performed:

  1. 1.

    The cops choose one cop z[xk1]{y[yk2]:γ(y)=} and declare a new destination wV(G){}.

  2. 2.

    The robber chooses a vertex v in Cvγ[z/].

  3. 3.

    If vim(γ[z/w]) the cops win. Otherwise, the game continues from the new position (γ[z/w],v).

Initially, neither the cops nor the robber are placed on the graph. The robber wins if the cops do not win after q rounds. The game variant CR(k1,k2) is defined in the same way with the modification that the robber wins if the cops never win a round.

The node searching game NS(k1,k2)(G) is defined as the variant of CR(k1,k2) in which the robber is invisible to the cops. That is, the choice of the assignment γi can only depend on γi1, but not on v. Here the cops are called searchers instead and the robber is called fugitive. In this formulation the only difference to CR(k1,k2) is that searchers do not know the position v, but the fugitive knows the position γ.

The strategy of the cops or searchers is called monotone if in each round it holds that CvγCvγ[z/]. We say that a game variant is monotone if the existence of a winning strategy implies the existence of a monotone winning strategy.

A winning strategy of the searchers in the game NS(k1,k2)(G) can be specified as a sequence of positions γ1,,γm:[xk1,yk2]V(G) while in the game CR(k1,k2) the cop strategy depends on the moves of the robber and therefore each position γi additionally depends on the robber position vi in round i. The proof of [30, Theorem 15] hinges on this fact and shows that in the game CR(k1,k2) the use of non-reusable cops is restricted to a pattern involving arbitrarily long sequences of reusing all reusable cops before utilizing a new non-reusable cop. We show that the situation is entirely different for NS(k1,k2) due to the invisibility of the fugitive.

Proposition 3.4.

The searchers have a winning strategy in NS(k1,k2)(G) if and only if they have a winning strategy in NS(k1,0)(G) with k2 initial fixed placements of non-reusable searchers.

To prove the characterization of a graph parameter by a pursuit-evasion game an important step often is to establish that the respective game is monotone. Alongside this, in some cases proving the monotonicity of a game is the crucial step in establishing homomorphism distinguishing closedness of the associated graph class, see [5, 17] for a discussion. Our goal is to show monotonicity of the games introduced here in order to utilize this property to prove game-theoretic characterizations of 𝒫(k1,k2) and 𝒯q(k1,k2) towards homomorphism distinguishing closedness. The monotonicity of NS(k1,0) was proven in [23] and recently [5] established the monotonicity of CRq(k1,0)(G). We build on top of these results to show that reusability is compatible with monotonicity by replacing parts of winning strategies by monotone strategies. The notion of monotonicity we use here is usually referred to as robber-monotonicity in the literature.

Proposition 3.5.

Let k1+k2,q+ and G be a graph. Then both games NS(k1,k2)(G) and CRq(k1,k2)(G) are monotone.

To characterize homomorphism indistinguishability over the class 𝒯q(k,0), in [17] the notion of construction trees was introduced, building on techniques from [13]. We extend this concept to accommodate the classes 𝒯q(k1,k2) and 𝒫(k1,k2). This generalized definition forms the basis of our framework for analyzing homomorphism indistinguishability over these broader classes.

Definition 3.6.

Let k1+k2+ and G be a [xk1,yk2]-labeled graph. A (k1,k2)-construction tree for G is a tuple (T,λ,r), where (T,r) is a rooted tree and λ:V(T)𝒢[xk1,yk2] is a function assigning [xk1,yk2]-labeled graphs to the nodes of T such that

  • λ(r)=G,

  • all leaves V(T) are assigned fully labeled graphs,

  • all internal nodes tV(T) with exactly one child t are elimination nodes, that is λ(t) is obtained from λ(t) by deleting a label,

  • all internal nodes tV(T) with more than one child are product nodes, that is λ(t) is the product of its children,

  • if tV(T) is an elimination node deleting a label y[yk2], then for all sTt it holds that yLλ(s).

The elimination depth of (T,λ,r) is the maximum number of elimination nodes on any path from the root r to a leaf. If G has a (k1,k2)-construction tree of elimination depth q we say that G is (k1,k2,q)-constructible. We write 𝒯q(k1,k2) for the class of (k1,k2,q)-constructible labeled graphs. If G has a (k1,k2)-construction tree T such that each product node vV(T) has at most one child which is not a leaf, we say that T is a construction caterpillar and G is linearly (k1,k2)-constructible. We write 𝒫(k1,k2) for the class of linearly (k1,k2)-constructible labeled graphs.

We obtain the following characterizations for the classes 𝒯q(k1,k2) and 𝒫(k1,k2), showing that all previous definitions are equivalent for unlabeled graphs.

Theorem 3.7.

For a graph G and k1+k2+ the following are equivalent:

  1. 1.

    G𝒫(k1,k2), i.e., G has a path decomposition of width (k11,k2).

  2. 2.

    G admits a linear (k1,k2)-pebble forest cover.

  3. 3.

    The searchers have a winning strategy for the game NS(k1,k2)(G).

  4. 4.

    G𝒫(k1,k2), i.e., G is linearly (k1,k2)-constructible.

Theorem 3.8.

For a graph G and k1+k2,q the following are equivalent:

  1. 1.

    G𝒯q(k1,k2), i.e., G has a tree decomposition of width (k11,k2) and depth q.

  2. 2.

    G admits a (k1,k2)-pebble forest cover of depth q.

  3. 3.

    The cops have a winning strategy for the game CRq(k1,k2)(G).

  4. 4.

    G𝒯q(k1,k2), i.e., G is (k1,k2,q)-constructible.

 Remark 3.9.

Regarding inclusions between classes 𝒯(k1,k2) (or 𝒫(k1,k2)) for varying parameters k1 and k2 we observe that the proof of [30, Theorem 13] can be used to show a complete classification of all inclusions, which in particular separates 𝒯(k1,k2) from 𝒯(k1,k2) for (k1,k2)(k1,k2) (and likewise for 𝒫(k1,k2), except that 𝒫(1,k2)𝒫(0,k2) for all k2 by Proposition 3.4).

We observe that classes the 𝒯q(k1,k2) and 𝒫(k1,k2) admit usual closure properties, except that 𝒫(k1,k2) is not closed under taking disjoint unions.

Proposition 3.10.

Let k1+k2+. The class 𝒯q(k1,k2) is closed under taking disjoint unions, summands, and minors. The class 𝒫(k1,k2) is closed under taking summands and minors but not under taking disjoint unions for k21.

The class 𝒫(k1,k2) formalizes the notion of reusability for path decompositions in an appropriate sense as exemplified by the characterization through NS(k1,k2). However, to overcome the obstacle that this class is not closed under disjoint unions we define the class ˙𝒫(k1,k2) as the closure of 𝒫(k1,k2) under disjoint unions. This class formalizes the notion of restricted reusability componentwise on a graph. The next proposition, which follows directly from Theorem 3.7, makes this explicit.

Proposition 3.11.

For a graph G and k1+k2+ the following are equivalent:

  1. 1.

    G˙𝒫(k1,k2), i.e., G has a path decomposition of component width (k11,k2).

  2. 2.

    G admits a linear (k1,k2)-pebble component forest cover.

  3. 3.

    For each component C𝒞G the searchers have a winning strategy for NS(k1,k2)(G[C]).

4 Homomorphism indistinguishability and logical equivalence

In this section, we characterize homomorphism indistinguishability over the classes 𝒫(k1,k2) and 𝒯q(k1,k2) by logics with restricted requantification. We start by giving the definition of finite variable counting logic with restricted conjunction and requantification, extending a definition from [27].

Definition 4.1.

We define the set of logical formulas 𝖢ω(k1,k2) over the variable sets [xk1,yk2] and 𝒲={w1,w2,}. The non-counting formulas of the logic are given by

φzi=zj|R(z¯)|¬p|iIψi|jJψj|zi(zi=wψ(z¯,w¯))

for zi,zj[xk1,yk2], z¯[xk1,yk2]n, p atomic, I and J countable index sets, jJψj a restricted conjunction, and a non-counting formula ψ(z¯,w¯) with w¯𝒲m, ww¯. Here, restricted conjunction means that at most one formula ψj containing a quantifier is not a sentence. Furthermore, the logic contains the formulas

φn(w1,,wm)ψ(w1,,wm)|ψ1ψ2

for n,m, w1,,wmW, a non-counting formula ψ, and ψ1,ψ2𝖢ω(k1,k2). We additionally require that only variables from [xk1] are requantified. The fragment 𝖢(k1,k2) is defined by additionally requiring that all conjunctions and disjunctions are finite.

We call a non-counting formula primitive if it contains no disjunction and every restricted conjunction does not contain a sentence. A formula φ𝖢ω is called primitive if it is of the form φ=nw¯ψ(w¯) for a primitive non-counting formula ψ.

We first prove that there is a normal form for restricted conjunction counting logic with respect to requantification and primitivity, enabling a more direct correspondence between the syntax of formulas and construction caterpillars. The idea is to translate the scheme from Proposition 3.4 into the language of logic: It suffices to first fix all non-requantifiable variables followed by a well-behaved employment of requantifiable variables.

Proposition 4.2.

Every sentence φ𝖢ω(k1,k2) is logically equivalent to disjunction of sentences of the form

nw¯y1yk2i[k2]yi=wiχ

for a primitive non-counting formula χ only containing quantification over variables from [xk1].

In [27] it was shown that equivalence in 𝖢ω(k,0) is the same as homomorphism indistinguishability over 𝒫(k,0). This result was proven by evoking a categorical meta-theorem from [11]. We utilize the constructive nature of the proofs in [13, 17] to give a new combinatorial proof of the result that also generalizes to the setting with restricted requantification.

As a first step, we show that homomorphism counts from graphs in 𝒫(k1,k2) are 𝖢(k1,k2)-definable by inductively building up the formula along a construction caterpillar.

Lemma 4.3.

Let F𝒫(k1,k2) and m. There exists a formula φmF𝖢(k1,k2) with free(φ)=LF such that for each [xk1,yk2]-labeled graph G with LFLG it holds that

GφmF if and only if hom(F,G)=m.

Next, we aim to prove that also every property definable in 𝖢(k1,k2) can be modeled by counting homomorphisms from 𝒫(k1,k2). In fact, the number of solutions to a non-counting formula in a graph can be expressed by counting homomorphisms from linear combinations:

Lemma 4.4.

Let k1+k2+ and ψ(w1,,wm,z¯)𝖢(k1,k2) be a non-counting formula. Then there exists a linear combination 𝔉ψ𝒫(k1,k2) such that for all G𝒢[xk1,yk2] we have

hom(𝔉ψ,G)={|{v¯V(G)m:G,v¯ψ}| if free(ψ)𝒲[Gψ] otherwise 

Combining the two previous results allows us to prove that homomorphism indistinguishability over the class 𝒫(k1,k2) is the same as logical equivalence with restricted conjunction and requantification.

Theorem 4.5.

For k1+k2+ and graphs G,H the following are equivalent:

  • G and H are homomorphism indistinguishable over the class 𝒫(k1,k2).

  • G and H are 𝖢(k1,k2)-equivalent.

Following the proof from [17], this strategy can be used to make all constructions for the logic 𝖢qk with unrestricted conjunction also preserve requantification.

Theorem 4.6.

For k1+k2,q+ and graphs G,H the following are equivalent:

  • G and H are 𝖢q(k1,k2)-equivalent.

  • G and H are homomorphism indistinguishable over the class 𝒯q(k1,k2).

4.1 Homomorphism distinguishing closedness

We follow the approach from [29] to combine pursuit-evasion and model-comparison games to prove homomorphism distinguishing closedness for the classes 𝒯q(k1,k2) and ˙𝒫(k1,k2).

First, we introduce a reusability-restricted variant of the all-in-one bijective pebble game from [27] to characterize 𝖢ω(k1,k2)-equivalence.

Definition 4.7.

Let 𝒜, be σ-structures and k1+k2+. The all-in-one bijective (k1,k2)-pebble game ABP(k1,k2)(𝒜,) is defined as follows:

The game is played by the two players Spoiler and Duplicator on the structures 𝒜 and . During the first and only round of the game, the following steps are performed:

  1. 1.

    Spoiler chooses a sequence of pebbles z¯=[z1,,zn][xk1,yk2]n such that each yj[yk2] occurs at most once in z¯.

  2. 2.

    Duplicator chooses a bijection hz¯:V(𝒜)nV()n.

  3. 3.

    Spoiler chooses v¯V(𝒜)n and defines the sequence s¯[(zi,vi)]i[n].

  4. 4.

    Duplicator responds with the sequence d¯[(zi,hz¯(v¯)[i])]i[n].

Duplicator wins if for all i[n] the function ηi defined by setting ηi(lastz(s¯[1,i]))lastz(d¯[1,i]) for each z[xk1,yk2] is a partial isomorphism between 𝒜 and .

We extend the proof of [27, Theorem 5.9.] to the setting with restricted requantification and obtain the following:

Theorem 4.8.

Let 𝒜, be finite σ-structures and k1+k2+. Then the following assertions are equivalent:

  1. 1.

    𝒜 and are 𝖢ω(k1,k2)-equivalent.

  2. 2.

    𝒜 and are 𝖢(k1,k2)-equivalent.

  3. 3.

    Duplicator has a winning strategy for ABP(k1,k2)(𝒜,).

The proof shows that the theorem also holds for infinite structures if we omit Item 2.

The next lemma is the key technical ingredient to establish our first homomorphism distinguishing closedness result. But more generally, it shows that the capability of G to be decomposed in a path-like fashion with reusability constraints provides a lower bound for the distinguishability of the CFI graphs X(G),X~(G) by 𝖢(k1,k2).

Lemma 4.9.

Let k1+k2+ and G be a connected graph. If the fugitive has a winning strategy for the game NS(k1,k2)(G), then Duplicator has a winning strategy for ABP(k1,k2)(X(G),X~(G)).

The proof idea is that the position of the fugitive in NS(k1,k2)(G) corresponds to the position where the difference of the CFI graphs is moved to in ABP(k1,k2)(X(G),X~(G)) by Lemma 2.3. Thus, the invisibility of the fugitive corresponds to the fact that Spoiler has to fix their entire strategy at once. We conjecture that using similar techniques also the reverse implication of this lemma can be shown, which would in particular yield that the pathwidth of a graph G is exactly the minimum k such that 𝖢k+1 distinguishes X(G) and X~(G). However, to prove our next theorem the direction form Lemma 4.9 suffices.

Theorem 4.10.

The classes 𝒫(k1,0) and ˙𝒫(k1,k2) are homomorphism distinguishing closed.

Proof.

For {𝒫(k1,0),˙𝒫(k1,k2)} the class is closed under taking disjoint unions and summands. For every connected graph G the fugitive has a winning strategy for NS(k1,k2)(G) by Theorem 3.7. By Theorem 4.5 and Lemma 4.9 this in turn yields X(G)X~(G). Finally, by Lemma 2.4 it follows that is h.d. closed. Note that the class 𝒫(k1,k2) is not homomorphism distinguishing closed since the relations ˙𝒫(k1,k2) and 𝒫(k1,k2) are identical, but 𝒫(k1,k2)˙𝒫(k1,k2).

After establishing the monotonicity of CRq(k1,k2) in Proposition 3.5, we can use the correspondence to the bijective pebble game [30, Lemma 8] to recast the proof for 𝒯q(k1,k2).

Theorem 4.11.

The class 𝒯q(k1,k2) is homomorphism distinguishing closed.

 Remark 4.12.

In the language of [31] the proofs of Theorem 4.10 and Theorem 4.11 show that the respective classes are closed under weak oddomorphisms by [31, Theorem 3.13].

4.2 Invariance of subgraph counts

As an application of the previous results of homomorphism distinguishing closedness and its relation to logic, we provide characterizations of the logical invariance of subgraph counts with respect to hereditary graph structure as in [29].

For graphs G,F we denote by sub(F,G) the number of subgraphs of G which are isomorphic to F. We write spasm(F) for the set of homomorphic images of a graph F containing exactly one representative from each isomorphism class. For a logic 𝖫 and a graph F we say that the function sub(F,) is 𝖫-invariant if for all graphs G and H the implication G𝖫Hsub(F,G)=sub(F,H) holds.

Theorem 4.13.

Let k1+k2,q1 and F be a graph. Then the following assertions hold:

  • The function sub(F,) is 𝖢(k1,k2)-invariant if and only if spasm(F)𝒫(k1,k2).

  • The function sub(F,) is 𝖢q(k1,k2)-invariant if and only if spasm(F)𝒯q(k1,k2).

 Remark 4.14.

By [30, Theorem 6] the second assertion of this theorem characterizes which subgraph counts are detected after q iterations of the (k1,k2)-dimensional oblivious Weisfeiler-Leman algorithm.

5 A comonadic account of requantification

In this section, we present variations of the pebble-relation comonad k introduced in [27] and the pebbling comonad k from [2], with the aim of capturing requantification as a logical resource from a categorical perspective. We emphasize that, in order to achieve this, it suffices to adapt the definitions of the associated universes (k1,k2)𝒜 and (k1,k2)𝒜. This approach highlights the versatility of the pebble-relation and pebbling comonads, enabling concise proofs building on previous work despite the significant differences among the corresponding graph classes.

For a sequence s¯=[(z1,a1),,(zn,an)]([xk1,yk2]×V(𝒜))n and i[n] define π𝒜(s¯,i)=zi. When no index i is given, we set π𝒜(s¯)zn.

Definition 5.1.

For a σ-structure 𝒜 we define the σ-structure (k1,k2)𝒜 as follows:

  • The universe of (k1,k2)𝒜 consists of all pairs (s¯,i)=([(z1,a1),,(zn,an)],i) for n, i[n], and (zj,aj)[xk1,yk2]×V(𝒜) for j[n] such that every yj[yk2] appears at most once as pebble index in s¯.

  • The counit morphism ε𝒜:(k1,k2)𝒜𝒜 is defined by ε𝒜([(z1,a1),,(zn,an)],i)ai

  • For Rσ it holds R(k1,k2)𝒜((s¯1,i1),,(s¯m,im)) exactly if there exists s¯ such that

    • for all j[m] it holds s¯j=s¯, (equality)

    • π𝒜(s¯,ij) does not appear in s¯[ij+1,i] for i=max{i1,,im}, and (active pebble)

    • R𝒜(ε𝒜(s¯1,i1),,ε𝒜(s¯m,im)). (compatibility)

For a σ-structure and a homomorphism f:(k1,k2)𝒜 we define the coextension f:(k1,k2)𝒜(k1,k2) of f by setting bi=f([(z1,a1),,(zm,am)],i) for i[m] and f([(z1,a1),,(zm,am)],i)([(z1,b1),,(zm,bm)],i).

Definition 5.2.

For a σ-structure 𝒜 we define the σ-structure (k1,k2)𝒜 as follows:

  • The universe of (k1,k2)𝒜 consists of all sequences s¯([xk1,yk2]×V(𝒜))+ such that every pebble yj[yk2] appears at most once as pebble index in s¯.

  • The counit morphism ε𝒜:(k1,k2)𝒜𝒜 is defined by ε𝒜([(z1,a1),,(zm,am)])am

  • For Rσ it holds R(k1,k2)𝒜(s¯1,,s¯m) exactly if

    • R𝒜(ε𝒜(s¯1),,ε𝒜(s¯m)), (compatibility)

    • for i,j[m] we have s¯is¯j or s¯js¯i, and (comparability)

    • for i,j[m] if s¯is¯j then π𝒜(s¯i)
      does not occur as a first coordinate in s¯+ for s¯i=s¯js¯+. (active pebble)

For a σ-structure and a homomorphism f:(k1,k2)𝒜 the coextension f is defined by f([(z1,a1),,(zm,am)])[(z1,b1),,(zm,bm)] where bi=f([(z1,b1),,(zi,ai)]) for i[m]. For q+ the structure (k1,k2)q𝒜 is defined as the substructure of (k1,k2)𝒜 over the universe ([xk1,yk2]×V(𝒜))q.

To show that (k1,k2) and (k1,k2)q are again comonads it suffices to observe that the definitions of R(k1,k2)𝒜, R(k1,k2)q𝒜, and the coextensions are invariant under reusability constraints. Thus, from [27, Proposition 3.1] and [2, Theorem 4] we obtain the following:

Proposition 5.3.

The triples ((k1,k2)q,ε,()) and ((k1,k2),ε,()) are comonads in coKleisli form on 𝐒𝐭𝐫(σ).

Utilizing the characterization of the classes 𝒯q(k1,k2) and 𝒫(k1,k2) in terms of pebble forest covers, we now provide a categorical account of reusability in path- and bounded depth tree decompositions. Similar results are called coalgebra characterization theorems in the literature of game comonads [4]. We have defined our decompositions in terms of graphs rather than relational structures. The definition of forest covers can be adapted for structures, which yields the same as considering forest covers of the Gaifman graph G(𝒜) of 𝒜.

Theorem 5.4.

For every finite σ-structure 𝒜 there is a bijective correspondence between

  1. 1.

    (k1,k2)-pebble linear component forest covers of G(𝒜) and coalgebras α:𝒜(k1,k2)𝒜.

  2. 2.

    (k1,k2)-pebble forest covers of depth q of G(𝒜) and coalgebras α:𝒜(k1,k2)q𝒜.

Further employing the theory of game comonads, we give a categorical formulation of equivalence in the counting logics 𝖢ω(k1,k2) and 𝖢q(k1,k2) as isomorphism in the coKleisli category. Accordingly, similar theorems are also called isomorphism power theorems in the literature. As in [27], we use the extended signature σ+=σ{I} to define the functor J:𝐒𝐭𝐫(σ)𝐒𝐭𝐫(σ+) which extends each σ-structure 𝒜 by the identity relation IJ𝒜={(a,a):aV(𝒜)} and gives rise to a relative comonad on J (see [27]).

Theorem 5.5.

For all σ-structures 𝒜 and the following hold:

  1. 1.

    There exists a coKleisli isomorphism (k1,k2)J𝒜J if and only if 𝒜𝖢ω(k1,k2).

  2. 2.

    There exists a coKleisli isomorphism (k1,k2)q𝒜 if and only if 𝒜𝖢q(k1,k2).

One of the contributions of game comonads is to provide a unified language for various relations from finite model theory. Specifically, in the remainder of this section we show that morphisms in the coKleisli category characterize preservation and winning strategies for logics and games without counting. We first introduce the notion of reusability to the all-in-one pebble game from [27] and the well-known existential k-pebble game from [24], allowing for a more fine grained analysis.

Definition 5.6.

Let 𝒜, be σ-structures and k1+k2+. The all-in-one (k1,k2)-pebble game AP(k1,k2)(𝒜,) and -(k1,k2)-pebble game are defined as follows: Both games are played by the two players Spoiler and Duplicator on the structures 𝒜 and and start from a (possibly empty) position s¯0([xk1,yk2]×V(𝒜))m,d¯0([xk1,yk2]×V())m with the same pebble sequence in which each pebble pair occurs at most once.

In each round n+ of the -(k1,k2)-pebble game, the following steps are performed:

  1. 1.

    Spoiler picks a pebble zn[xk1,yk2] such that zn is not yet placed or zn[xk1] and places it on an element anV(𝒜).

  2. 2.

    Duplicator places the pebble zn on an element bnV().

This induces sequences s¯=[(z1,a1),,(zn,an)] and d¯[(z1,b1),,(zn,bn)] of placements after round n.

In the single round of the game AP(k1,k2)(𝒜,), the following steps are performed:

  1. 1.

    Spoiler chooses a sequence s¯=[(z1,a1),,(zn,an)]([xk1,yk2]×V(𝒜))n such that each yj[yk2] occurs at most once in z¯=(z1,,zn) and not in s¯0.

  2. 2.

    Duplicator responds with a sequence d¯[(z1,b1),,(zn,bn)]([xk1,yk2]×V())n.

The winning condition for both games is the following: Duplicator wins the game if for all i[m+n] the function ηi defined by setting ηi(lastz(s¯0s¯[1,i]))lastz(d¯0d¯[1,i]) for each z[xk1,yk2] is a partial homomorphism between 𝒜 and .

The logic +𝖫(k1,k2) is defined as the fragment of existential positive first-order logic (i.e. no universal quantification and negation) over the variable set [xk1,yk2] such that only variables from [xk1] are requantified. We obtain +𝖫(k1,k2) by additionally requiring that every conjunction is restricted and +𝖫q(k1,k2) by bounding the quantifier-rank by q.

Proposition 5.7.

For all σ-structures 𝒜 and the following hold:

  1. 1.

    Duplicator wins AP(k1,k2)(𝒜,) if and only if 𝒜+𝖫(k1,k2).

  2. 2.

    Duplicator wins q rounds of the -(k1,k2)-pebble game if and only if 𝒜+𝖫q(k1,k2).

Finally, we also obtain what is called a morphism power theorem for game comonads with restricted reusability.

Theorem 5.8.

For all σ-structures 𝒜 and the following hold:

  1. 1.

    There exists a coKleisli morphism f:(k1,k2)𝒜 if and only if 𝒜+𝖫(k1,k2).

  2. 2.

    There exists a coKleisli morphism f:(k1,k2)q𝒜 if and only if 𝒜+𝖫q(k1,k2).

6 Conclusion

In this work, we extended the analysis of homomorphism indistinguishability to graph classes characterized by graph decompositions with restricted reusability. We demonstrate how decomposition-based approaches offer robust and adaptable techniques for characterizing indistinguishability relations as well as for establishing homomorphism distinguishing closedness. Moreover, by integrating these results within the broader framework of game comonads, we present a unified categorical perspective on the role of requantification in finite variable counting logics. We list some open questions for future work:

  • The homomorphism indistinguishability relation 𝒯q(k1,k2) can be decided by a more space-efficient variant of the (k1+k2)-dimensional Weisfeiler-Leman algorithm [30]. It would be interesting to develop a linearized variant to efficiently decide the relation 𝒫(k1,k2). The logic +𝖫k is closely related to the k-consistency algorithm for solving constraint satisfaction problems, so it might be fruitful to explore whether restricting reusability yields improved algorithmic techniques.

  • Motivated by the constructive nature of our results, it is natural to ask for more connections between model-comparison and pursuit-evasion games. Specifically, identifying broader classes of games that align with logical equivalences could yield more results on characterizations and h.d. closedness.

  • While we have established h.d. closedness for specific graph classes, a comonadic treatment of this property could provide a deeper understanding of its categorical structure. In particular, investigating whether h.d. closedness can be characterized via coalgebraic properties of game comonads might reveal fundamental principles governing homomorphism indistinguishability of relational structures as in [11].

References

  • [1] S. Abramsky and N. Tzevelekos. Introduction to Categories and Categorical Logic, pages 3–94. Springer Berlin Heidelberg, 2010. doi:10.1007/978-3-642-12821-9_1.
  • [2] Samson Abramsky, Anuj Dawar, and Pengming Wang. The pebbling comonad in finite model theory. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017, pages 1–12. IEEE Computer Society, 2017. doi:10.1109/LICS.2017.8005129.
  • [3] Samson Abramsky and Luca Reggio. An invitation to game comonads. ACM SIGLOG News, 11(3):5–48, 2024. doi:10.1145/3687256.3687260.
  • [4] Samson Abramsky and Nihil Shah. Relating structure and power: Comonadic semantics for computational resources. J. Log. Comput., 31(6):1390–1428, 2021. doi:10.1093/LOGCOM/EXAB048.
  • [5] Isolde Adler and Eva Fluck. Monotonicity of the cops and robber game for bounded depth treewidth. In 49th International Symposium on Mathematical Foundations of Computer Science, MFCS 2024, August 26-30, 2024, Bratislava, Slovakia, volume 306 of LIPIcs, pages 6:1–6:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.MFCS.2024.6.
  • [6] Daniel Bienstock, Neil Robertson, Paul D. Seymour, and Robin Thomas. Quickly excluding a forest. J. Comb. Theory B, 52(2):274–283, 1991. doi:10.1016/0095-8956(91)90068-U.
  • [7] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theor. Comput. Sci., 209(1-2):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.
  • [8] Jin-Yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the number of variables for graph identification. Combinatorica, 12(4):389–410, 1992. doi:10.1007/bf01305232.
  • [9] Radu Curticapean, Holger Dell, and Dániel Marx. Homomorphisms are a good basis for counting small subgraphs. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 210–223. ACM, 2017. doi:10.1145/3055399.3055502.
  • [10] Víctor Dalmau. Linear datalog and bounded path duality of relational structures. Log. Methods Comput. Sci., 1(1), 2005. doi:10.2168/LMCS-1(1:5)2005.
  • [11] Anuj Dawar, Tomas Jakl, and Luca Reggio. Lovász-type theorems and game comonads. In 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, June 29 - July 2, 2021, pages 1–13. IEEE, 2021. doi:10.1109/LICS52264.2021.9470609.
  • [12] Holger Dell, Martin Grohe, and Gaurav Rattan. Lovász meets Weisfeiler and Leman. In 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018, July 9-13, 2018, Prague, Czech Republic, volume 107 of LIPIcs, pages 40:1–40:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPICS.ICALP.2018.40.
  • [13] Zdenek Dvorák. On recognizing graphs by numbers of homomorphisms. Journal of Graph Theory, 64(4):330–342, 2010. doi:10.1002/JGT.20461.
  • [14] Heinz-Dieter Ebbinghaus. Extended Logics: The General Framework, pages 25–76. Cambridge University Press, 2017. doi:10.1017/9781316717158.005.
  • [15] Heinz-Dieter Ebbinghaus and Jörg Flum. Finite Model Theory. Springer Berlin Heidelberg, second edition edition, 1995. doi:10.1007/3-540-28788-4.
  • [16] Eva Fluck, Tim Seppelt, and Gian Luca Spitzer. Going deep and going wide: Counting logic and homomorphism indistinguishability over graphs of bounded treedepth and treewidth, 2023. doi:10.48550/arXiv.2308.06044.
  • [17] Eva Fluck, Tim Seppelt, and Gian Luca Spitzer. Going deep and going wide: Counting logic and homomorphism indistinguishability over graphs of bounded treedepth and treewidth. In 32nd EACSL Annual Conference on Computer Science Logic, CSL 2024, February 19-23, 2024, Naples, Italy, volume 288 of LIPIcs, pages 27:1–27:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.CSL.2024.27.
  • [18] Archontia C. Giannopoulou, Paul Hunter, and Dimitrios M. Thilikos. Lifo-search: A min–max theorem and a searching game for cycle-rank and tree-depth. Discrete Applied Mathematics, 160(15):2089–2097, October 2012. doi:10.1016/j.dam.2012.03.015.
  • [19] Andreas Göbel, Leslie Ann Goldberg, and Marc Roth. The Weisfeiler-Leman dimension of conjunctive queries. Proc. ACM Manag. Data, 2(2):86, 2024. doi:10.1145/3651587.
  • [20] Martin Grohe. Counting bounded tree depth homomorphisms. In LICS ’20: 35th Annual ACM/IEEE Symposium on Logic in Computer Science, Saarbrücken, Germany, July 8-11, 2020, pages 507–520. ACM, 2020. doi:10.1145/3373718.3394739.
  • [21] Martin Grohe, Gaurav Rattan, and Tim Seppelt. Homomorphism tensors and linear equations. In 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 70:1–70:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ICALP.2022.70.
  • [22] Lefteris M. Kirousis and Christos H. Papadimitriou. Interval graphs and searching. Discrete Mathematics, 55(2):181–184, 1985. doi:10.1016/0012-365x(85)90046-9.
  • [23] Lefteris M. Kirousis and Christos H. Papadimitriou. Searching and pebbling. Theoretical Computer Science, 47(3):205–218, 1986. doi:10.1016/0304-3975(86)90146-5.
  • [24] Phokion G. Kolaitis and Moshe Y. Vardi. On the expressive power of datalog: Tools and a case study. J. Comput. Syst. Sci., 51(1):110–134, 1995. doi:10.1006/JCSS.1995.1055.
  • [25] László Lovász. Operations with structures. Acta Mathematica Academiae Scientiarum Hungaricae, 18(3–4):321–328, 1967. doi:10.1007/bf02280291.
  • [26] Laura Mancinska and David E. Roberson. Quantum isomorphism is equivalent to equality of homomorphism counts from planar graphs. In 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 661–672. IEEE, 2020. doi:10.1109/FOCS46700.2020.00067.
  • [27] Yoàv Montacute and Nihil Shah. The pebble-relation comonad in finite model theory. Log. Methods Comput. Sci., 20(2), 2024. doi:10.46298/LMCS-20(2:9)2024.
  • [28] Jaroslav Nesetril and Patrice Ossona de Mendez. Tree-depth, subgraph coloring and homomorphism bounds. Eur. J. Comb., 27(6):1022–1041, 2006. doi:10.1016/J.EJC.2005.01.010.
  • [29] Daniel Neuen. Homomorphism-distinguishing closedness for graphs of bounded tree-width. In 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024, March 12-14, 2024, Clermont-Ferrand, France, volume 289 of LIPIcs, pages 53:1–53:12. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.STACS.2024.53.
  • [30] Simon Raßmann, Georg Schindling, and Pascal Schweitzer. Finite variable counting logics with restricted requantification. In 33rd EACSL Annual Conference on Computer Science Logic, CSL 2025, February 10-14, 2025, Amsterdam, Netherlands, volume 326 of LIPIcs, pages 14:1–14:23. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPICS.CSL.2025.14.
  • [31] David E. Roberson. Oddomorphisms and homomorphism indistinguishability over graphs of bounded degree, 2022. doi:10.48550/arXiv.2206.10321.
  • [32] David E. Roberson and Tim Seppelt. Lasserre hierarchy for graph isomorphism and homomorphism indistinguishability. TheoretiCS, 3, 2024. doi:10.46298/THEORETICS.24.20.
  • [33] Neil Robertson and Paul D. Seymour. Graph minors. I. excluding a forest. J. Comb. Theory B, 35(1):39–61, 1983. doi:10.1016/0095-8956(83)90079-5.
  • [34] Georg Schindling. Homomorphism indistinguishability and game comonads for restricted conjunction and requantification, 2025. arXiv:2506.19746.
  • [35] Tim Seppelt. Logical equivalences, homomorphism indistinguishability, and forbidden minors. Inf. Comput., 301:105224, 2024. doi:10.1016/J.IC.2024.105224.
  • [36] Tim Seppelt. Homomorphism indistinguishability. PhD thesis, RWTH Aachen University, 2024/2025. doi:10.18154/RWTH-2024-11629.
  • [37] Paul D. Seymour and Robin Thomas. Graph searching and a min-max theorem for tree-width. Journal of Combinatorial Theory, Series B, 58(1):22–33, May 1993. doi:10.1006/jctb.1993.1027.