Manuscript Offprint
arXiv:2610.07927Topological and Geometric Perspectives on Homomorphism Indistinguishability
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
Abstract
Two graphs G and H are homomorphism indistinguishable over a graph class F if, for every graph , the number of homomorphisms from F to G is equal to the number of homomorphisms from F to H. Lovász (Acta Mathematica Academiae Scientiarum Hungarica, 1967) showed that two graphs are isomorphic if, and only if, they are homomorphism indistinguishable over all graphs. Subsequently, homomorphism indistinguishability relations of a long list of natural graph classes have been equated with natural graph isomorphism relaxations.
Given the wealth of such results, Atserias, Kolaitis, & Wu (LICS 2021) asked for an axiomatic characterisation of homomorphism indistinguishability relations. By exhibiting topological and geometric structure associated with homomorphism indistinguishability, we derive such an axiomatic characterisation. Here, a central ingredient is a novel characterisation of graph parameters of the form for some graph alternative to a previous result of Lovász & Schrijver (JCTA 2010). Moreover, we investigate the topology of homomorphism indistinguishability and discuss repercussions for the Ulam–Kelly Reconstruction Conjecture.
1. Introduction
Graph data arises in various contexts ranging from program flows, social networks, protein interactions, and trophic networks. A central task when presented with graph data is to decide whether two graphs are isomorphic, i.e., structurally equivalent. However, the algorithmic problem of deciding whether two graphs are isomorphic is riddled with complexity-theoretic difficulties [4]. Furthermore, in many applications, isomorphism is too brittle an equivalence relation between graphs which does not account for noise or perturbations. These two shortcomings of graph isomorphism have sparked a decade-long line of work on graph isomorphism relaxations, i.e. equivalence relations between graphs that satisfy for all graphs G and H that
Graph isomorphism relaxations may stem from algorithmic heuristics such as the Weisfeiler–Leman algorithm [5], machine learning paradigms such as Graph Neural Networks [6–8], or from theoretical considerations rooted e.g. in spectral graph theory or quantum information theory [9]. Despite the long list of intensively studied graph isomorphism relaxations, they lack a coherent theory predicting their computational complexity or distinguishing power [10].
A proposal for such a theory, which has been brought forward in recent years, is homomorphism indistinguishability [11]. Two graphs G and H are homomorphism indistinguishable over a graph class F, in symbols , if, for every graph , the number hom( ) of homomorphisms from F to G is equal to the number hom( ) of homomorphisms from F to H. A diverse range of graph isomorphism relaxations including isomorphism [1], quantum isomorphism [12], and equivalences with respect to counting logic fragments [13–18] can be characterised as homomorphism indistinguishability relations over natural graph classes. Other examples include graph isomorphism relaxations originating from quantum information theory [12, 19], optimisation [20, 21], category theory [17, 22], and machine learning [23, 24].
These results demonstrate the versatility of homomorphism indistinguishability and justify studying this notion more abstractly. In this context, three research strands have emerged: The first studies the computational complexity of homomorphism indistinguishability relations in relation with graph-theoretic or model-theoretic properties of the graph class [25–27]. The second is concerned with the distinguishing power of and aims to understand for which relations differ from isomorphism , cf. Roberson's conjectures [28] and [29–32]. The final strand is concerned with abstract properties of homomorphism indistinguishability relations [2, 22, 33, 34]. In this context, Atserias, Kolaitis, & Wu [2] posed the following problem:
‘One of the ultimate goals is to characterize the relaxations of graph isomorphism that are captured by restrictions of the left profile [...].’ [2, Section VIII]
In other words, they asked which graph isomorphism relaxations are homomorphism indistinguishability relations. As our central contribution (Theorem 3.6), we resolve this ultimate goal. Towards Theorem 3.6, we significantly advance the structural understanding of homomorphism indistinguishability by the means of geometry and topology. As corollaries, we answer open questions of Atserias, Kolaitis, & Wu [2], Roberson [28], and Botteron & Weber [35] in Example 6.40, Lemma 8.2, and Example 6.42 and simplify arguments from [2] in Section 6.9.3.
Of particular interest are the objects that are invariant under going back and forth through this correspondence. The graph classes such that are precisely the homomorphism distinguishing closed graph classes. A graph class is homomorphism distinguishing closed [28] if, for every , the relation is strictly finer than . For homomorphism distinguished closed graph classes and , the problem of comparing the graph isomorphism relaxations and reduces to comparing the graph classes and . That is, refines if, and only if, . This approach has been used for measuring the distinguishing power of graph isomorphism relaxations from mathematical programming [21], counting logic [15, 18], and machine learning [23, 24]. Therefore, it is desirable to identify natural criteria for a graph class to be homomorphism distinguishing closed. Roberson's (strong) conjecture [28] asserting that every graph class closed under taking minors and disjoint unions is homomorphism distinguishing closed has received much attention as the central hypothesis regarding the distinguishing power of homomorphism indistinguishability relations [29–31]. Its recent refutation by Kristjánsson [32] warrants identifying sufficient conditions for a graph class to be homomorphism distinguishing closedness other than being minor-closed.
Dually, the graph isomorphism relaxations such that are precisely the homomorphism indistinguishability relations. Thus, the quest for homomorphism distinguishing closed graph classes and Atserias, Kolaitis, & Wu's 'ultimate goal' both require to understand the objects preserved under the Galois correspondence (2).
We propose to study the Galois correspondence (2) via an analogy with one of the most fundamental Galois correspondences in mathematics: the correspondence between sets , so-called varieties, and ideals of the polynomial ring given by
The objects invariant under this correspondence are well understood: By Hilbert's Nullstellensatz, the ideals such that are precisely the radical ideals of , i.e., the ideals satisfying that, if for and , then . Dually, a variety satisfies if, and only if, it is closed in the Zariski topology on .
We translate these characterisations of invariant objects to homomorphism indistinguishability. On the side of graph classes, this implies that the homomorphism distinguishing closed sets constitute the closed sets of a Zariski-like topology (Lemmas 4.2 and 4.3). Homomorphism indistinguishability was not previously known to admit topological structure. As a preliminary investigation of this topological space, we show that it is disconnected, non-compact, and Fréchet (Propositions 4.6 and 4.7). On the side of relations, we obtain the desired characterisation of homomorphism indistinguishability relations (Theorem 3.6).
How can the Galois correspondence (2) be cast into the language of algebraic geometry? It was observed in [33] that homomorphism indistinguishability relations satisfy a multitude of preservation properties. For example, all homomorphism indistinguishability relations are preserved under categorical products, i.e. for all graphs G, H, and K, if , then , where denotes the categorical product. These preservation properties can be understood as asserting that homomorphism indistinguishability relations are congruences for the semiring on the set of (isomorphism types of) looped-simple graphs with disjoint union as addition and categorical product as multiplication. By a standard Grothendieck construction and an extension of scalars, we show that homomorphism indistinguishability relations form a class of ideals of the semiring algebra . The algebra is a quotient of the complex polynomial ring in countably many variables. A version of Hilbert's Nullstellensatz applies to this algebra and lays the foundations for our Theorem 3.6. Thinking of the elements of as polynomials also allows us to recast the homomorphism distinguishing closed graph classes as varieties.
Related work
The algebraic structure of homomorphism counts is well explored from multiple perspectives ranging from algorithms & complexity [36–38], and extremal combinatorics [39] to database theory [40]. We highlight the following selection of related work.
By using an algebra whose elements are formal linear combinations of (labelled) graphs, Lovász & Schrijver [3] characterised the functions that are of the form for some graph . Their characterisation involves a condition which asserts that certain infinite matrices called connection matrices are positive semidefinite. It is related to similar characterisations for functions and categorical generalisations proven in [39, 41, 42]. We prove an alternative such characterisation in Corollary 6.35. Our algebra set-up differs from the one from [3]: While their algebra is multisorted, we use tools from commutative algebra and elementary algebraic geometry.
Another ingredient of this work are graph semirings and homomorphisms on such semirings. Zuiddam [43] studied similar objects when characterising the Shannon capacity of a graph in terms of asymptotic spectra. Here, the asymptotic spectrum of a graph is the set of all semiring homomorphisms such that for all graphs , if there is a homomorphism , then . Here, denotes the strong graph product and the complement of . We study a different graph semiring (with the categorical product rather than the strong product ). Furthermore, we do not make use of any order structure and Hilbert's Nullstellensatz replaces the Vergleichstellensätze of Strassen [44], see [45].
In the context of game comonads, cf. [17], Abramsky, Jakl, & Paine [22] characterised the homomorphism indistinguishability relations that are classified by a comonad, i.e., there exists a comonad on the category of graphs such that if, and only if, the cofree -coalgebras of G and H are isomorphic. The graph classes arising here are precisely the componental graph classes, i.e., those closed under disjoint union and taking summands.
Closest to our axiomatisation of homomorphism indistinguishability relations (Theorem 3.6) is perhaps a result of Seppelt [33] characterising the homomorphism indistinguishability relations for which can be assumed to have certain closure properties such as being closed under taking (induced) subgraphs or minors. In particular, a homomorphism indistinguishability relation is a homomorphism indistinguishability relation over a minor-closed graph class if, and only if, is preserved under complements, i.e., for all graphs . Combined with our Theorem 3.7, this gives an axiomatisation of homomorphism indistinguishability relations over minor-closed graph classes.
2. Preliminaries
Graphs. All graphs are finite, undirected, and without multiple edges, i.e. they are looped-simple. Write for the class of (isomorphism types of) looped-simple graphs. A simple graph is a graph without loops. Write for the class of (isomorphism types of) simple graphs. A homomorphism between graphs and is a map such that implies ; in particular, homomorphisms map loops to loops. Write for the number of homomorphisms . The categorical product of two graphs and has vertex set and edges between and if and . We write for the disjoint union of and . A graph is connected if it has exactly one connected component; in particular, the vertex-less graph is not connected. Write and for the classes of connected graphs in and , respectively (zusammenhängend means connected).
Semirings. A semiring is a tuple where is a set equipped with two binary operations + and and distinguished elements satisfying that:
(i) is a commutative monoid,
(ii) is a monoid,
(iii) multiplication distributes over addition: and for all ,
(iv) for all .
The semiring is commutative if is a commutative monoid, i.e., for all . The semiring is cancellative if the additive monoid is cancellative, i.e., for all , if , then .
Lemma 2.1. The class of looped-simple graphs with disjoint union + as addition, categorical product as multiplication, the vertex-less graph and the one-vertex looped graph as neutral elements forms a countable cancellative commutative semiring.
3. Which relations are homomorphism indistinguishability relations?
Towards answering this question, we build up a collection of necessary conditions that in conjunction will turn out to be sufficient. Full proofs are given in Section 6. In particular, we develop an algebraic machinery that is inspired by the following three basic identities satisfied by homomorphism counts. For graphs , and every connected graph , the following hold [39, (5.28)–(5.30)]:
These basic identities are not hard to show and demonstrate the categorical nature of homomorphism counts. Equation (4) implies that every homomorphism indistinguishability is preserved under categorical products, i.e. for all graphs ,
Componental graph classes. Equations (3) and (5) imply a similar identity for disjoint union instead of with a small caveat: Equation (5) only applies to connected graphs. We therefore restrict our attention to homomorphism indistinguishability relations over componental graph classes. A graph class is componental if, for all graphs , it holds that iff . Restricting to componental graph classes is standard in the context of homomorphism indistinguishability [22, 28, 33] and arguably does not constitute a significant loss of generality. In particular, we are not aware of any natural homomorphism indistinguishability relation over a non-componental graph class. Every homomorphism indistinguishability relation over a componental graph class satisfies the following identity for all graphs ,
Semiring congruences. Before adding further necessary conditions, we take a step back and phrase Equations (6) and (7) more abstractly. A graph isomorphism relaxation satisfying these conditions is in fact a congruence for a semiring on the class of looped-simple graphs with disjoint union as addition, whose neutral element is the vertex-less graph 0, and with the categorical product as multiplication, whose neutral element is the single-vertex looped graph 1 (Lemma 2.1). Equations (6) and (7) assert that is a congruence for .
It was shown in [33, Theorem 7] that a homomorphism indistinguishability relation satisfies (7) if, and only if, it is a homomorphism indistinguishability relation over a componental graph class.
Ring congruences. As a next step, we add further necessary conditions which allow us to work with a ring instead of a semiring. To that end, we introduce additive inverses to . The Grothendieck ring of the semiring is the standard construction in this context. Its elements are of the form for . Here, holds in iff holds in . A relation is a congruence for iff it satisfies Equations (6) and (7) and the following condition for all graphs
Congruences of a ring are in one-to-one correspondence with the ring's ideals. That is, we may identify relations satisfying Equations (6) to (8) with ideals of (Proposition 6.1).
Extension of scalars. Towards applying Hilbert’s Nullstellensatz, we extend scalars in order to turn into an algebra over an algebraically closed field. Here, the only non-trivial step is from to . The elements of are of the form for graphs and integers . It holds that in iff in , which holds iff in . To that end, we add the necessary condition that, for all graphs , and integers ,
It is immediate from Equation (5) that every componental homomorphism indistinguishability relation satisfies Equation (9). Furthermore, it holds that is a congruence of iff it satisfies Equations (6) to (9). Such congruences are in one-to-one correspondence with ideals of (Proposition 6.7). More specifically, for a relation satisfying Equations (6) to (9), let
Then is an ideal of . Conversely, for an ideal of , define a relation via
Then satisfies Equations (6) to (9). Furthermore, the constructions and are mutually converse. It remains to understand the ideals of that encode homomorphism indistinguishability relations. For algebraic convenience, we extend scalars further to without incurring additional axioms (Lemma 6.15).
Hilbert’s Nullstellensatz. How should we think of the algebra ? It looks much like the polynomial algebra in countably many variables enumerating the graphs in . In fact, it is a quotient of this polynomial algebra imposing the identities that hold in . For example, it holds in that . Nevertheless, we think of the elements of as polynomials whose indeterminates are the elements of .
Polynomials can be evaluated by substituting field elements for the variables. Similarly, we may ‘evaluate’ the elements of by substituting field elements for the graphs in . However, such a substitution must respect the intrinsic identities that hold in . This observation is formalised by the notion of a semiring homomorphism , i.e. maps satisfying, for all graphs ,
We write for the set of such semiring homomorphisms. Crucially, by Equations (4) and (5), the map is a semiring homomorphism for every connected graph . Thus counting homomorphisms from a connected graph amounts to substituting field elements for the ‘indeterminates’ of .
The ideal corresponding to a componental homomorphism indistinguishability relation is the vanishing ideal of the semiring homomorphisms for . More generally, for a set of semiring homomorphisms and an ideal of , we define the vanishing ideal and the zero locus
Since homomorphism indistinguishability relations are vanishing ideals, we first characterise such ideals in terms of the relation . The key ingredient here is a variant of Hilbert's Nullstellensatz. We show in Theorem 6.19 that
Here, is the radical of . It follows that an ideal of is the vanishing ideal of some if, and only if, it is radical, i.e. . This condition can be phrased in terms of the relation by observing that elements of are up to scalars of the form and applying the Binomial Theorem. For all graphs , and , we assert that
Let us summarise which class of relations we have axiomatised so far.
Theorem 3.1. Let be a graph isomorphism relaxation. The relation satisfies Equations (6) to (10) if, and only if, there exists a set such that, for all graphs ,
So far, even though we have concerned ourselves with the semiring , we have in fact not used any specific properties of this semiring. More precisely, Theorem 3.1 holds for countable commutative cancellative semirings in general (Theorem 6.27). This already indicates that Theorem 3.1 is most likely not the final axiomatisation of componental homomorphism indistinguishability relations. Indeed, we give the following counterexample, see Section 7. Moreover, one might wonder whether considering the complex numbers in Theorem 3.1 is necessary. We show that it is in Corollary 7.5 by constructing a with imaginary values.
Example 3.2. The adjacency matrix rank rk: is a semiring homomorphism. The relation satisfies Equations (6) to (10) but is not a homomorphism indistinguishability relation.
We must thus reintroduce the combinatorial structure of to the purely algebraic conditions of Theorem 3.1. More precisely, we must axiomatise inside . The difficulty, however, is that we do not have access to the values of the in Theorem 3.1 but merely to the relation . This is also why the characterisation by Lovász & Schrijver [3] does not appear to be applicable. As a first step, we prove an alternative characterisation more suitable for our needs, which may be of independent interest.
Subgraph series. Using Möbius inversion, we show that every function can be written as
The function sub(F,★) counts the number of subgraphs isomorphic to F. Hence, while the above sum is infinite, only finitely many summands contribute to the value of for every graph . We call the expression a subgraph series. Conveniently, the coefficients are uniquely determined by the values of . More precisely, as shown in Lemma 6.28, it holds that
for every graph . Here, denotes the subgraph of with vertex set whose edges are those edges of all of whose endpoints lie in . We may thus define the support of a graph parameter as the graph class
We prove the following new characterisation of homomorphism counts.
Theorem 3.3. A semiring homomorphism is of the form for some connected graph if, and only if, its support is finite.
The graph parameters with finite support are precisely the so-called graph motif parameters and intensively studied in counting complexity [36–38]. The fact that is finite can be phrased in terms of vanishing ideals yielding an axiomatization of graph motif parameters. For semiring homomorphisms , the sum in Equation (11) may be written as the evaluation of at a single element of . For a graph , let
It follows that has finite support if, and only if, for all but finitely many . For an integer , write for the ideal of generated by the for graphs on more than vertices. Using Theorem 3.3, we obtain the following characterisation.
Theorem 3.4. Let be a graph isomorphism relaxation satisfying Equations (6) to (9) and let denote the corresponding ideal of given by Lemma 6.15. Then is a homomorphism indistinguishability relation over a componental graph class if, and only if,
In order to rephrase (13) in terms of the relation , we characterise the homomorphism indistinguishability relation corresponding to the ideal . We write if .
Lemma 3.5. Let . For graphs , the following are equivalent:
(i) , i.e., ,
(ii) for all on at most vertices,
(iii) there exists a bijection between the subsets of and of of size at most such that and for all such .
Using Lemma 3.5, we rephrase Equation (13) in terms of the relation : For all ,
Intuitively, (14) asserts that and must be in if they can be arbitrarily well approximated by taking graphs and satisfying .
Putting the pieces together, we obtain the desired axiomatisation of homomorphism indistinguishability relations. For convenience, we restate Equations (6) to (9) and (14).
Theorem 3.6. A graph isomorphism relaxation is a homomorphism indistinguishability relation over a componental graph class if, and only if, it satisfies, for all graphs and ,
(i)
(ii)
(iii)
(iv)
(v) if, for all , there exist and graphs such that and then .
Discarding loops. Most of the homomorphism indistinguishability literature concerns relations between simple graphs, cf. [28, Section 7] and [11, p. 32]. For algebraic convenience, we chose to work with rather than G as G lacks a multiplicative unit. Nevertheless, we deduce a characterisation of graph isomorphism relaxations between simple graphs that are homomorphism indistinguishability relations from Theorem 3.6. Restricted to G, the axioms are the same, except for Assertion (vi), which mitigates the lack of a unit in G.
Theorem 3.7. A simple graph isomorphism relaxation is a homomorphism indistinguishability relation over a componental class of simple graphs if, and only if, it satisfies, for all ,
(i)
(ii)
(iii)
(iv) if for some , then ,
(v) if, for all , there exist and simple graphs such that and then ,
(vi) if for all and the n-vertex complete graph , then .
Applications. Admittedly, Assertion (v) in Theorem 3.6 is quite hard to relate to. However, as we will see in the following example, already the first conditions can be as hard to establish as resolving the notorious Ulam–Kelly Reconstruction Conjecture [46, 47]. This conjecture asserts that any two hypomorphic simple graphs are isomorphic. Two graphs are hypomorphic if they have the same number of edges and there exists a bijection such that for all .
Example 3.8. The following are equivalent:
(i) The Ulam–Kelly Reconstruction Conjecture holds.
(ii) Hypomorphicity is a homomorphism indistinguishability relation over a componental graph class.
(iii) The hypomorphicity relation satisfies Assertion (i) of Theorem 3.7.
(iv) The hypomorphicity relation satisfies Assertion (ii) of Theorem 3.7.
As another application, we answer an open question raised by Botteron and Weber [35, Open Question 2], who asked for a homomorphism indistinguishability characterisation of a graph isomorphism relaxation called D-fractional isomorphism. In Example 6.40, we show that this isomorphism relaxation fails condition (i) in Theorem 3.6, so it does not admit a homomorphism indistinguishability characterisation.
The Reconstruction Conjecture is commonly stated for graphs on at least three vertices, with hypomorphicity defined by the existence of alone. Both formulations are equivalent. Indeed, on at least three vertices, the number of edges is determined by the multiset of the [47], so the additional requirement is vacuous there. On at most two vertices, the only non-isomorphic graphs admitting such a bijection are and , which are ruled out as they differ in their number of edges.
We also use Theorem 3.6 to significantly simplify the proofs of the negative results by Atserias, Kolaitis, & Wu [2]. In Section 6.9.3, we show that chromatic equivalence violates condition (i), while -equivalence and -equivalence violate (iii). Here, and denote the k-variable and quantifier-rank-q fragment of first-order logic, respectively.
Finally, we answer an open question of Atserias, Kolaitis, & Wu [2] in the negative: Having the same fractional clique number is not a homomorphism indistinguishability relation (Example 6.42).
4. Homomorphism distinguishing topology
Having demonstrated that homomorphism indistinguishability relations can be regarded as certain ideals of a semiring algebra, we now turn to the dual perspective and discuss the topological structure of homomorphism indistinguishability. Here, we make explicit that the homomorphism distinguishing closed componental graph classes form the closed sets of a topology. In order to be aligned with the literature, we focus on simple graphs (the connection to the looped-simple case is discussed in Section 8).
Definition 4.1 (Roberson [28]). Let F be a class of simple graphs. The homomorphism distinguishing closure of F is the graph class
The class F is homomorphism distinguishing closed if .
Roberson observed that is a closure operator, cf. Equations (34) to (36). Furthermore, Roberson showed the following:
Lemma 4.2 ([28, Lemma 6.1]). For an arbitrary index set , let be homomorphism distinguishing closed graph classes for . Then is homomorphism distinguishing closed.
Given these properties, it is natural to ask whether induces a topology by declaring the sets invariant under as closed. This fails since the union of two closed sets is not necessarily closed. More precisely, it is not hard to see that homomorphism distinguishing closed sets are always closed under disjoint unions as implied by Equation (3). Hence, the union of two homomorphism distinguishing closed graph classes is typically not homomorphism distinguishing closed. Moreover, in [33, Example 34], homomorphism distinguishing closed graph classes and are constructed such that the disjoint union closure of is not homomorphism distinguishing closed. Thus, does not interact nicely with (disjoint union closures of) unions. We overcome this issue by restricting our attention to componental graph classes. For graph classes and , we write for the smallest componental graph class containing and . Our key observation is the following lemma, which makes use of the algebra structure exhibited in Section 3.
Lemma 4.3. If are homomorphism distinguishing closed componental graph classes, then is homomorphism distinguishing closed.
Lemma 4.3 allows us to construct new homomorphism distinguishing closed graph classes by applying +. For example, invoking [28, 48], we have the following.
Corollary 4.4. For , the graph class is homomorphism distinguishing closed. Here, denotes the treewidth and the maximum degree of .
We restrict our attention to componental graph classes F. Note that componental graph classes are in one-to-one correspondence with classes of connected graphs. Recall that Z denotes the class of all non-empty connected graphs.
Definition 4.5. The homomorphism distinguishing topology is the topology on Z whose closed sets are the such that .
That this is indeed a topological space follows from Lemmas 4.2 and 4.3. Finally, we list the following properties of the homomorphism distinguishing topology. In the following proposition, a graph class F is essentially finite if its componental closure contains finitely many non-isomorphic connected graphs. The proposition simplifies previous proofs of [33, 40].
Proposition 4.6. The homomorphism distinguishing topology is Fréchet, i.e., all singletons are closed. In particular, every essentially finite componental graph class is homomorphism distinguishing closed.
Proposition 4.7. The homomorphism distinguishing topology is disconnected and non-compact.
5. Conclusion
By exhibiting geometric and topological structure associated with homomorphism indistinguishability, we gave an axiomatisation of homomorphism indistinguishability relations in Theorems 3.6 and 3.7 resolving the ‘ultimate goal’ of Atserias, Kolaitis, & Wu [2]. A crucial ingredient is a novel characterisation of functions which are of the form for some in Theorem 3.3 and Corollary 6.35 alternative to [3]. In our eyes, the central contribution of this paper, however, is to introduce a new algebraic language to reason about homomorphism indistinguishability. We propose to further develop this tool in the following directions.
Most of this paper is not specific to the semiring but applies to every countable commutative cancellative semiring (Theorem 6.27). It would be interesting to apply the theorem to graph semirings with respect to other graph products [43, 49–51]. Concretely, can the relations satisfying the axioms of Theorem 6.27 for the strong or Cartesian product be naturally described? Moreover, given the few combinatorial properties our Theorem 3.6 required, we expect a categorical generalisation as in [42] to hold.
A remaining open problem from [2] is a characterisation of right profiles, i.e., relations of the form for all in some graph class . Homomorphism indistinguishability to the right is much less studied [2, 52] than homomorphism indistinguishability to the left due to the small number of known interesting example relations [11, p. 32]. Since lacks an additive identity analogous to Equation (5), our Theorem 6.27 does not seem to be applicable. A similar problem arises when attempting to axiomatise homomorphism indistinguishability relations (to the left) of not necessarily componental graph classes. To our knowledge, no interesting examples of such relations are known.
Further, we propose to connect our insights to the two other strands of research on homomorphism indistinguishability. On the one hand, it is plausible that the algebraic structure exhibited here may be useful when designing computational reductions between homomorphism indistinguishability problems, as implicitly done in [26, Theorem 20]. Such reductions would serve as a tool towards resolving [25, Conjecture 25]. On the other hand, the homomorphism distinguishing topology (Definition 4.5) gives additional structure to homomorphism distinguishing closed graph classes in light of the Kristjánsson's refutation of Roberson's strong conjecture [32]. We propose to further investigate the topology: Is it Hausdorff? What are convergent sequences, continuous maps?
Finally, the characterisation of left homomorphism profiles in terms of positive semidefiniteness of connection matrices (Lovász & Schrijver [3]) suggests a connection to sums of squares certificates and real algebraic geometry. We do not know whether this connection can be harnessed to further simplify the conditions in Theorems 3.6 and 3.7.
Acknowledgements
JvDdB and DER were supported by the Carlsberg Foundation Young Researcher Fellowship CF21-0682 — “Quantum Graph Theory”. Additionally, JvDdB was supported by GAR grant 25-17377S. Part of this paper was written while JvDdB, DR, GLS, and PZ were in residence at Institut Mittag-Leffler in Djursholm, Sweden during the research semester “Operator Algebras and Quantum Information” in the spring of 2026, supported by the Swedish Research Council under grant no. 2021-06594. PZ was funded by the European Union (ERC, POCOCOP, 101071674). GLS acknowledges support from the CNRS 80Prime grant “QuantGraphe”. JM acknowledges the financial support from the European Research Council under the European Union’s Horizon 2020 research and innovation programme (Synergy Project Malinca, ERC Grant Agreement No 670624). TS acknowledges funding by the European Union (ERC, CountHom, 101077083).
Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Initial discussions between TS and JM took place at Dagstuhl Seminar 25141 'Categories for Automata and Language Theory'. TS would like to thank Bartek Klim, Filip Kučerák, Cornelius Brand, Radu Curticapean, Arnar Kristjánsson, Ben Moore, Ben Young, Daniel Neuen, and Moritz Seppelt for fruitful conversations.
AI Statement
Claude Code Opus 5 was used for writing, proofreading, and literature review. This applies mostly to the commutative algebra techniques. All AI-generated content was revised/rewritten by the authors. We assume full responsibility for the entire material.
6. Full version of Section 3
In this section, we give a full proof of Theorem 3.6. The bulk of the section is concerned with introducing notions from commutative algebra and elementary algebraic geometry to deal with graph isomorphism relaxations. Starting with a commutative cancellative semiring S, we construct the Grothendieck ring ZS in Section 6.1, extend scalars in QS = Q ⊗_Z ZS in Section 6.2, and further to CS = C ⊗_Q QS in Section 6.3. In each step, we identify the conditions on equivalence relations ≈ on S making them correspond to ideals of the respective semiring algebras.
In Section 6.4, we prove a Nullstellensatz for semiring algebras CS. In Section 6.5, we characterise semiring congruences corresponding to radical ideals of CS. The Nullstellensatz is then instantiated to graphs in Theorem 3.3.
So far, none of the results are specific to the graph semiring . This gap is closed in Section 6.7 by studying subgraph series and proving a characterisation of homomorphism counts alternative to previous work of Lovász & Schrijver [3].
In Section 6.8, our main theorem 3.6 is derived from the aforementioned ingredients.
6.1. Semiring congruences and ideals of Grothendieck ring ZS
Let be a commutative cancellative semiring. We write multiplication as juxtaposition. The Grothendieck ring ZS is defined on the set of equivalence classes of the equivalence relation on given by
Multiplication and addition are defined via
for all . The map given by is a semiring homomorphism. Generic elements of are of the form for .
Recalling Equations (6) to (8), we show the following correspondence between ideals of ZS and congruences on S. For an ideal , define an equivalence relation on S via
Conversely, given an equivalence relation on S, define the set
We shall see that is an ideal and that these constructions are mutually inverse.
Proposition 6.1. Let denote a commutative cancellative semiring. The maps and establish a bijection between the set of ideals of the Grothendieck ring and the set of equivalence relations on such that, for all , it holds that
We call an equivalence relation on S satisfying (15) and (16) a cancellative congruence. Towards Proposition 6.1, we make the following observations.
Lemma 6.2. Let be a cancellative congruence on S. For all ,
(i) if and , then ,
(ii) if and , then , and
(iii) if in ZS, then if, and only if, .
Proof. For the first assertion, by the forward direction of (15), implies . Analogously, implies . By transitivity, . For the second assertion, by the first assertion, and imply that . Now the term cancels from both sides by the backward implication of (15) yielding . For the final assertion, the equality rewrites as in S. In particular, . By the second assertion, , that is, by symmetry. The converse follows by exchanging the roles of and .
Proof of Proposition 6.1. We must first show that the map is well-defined.
Claim 6.3. For every cancellative congruence on S, the set is an ideal of ZS.
Proof of Claim. It holds that since is reflexive.
If , then, by the third assertion of Lemma 6.2, and . By Lemma 6.2, . Hence, .
If and , then by Lemma 6.2. By (16), and . By Lemma 6.2, . Hence, it holds that .
Next we show that the map is well-defined.
Claim 6.4. For every ideal of ZS, the relation is a cancellative congruence.
Proof of Claim. Since for every , the relation is reflexive. It is symmetric since iff since is closed under multiplication with . It is transitive since and implies that .
It remains to verify (15) and (16). Let , i.e. . For , it holds that . Hence, . The converse implication of (15) follows analogously. For (16), since is an ideal. Hence, .
It remains to argue that the maps are mutually inverse.
Claim 6.5. For every ideal of , it holds that .
Proof of Claim. Let . Then and hence . Conversely, if , then by Lemma 6.2 and Claim 6.4. Hence, .
Claim 6.6. For every cancellative congruence on S, it holds that .
Proof of Claim. If , then , hence, . Conversely, if , then . Hence, by Lemma 6.2, .
This concludes the proof.
6.2. Extension of scalars to QS
We extend scalars to . Writing for the elements of , the elements of are of the form for and integers . For , , it holds that
Here, for and , we write for the -fold sum . Note that there is a semiring homomorphism mapping . Hence, is a product in .
For an ideal , define an equivalence relation on via
Conversely, given an equivalence relation on S, define the set
We show the following extension of Proposition 6.1 mirroring (9). Recall that an equivalence relation on S is called cancellative if it satisfies (15) and (16).
Proposition 6.7. Let denote a commutative cancellative semiring. The maps and establish a bijection between the set of ideals of and the set of cancellative congruences on such that, for all and , it holds that
We call an equivalence relation on a semiring S satisfying (17) torsion-free. In preparation, we first make the following observation analogous to Lemma 6.2.
Lemma 6.8. Let be a torsion-free cancellative congruence on S. If in QS, then if, and only if, .
Proof. If , then by Lemma 6.2. Furthermore, by assumption, . Hence, by Lemma 6.2. In particular, . By Lemma 6.2, . By (17), , that is, by symmetry. The converse follows by exchanging the roles of and .
Proof of Proposition 6.7. We must first show that the map is well-defined.
Claim 6.9. For every torsion-free cancellative congruence on S, the set is an ideal of QS.
Proof of Claim. It holds that since is reflexive.
If , then, by Lemma 6.8, and . By Lemma 6.2, and . By Lemma 6.2, . Hence,
If and , then by Lemma 6.8. By (16), and . By Lemma 6.2, . Hence, it holds that
Next we show that the map is well-defined.
Claim 6.10. For every ideal of QS, the relation is a torsion-free cancellative congruence.
Proof of Claim. By the proof of Claim 6.4, it remains to verify that is torsion-free. Let for and . By definition, . Since is an ideal, .
It remains to argue that the maps are mutually inverse.
Claim 6.11. For every ideal of QS, it holds that .
Proof of Claim. Let . Then and hence . Conversely, if , then for some and . By Lemma 6.8 and Claim 6.10, . By definition, . By multiplication with , it follows that .
Claim 6.12. For every torsion-free cancellative congruence on S, it holds that .
Proof of Claim. If , then , hence, . Conversely, if , then . By definition, for some and . By Lemma 6.8, .
This concludes the proof.
6.3. Extension of scalars to CS
Hilbert’s Nullstellensatz requires an algebraically closed field. Hence, we extend scalars further to . Generic elements of are finite sums where , , and . Furthermore, the can be assumed to be linearly independent as elements of the Q-vector space .
For an ideal , define an equivalence relation on via
Conversely, given an equivalence relation on S, define the set
Proposition 6.13. Let S denote a commutative cancellative semiring.
(i) For every ideal b of CS, the relation is a torsion-free cancellative congruence on S.
(ii) For every torsion-free cancellative congruence on , the set is an ideal of and , i.e. for all , it holds that if, and only if, .
In particular, is injective and establishes a bijection between the torsion-free cancellative congruences on S and the ideals of CS extended from QS.
Proof. Write for the ideal corresponding to under Proposition 6.7. Comparing the definitions in Sections 6.2 and 6.3, the set consists of the finite sums with and . That is,
is the ideal of CS extended from ; in particular, it is indeed an ideal.
Assertion (i) follows as in the proof of Proposition 6.7.
For Assertion (ii), recall that the field extension is faithfully flat. Hence, for every -algebra and every ideal , the quotient embeds into [53, Tag o5CK], where the equality uses that is flat [53, Tag ooHB] over . In other words, extending scalars does not enlarge within :
Applying this to and , we obtain, for all ,
where the final equivalence is Proposition 6.7.
The injectivity of follows from Assertion (ii). By (19), its image consists of extended ideals. Conversely, if for an ideal of QS, then by (20), and hence by (19) and Proposition 6.7.
Remark 6.14. Unlike Propositions 6.1 and 6.7, Proposition 6.13 cannot be strengthened to a bijection with all ideals of CS. The reason is that the elements for span CS over C without exhausting it, so that an ideal of CS is not determined by the differences it contains. For example, let , so that and . A polynomial in vanishes at if, and only if, it is divisible by . Hence, the distinct principal ideals and of induce the same relation on S, namely the one corresponding to the extended ideal .
Nevertheless, among all ideals inducing a given congruence there is a least one, namely : if is an ideal of with , then for all , and is closed under -linear combinations, whence .
This concludes the preparations for the proof of Lemma 6.15, which instantiates Proposition 6.13 to graph isomorphism relaxations.
Lemma 6.15. Let be a graph isomorphism relaxation. The relation satisfies Equations (6) to (9) if, and only if, there exists an ideal of such that, for all graphs ,
Proof. Recall from Lemma 2.1 that , equipped with disjoint union as addition and the categorical product as multiplication, is a commutative cancellative semiring. Being a graph isomorphism relaxation, is an equivalence relation on .
We first observe that satisfies Equations (6) to (9) if, and only if, it is a torsion-free cancellative congruence on . Indeed, Equation (6) is (16), while the forward and the backward direction of (15) are Equations (7) and (8), respectively. Furthermore, Equation (9) asserts that is torsion-free, since is the n-fold disjoint union of G with itself.
Now, if satisfies Equations (6) to (9), then, by Assertion (ii) of Proposition 6.13, the set is an ideal of such that if, and only if, , for all graphs .
Conversely, if is an ideal of such that if, and only if, , then . By Assertion (i) of Proposition 6.13, this is a torsion-free cancellative congruence on , so that satisfies Equations (6) to (9).
6.4. Algebraic geometry of semiring algebras
In order to prove Theorem 3.1, we adapt Hilbert's Nullstellensatz to semiring algebras in Theorem 6.19.
Let be a commutative cancellative semiring. Write for the set of semiring homomorphisms , i.e., maps such that and, for all ,
We require the following lemma whose proof is routine and therefore omitted.
Lemma 6.16. For every semiring homomorphism , there exists a unique -algebra homomorphism such that for all . It is given by
In light of Lemma 6.16, we henceforth write for the extension of a semiring homomorphism .
Definition 6.17. For an ideal and a subset , let
We record that vanishing ideals of rational-valued semiring homomorphisms are extended from QS.
Lemma 6.18. Let denote a commutative cancellative semiring and let . Then it holds that .
Proof. By Section 6.3, every can be written as with and linearly independent over . Let . Since takes rational values on , it holds that for every by (21). Hence, if, and only if, for all . Therefore, if, and only if, for all , which is the assertion.
For an ideal in a ring , write for the radical of . An ideal is called radical if . The following Nullstellensatz for semiring algebras is the main result of this section.
Theorem 6.19 (Hilbert's Nullstellensatz for Semiring Algebras). Let S be a countable commutative cancellative semiring and a an ideal of CS. Then
We deduce Theorem 6.19 from the following Theorem 6.20, a version of Hilbert's Nullstellensatz for polynomial algebras in infinitely many variables. Note that the difference between Theorems 6.19 and 6.20 is that in the definition of only semiring homomorphisms are considered while contains arbitrary maps . Theorem 6.20 is apparently due to Lang [54]; see also [53, Tag ooFU] and [55].
Theorem 6.20 (Lang [54]). Let be a non-zero ring, a non-empty index set, and write for the polynomial algebra . Suppose that is algebraically closed and that . Then, for every ideal , it holds that
Here, every gives rise to the evaluation homomorphism , i.e. the unique F-algebra homomorphism with for all , and, for an ideal and a set ,
Proof of Theorem 6.19. Since is countable and non-empty, there exists a surjection , . Write for the polynomial algebra over in countably many variables and let
denote the unique C-algebra homomorphism mapping to the image of under the canonical semiring homomorphism . Its kernel encodes the relations holding in .
Claim 6.21. The homomorphism is surjective.
Proof of Claim. By Section 6.3, every element of CS is a finite sum with , , and . Since is surjective, there are with and . As and is -linear,
Write for the preimage of in . It is an ideal of containing . Since is a non-zero algebraically closed field and , Theorem 6.20 applies to and yields
By Lemma 6.16, every is identified with its unique extension to a -algebra homomorphism . Write for the map . Then
since both sides are C-algebra homomorphisms agreeing on the generators , for .
Claim 6.22. The map is injective on and restricts to a bijection between and , i.e. the following square commutes and its horizontal maps are as indicated:
Proof of Claim. Injectivity is immediate.
The map is well-defined on : If and , then and hence by (23). Thus .
It remains to show that every is of the form for some . Since , it holds that , so vanishes on . By Claim 6.21, induces an isomorphism . Hence, there is a unique -algebra homomorphism such that . Let denote the composition of with the canonical semiring homomorphism . As a composition of semiring homomorphisms, is a semiring homomorphism, and , i.e. . By the uniqueness assertion in Lemma 6.16, is the extension of to . For all ,
so . Finally, : Given , by Claim 6.21 there is with . Then and thus .
Claim 6.23. It holds that .
Proof of Claim. Let . Using Claim 6.22 in the second and (23) in the third step,
Claim 6.24. It holds that .
Proof of Claim. If , say for some , then , i.e. . Conversely, let , say . By Claim 6.21, there is with . Then , i.e. . Hence .
Combining these claims yields
6.5. Radical ideals
In order to apply Theorem 6.19, it remains to understand the radical of an ideal in terms of the cancellative congruence corresponding to under Proposition 6.13. While a generic element of is a finite sum , this congruence only records which of the elements for lie in . Fortunately, these elements are all we need to consider. By the Binomial Theorem, it holds in that
where crucially and are again elements of . That is, the -th power of is again the difference of two elements of . We may thus consider the following condition on a relation on , asserted for all and all :
Lemma 6.25. Let be a torsion-free cancellative congruence on satisfying (25), and let denote the corresponding ideal given by Equation (18). Then, for all ,
Proof. By Proposition 6.13, it holds that , i.e. if, and only if, , for all . In the backward direction, if , then . In the forward direction, suppose that , i.e. for some . By (24),
As and are elements of , this means that . By (25), it follows that .
Lemma 6.25 is all we shall need, but in fact more is true:
Lemma 6.26. Let be a torsion-free cancellative congruence on S. The relation satisfies (25) if, and only if, the ideal of CS is radical.
Proof. Suppose that is radical and that for some and . By (24), , whence , i.e. by Proposition 6.13.
The converse requires the intermediate extension of scalars to QS. Write for the ideal corresponding to under Proposition 6.7, and suppose that satisfies (25). Every element of QS is of the form for and . If for some , then, as is an ideal of the Q-algebra QS,
i.e. . By (25), , so that . Hence, is radical, equivalently, the quotient is reduced [53, Tag o1IZ], i.e. has no non-zero nilpotents. As Q has characteristic zero, it is perfect [53, Tag o30Y], so that is geometrically reduced [53, Tag o30S] over Q by [53, Tag ooI4]; in particular, is reduced. By the definitions in Sections 6.2 and 6.3, the ideal consists of the finite sums with and , i.e. as is flat [53, Tag ooHB] over Q. The same flatness identifies the reduced ring above with , whence is radical.
6.6. Semiring congruences from semiring homomorphism indistinguishability
In this section, we prove Theorem 3.1 which characterises the graph isomorphism relaxations that are of the form . for some set of semiring homomorphisms. Since this statement does not involve the combinatorics of , we prove the following general statement, which holds for any countable commutative cancellative semiring.
Theorem 6.27. Let be a countable commutative cancellative semiring and let be an equivalence relation on . There exists a set such that, for all ,
if, and only if, for all and ,
(i)
(ii)
(iii)
(iv)
(v)
Proof. Suppose first that there exists a set such that if, and only if, for all . Let , let , and let . Assertions (i) and (ii) hold since and , and analogously with in place of . Assertion (iii) holds since implies . Assertion (iv) holds since and , and implies , as is of characteristic zero. For Assertion (v), observe that, by the Binomial Theorem,
Hence, if , then and thus , for every . That is, .
Conversely, suppose that satisfies Assertions (i) to (v). Assertions (i) and (iii) are the two directions of (15), Assertion (ii) is (16), and Assertion (iv) states that is torsion-free. Hence, is a torsion-free cancellative congruence on S. By Proposition 6.13,
is an ideal of CS such that, for all , it holds that if, and only if, . Furthermore, Assertion (v) is (25).
Since is countable, Theorem 6.19 applies. Writing , it yields
Therefore, for all ,
where the first equivalence is Lemma 6.25. This is the desired characterisation of .
Theorem 6.27 readily implies the following theorem via Lemma 2.1.
Theorem 3.1. Let be a graph isomorphism relaxation. The relation satisfies Equations (6) to (10) if, and only if, there exists a set such that, for all graphs ,
6.7. Subgraph series
So far we have not made use of the combinatorics of . Given Theorem 3.1, it remains to understand the semiring homomorphisms that are of the form for some connected graph . Towards this goal, we observe that every graph parameter can be uniquely expressed as an infinite linear combination of subgraph counts .
6.7.1. Unique coefficients and support
For a graph and sets and , write for the subgraph of with vertex set whose edges are precisely those edges of all of whose endpoints lie in . The subgraphs of are exactly the graphs of this form. We abbreviate the induced subgraph .
Lemma 6.28. Let be a graph parameter. For a graph , let
Then , where for every input graph G only finitely many summands are non-zero. Moreover, the are the unique complex numbers with this property.
We call the subgraph series of the graph parameter . Here, we adopt the convention that the indices are pairwise non-isomorphic.
Proof. Uniqueness. Suppose that and write , so that vanishes identically. We show that for every by induction along the lexicographic order on the pairs . So let and suppose that for every graph whose pair is lexicographically smaller than that of . Every with is such a graph, as and with equality in both only if . Evaluating at therefore yields
Existence. We apply Möbius inversion over the Boolean lattice (Lemma A.1) twice. Define the graph parameter
The graph has vertex set and satisfies , so that . Exchanging the order of summation in the definition of therefore gives
We claim that, for all graphs ,
Both are instances of Lemma A.1, i.e. of Möbius inversion over a Boolean lattice. For (27), apply it to and to and : as for , the definition of states precisely that , so that ; now take . For (28), apply it to and to and : as for , (26) states precisely that , so that ; now take .
Finally, let be arbitrary. Every subgraph of is of the form for a unique pair of sets and , and for such a pair. Hence, grouping the subgraphs of by their isomorphism types,
where all sums are finite.
22
□
By Lemma 6.28, the coefficients of the subgraph series are uniquely determined by p. Hence, the following notion is well-defined.
Definition 6.29. For a graph parameter , let for be as in Lemma 6.28 and define the support of as the graph class .
Recalling from Equation (12), we prove the following lemma, which allows us to recast the support of a semiring homomorphism in terms of its values. Note that, in contrast to Definition 6.29 and Lemma 6.28, this requires to be a semiring homomorphism.
Lemma 6.30. Let and let . Then , where denotes the coefficient of in the subgraph series of . In particular, if, and only if, .
Proof. By Lemma 6.16, extends to a C-algebra homomorphism , which we again denote by . In particular, is C-linear, and hence, recalling Equation (12) and Lemma 6.28,
Hence, if, and only if, , that is, if, and only if, .
Finally, note that the double Möbius inversion in Lemma 6.28 is essential. One may be tempted to invert over edge subsets only as done in [39, Section 4.1], that is, to expand p into counts of spanning subgraphs. The following remark explains why this is not sufficient for our purposes.
Remark 6.31. For graphs , let denote the number of spanning subgraphs of isomorphic to , i.e. the number of sets with , and put
i.e. retain only the summands with in the definition of . A single application of Lemma A.1 to yields , so this expansion is valid as well. It is, however, useless for our purposes.
Indeed, unless , so such an expansion amounts to one separate expansion for each vertex count, and a parameter with finitely many non-zero vanishes on all but finitely many vertex counts. In particular, no semiring homomorphism has finitely many non-zero , as is additive and hence maps the disjoint union of copies of 1 to . The notion of finite support underlying Lemmas 6.30 and 6.37 would thus be vacuous. For example, the parameter counting vertices satisfies and for all , whereas for every , writing for the edgeless graph on vertices. Moreover, is not itself a graph motif parameter, see Section 6.7.2.
6.7.2. Graph motif parameters
Of particular importance are subgraph series with finite support. These were studied by Curticapean, Dell, & Marx [36] under the term graph motif parameter, see also the survey [38].
Definition 6.32. A graph motif parameter is a function with finite support .
By definition, the functions for span the C-vector space of graph motif parameters. It is implicit in the work of Lovász [1] that these functions form a basis of this space. In the following, it will be more convenient to work with an alternative basis of the space of graph motif parameters, the homomorphism basis. The basis change is given by [39, (5.18)], i.e., for every , it holds that
where is the number of automorphisms of , ranges over partitions of , is a suitably defined graph quotient, and the are coefficients arising from Möbius inversion over the set-partition lattice. Hence, the homomorphism counts for span the space of graph motif parameters. In fact, they form a basis.
Theorem 6.33 (Lovász [1], see also [39, Proposition 5.44b]). For pairwise non-isomorphic graphs , the functions are linearly independent.
We use Theorem 6.33 to characterise the graph motif parameters that are of the form for some , i.e., they are comprised only of a single homomorphism count. We write graph motif parameters in this basis as , where, in contrast to the definition of subgraph series, all but finitely many coefficients vanish.
Lemma 6.34. For every non-zero graph motif parameter , the following are equivalent:
(i) p is multiplicative, i.e., for all ,
(ii) p is of the form for some graph .
Proof. The backward direction is immediate from Equation (4). Conversely, let be arbitrary. By assumption and Equation (4),
For fixed H, we first view both sides as graph motif parameters in G. That is,
Since the functions are linearly independent by Theorem 6.33, i.e. they form a basis of the space of graph motif parameters, we may compare coefficients and obtain
Fix with , which exists since is non-zero, and divide both sides by . Since was chosen arbitrarily, we can view this identity as an identity of graph motif parameters
and compare coefficients. Hence, for all and . In particular, for some , as desired.
We deduce the following characterisation of homomorphism counts alternative to Lovász & Schrijver [3].
Corollary 6.35. A non-zero function is of the form for some graph if, and only if, it is multiplicative and has finite support.
Finally, we characterise the homomorphism counts which are semiring homomorphisms . For a more general statement, compare [39, Exercise 4.2].
Lemma 6.36. For every graph , the following are equivalent:
(i) is additive, i.e., for all ,
(ii) F is connected.
Proof. The backward direction is immediate from Equation (5). Conversely, let be the connected components of . Let be arbitrary. By Equations (3) and (5), we have
By the assumption that ,
In particular,
We view these expressions as a graph motif parameter in G, i.e.
All coefficients on the left-hand side are non-negative, which rules out cancellations. There is only one pattern on the right-hand side. By comparing coefficients by virtue of Theorem 6.33, there is only one pattern on the left-hand side. Hence, n = 1, as desired.
Combining the lemmas above, we obtain our characterisation.
Theorem 3.3. A semiring homomorphism is of the form for some connected graph if, and only if, its support is finite.
Proof. If for some connected graph , then it is a graph motif parameter, i.e. it has finite support. It is additive and multiplicative by Equations (4) and (5). Furthermore, . Conversely, since is multiplicative and of finite support, it is of the form for some graph by Lemma 6.34. Since is additive, the graph is connected by Lemma 6.36.
6.8. Putting the pieces together
Towards Theorem 3.4, we first identify the right-hand side of (13) as a vanishing ideal.
Lemma 6.37. (i) For , it holds that .
(ii) For , every ideal of containing is radical.
(iii) For an ideal of , it holds that .
Proof. By Lemma 6.30, it holds that if, and only if, , for every and every graph . Since is generated by the for graphs on more than vertices,
In particular, each is of finite support and thus of the form for some by Theorem 3.3. By applying Möbius inversion to Equation (29), it follows that for every . Hence, . Conversely, if has at most vertices, then by Equation (29) every graph in is a quotient of and hence has at most vertices, so that .
For the second assertion, observe that the elements of the form where is connected form a basis of over since is a linear combination of connected graphs with fewer vertices than , or with the same number of vertices and fewer edges. It follows that the dimension of over is at most the number of connected graphs on vertices or less. By Theorem 6.33, the functions for with are linearly independent, so the -linear evaluation map
is surjective. This map factors through by Assertion (i), and by the bound on the dimension of , we obtain an isomorphism
Every ideal of this ring is radical, hence every ideal of containing is radical.
For the third assertion, observe that . Therefore, using Theorem 6.19 in the first step,
The assertion now follows by applying Assertion (i) and Assertion (ii).
This concludes the preparations for the proof of Theorem 3.4. Note that (10) is not among the hypotheses of Theorem 3.4. It is in fact implied by (13): the right-hand side of (13) is an intersection of radical ideals, so that (13) forces to be radical, which is equivalent to (10) by Lemma 6.26.
Theorem 3.4. Let be a graph isomorphism relaxation satisfying Equations (6) to (9) and let denote the corresponding ideal of given by Lemma 6.15. Then is a homomorphism indistinguishability relation over a componental graph class if, and only if,
Proof. Write , and . By Lemma 6.37, (13) reads . By Lemma 6.15, if, and only if, .
In the backward direction, suppose that . Then iff iff for all , i.e. . As consists of connected graphs, coincides with homomorphism indistinguishability over the componental closure of by (3).
Conversely, invoking Equation (3), suppose that for a class of connected graphs. Let . Every vanishes on the generators of , so and . Moreover, iff iff , i.e. . Both and are extended from by Lemma 6.18 and (19), respectively, so by Proposition 6.13. Hence, , using and .
This concludes the preparations for the proof of Theorem 3.6.
Theorem 3.6. A graph isomorphism relaxation is a homomorphism indistinguishability relation over a componental graph class if, and only if, it satisfies, for all graphs and ,
(i)
(ii)
(iii)
(iv)
(v) if, for all , there exist and graphs such that and then .
Proof. Assertions (i) to (iv) are Equations (6) to (9), which hold for every homomorphism indistinguishability relation over a componental graph class. Write . By Lemma 6.15, if, and only if, . By Theorem 3.4, it suffices to show that Assertion (v) is equivalent to . Recall that iff .
Suppose that and that satisfy the premise of Assertion (v). For every , it holds that and, as , . Hence, , i.e. .
Conversely, assume Assertion (v). By Lemmas 6.18 and 6.37, the ideals and are vanishing ideals of integer-valued homomorphisms and thus extended from , as is by (19). By Proposition 6.13, it suffices to show that implies .
Let . Since and are extended from and , we may write with and . Every element of is of the form for some and , so with and , i.e. . As was arbitrary, Assertion (v) yields and thus . It follows that and applying Proposition 6.13 concludes the proof.
Finally, we prove Lemma 3.5. The lemma shows in particular that is a homomorphism indistinguishability relation.
Lemma 3.5. Let . For graphs , the following are equivalent:
(i) , i.e., ,
(ii) for all on at most vertices,
(iii) there exists a bijection between the subsets of and of of size at most such that and for all such .
Proof. Assume that . Let be a connected graph on at most vertices. By Lemma 6.37, it holds that . In particular, . The case of disconnected follows by Equation (3), as each of its components has at most vertices.
Conversely, suppose that and are homomorphism indistinguishable over all graphs on at most vertices. Let . By Lemma 6.37, for some graph
F on at most vertices. It follows that . Hence, by Theorem 6.19 and Lemma 6.37.
For the final assertion, consider the following additional equivalent assertions:
(iv) sub(F, G) = sub(F, H) for all on at most vertices,
(v) indsub(F, G) = indsub(F, H) for all on at most vertices.
Here, indsub(F,★) counts induced subgraphs isomorphic to F. For the equivalence of the second and the fifth assertion, we observe that, by [36], the functions hom(F,★) for graphs F on at most vertices span the same space as the functions indsub(F,★) that count induced subgraphs from graphs F on at most vertices. The fourth assertion is equivalent to these as well, since the functions sub(F,★) for graphs F on at most vertices span that same space [36]. Finally, it holds that indsub(F, G) = indsub(F, H) for every F on at most vertices if, and only if, the bijection from the third assertion exists.
6.9. Applications
We give three applications of Theorems 3.6 and 3.7.
6.9.1. Ulam–Kelly Reconstruction Conjecture
The following Example 3.8 shows that the involved Assertion (v) is not the bottleneck when applying Theorem 3.7 to the Ulam–Kelly Reconstruction Conjecture.
Example 3.8. The following are equivalent:
(i) The Ulam–Kelly Reconstruction Conjecture holds.
(ii) Hypomorphism is a homomorphism indistinguishability relation over a componental graph class.
(iii) The hypomorphism relation satisfies Assertion (i) of Theorem 3.7.
(iv) The hypomorphism relation satisfies Assertion (ii) of Theorem 3.7.
In order to establish the equivalence with Assertion (iii), we require the following lemma. Recall the definition of graph motif parameters from Definition 6.32.
Lemma 6.38. For every graph , the graph parameter
is a graph motif parameter such that the unique coefficient is non-zero.
Proof. First note that, for every ,
Moreover, using an observation of Lovász [1], see [11, Lemma 3.1.2],
Here, denotes the number of homomorphisms whose image contains , the number of surjective homomorphisms , and the number of injective homomorphisms , so that . The first sum ranges over all homomorphisms . In the last two lines, the (outer) sum ranges over all graphs on at most vertices. In the last line, the inner sum ranges over all partitions of . By summing Equation (30) over and observing that , it follows that
This is a graph motif parameter evaluated at G since the patterns and coefficients do not depend on G. Furthermore, after grouping terms for isomorphic patterns it follows that the coefficient of is non-zero. To that end, observe that the all have at most vertices.
The second ingredient we require is the following lemma.
Lemma 6.39 ([33, Lemma 6], cf. [36, Lemma 3.6]). Let be a simple graph isomorphism relaxation satisfying Assertion (i) of Theorem 3.7. Let be a graph motif parameter. Suppose that, for all , it holds that . Then, for all , it holds that for all with .
Proof of Example 3.8. Given [1] and Theorem 3.7, only the implications from Assertions (iii) and (iv) to Assertion (i) require an argument.
For Assertion (iv), let be hypomorphic via a bijection . As and have the same number of edges and , every satisfies . Hence, and have the same number of isolated vertices. By Assertion (ii), the graphs and are hypomorphic, say via a bijection . Both have isolated vertices, and removing any one of them yields and , respectively. Let denote the vertex of the added in , so that has isolated vertices. Removing a non-isolated vertex of leaves the isolated vertices isolated. Hence, is isolated and , as asserted by the Reconstruction Conjecture.
For Assertion (iii), we apply Lemmas 6.38 and 6.39. By definition, if are hypomorphic, then there exists a bijection such that for all . Hence, for all and the graph motif parameter from Lemma 6.38. By Lemmas 6.38 and 6.39, it follows that
for all whenever are hypomorphic. We may assume that , as otherwise and are both empty. By (3), and likewise for , so that . Hence, and are homomorphism indistinguishable over all graphs and thus isomorphic by [1].
6.9.2. D-fractional isomorphism
For an integer , two graphs and are said to be -fractionally isomorphic, written , if there exists a bistochastic matrix such that for all , where
This isomorphism relaxation was introduced by Botteron and Weber in [35], motivated by nonlocal games and communication complexity.
In [35, Open Question 2], Botteron and Weber ask for a homomorphism indistinguishability characterisation of D-fractional isomorphism. We use Theorem 3.7 to show that neither 2-fractional isomorphism, nor D-fractional isomorphism for some fixed , nor D-fractional isomorphism for all D, can be characterised as homomorphism indistinguishability over some graph class.
We show this by exhibiting two graphs that violate Assertion (i). A priori, this only shows that is not a homomorphism indistinguishability relation over a componental graph class. However, it is easy to see that satisfies Equation (7), that is
As was shown in [33, Theorem 7], a homomorphism indistinguishability relation satisfying Equation (7) is necessarily a homomorphism indistinguishability relation over a componental graph class. Our negative result thus follows from the contrapositive.
Example 6.40. Let and let be the triangular prism. Then both and are 3-regular, both and are 2-regular, and for all , so the normalised all-ones matrix gives a -fractional isomorphism between and for all . However, we claim that whenever , so fails Assertion (i) in Theorem 3.7. Indeed, is the disjoint union of two copies of and is the hexagonal prism. The former has 12 pairs of vertices at distance 2, while the latter has 24, so they cannot be 2-fractionally isomorphic. We conclude that does not admit a homomorphism indistinguishability characterisation when .
6.9.3. Chromatic- and FO-equivalence
In [2], the authors proved the following negative results.
Proposition 6.41 ([2, Theorem 17, Proposition 1, Proposition 2]). The following equivalence relations are not homomorphism indistinguishability relations.
-
Chromatic equivalence, having the same chromatic polynomial.
-
-equivalence, being indistinguishable by a sentence of first-order logic using at most k distinct variables.
-
-equivalence, being indistinguishable by a sentence of first-order logic of quantifier-rank at most q.
We can recover these statements as corollaries of Theorem 3.7. Clearly, the three relations satisfy Equation (7), so it again suffices to show that they violate one of the conditions of the theorem.
Indeed, chromatic equivalence violates Assertion (i). Consider the graphs and . As noted in [2], it is easy to verify that they both have chromatic polynomial and hence are chromatically equivalent. On the other hand, we have and . The chromatic polynomial of the former is given by while the latter has chromatic polynomial .
On the other hand, equivalence in first-order logic FO—both over the bounded variable-and the bounded quantifier-rank fragment—violates Assertion (iii). Let be arbitrary and consider the graphs and . Clearly, they are distinguished by the sentence
which is in . On the other hand, we have and . These graphs are not distinguishable by any or sentence, as a routine EF-game argument shows.
6.9.4. Fractional clique number
Finally, we give an example of a graph isomorphism relaxation satisfying Assertions (i) and (ii) but failing Assertion (iii). We answer a further question of Atserias, Kolaitis, & Wu [2].
In [2, Section VII], Atserias, Kolaitis, & Wu asked whether the relation is a homomorphism indistinguishability relation (for simple graphs ). Here, denotes the fractional clique number defined as the optimum of the linear program
Here, denotes the set of independent sets in G. By the duality theorem of linear programming, equals the fractional chromatic number . We show that is not a homomorphism indistinguishability relation.
Example 6.42. The relation satisfies Assertions (i) and (ii) but fails to satisfy Assertion (iii) of Theorem 3.7. In particular, it is not a homomorphism indistinguishability relation.
Proof. By [56, Theorem 2] and [2], for all ,
This identity readily implies Assertion (i).
For Assertion (ii), we show that for . For any feasible on , put and . Every independent set of splits as the union of independent sets , so ; and is feasible for , giving and likewise for . Hence
and putting all the weight on the better component attains it.
In order to see that Assertion (iii) is violated, consider
while
By [33, Theorem 7], the relation satisfying Assertion (ii) has to be a homomorphism indistinguishability relation over a componental graph class if it is one at all. However, as it does not satisfy Assertion (iii), it is no homomorphism indistinguishability relation by Theorem 3.7.
7. Examples of semiring homomorphisms on
In this section, we give examples of graph isomorphism relaxations and semiring homomorphisms highlighting the necessity of the axioms in Theorem 3.6.
7.1. Necessity of Equation (14)
Example 3.2. The adjacency matrix rank rk: is a semiring homomorphism. The relation satisfies Equations (6) to (10) but is not a homomorphism indistinguishability relation.
Proof. In order to verify Equations (6) to (10), it suffices by Theorem 3.1 to show that rk: is a semiring homomorphism. It holds that and for matrices ,
where is the matrix direct sum and denotes the Kronecker product of matrices. The direct sum of the adjacency matrices of two graphs is the adjacency matrix of their disjoint union; the Kronecker product of the adjacency matrices of two graphs is the adjacency matrix of their categorical product.
Suppose is a homomorphism indistinguishability relation over some graph class . The adjacency matrices of the graphs and are the and the all-ones matrix, respectively. They both have rank 1. However, for every -vertex graph , it holds that , hence and are not homomorphism indistinguishable over any graph except the empty graph , for which . This implies that which renders trivial, a contradiction.
Theorem 3.3 implies that the support of the graph parameter rk is infinite. We leave computing this support explicitly as an interesting open problem.
Finally, we note that Example 3.2 is an instance of a more general phenomenon.
Lemma 7.1. The functions from Hermitian matrices to C satisfying, for all Hermitian A, B and unitary X,
are of the form where is a semigroup homomorphism and denotes the multiset of eigenvalues of .
For the rank, we have . Since permutation matrices are unitary, every function satisfying the properties in Lemma 7.1 induces (by application to the adjacency matrix) a graph parameter which is a semiring homomorphism.
Proof of Lemma 7.1. Let for some semiring homomorphism . Since and are cospectral for every unitary , the first property holds. For the second property, observe that where we take the multiset union on the right hand-side. For the final property, . Hence, is of the desired form.
Conversely, every Hermitian matrix can be unitarily diagonalised into a diagonal matrix of real eigenvalues . Applying the -identity, the only remaining degree of freedom is for . Let be this map. The identity implies that for all , that is, is a semigroup homomorphism.
7.2. Semiring homomorphism on looped-simple graphs with imaginary values
Next, we show that not all semiring homomorphisms have image contained in . To that end, we use the following lemmas.
Lemma 7.2 ([39, Exercise 5.52]). Let be pairwise non-isomorphic connected non-bipartite simple graphs. Then the functions are linearly independent, even when restricted to connected graphs.
Lemma 7.3 (Lovász [57], cf. [58, Theorem 9.10], [39, Theorem 5.37]). Let and suppose that has an odd cycle. Then .
Lemma 7.4. Let be connected, simple, and non-bipartite. Then:
(i) G is transcendental in , i.e., it is not the root of any non-zero polynomial .
(ii) If is any non-constant polynomial, then is non-invertible.
Proof. (i). Since is connected and non-bipartite, the categorical powers are connected and non-bipartite for all . Note that whenever . Suppose that is a polynomial such that . Then for all connected graphs we have by Equation (5)
By taking , it follows that since the looped graph does not admit homomorphisms to any of the simple graphs . Now by applying Lemma 7.2 to the remaining expression, it follows that . This shows that is transcendental.
(ii). Write with for some (since is non-constant). Let be any non-zero element, and write with connected and pairwise non-isomorphic, and (where , since ). We show that . To that end, reorder the by decreasing size, and let be such that . Now we write
and note that the graphs are connected (since is non-bipartite) and pairwise non-isomorphic by Lemma 7.3. Since and , it follows that contains non-constant terms, so we have . Since was arbitrary, we conclude that is non-invertible.
Corollary 7.5. Let be connected, simple, and non-bipartite. Then for every , there exists such that .
Proof. Let be the ideal generated by . By Lemma 7.4(ii), the generator is not invertible, so is a proper ideal. Therefore, is contained in a maximal ideal [53, Tag ooEo]. By [53, Tag ooFU], we have . Let be the canonical map. We have , so either or . It follows that either or restricts to the desired homomorphism such that .
In particular, Corollary 7.5 shows that homomorphisms are not necessarily real.
Remark 7.6. In the proof of Corollary 7.5, we could have taken the ideal generated by . Working with the ideal generated by for some shows something stronger, namely that even has a maximal ideal such that . So even when working with real coefficients, there still exist semiring homomorphisms onto the complex numbers.
Remark 7.7. When is not a non-negative integer, it is clear that the semiring homomorphism constructed in Corollary 7.5 is not of the form for some and all , so this gives a wealth of 'exotic' semiring homomorphisms . Further, the kernel of the associated homomorphism is a maximal ideal, and therefore radical, so this gives a wealth of radical ideals in that are not associated to homomorphism indistinguishability relations.
8. Discarding loops
In this section, we discuss the transition from homomorphism indistinguishability relations on to homomorphism indistinguishability between simple graphs from . To that end, we first answer an open question of Roberson [28].
Question 8.1 (Roberson [28, Question 1]). For a family of simple graphs , is ?
Here, is the homomorphism distinguishing closure in , i.e., for a graph class ,
The difference to Definition 4.1 is that range over looped-simple graphs. Question 8.1 asks for the relationship between and . We resolve this question in the affirmative.
Lemma 8.2. For every family of simple graphs, .
The proof of Lemma 8.2 requires the following fact, that we will use throughout this section.
Fact 8.3. For and , it holds that .
Proof of Lemma 8.2. Let . By definition, is a simple graph. Let be not necessarily simple graphs such that . Then by (6). Since is simple, so are and by Fact 8.3. Hence, by assumption,
Since , we may divide both sides by this term. Hence, and .
Lemma 8.2 implies that the looped-simple homomorphism distinguishing closure of a class of simple graphs collapses to the simple homomorphism distinguishing closure. That is, for every , it holds that
As a step towards Theorem 3.7, we characterise the homomorphism indistinguishability relations between looped-simple graphs that are homomorphism indistinguishability relations over a class of simple graphs.
Lemma 8.4. Let be a class of looped-simple graphs. The relation is a homomorphism indistinguishability relation over a class of simple graphs if, and only if, for all graphs ,
Proof. In the forward direction, suppose that coincides with for a class of simple graphs and let satisfy for all . Let and put . As is simple, . By (4),
and dividing by yields . As was arbitrary, and hence .
For the backward direction, let be the class of simple graphs in . Clearly, if , then . Conversely, suppose and let and . If , then (4) gives . Otherwise, contains a loop, so as has none, and both sides vanish by (4). Hence, for all , and the assumption yields . It follows that and coincide, as desired.
8.1. An axiomatisation for simple graph isomorphism relaxations
Theorem 3.6 axiomatises the homomorphism indistinguishability relations between looped-simple graphs. In the literature, one is typically interested in relations between simple graphs. Our machinery does not immediately apply to simple graphs. This is because the class of simple graphs G does not contain the multiplicative unit 1, i.e., the single-vertex looped graph. The complete graphs serve as a substitute.
In Theorem 3.7, we deduce the simple case from Theorem 3.6 at the cost of one additional axiom. To that end, we first describe how to extend a simple graph isomorphism relaxation, i.e., an equivalence relation on such that implies , to a graph isomorphism relaxation between looped-simple graphs.
Definition 8.5. Let be a simple graph isomorphism relaxation. Its saturation is the graph isomorphism relaxation defined, for , by
This is well-defined since and are simple for every simple by Fact 8.3. We deduce Theorem 3.7 from Theorem 3.6 after adding the additional Assertion (vi). Recall that is the graph isomorphism relaxation characterised by Lemma 3.5.
Theorem 3.7. A simple graph isomorphism relaxation is a homomorphism indistinguishability relation over a componental class of simple graphs if, and only if, it satisfies, for all ,
(i)
(ii)
(iii)
(iv) if for some , then ,
(v) if, for all , there exist and simple graphs such that and then ,
(vi) if for all and the n-vertex complete graph , then .
Proof. Necessity follows from Theorem 3.6 and Lemma 8.4. For sufficiency, let satisfy Assertions (i) to (vi). We show that its saturation satisfies the conditions of Theorem 3.6. Claim 8.6. For all simple graphs , it holds that if, and only if, .
Proof of Claim. If , then for every by Assertion (i), so . Conversely, if , then in particular for all , so by Assertion (vi).
Claim 8.7. The relation satisfies Assertion (i) of Theorem 3.6.
Proof of Claim. Suppose that for . Let . Let be arbitrary. Then by Definition 8.5. Let be arbitrary. The graph is simple by Fact 8.3. Hence, by Assertion (i) for , it holds that . Since is simple, and are simple by Fact 8.3 and Assertion (vi) applies. It follows that . Hence, by Definition 8.5, as was arbitrary, .
Claim 8.8. The relation satisfies Assertion (ii) of Theorem 3.6.
Proof of Claim. Suppose that for . Let . Let be arbitrary. Then by Definition 8.5. Since is simple by Fact 8.3, Assertion (ii) applies and . As was arbitrary, by Definition 8.5, .
Claim 8.9. The relation satisfies Assertion (iii) of Theorem 3.6.
Proof of Claim. Suppose that for . Let be arbitrary. By Definition 8.5, . Since is simple by Fact 8.3, it cancels from both sides by Assertion (iii), as desired.
Claim 8.10. The relation satisfies Assertion (iv) of Theorem 3.6.
Proof of Claim. Suppose that for and . Let be arbitrary. By Definition 8.5, . Since is simple by Fact 8.3, Assertion (iv) applies and cancels from both sides, as desired.
Claim 8.11. The relation satisfies Assertion (v) of Theorem 3.6.
Proof of Claim. Let . Suppose that, for all , there exist and graphs such that and . Let be arbitrary. Let and choose , and as above. By Definition 8.5 applied with and distributivity,
By Lemma 3.5, is a homomorphism indistinguishability relation. Hence, by Equation (6), implies that . The graphs , , , and are simple by Fact 8.3. As was arbitrary, Assertion (v) yields . Since was arbitrary, by Definition 8.5, establishing the conclusion of Assertion (v) of Theorem 3.6.
By Claims 8.7 to 8.11 and Theorem 3.6, is a homomorphism indistinguishability relation over a componental class of looped-simple graphs. Moreover, satisfies the condition of Lemma 8.4: if for all , then, for every , applying Assertion (vi) to the graphs and , which are simple by Fact 8.3, yields , i.e. . By Lemma 8.4, is a homomorphism indistinguishability relation over the class of simple graphs in , cf. its proof. It remains to observe that via Claim 8.6 the relations and coincide on simple graphs.
9. Material omitted in Section 4
9.1. Homomorphism distinguishing topology as Zariski topology
Before turning to the elementary perspective of Section 4, we relate the homomorphism distinguishing topology to the Zariski topology on the semiring algebras of Section 3.
For a subset P of or of , let
Lemma 9.1. For a componental graph class , the following are equivalent.
(i) is homomorphism distinguishing closed, i.e., ,
(ii) there exists an ideal such that ,
(iii) there exists an ideal such that .
(iv) there exists a set such that ,
(v) there exists a set such that .
Furthermore, for a componental class of simple graphs, the following are equivalent:
(vi) is homomorphism distinguishing closed, i.e., ,
(vii) there exists a set such that ,
(viii) there exists a set such that .
Proof. (ii) (iv) and (iii) (v) hold as every ideal is in particular a subset.
(iv) (i) and (v) (i). Let . By definition, for all graphs with . Hence, every satisfies for all such , that is, . The reverse inclusion holds by the definition of .
(i) (ii) and (i) (iii). Since is componental, by (3). Hence, (5) yields both directions of (15) and (4) yields (16), so that is a torsion-free cancellative congruence on . By Proposition 6.1, the set is an ideal of with
Therefore, by the definition of .
For (iii), note that is a graph isomorphism relaxation satisfying Equations (6) to (9), the last by (5). By Lemma 6.15, there is an ideal of such that if, and only if, , so that as before.
Finally, let be componental. Note that the ideals constructed above satisfy and without any assumption on , since this only used the definitions of , , and . Hence, by (32),
so (vi) implies (vii) and (viii). Conversely, let for a set or . As above, for all with , so every satisfies for all such . By (32), , and the reverse inclusion holds by the definition of .
Lemma 9.1 shows that the homomorphism distinguishing topology (on or ) is the subspace topology of the Zariski topology of or on the subspace . In particular, it is indeed a topology.
9.2. The homomorphism distinguishing topology is a topology
In this section, we give an elementary proof of the fact that the homomorphism distinguishing topology on Z forms a topology. To that end, Roberson [28] observed that is a closure operator, i.e., for all graph classes with ,
We require the following lemma.
Lemma 9.2 ([33, Theorem 7]). If is componental, then is componental.
Lemma 4.3. If are homomorphism distinguishing closed componental graph classes, then is homomorphism distinguishing closed.
Proof. Let . By Lemma 9.2, cf. [11, Corollary 7.1.5], it suffices to construct, for every connected graph , two graphs and such that and .
Let be connected. This implies that and . By assumption, there exist graphs , such that , , , and .
We combine these two pairs of graphs into one pair of graphs with the desired properties. Let and . By Equations (4) and (5), for every connected graph , it holds that if, and only if,
It follows that and .
The following corollary allows us to compute the homomorphism distinguishing closure of a sum of two componental graph classes as the sum of their closures.
Corollary 9.3. For componental graph classes , it holds that
Proof. By (34), . By Lemma 9.2, and are componental. By Lemma 4.3, is homomorphism distinguishing closed and thus
Conversely, by (35). By Lemma 9.2, .
9.3. Topological properties
Proposition 4.6. The homomorphism distinguishing topology is Fréchet, i.e., all singletons are closed. In particular, every essentially finite componental graph class is homomorphism distinguishing closed.
The proof of Proposition 4.6 requires the following theorem.
Theorem 9.4 (Lovász [1] and Chaudhuri & Vardi [59]). Two graphs are isomorphic if, and only if, for all graphs , it holds that .
Proof of Proposition 4.6. Let be a connected graph. We show that the componental graph class generated by is homomorphism distinguishing closed. That is, for every graph not in this class, there exist graphs and such that and .
By Lemma 9.2, it suffices to consider a connected graph such that . By Theorem 9.4, there exists a graph such that . Consider the graphs and . Then by Equations (4) and (5). Moreover, since . The final assertion now follows from Lemma 4.3.
Proposition 4.7. The homomorphism distinguishing topology is disconnected and non-compact.
Proof. In order to show that our topology is disconnected, we must exhibit a non-trivial clopen set. In other words, by [60, Lemma 1.1], we must find a non-trivial idempotent in . We use the identity , which yields the non-trivial idempotent . In particular, the sets and are closed by Lemma 9.1 and disjoint. They are the componental graph classes of bipartite and non-bipartite graphs respectively.
A further example is given by the idempotent , which shows that the set of all graphs with at least one edge is closed; hence is open, and it is closed by Proposition 4.6, thus clopen.
For non-compactness, we recast the proof of [28, Theorem 6.15], which shows that, for every , the componental graph class generated by the complete graphs with is homomorphism distinguishing closed. Write . The family of (closed) sets for has the finite intersection property, i.e., any finite subfamily has non-empty intersection. However, the intersection is empty.
A. Möbius inversion over the Boolean lattice
For the reader’s convenience, we state the fact about Möbius inversion underlying the proof of Lemma 6.28. It is the instance of the Möbius inversion formula [61, Proposition 3.7.1] for the Boolean lattice , whose Möbius function is , and it is equivalent to the principle of inclusion-exclusion.
Lemma A.1 ([61, Example 3.8.3]). Let X be a finite set and let . The following are equivalent:
(i) for all ,
(ii) for all .
References
[1] László Lovász. 'Operations with structures'. In: Acta Mathematica Academiae Scientiarum Hungarica 18.3 (1967), pp. 321–328. DOI: 10.1007/BF02280291 (cit. on pp. 2, 23, 24, 28, 29, 38).
[2] Albert Atserias, Phokion G. Kolaitis, & Wei-Lin Wu. 'On the Expressive Power of Homomorphism Counts'. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021. Rome, Italy, 2021, pp. 1–13. DOI: 10.1109/LICS52264.2021.9470543 (cit. on pp. 2, 3, 10, 11, 30, 31).
[3] László Lovász & Alexander Schrijver. 'Dual graph homomorphism functions'. In: Journal of Combinatorial Theory, Series A 117.2 (2010), pp. 216–222. DOI: 10.1016/j.jcta.2009.04.006 (cit. on pp. 4, 7, 11, 12, 24).
[4] Martin Grohe & Pascal Schweitzer. 'The Graph Isomorphism Problem'. In: Commun. ACM 63.11 (2020). Place: New York, NY, USA, pp. 128–134. DOI: 10.1145/3372123 (cit. on p. 1).
[5] Sandra Kiefer. 'The Weisfeiler–Leman algorithm: an exploration of its power'. In: ACM SIGLOG News 7.3 (2020), pp. 5–27. DOI: 10.1145/3436980.3436982 (cit. on p. 2).
[6] Martin Grohe. 'The Logic of Graph Neural Networks'. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS. Rome, Italy: IEEE, 2021, pp. 1–17. DOI: 10.1109/LICS52264.2021.9470677 (cit. on p. 2).
[7] Keyulu Xu, Weihua Hu, Jure Leskovec, & Stefanie Jegelka. 'How Powerful are Graph Neural Networks?' In: International Conference on Learning Representations. 2019. URL: https://openreview.net/forum?id=ryGs6iA5Km (cit. on p. 2).
[8] Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, & Martin Grohe. 'Weisfeiler and Leman Go Neural: Higher-Order Graph Neural Networks'. In: Proceedings of the AAAI Conference on Artificial Intelligence 33 (2019), pp. 4602–4609. DOI: 10.1609/aaai.v33i01.33014602 (cit. on p. 2).
[9] Albert Atserias, Laura Mančinska, David E. Roberson, Robert Šámal, Simone Severini, & Antonios Varvitsiotis. 'Quantum and non-signalling graph isomorphisms'. In: J. Comb. Theory, Ser. B 136 (2019), pp. 289–328. DOI: 10.1016/j.jctb.2018.11.002 (cit. on p. 2).
[10] Martin Grohe. 'Some Thoughts on Graph Similarity'. In: Principles of Verification: Cycling the Probabilistic Landscape: Essays Dedicated to Joost-Pieter Katoen on the Occasion of His 60th Birthday, Part I. Ed. by Nils Jansen, Sebastian Junges, Benjamin Lucien Kaminski, Christoph Matheja, Thomas Noll, Tim Quatmann, Mariëlle Stoelinga, & Matthias Volk. Cham: Springer Nature Switzerland, 2025, pp. 369–392. DOI: 10.1007/978-3-031-75783-9_15 (cit. on p. 2).
[11] Tim Seppelt. 'Homomorphism Indistinguishability'. Dissertation. Aachen: RWTH Aachen University, 2024. DOI: 10.18154/RWTH-2024-11629 (cit. on pp. 2, 9, 11, 28, 38).
[12] Laura Mančinska & David E. Roberson. 'Quantum isomorphism is equivalent to equality of homomorphism counts from planar graphs'. In: IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS). 2020, pp. 661–672. DOI: 10.1109/FOCS46700.2020.00067 (cit. on p. 2).
[13] Zdeněk Dvořák. 'On recognizing graphs by numbers of homomorphisms'. In: Journal of Graph Theory 64.4 (2010), pp. 330–342. DOI: 10.1002/jgt.20461 (cit. on p. 2).
[14] Holger Dell, Martin Grohe, & Gaurav Rattan. 'Lovász Meets Weisfeiler and Leman'. In: 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018). Ed. by Ioannis Chatzigiannakis, Christos Kaklamanis, Dániel Marx, & Donald Sannella. Vol. 107. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018, 40:1–40:14. DOI: 10.4230/LIPIcs.ICALP.2018.40 (cit. on p. 2).
[15] Georg Schindling. 'Homomorphism Indistinguishability and Game Comonads for Restricted Conjunction and Requantification'. In: 50th International Symposium on Mathematical Foundations of Computer Science, MFCS 2025, August 25-29, 2025, Warsaw, Poland. Ed. by Pawel Gawrychowski, Filip Mazowiecki, & Michal Skrzypczak. Vol. 345. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025, 89:1–89:19. DOI: 10.4230/LIPICS.MFCS.2025.89 (cit. on pp. 2, 3).
[16] Yoav Montacute & Nihil Shah. 'The Pebble-Relation Comonad in Finite Model Theory'. In: Logical Methods in Computer Science Volume 20, Issue 2 (2024). DOI: 10.46298/lmcs-20(2:9)2024 (cit. on p. 2).
[17] Anuj Dawar, Tomáš Jakl, & Luca Reggio. 'Lovász-Type Theorems and Game Comonads'. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS. IEEE, 2021, pp. 1–13. DOI: 10.1109/LICS52264.2021.9470609 (cit. on pp. 2, 4).
[18] Isolde Adler, Eva Fluck, Tim Seppelt, & Gian Luca Spitzer. 'Going deep and going wide: Counting logic and homomorphism indistinguishability over graphs of bounded treedepth and treewidth'. In: Logical Methods in Computer Science Volume 22, Issue 2 (2026). DOI: 10.46298/1mcs-22(2:33)2026 (cit. on pp. 2, 3).
[19] Tim Seppelt & Gian Luca Spitzer. Homomorphism Indistinguishability Relations induced by Quantum Groups. arXiv:2505.07922 [quant-ph]. 2025. DOI: 10.48550/arXiv.2505.07922 (cit. on p. 2).
[20] Prem Nigam Kar, David E. Roberson, Tim Seppelt, & Peter Zeman. 'NPA Hierarchy for Quantum Isomorphism and Homomorphism Indistinguishability'. In: Quantum 10 (2026), p. 1989. DOI: 10.22331/q-2026-01-28-1989 (cit. on p. 2).
[21] David E. Roberson & Tim Seppelt. 'Lasserre Hierarchy for Graph Isomorphism and Homomorphism Indistinguishability'. In: TheoreticCS Volume 3 (2024), p. 12321. DOI: 10.46298/theoretics.24.20 (cit. on pp. 2, 3).
[22] Samson Abramsky, Tomáš Jakl, & Thomas Paine. 'Discrete Density Comonads and Graph Parameters'. In: Coalgebraic Methods in Computer Science. Ed. by Helle Hvid Hansen & Fabio Zanasi. Cham: Springer International Publishing, 2022, pp. 23–44. DOI: 10.1007/978-3-031-10736-8_2 (cit. on pp. 2, 4, 5).
[23] Bohang Zhang, Jingchu Gai, Yiheng Du, Qiwei Ye, Di He, & Liwei Wang. 'Beyond Weisfeiler–Lehman: A Quantitative Framework for GNN Expressiveness'. In: The Twelfth International Conference on Learning Representations. 2024. URL: https://openreview.net/forum?id=HSKaG0i7Ar (cit. on pp. 2, 3).
[24] Jingchu Gai, Yiheng Du, Bohang Zhang, Haggai Maron, & Liwei Wang. 'Homomorphism Expressivity of Spectral Invariant Graph Neural Networks'. In: The Thirteenth International Conference on Learning Representations. 2025. URL: https://openreview.net/forum?id=rdv6yeMFpn (cit. on pp. 2, 3).
[25] Tim Seppelt. 'An Algorithmic Meta Theorem for Homomorphism Indistinguishability'. In: 49th International Symposium on Mathematical Foundations of Computer Science (MFCS 2024). Ed. by Rastislav Královič & Antonín Kučera. Vol. 306. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024, 82:1–82:19. DOI: 10.4230/LIPIcs.MFCS.2024.82 (cit. on pp. 2, 11).
[26] Marek Černý & Tim Seppelt. 'Homomorphism Indistinguishability, Multiplicity Automata Equivalence, and Polynomial Identity Testing'. In: 43rd International Symposium on Theoretical Aspects of Computer Science (STACS 2026). Ed. by Meena Mahajan, Florin Manea, Annabelle McIver, & Nguyễn Kim Tháng. Vol. 364. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026, 25:1–25:20. DOI: 10.4230/LIPIcs.STACS.2026.25 (cit. on pp. 2, 11).
[27] Radu Curticapean, Daniel Neuen, Amir Nikabadi, Tim Seppelt, & Ben Young. A Dense Weisfeiler–Leman Algorithm for Deciding Bounded-Cliquewidth Homomorphism Indistinguishability. 2026. arXiv: 2608.13382 [cs.L0]. URL: https://arxiv.org/abs/2608.13382 (cit. on p. 2).
[28] David E. Roberson. 'Oddomorphisms and homomorphism indistinguishability over graphs of bounded degree'. In: Journal of Combinatorial Theory, Series B 181 (2026), pp. 1–61. DOI: 10.1016/j.jctb.2026.07.003 (cit. on pp. 2, 3, 5, 9, 10, 34, 37, 39).
[29] Daniel Neuen & Tim Seppelt. 'Distinguishing Graphs by Counting Homomorphisms from Sparse Graphs'. In: 41st Annual Symposium on Logic in Computer Science (LICS 2026). Ed. by Claudia Faggian & Joost-Pieter Katoen. Vol. 380. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026, 75:1–75:29. DOI: 10.4230/LIPIcs.LICS.2026.75 (cit. on pp. 2, 3).
[30] Andrea Jiménez, Benjamin Moore, Daniel A. Quiroz, & Youngho Yoo. Homomorphism counting for immersion-closed classes is not isomorphism. arXiv:2602.08738 [math]. 2026. DOI: 10.48550/arXiv.2602.08738 (cit. on pp. 2, 3).
[31] Arnar Á Kristjánsson. Oddomorphisms, Split-Off Minors, and the Strong Roberson Conjecture. arXiv:2607.03405 [cs.DM]. 2026. DOI: 10.48550/arXiv.2607.03405 (cit. on pp. 2, 3).
[32] Arnar Á Kristjánsson. Counterexamples to the Strong Roberson Conjecture. arXiv:2610.03550 [math.CO]. 2026. DOI: 10.48550/arXiv.2610.03550 (cit. on pp. 2, 3, 11).
[33] Tim Seppelt. 'Logical equivalences, homomorphism indistinguishability, and forbidden minors'. In: Information and Computation 301 (2024), p. 105224. DOI: 10.1016/j.ic.2024.105224 (cit. on pp. 2–5, 10, 11, 29–31, 38).
[34] Moritz Lichter, Benedikt Pago, & Tim Seppelt. 'Limitations of Game Comonads for Invertible-Map Equivalence via Homomorphism Indistinguishability'. In: 32nd EACSL Annual Conference on Computer Science Logic (CSL 2024). Ed. by Aniello Murano & Alexandra Silva. Vol. 288. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024, 36:1–36:19. DOI: 10.4230/LIPIcs.CSL.2024.36 (cit. on p. 2).
[35] Pierre Botteron & Moritz Weber. Communication Complexity of Graph Isomorphism, Coloring, and Distance Games. arXiv:2406.02199 [math-ph, physics:quant-ph]. 2024. URL: http://arxiv.org/abs/2406.02199 (cit. on pp. 2, 9, 29, 30).
[36] Radu Curticapean, Holger Dell, & 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. New York, NY, USA: Association for Computing Machinery, 2017, pp. 210–223. DOI: 10.1145/3055399.3055502 (cit. on pp. 3, 8, 23, 28, 29).
[37] Hubie Chen & Stefan Mengel. 'Counting Answers to Existential Positive Queries: A Complexity Classification'. In: Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems. San Francisco California USA: ACM, 2016, pp. 315–326. DOI: 10.1145/2902251.2902279 (cit. on pp. 3, 8).
[38] Marc Roth. 'Parameterised counting complexity theory'. In: Computer Science Review 59 (2026), p. 100837. DOI: 10.1016/j.cosrev.2025.100837 (cit. on pp. 3, 8, 23).
[39] László Lovász. Large networks and graph limits. American Mathematical Society colloquium publications volume 60. Providence, Rhode Island: American Mathematical Society, 2012. DOI: 10.1090/coll/060 (cit. on pp. 3–5, 23–25, 32, 33).
[40] Jaroslaw Kwiecien, Jerzy Marcinkowski, & Piotr Ostropolski-Nalewaja. 'Determinacy of Real Conjunctive Queries. The Boolean Case'. In: Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems. Philadelphia, PA, USA: Association for Computing Machinery, 2022, pp. 347–358. DOI: 10.1145/3517804.3524168 (cit. on pp. 3, 11).
[41] Michael Freedman, László Lovász, & Alexander Schrijver. 'Reflection positivity, rank connectivity, and homomorphism of graphs'. In: Journal of the American Mathematical Society 20 (2007), pp. 37–51. DOI: 10.1090/S0894-0347-06-00529-7 (cit. on p. 4).
[42] László Lovász & Alexander Schrijver. 'Semidefinite Functions on Categories'. In: Electron. J. Comb. 16.2 (2009). DOI: 10.37236/80 (cit. on pp. 4, 11).
[43] Jeroen Zuiddam. 'The Asymptotic Spectrum of Graphs and the Shannon Capacity'. In: Combinatorica 39.5 (2019), pp. 1173–1184. DOI: 10.1007/s00493-019-3992-5 (cit. on pp. 4, 11).
[44] V. Strassen. 'The asymptotic spectrum of tensors'. In: Journal für die reine und angewandte Mathematik 1988.384 (1988), pp. 102–152. DOI: 10.1515/cr11.1988.384.102 (cit. on p. 4).
[45] Tobias Fritz. 'A unified construction of semiring-homomorphic graph invariants'. In: Journal of Algebraic Combinatorics 54.3 (2021), pp. 693–718. DOI: 10.1007/s10801-020-00983-y (cit. on p. 4).
[46] Stanislaw M. Ulam. A collection of mathematical problems. Interscience tracts in pure and applied mathematics 8. New York: Interscience Publishers, 1960. URL: https://catalog.hathitrust.org/Record/000007122 (cit. on p. 9).
[47] Paul J. Kelly. 'A congruence theorem for trees'. In: Pacific Journal of Mathematics 7.1 (1957), pp. 961–968 (cit. on p. 9).
[48] Daniel Neuen. 'Homomorphism-Distinguishing Closedness for Graphs of Bounded Tree-Width'. In: 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024). Ed. by Olaf Beyersdorff, Mamadou Moustapha Kanté, Orna Kupferman, & Daniel Lokshtanov. Vol. 289. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024, 53:1–53:12. DOI: 10.4230/LIPIcs.STACS.2024.53 (cit. on p. 10).
[49] Wilfried Imrich & Herbert Izbicki. 'Associative products of graphs'. In: Monatshefte für Mathematik 80.4 (1975), pp. 277–281. DOI: 10.1007/BF01472575 (cit. on p. 11).
[50] Wilfried Imrich, Igor Klep, & Daniel Smertnig. 'Monoid algebras and graph products'. In: The Art of Discrete and Applied Mathematics 8.1 (2025), #P1.11. DOI: 10.26493/2590-9770.1816.e85 (cit. on p. 11).
[51] Nicolas Campanelli, Martín Eduardo Frías-Armenta, & Jose Luis Martinez-Morales. 'Graph products and characterization by rings'. In: Boletín de la Sociedad Matemática Mexicana 23.2 (2017), pp. 527–535. DOI: 10.1007/s40590-015-0081-7 (cit. on p. 11).
[52] Anuj Dawar. 'Homomorphism Counts to Trees'. In: Discrete Mathematics & Theoretical Computer Science 27:3 (2025). DOI: 10.46298/dmtcs.13682 (cit. on p. 11).
[53] The Stacks project authors. The Stacks project. https://stacks.math.columbia.edu. 2026 (cit. on pp. 16, 18, 20, 33).
[54] Serge Lang. 'Hilbert's Nullstellensatz in infinite-dimensional space'. In: Proc. Am. Math. Soc. 3 (1952), pp. 407–410. URL: https://www.jstor.org/stable/2031893 (cit. on p. 18).
[55] A. Bernhard Zeidler. 'Infinite versions of Hilbert's Nullstellensatz'. In: Communications in Algebra 54.3 (2026), pp. 968–974. DOI: 10.1080/00927872.2025.2542548 (cit. on p. 18).
[56] Xuding Zhu. 'The fractional version of Hedetniemi's conjecture is true'. In: European Journal of Combinatorics 32.7 (2011), pp. 1168–1175. DOI: 10.1016/j.ejc.2011.03.004 (cit. on p. 31).
[57] L. Lovász. 'On the cancellation law among finite relational structures'. In: Periodica Mathematica Hungarica 1.2 (1971), pp. 145–156. DOI: 10.1007/BF02029172 (cit. on p. 33).
[58] Richard Hammack, Wilfried Imrich, & Sandi Klavžar. Handbook of Product Graphs. oth ed. CRC Press, 2011. DOI: 10.1201/b10959 (cit. on p. 33).
[59] Surajit Chaudhuri & Moshe Y. Vardi. 'Optimization of Real Conjunctive Queries'. In: Proceedings of the Twelfth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. Ed. by Catriel Beeri. ACM Press, 1993, pp. 59–70. DOI: 10.1145/153850.153856 (cit. on p. 38).
[60] James S. Milne. Basic Theory of Affine Group Schemes. 2012. URL: https://www.jmilne.org/math/CourseNotes/AGS.pdf (cit. on p. 39).
[61] Richard P. Stanley. Enumerative combinatorics. Cambridge studies in advanced mathematics 49, 62. Cambridge ; New York: Cambridge University Press, 1997 (cit. on p. 39).