Abstract 1 Introduction 2 Related Work 3 Background 4 The Counting Logic Formula Size Game 5 Game Characterization Theorem 6 Distinguishing Linear Orders with Counting Logics 7 Proof of Theorem 16 8 Conclusion and Perspectives References Appendix A Proof of Theorem 10 Appendix B Proof of Theorem 14 Appendix C Proof of the lemmas of Section 7

A Game for Counting Logic Formula Size and an Application to Linear Orders

Grégoire Fournier ORCID University of Illinois at Chicago, IL, USA György Turán ORCID University of Illinois at Chicago, IL, USA
HUN-REN-SZTE Research Group on AI, Szeged, Hungary
Abstract

Ehrenfeucht–Fraïssé (EF) games are a basic tool in finite model theory for proving definability lower bounds, with many applications in complexity theory and related areas. They have been applied to study various logics, giving insights on quantifier rank and other logical complexity measures. In this paper, we present an EF game to capture formula size in counting logic with a bounded number of variables. The game combines games introduced previously for counting logic quantifier rank due to Immerman and Lander, and for first-order formula size due to Adler and Immerman, and Hella and Väänänen. The game is used to prove an extension of a formula size lower bound of Grohe and Schweikardt for distinguishing linear orders, from 3-variable first-order logic to 3-variable counting logic.

Keywords and phrases:
Finite Model Theory, Logical Aspects of Computational Complexity
Copyright and License:
[Uncaptioned image] © Grégoire Fournier and György Turán; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Finite Model Theory
; Theory of computation Models of learning ; Theory of computation Complexity theory and logic
Related Version:
Full Version: https://arxiv.org/abs/2505.16185
Funding:
Support from grants NSF 2217023 and NSF 2240532 is acknowledged. Support from Project 2024-1.2.3-HU-RIZONT-2024-00017 is acknowledged, financed by the Ministry of Culture and Innovation of Hungary from the National Research, Development and Innovation Fund, under the a 2024-1.2.3-HU-RIZONT funding scheme.
Editors:
Stefano Guerrini and Barbara König

1 Introduction

Ehrenfeucht–Fraïssé (EF) games [11, 7] are a basic tool of finite model theory for proving definability lower bounds [26, 6]. Combined with logical characterizations of complexity classes, they provide a logic-based approach to problems in complexity theory. The original form of EF games gives bounds for quantifier rank in first-order logic. The games have been extended and modified for many logics and formula complexity measures. An EF game for formula size in first-order logic (FO) is given by Hella and Väänänen [19], building on Adler and Immerman [1]. In what follows, we refer to this game as the HV-game.

Counting logic extends first-order logic by adding the counting quantifier k, and is frequently used in complexity theory and combinatorics. Counting logic turns out to be relevant for understanding the computational power of graph neural networks (Gnn) as well [12]. An EF game for distinguishing graphs in counting logic with a bounded number of variables is formulated by Immerman and Lander [22]. It extends the basic EF setup by an additional phase in each round involving the choice of subsets of the same cardinality in the two structures.

In this paper, we formulate a game for capturing formula-size complexity for counting logic. The game is a combination of the Immerman-Lander and Hella-Väänänen games. Restricted versions characterize formula size for fragments of counting logic where the number of variables and the counting rank are bounded. The game for formulas with a bounded number of variables could be a useful tool for exploring the implications of the logical characterization of Gnns (Barceló et al. [2]).

While the standard EF game is played on two structures, the HV game is played on two sets of structures, referred to in this paper as families. Grohe and Schweikardt [14] prove a formula size lower bound for linear orders for the 3-variable fragment of first-order logic, using this technique implicitly. They show that every first-order 3-variable formula that distinguishes a linear order of size n from a larger one has size Ω(n). Their proof is based on the notion of a separator and an involved weighting technique, which allows for a refined analysis of the syntax tree of a formula, by gauging the progress made in subformulas of a distinguishing formula. The proof is a detailed case analysis, with numerous subcases required to deal with quantifiers.

The formula size characterization is given in Theorem 10. The main result of the paper is that every 3-variable counting logic formula with counting rank t distinguishing a linear order of size n from a larger one has size at least n/t (Theorem 16). This result extends the result of [14] from first-order logic to counting logic. The theorem is proved using the game characterization. There is a simple distinguishing formula of size n/t (Proposition 15). For the case t=1, i.e., for 3-variable FO, our result improves the formula size lower bound of [14] from n/2 to n.

The proof of Theorem 16 adapts the framework of [14]. The main difference is in the most technical part, the quantifier case. We present the main lemma dealing with this case, with proofs of lemmas used in this proof given in the appendix. Other lemmas used in the lower bound are stated without proof due to lack of space.

The paper is structured as follows. After reviewing related work in Section 2, we describe the counting and HV games in Section 3. Section 4 describes the game and Section 5 gives the correspondence between the game and counting logic formula size. Section 6 contains the application on linear orders, with the proof of the lower bound in Section 7. The proof of the main lemma on counting quantifiers is presented separately in Section 7.3 and additional details are given in Appendix C. Section 8 contains further remarks.

2 Related Work

Counting logic has been discussed in several different forms. Grohe [12] defines counting logic 𝒞 as first-order logic (FO) extended by counting quantifiers of the form kx, and 𝒞m as its fragment using at most m variables. This is the counting logic we consider in this paper. Previous work using this kind of counting logic includes Immerman and Lander [22] and Cai et al. [3]. Grohe [13], on the other hand, considers a more powerful counting logic, where formulae can include arithmetic operations on the number of elements satisfying a formula (see also Kuske and Schweikardt [25]).

EF games using sets of structures, capturing the number of quantifiers as opposed to quantifier rank, have been proposed by Immerman [20]. These multi-structural (MS) games receive increasing current attention (Fagin et al. [10], Carmosino et al. [4], Vinall-Smeeth [32]). HV games are essentially extensions of MS games, also modelling Boolean connectives in the formulae.

A graph neural network (Gnn) is a variant of neural networks for machine learning problems involving graphs [31]. Such a network allows the use of deep learning techniques to classify graphs (graph classification), or to classify the nodes of a large graph (node classification). The computational power of Gnn is closely related to the Weisfeiler–Leman (WL) graph isomorphism algorithm (Morris et al. [27], Xu et al. [33]). The connection of the WL algorithm to counting logic with a bounded number of variables [3, 12] brings these logics into the Gnn picture as well. Barceló et al. [2] gave logical characterizations in terms of counting logic with a bounded number of variables using results established in modal logic (Otto [29]). The complexity aspects of the characterizations are not discussed in [2], and studying this aspect (also pointed out in Grohe [12]) has been a motivation for the topic of this paper (a brief further discussion is given at the end of the paper).

The Gnn characterizations of Grohe [13] establish a connection of Gnn to threshold circuits, a Boolean circuit model of neural networks. The computational power of such circuits corresponds to counting logic with an arbitrary built-in predicate. Proving superpolynomial lower bounds for threshold circuits is an open problem. Hajnal et al. [15, 16] prove an exponential lower bound for depth-2 circuits with polynomial weights. The same papers prove a quantifier rank lower bound for counting logic with successor as the built-in relation. Similar results are also given in Etessami [8, 9]. Karchmer and Wigderson [24] formulate an approach, related to HV games, to proving monotone formula depth lower bounds. They also prove a depth version of the Krapchenko formula size lower bound. Krapchenko’s Theorem is proved in [19] as an application of HV games.

General background for the topic of this paper is given in Immerman [21], Ebbinghaus and Flum [6], Libkin [26], Otto [28] and Hamilton [17].

3 Background

In this section we introduce basic notation used in the paper and review EF and HV games.

3.1 Basic Definitions

3.1.1 Logics

We consider relational structures over a fixed vocabulary. Counting logic 𝒞 is obtained by extending first-order logic with counting quantifiers kxϕ(x) and kxϕ(x). Here kxϕ(x) means that there are at least k distinct assignments to the variable x that satisfy ϕ. Thus kϕ(x) is logically equivalent to x1xk(iϕ(xi)i,jxixj). The quantifier kxϕ(x) stands for ¬kx¬ϕ(x). In kxϕ(x) and kxϕ(x), k is referred to as the counting rank of the quantifier. The counting rank of a formula is the maximum counting rank of its quantifiers.

As a counting quantifier can be replaced by standard quantifiers, adding counting quantifiers does not change the expressivity of first-order logic. It does, however, impact the succinctness, the minimum size of formulae expressing a property. In applications to finite model theory one usually considers a sequence (𝒜n,n) of pairs of structures. Complexity bounds to be proven are also functions of n. Note that kxφ(x) is equivalent to nk+1xφ(x) for an n-element structure. The transformation increases counting rank and thus it cannot be used in formula size bounds for the bounded counting rank case.

Parameters to be considered are the bounds m on the number of variables, t on the counting rank, and w on formula size. The fragment of 𝒞 containing at most m variables is denoted by 𝒞m, and by 𝒞mt if, in addition, counting rank is at most t.

3.1.2 Structures and Families

The universe of a structure 𝒜 is denoted by 𝒰𝒜. We use xj, j, to denote variables. A variable assignment for a structure 𝒜 is a finite partial mapping α:Var𝒰𝒜, where Var is the set of variables. The finite domain of α is denoted by dom(α).

An interpretation is a pair (𝒜,α). For a formula ϕ, (𝒜,α)ϕ means that the assignment α satisfies the formula ϕ in the structure 𝒜, with dom(α) containing all the j for which the variable xj is free in ϕ. A formula ϕ distinguishes interpretations (𝒜,α) and (,β), denoted by ((𝒜,α),(,β))ϕ, if (𝒜,α)ϕ and (,β)¬ϕ.

A family A𝒜,D is a set of interpretations {(𝒜,αi):iΓ} where 𝒜 and D=dom(αi) for every i and Γ is some set. When the context is clear, we drop the subscript. We write (A,B)ϕ to express that for all (𝒜,α)A (,β)B it holds that ((𝒜,α),(,β))ϕ, and we say that ϕ distinguishes (A,B). For a structure 𝒜, we denote by A0 the family {(𝒜,)}, containing a single interpretation with the empty assignment.

3.1.3 Operations

If α is an assignment on 𝒜, a𝒰𝒜 and j, then α(a/j) is the assignment that maps xj to a and agrees with α otherwise.

Given a family A, a choice function is of the form F:A𝒰𝒜. The set of all choice functions on the family A is denoted by FA. We define two operations on families [19].

  • Change: Given a family A, a choice function FFA and j, the change operation on A with F for the variable xj produces the family

    A(F/j):={(𝒜,α(F(𝒜,α)/j)):(𝒜,α)A}.

    In the new family, the assignment to xj is changed based on the choice function F. If jD then xj is a new variable, and D is updated to D{j}. Thus a change operation may either leave the domain unchanged or add a new element to it.

  • Multiplication: Given a family A and j, the multiplication operation A for the variable xj produces the family

    A(/j):={(𝒜,α(a/j)):(𝒜,α)A,a𝒰𝒜}.

    The new family consists of interpretations with xj assigned to all possible values in 𝒰𝒜. Here, again, the domain is either unchanged or a new element is added to it.

3.1.4 Formula Complexity

The size of a formula is defined inductively: if ϕ is an atomic formula, |ϕ|=1; and for formulae ϕ,ψ, |¬ϕ|=|ϕ|+1; |ϕψ|=|ϕψ|=|ϕ|+|ψ|; |kxjϕ|=|kxjϕ|=1+|ϕ|.

3.2 Review of Games

In this section we review the counting logic game [22] and the first-order logic formula size game [19], referred to as the HV game.

Definition 1 (r-round IL m-pebbling game).

The game IL(𝒜,) is played on two relational structures 𝒜 and . There are two players, Spoiler and Duplicator, and m pairs of pebbles (ai,bi) for i[m]. It goes as follows:

  • For r rounds:

    • Spoiler picks a set of elements S1 of 𝒜 or and a number i[m]. Duplicator selects a set S2 of elements of the same cardinality in the other structure.

    • Spoiler picks an element in S2 and Duplicator selects an element in S1. The pebble ai (resp., bi) holds the value of the element picked in 𝒜 (resp., ).

  • The r-round game ends in the position a=(a1,,am), b=(b1,,bm). Duplicator wins if the mapping from ((a,c𝒜) to (b,c)) is a partial isomorphism between 𝒜 and , where c denotes the constants of the language.

Theorem 2.

The following are equivalent:

  • 𝒜 and satisfy the same sentences of 𝒞m of quantifier rank at most r.

  • Duplicator has a winning strategy in the r-round m-pebbling game.

A similar result holds for the bounded counting rank fragment 𝒞mt, by restricting the cardinality of the sets picked to be at most t.

Figure 1: Two families, A={(𝒜,α)} and B={(,β)}, for the z move in the HV-game.
Definition 3 (HV game for formula size on first-order logic).

The game HV(A,B)w is played on two families, A and B, by Spoiler and Duplicator, for a positive integer w. The initial position is (w,A,B). Spoiler chooses one of five possibilities for the continuation of the game:

  • ¬-move: the game continues from the position (w1,B,A).

  • -move: Spoiler chooses 1u,v<w such that u+v=w and partitions A to get CD. Duplicator sets the next position as (u,C,B) or (v,D,B), from which the game goes on.

  • -move: similar but played on B.

  • -move: Spoiler chooses j and a choice function F from FA. Then the game continues from (w1,A(F/j),B(/j)).

  • -move: similar but Spoiler chooses on B.

Spoiler wins if the game reaches a position (w,A,B) for w1 and there is an atomic formula that distinguishes A and B. Duplicator wins if the game reaches a position (1,A,B) and Spoiler does not win.

Theorem 4.

Let (A,B) be a pair of families, and let w be a positive integer. Then the following are equivalent:

  1. 1.

    Spoiler has a winning strategy in the game HV(A,B)w.

  2. 2.

    There is a formula ϕ of FO of size |ϕ|w such that (A,B)ϕ.

Note that for any m, one can define the variant of the game HV(A,B)wm, for which the moves and are restricted by j[m]. This game then characterizes FOm, the fragment of FO logic, with m variables. An illustration of the -move is given in Fig. 1.

In Table 1, we summarize the game characterizations discussed above and the game we are about to introduce.

Table 1: Complexity characterizing games.
FOm 𝒞m
Quantifier Rank [11], [7] ILm [22]
Size HVm [18] CSm (new)

4 The Counting Logic Formula Size Game

In this section we define the game for counting logic formula size. We start by extending the operations of the HV game to this setting.

4.1 Extended Operations

Definition 5 (k-choice function).

Given a family A, a k-choice function is of the form Fk=(F1k,F2k,,Fkk), where each Fik is a choice function, and for every (𝒜,α)A the elements Fik(𝒜,α) are pairwise distinct. The set of all the k-choice functions on the family A is denoted by FAk.

Definition 6 (selection).

A mapping S:FAkFA is a selection if S(Fk)(𝒜,α){F1k(𝒜,α),,Fkk(𝒜,α)} for every (𝒜,α)A. The set of all the selection functions of FAk is denoted by SAk.

The extended set of operations is the following:

  • k-Change: Given a family A and j,k, the k-change operation associated to FkFAk produces the family

    A(Fk/j):={(𝒜,α(Fik(𝒜,α)/j)):(𝒜,α)A,1ik}.

    Thus each interpretation gives rise to k interpretations composing the new family, where the assignments to xj are changed based on the k-choice function Fk.

  • k-Multiplication: Given a family A and j,k, the k-multiplication operation associated to the selection SSAk produces the family

    A(Sk/j):={(𝒜,α(S(Fk)(𝒜,α)/j)):(𝒜,α)A,FkFAk}.

    To avoid overloading the notation, we will keep the S implicit with the notation A(k/j), and use the term “selects” when referring to the action of S.

    In plain language, for every FkFAk and (𝒜,α)A, one interpretation is selected from {(𝒜,α(Fik(𝒜,α)/j)):1ik} to be part of A(k/j). Thus each interpretation generates card(FAk) interpretations that compose the family A(k/j).

4.2 The CS Game

We now define the game for counting logic formula size (referred to as the CS game for “counting formula size”). It is presented in the 𝒞m version, as this will be used in the rest of the paper. The new k-move is illustrated in Fig. 2.

Definition 7 (CS game for formula size on counting logic).

The game CS(A,B)wm has two players, Spoiler and Duplicator, m is the number of variables. A,B are two families with dom(A)=dom(B) of size at most m. Suppose after p moves we reach the position (w,A,B). Depending on Spoiler’s choice, the game continues as follows:

  • ¬-move: the game continues from the position (w1,B,A).

  • -move: Spoiler first chooses numbers u and v such that 1 u,v<w and u+v=w. Then Spoiler partitions A into a pair of families C and D. The game continues either from the position (u, C, B) or from the position (v, D, B) according to Duplicator’s choice.

  • -move: Spoiler first chooses numbers u and v such that 1 u,v<w and u+v=w. Then Spoiler partitions B into a pair of families C and D. The game continues either from the position (u, A, C) or from the position (v, A, D) according to Duplicator’s choice.

  • k-move: Spoiler chooses j[m],k and a k-choice function Fk on A. For every k-choice function Gk on B, Spoiler selects 111Note that formally a selection S chosen by Spoiler is considered here as in Definition 6. G from Gk. The union of the B(G/j) over GkFBk forms B(k/j). Then the game continues from the position (w1, A(Fk/j), B(k/j)).

  • k-move: Spoiler chooses j[m],k and a k-choice function Fk on B. For every k-choice function Gk on A, Spoiler selects G from Gk. The union of the A(G/j) over AkFAk forms A(k/j). Then the game continues from the position (w1, A(k/j), B(Fk/j)).

(Atomic) The game ends in a position (w,A,B) if either there is an atomic formula ϕ such that (A,B)ϕ, in which case Spoiler wins, or, otherwise if w=1 Duplicator wins if there is no such ϕ.

Figure 2: The k-move in the CS game. On the left the k-Change operation: k different elements are chosen by Spoiler. On the right the two steps of the k-Multiplication operation. The first step is to form all k-choice functions (each denoted by a box). In the second step Spoiler picks one interpretation in each box to compose the new family.

In the application to linear orders we use the version of the game for bounded counting rank.

Definition 8 (CS game for 𝒞mt-formula size).

The CS(A,B)wm,t game is the version of the CS(A,B)wm game where kt for the k and k moves.

4.3 An Illustration of the CS Game

In this section we present a small example illustrating the game.

Figure 3: Structures 𝒜 and with relations red and blue, and a possible 2x move.
Example 9.

Consider playing the game CSw01,2 on structures 𝒜 and of 4 and 3 elements respectively with unary relations blue and red, as illustrated in Fig. 3. Formulas of size w0=2 cannot distinguish the structures, as those can only contain a single atomic formula and a quantifier. The sentence 2x(blue(x)red(x)) distinguishes 𝒜 and and is of size w0=3. We show that Spoiler has a winning strategy when w0=3 and illustrate an w0=2 strategy.
Consider the starting position with no assignment CS(A0,B0)31,2. Spoiler starts with an 2x-move and picks the 2-choice function {1,2}, corresponding to two copies of 𝒜, with α(x)=1 and α(x)=2. This is shown on the left of Fig. 3 by showing only the assignments in the two copies.
The 2-choice functions on B are {1,2},{1,3},{2,3}(the three boxes on the right of Fig. 2). Spoiler then selects one of the two possible choices in each box. For example, picking the selection function (1,1,3) (picking 1 from the first and second boxes and 3 from the third box) is a valid choice for Spoiler. To win at this step (bottom of the Fig.), and make w0=2 sufficient for the initial game, Spoiler must distinguish all elements on the left from the element of the right with red or blue in one move, since this is not possible no matter what Spoiler had picked from the three boxes, the game has to go on for Spoiler to be able to win.

From w0=3, in the position shown in the bottom of Fig. 3, w=2, and families {1,2}, {1,3} need to be distinguished. Spoiler can make a move with u=v=1 to get to position (1,{1,2},{1}) on one side, and position (1,{1,2},{3}) on the other side. On the first side, Spoiler wins in u=1 with red and on the other side wins in v=1 with blue.

5 Game Characterization Theorem

In this section, we state the game characterization theorem and formulate some corollaries. The proof of the characterization theorem is given in Appendix A.

Theorem 10 (Characterization Theorem).

Let A,B be families and w be a positive integer. Then the following are equivalent:

  1. 1.

    Spoiler has a winning strategy in the game CS(A,B)wm.

  2. 2.

    There is a 𝒞m formula ϕ of size |ϕ|w such that (A,B)ϕ.

A corollary for structures is as follows:

Corollary 11.

Let 𝒜 and be structures and let w be a positive integer. Then the following conditions are equivalent:

  1. 1.

    Spoiler has a winning strategy in the game CS(A0,B0)wm.

  2. 2.

    There is a 𝒞m-sentence ϕ of size |ϕ|w such that (𝒜,)ϕ.

The game for 𝒞mt can be used to prove analogous results for bounded counting rank.

Corollary 12.

Suppose A and B are families and let w be a positive integer. Then the following are equivalent:

  1. 1.

    Spoiler has a winning strategy in the game CS(A,B)wm,t.

  2. 2.

    There is a 𝒞mt-formula ϕ of size |ϕ|w such that (A,B)ϕ.

The proof is similar to the CS game characterization of 𝒞m formula size presented in Appendix A, but with the aforementioned parameter k bounded, and is omitted.

We derive a variation of the counting game for guarded counting logic [12], where the guarding binary relation is denoted by E. The resulting game is denoted by E-CS(A,B)w 2. By the equivalence between the expressivity of Gnns and guarded counting logic established in [2, Theorem 4.2], we obtain the following corollary linking the distinguishing power of Gnns and the guarded counting game:

Corollary 13.

Let A and B be families and let w be a positive integer. Then the following are equivalent:

  1. 1.

    Spoiler has a winning strategy in the game E-CS(A,B)w 2.

  2. 2.

    There is a Gnn that expresses an FO formula of size w that is capable of distinguishing A from B.

6 Distinguishing Linear Orders with Counting Logics

In the rest of the paper we deal with counting logic definability on linear orders and apply CS games in this context. A linear order is defined over the signature {min,max,<,succ}, where < is a linear ordering. 𝒜n denotes the structure ({0,,n} , <), where < is the standard linear ordering. For a,b, let d(a,b):=|ab| and <-type(a,b) be =,< or > reflecting the order between a and b.

The first result gives a lower bound for the quantifier rank needed to distinguish linear orders in counting logic with bounded counting rank. It extends the standard lower bound for first-order logic (see, e.g., [26]). The proof uses the IL pebble game of Definition 1 with bounded counting rank [22] and is presented in Appendix B. The argument provides intuition for the framework developed for Theorem 16.

Theorem 14.

Let t,k>0, and let n,m(t+1)k. Then 𝒜n and 𝒜m cannot be distinguished by sentences of counting rank at most t and quantifier rank at most k.

We now turn to the problem of distinguishing two linear orders using counting logic sentences with a bounded number of variables and bounded counting rank, starting with an upper bound using two variables.

Proposition 15.

There is a 𝒞2t-sentence of size O(n/t) distinguishing 𝒜n and 𝒜m, where n<m.

Proof.

Consider the formulae:

  • ϕ0(x)=(x=x).

  • ϕt(l+1)(x)=ty((y<x)ϕtl(y)).

  • For n=tl+p with p<t: ϕtl+p(x)=py((y<x)ϕtl(y))

Let ϕ=¬xϕn+1(x) Then 𝒜m satisfies ϕ iff n<m. The size of ϕ is O(n/t). As discussed earlier, the following lower bound extends [14] to counting logic. The proof is presented in the remainder of the paper and in Appendix C. For t=1, i.e. for FO3, this theorem improves on lower bound of [14] from n/2 to n.

Theorem 16.

If ϕ is a 𝒞3t-sentence distinguishing 𝒜n and 𝒜m, where n<m, then |ϕ|nt.

7 Proof of Theorem 16

In this section we first introduce the framework of [14]. Extended syntax trees are adapted to counting logic. The definitions of separators and the weighting scheme are unchanged. The lower bound for formula size in terms of separator weights and the proof of Theorem 16 based on it are given in Section 7.2. The main technical result is Lemma 22, Part 3, which is proved in Section 7.3. Proofs of lemmas used in this section are given in Appendix C.

7.1 Description of the Framework

We extend the framework for FO of [14] to counting logic. In the following, we write x,y,z for the three variables used. We start by describing the main concepts: the counting game derived extended syntax trees, separators, and weighting scheme.

7.1.1 Extended Syntax Tree

Given two families A,B, the extended syntax tree represents a winning strategy for Spoiler in the CS3,tw game on (A,B). It assigns to each tree node v a pair of families il(v) (“interpretation label”), along with Spoiler’s move sl(v) (“syntax label”) in this position such that:

  1. 1.

    A node v1 is a child of node v if position il(v1) can be obtained in one move from il(v),

  2. 2.

    A node v is a leaf if il(v) satisfies the atomic win condition.

For each node some additional information is provided, including the family distinguished by the interpretation label of the node. The root is associated to the starting position of the game CS3,tw, and we consider the nodes associated to positions reached throughout a winning strategy.

Definition 17.

Let ψ be an 𝒞3t-formula and A and B be families such that (A,B)ψ. The extended syntax tree TψA,B is defined as follows:

  • If ψ is an atomic formula, then TψA,B is a single node v with syntax label sl(v):=ψ and interpretation label il(v):=A,B. Comment: (A,B)ψ.

  • If ψ is of the form ¬ψ1, then TψA,B has root v with sl(v):=¬ and il(v):=A,B. The unique child of v is the root of Tψ1B,A. Comment: (B,A)ψ1.

  • If ψ is of the form ψ1ψ2, then TψA,B has root v with sl(v):= and il(v):=A,B. The first child of v is the root of Tψ1A1,B and the second child of v is the root of Tψ2A2,B, where Ai={(𝒜,α)A:(𝒜,α)ψi} for i{1,2}. Comment: A=A1A2 and (Ai,B)ψi.

  • If ψ is of the form ψ1ψ2, then TψA,B has root v with sl(v):= and il(v):=A,B. The first child of v is the root of Tψ1A,B1 and the second child of v is the root of Tψ2A,B2, where Bi={(,β)B:(,β)¬ψi} for i{1,2}. Comment: B=B1B2 and (A,Bi)ψi.

  • If ψ is of the form kuψ1, for a variable u{x,y,z} and kt, then TψA,B has root v with sl(v):=ku and il(v):=A,B. The unique child of v is the root of Tψ1A(Fk/u),B(k/u), where FkFAk is chosen so that A(Fk/u)ψ1, and for every GkFBk, G is selected from Gk so that B(G/u)¬ψ1. Comment: (A(Fk/u),B(k/u))ψ1, as B(k/u)=GkFBkB(G/u).

  • If ψ is of the form kuψ1, for a variable u{x,y,z} and kt, then TψA,B has a root node v with sl(v):=ku and il(v):=A,B. The unique child of v is the root of Tψ1A(k/u),B(Fk/j), where FkFBk is chosen so that B(Fk/u)¬ψ1, and for every GkFAk, G is selected from Gk so that A(G/u)ψ1. Comment: (A(k/u),B(Fk/u))ψ1, as A(k/u)=GkFAkA(G/u).

We define |TψA,B| to be the number of nodes in the tree, and clearly |TψA,B|=|ψ|. Note that the definition of the tree corresponds to the formula to game direction of Theorem 10, detailed in Appendix A.

7.1.2 Separators and Weighting Scheme

Separators are the key concept in [14] to study succinctness of formulas with a bounded number of variables. They provide a different “yardstick” for every pair of variables and constants for distances to be represented exactly. In contrast to the standard approach (as in Theorem 14), this “context-dependent” approach allows for a detailed representation of the progress made in the game.

Definition 18 (separator).

A separator for families A,B is a mapping
δ:𝒫2({min,max,x,y,z}) such that for every I:=(𝒜,α)A and J:=(,β)B, there are u,u{min,max,x,y,z} with uu one of the following hold:

  1. 1.

    <-type(α(u),α(u))<-type(β(u),β(u))

  2. 2.

    both of the following two conditions hold:

    • MIN[d(α(u),α(u)),d(β(u),β(u))]δ({u,u})

    • d(α(u),α(u))d(β(u),β(u)).

In this case the separator distinguishes the two families. We will also use the notion of the type of an element, in the following specific form.

Definition 19.

(type of an element) Let (𝒜,α) be an interpretation and a𝒰𝒜. Then <-type(a) = (<-type(a,minA), <-type(a,α(x)), <-type(a,α(y)), <-type(a,maxA)).

The definition of the weight of a separator is motivated by the quantities appearing in the computations [14].

Definition 20 (weight of a separator).

Let δ be a separator, we define its:

  1. 1.

    border-distance b(δ):= MAX {δ({min,max}),
    δ({min,u})+δ({u,max}):u,u{x,y,z}}

  2. 2.

    center-distance c(δ):= MAX {δ(p)+δ(q):p,q𝒫2({x,y,z}),pq}

  3. 3.

    weight w(δ):=c(δ)2+b(δ).

The weight is a measure of the distinguishing power of separators. A separator is minimal if it has minimal weight.

7.2 Proof of Theorem 16

The proof is based Theorem 21, which gives a formula size lower bound in terms of minimal separator weight. Theorem 21, in turn, is based on two lemmas, Lemma 22 and 23. The proofs of these lemmas are similar for FO and counting logic and are omitted due to lack of space, with the exception of quantifiers, handled in Lemma 22 Part 3. This is the most technical part of [14] and the problem we consider is to prove a version of this part for counting quantifiers. This is the point where counting rank t enters the bounds. Other than this difference, the rest of the argument, like handling propositional connectives, involves minor changes in the computation to account for t. The proof Lemma 22 Part 3 is based on Lemma 24. This lemma is proved in Section 7.3 and Appendix C. The derivation of Lemma 22 from Lemma 24 is again similar to the FO case and is omitted.

Theorem 21.

Suppose (A,B)ψ and δ is a minimal separator for A,B, then |ψ|w(δ)t.

The following lemma links separator weights to the structure of extended syntax trees.

Lemma 22.

Suppose (A,B)ψ and let T be the extended syntax tree TψA,B, and δ be a minimal separator for il(v). For every node v of T the following is true:

  1. 1.

    If v is a leaf, then w(δ)1.

  2. 2.

    If v has 2 children v1 and v2, and δi is a minimal separator for il(vi), for i{1,2}, then w(δ)w(δ1)+w(δ2).

  3. 3.

    If v has exactly one child v1, and δ1 is a minimal separator for il(v1), then w(δ)w(δ1)+t.

The bound of part 3. extends the corresponding bound of [14] to counting logic. In fact, for counting rank 1, i.e., for first-order logic without counting, it improves the bound from w(δ)w(δ1)+2 to w(δ)w(δ1)+1. This leads to the slight improvement of the lower bound of [14] mentioned after Theorem 16.

Lemma 23.

Let T be a finite binary tree where each node v is equipped with a weight w(v)>0 such that the following is true:

  • If v is a leaf, then w(v)1.

  • If v has 2 children v1 and v2, then w(v)w(v1)+w(v2).

  • If v has exactly one child v1, then w(v)w(v1)+t.

Then, |T|w(r)t, where r is the root of T and |T| is the number of nodes of T.

Theorem 21 follows directly from the previous lemmas.

Proof of Theorem 21.

Consider TψA,B the syntax tree for the pair A,B, ψ.
We associate to each node v of TψA,B a weight w(v):=w(δv), where δv is a minimal separator for il(v). From , we get that |ψ|=|TψA,B|w(δ)t, where δ is a minimal separator of il(r)=A,B.

Finally, as a consequence, we get Theorem 16.

Proof of Theorem 16.

Suppose ψ is an 𝒞3t-sentence such that 𝒜nψ and 𝒜m¬ψ. Let α be the assignment that assigns x,y and z to 0. A mapping δ is a separator for the two structures iff δ({u,max})n for some u{min,x,y}. The separator defined as δ({min,max})=n and 0 elsewhere is one of the minimal weight separator available, and w(δ)=n. Finally, Theorem 16 follows from Theorem 21.

7.3 Proof of Lemma 22

The proof of Lemma 22 Part 3. relies on the following key lemma, which gives a bound on how much a counting quantifier can increase the distinguishing power of separators.

Lemma 24.

Let v be a node of T that has syntax-label sl(v)=Qku for Q{,}, kt and u{x,y,z}. Let δ1 be a separator for il(v1), where v1 is the unique child of v in T.

Let δ be the separator defined via:

  • δ({u,u}):=0 , for all u{min,max,x,y,z}{u} and,

  • δ({u,u′′}):=MAX{δ1({u,u′′}),δ1({u,u}) +δ1({u,u′′})+k1} for all (u,u′′)𝒫2({min,max,x,y,z}{u}).

Then, δ is a separator for il(v).

7.3.1 Proof of Lemma 24

Due to symmetry, we only consider the case kz. It has to be shown that δ is a separator for A,B=il(v). By definition, il(v1)=A(Fk/z),B(k/z). Consider I=(𝒜,α)A and J=(,β)B. We need to show that δ separates I,J. Let:

  • IFk:={(𝒜,α(Fik(𝒜,α)/z)} be the set of interpretations generated from I in v1, and let ai=Fik(𝒜,α) and IFki=(𝒜,α(ai/z)), 1ik.

  • For any k-choice function Gk on B, let G be the choice function selected from Gk, and let JG be the interpretation selected from JGk={(,β(Gik(,β)/z))}. We define bi:=Gik(,β); note that JG corresponds to some bj, 1jk.

Note that for all u{min,max,x,y}, and for all i[k], α(Fik(𝒜,α)/z)(u)=α(u). So we will omit subscripts and just write α(x) for the assignment of x and minA for the minimum in the k copies of (𝒜,α) (and similarly with y,max). Similarly, for all u{min,max,x,y}, for all i[k], and for all GkFBk, β(Gik(,β)/z)(u)=β(u), so we will also write β(x) for the assignment of x and minB for the minimum in the k copies of (,β) (and similarly with y,max). We will say that δ({u,u}) separates I,J to signify that {u,u} witnesses the separation property of δ on I,J.

We formulate several indistinguishability properties for the choice functions and the interpretations. Lemma 30 shows that if each property holds then δ1 does not separate il(v1) as, using the indistinguishabilities, a k-choice function Gk can be constructed for which IFk and JG are not separated by δ1. Thus some of the assumptions fail. Lemmas 26-29 combined show that if any of the properties fail, then δ separates I,J.

The first property is about the role of min,x,y,max in separation.

Property 1.
Part a)

For every Gk, none of the IFki is separated from JG by δ1({u,u}) for {u,u}{min,x,y,max}.

Part b)

If there are u,u{x,y,min,max} such that MIN [ d(α(u),α(u)),d(β(u),β(u))]δ1({z,u}) then d(α(u),α(u))=d(β(u),β(u)).

We may assume w.l.o.g. that α(x)α(y). Property 1 implies that β(x)β(y) holds as well.

The other properties refer to“closeness” of elements ai to {α(x),α(y)y,minA,maxA} in (𝒜,α), gauged by δ1({z,u}) for u{x,y,min,max}, depending on whether d(ai,α(u))δ1({z,u}) or d(ai,α(u))>δ1({z,u}). The information about the location of ai is completed by its type <-type(ai) (Definition 19).

The next two properties deal with implications of closeness to the existence of a “twin” in the other structure.

Property 2.

For every ai and u{x,y,min,max} such that d(ai,α(u))δ1({z,u}) there is a b𝒰 such that d(ai,α(u))= d(b,β(u)) and <-type(ai)= <-type(b).

Let Si:={u{x,y,min,max}:d(ai,α(u))δ1({z,u})} be the set of variables to which ai is close.

Property 3.

For every ai such that Si, there is a b𝒰 such that <-type(ai)= <-type(b) and for every u{x,y,min,max} it holds that

  1. a)

    d(ai,α(u))= d(b,β(u)) if uSi

  2. b)

    d(b,β(u))>δ({z,u}) otherwise.

The last property is about elements which are not in any closeness relation. We define quantities, called gaps, to characterize those elements.

Definition 25 (Gap).

For (𝒰,γ){(𝒜,α),(,β)} and

I{min,x}=[minU,γ(x)],I{x,y}=[γ(x),γ(y)],I{y,max}=[γ(y),maxU],

define: Gap(𝒰,γ)(S):={aIS:d(a,γ(u))>δ1({u,z})u{min,x,y,max}}.

A separator cannot distinguish using a pair of variables in {{min,z},{x,z},{y,z},{max,z}} between an element in Gap(𝒰,γ)(S) and Gap(𝒰,γ)(S). This is the point where the additive term k1 enters the bounds.

Property 4.

If (u,u){(min,x),(x,y),(y,max)} and there are p choices of Fk in Gap(𝒜,α)({u,u}) then |Gap(,β)({u,u})|p.

Now we formulate the lemmas which conclude the separator property of δ in case some subsets of the properties fail. The first lemma notes that a separating pair in δ1 not involving z also separated in δ.

Lemma 26.

If Property 1 fails then δ separates I,J.

In view of Lemma 26, the next two lemmas say that if Property 1 holds, then the non-existence of a twin implies separation.

Lemma 27.

If Properties 1 or 2 fails then δ separates I,J.

Lemma 28.

If Properties 1, 2 or 3 fails then δ separates I,J.

The last lemma of this kind concludes separation from the sizes of gaps.

Lemma 29.

If Properties 1 or 4 fails then δ separates I,J.

The final Lemma 30 provides the step needed to complete the proof of Lemma 24. It shows that, on the other hand, the conjunction of all the indistinguishabilities contradicts the property that δ1 is a separator,

Lemma 30.

If Properties 1,2,3,4 hold, then there is a Gk such that δ1 does not separate IFjk,JG.

Figure 4: Illustration of why IFk,JG cannot be separated by δ1 in Lemma 30 of the proof of Lemma 24. For each u{𝑚𝑖𝑛,x,y,𝑚𝑎𝑥} we draw on 𝒜 (resp. ) a box centered at α(u) (resp. β(u)) of half-length δ1({u,z}), representing the separating power of the pair {u,z}. The portions of the linear orders not covered by any such interval form the gaps (shown in purple). Crossed dots on 𝒜 indicate the choices coming from Fk, while crossed dots on represent the best matching replies for indistinguishability. In Lemma 30, every choice on 𝒜 admits a distinct δ1-indistinguishable counterpart on , preventing separation by δ1.
Proof.

As Property 3 holds, for every ai such that Si, we have that there exists a unique bi𝒰 such that <-type(ai)= <-type(bi) and d(bi,β(u))= d(ai,α(u)) for all uSi, and d(bi,β(u))>δ1({z,u}) for all u{x,y,min,max}Si. Additionally, since Property 4 holds, for every ai in Gap(𝒜,α)({u,u}) for (u,u){(min,x),(x,y), (y,max)}, there exists a distinct biGap(,β)({u,u}).
Consider the choice function Gk consisting of the k bi’s matching the k ai’s as described above. Suppose index j from the choice function Gk is selected to create JG.

  • If Sj, i.e., aj is not in a gap, then bj satisfies the conditions described by Property 3, so IFjk,JG cannot be separated by δ1(z,u) for u{x,y,min,max}.

  • If aj is in Gap(𝒜,α)({u,u}), then by construction bj is in Gap(,β)({u,u}), and IFjk,JG cannot be distinguished by δ1(z,u) for u{x,y,min,max}.

Property 1 states that pairs δ1(u,u) with u{x,y,min,max} cannot distinguish IFjk,JG either. Thus δ1 does not distinguish IFjk,JG.

We complete the proof of Lemma 24 using Lemmas 26-30.

Proof.

If Lemma 26 cannot be applied to show that δ separates I,J then Property 1 holds. Then, if Lemma 27 cannot be applied to show that δ separates I,J, Property 2 holds as well. It follows similarly from Lemmas 28 and 29 that Properties 3-4 hold. Lemma 30 then implies that δ1 does not separate il(v1), a contradiction.

8 Conclusion and Perspectives

In this paper an EF game is formulated for counting logic formula size. It is used to prove a n/t lower bound for the size of 3-variable counting logic formulae with counting rank t, distinguishing a linear order of size n from a larger one. The lower bound extends a Ω(n) lower bound of [14] for FO3. The proof is based on the approach of [14], with a different argument for the central case of handling counting quantifiers. Closing the gap between the lower bound and the upper bound of size O(n/t) is an open problem. This is open even in the FO case where, as far as we know, no improvement is known of the linear upper bound.

Comparing the succinctness of various knowledge representation formalisms is studied in detail in knowledge compilation [5], Boolean complexity theory [23] and other areas, but, as noted in [14], perhaps less so for predicate logic. Comparing m-variable counting logic formula sizes for m=2,3,4 seems to be an interesting problem.

We conclude with a brief description of the connection between Gnn and counting logic formula size. A Gnn works on a graph with feature vectors assigned to the nodes. In each round these are updated by applying a combination function to the previous vector and an aggregate of the feature vectors of the neighbors [17]. A logical classifier computes a unary query on graphs (e.g., assigning to every graph the set of red vertices with all blue neighbors). Barceló et al. [2] showed that an FO logical classifier is computable by a Gnn iff it is definable in 2-variable guarded counting logic. See also [12, 13], also noting that this is a “uniform” model. Every such formula has a Gnn simulation with complexity (number of features and rounds) depending on the complexity of the formula. One of the many questions raised by this connection is: how is the complexity of the formula related to the complexity of learning the Gnn? A related question, recently considered in [30], is whether the underlying formula can be extracted from a learned Gnn using explainability techniques.

References

  • [1] Micah Adler and Neil Immerman. An n! lower bound on formula size. ACM Trans. Comput. Log., 4(3):296–314, 2003. doi:10.1145/772062.772064.
  • [2] Pablo Barceló, Egor V. Kostylev, Mikaël Monet, Jorge Pérez, Juan L. Reutter, and Juan Pablo Silva. The logical expressiveness of graph neural networks. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020, 2020. URL: https://openreview.net/forum?id=r1lZ7AEKvB.
  • [3] Jin-yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the number of variables for graph identification. Comb., 12(4):389–410, 1992. doi:10.1007/BF01305232.
  • [4] Marco Carmosino, Ronald Fagin, Neil Immerman, Phokion G. Kolaitis, Jonathan Lenchner, and Rik Sengupta. A finer analysis of multi-structural games and beyond. CoRR, abs/2301.13329, 2023. doi:10.48550/arXiv.2301.13329.
  • [5] Adnan Darwiche and Pierre Marquis. A knowledge compilation map. J. Artif. Intell. Res., 17:229–264, 2002. doi:10.1613/jair.989.
  • [6] Heinz-Dieter Ebbinghaus and Jörg Flum. Finite model theory. Perspectives in Mathematical Logic. Springer, 1995.
  • [7] Andrzej Ehrenfeucht. An application of games to the completeness problem for formalized theories. Fundamenta Mathematicae, 1961.
  • [8] Kousha Etessami. Counting quantifiers, successor relations, and logarithmic space. In Proceedings of the Tenth Annual Structure in Complexity Theory Conference, Minneapolis, Minnesota, USA, June 19-22, 1995, pages 2–11. IEEE Computer Society, 1995. doi:10.1109/SCT.1995.514723.
  • [9] Kousha Etessami. Counting quantifiers, successor relations, and logarithmic space. J. Comput. Syst. Sci., 54(3):400–411, 1997. doi:10.1006/jcss.1997.1485.
  • [10] Ronald Fagin, Jonathan Lenchner, Nikhil Vyas, and R. Ryan Williams. On the number of quantifiers as a complexity measure. In Stefan Szeider, Robert Ganian, and Alexandra Silva, editors, 47th International Symposium on Mathematical Foundations of Computer Science, MFCS 2022, Vienna, Austria, August 22-26, 2022, volume 241 of LIPIcs, pages 48:1–48:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.MFCS.2022.48.
  • [11] Roland Fraisse. Sur quelques classifications des systemes de relations, 1954.
  • [12] Martin Grohe. The logic of graph neural networks. In 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, June 29 - July 2, 2021, pages 1–17. IEEE, 2021. doi:10.1109/LICS52264.2021.9470677.
  • [13] Martin Grohe. The descriptive complexity of graph neural networks. In 38th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2023, Boston, MA, USA, June 26-29, 2023, pages 1–14. IEEE, 2023. doi:10.1109/LICS56636.2023.10175735.
  • [14] Martin Grohe and Nicole Schweikardt. The succinctness of first-order logic on linear orders. Log. Methods Comput. Sci., 1(1), 2005. doi:10.2168/LMCS-1(1:6)2005.
  • [15] András Hajnal, Wolfgang Maass, Pavel Pudlák, Mario Szegedy, and György Turán. Threshold circuits of bounded depth. In 28th Annual Symposium on Foundations of Computer Science, Los Angeles, California, USA, 27-29 October 1987, pages 99–110. IEEE Computer Society, 1987. doi:10.1109/SFCS.1987.59.
  • [16] András Hajnal, Wolfgang Maass, Pavel Pudlák, Mario Szegedy, and György Turán. Threshold circuits of bounded depth. J. Comput. Syst. Sci., 46(2):129–154, 1993. doi:10.1016/0022-0000(93)90001-D.
  • [17] William L. Hamilton. Graph Representation Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2020. doi:10.2200/S01045ED1V01Y202009AIM046.
  • [18] Lauri Hella. Logical hierarchies in PTIME. Inf. Comput., 129(1):1–19, 1996. doi:10.1006/inco.1996.0070.
  • [19] Lauri Hella and Jouko Väänänen. The size of a formula as a measure of complexity. In Åsa Hirvonen, Juha Kontinen, Roman Kossak, and Andrés Villaveces, editors, Logic Without Borders - Essays on Set Theory, Model Theory, Philosophical Logic and Philosophy of Mathematics, volume 5. De Gruyter, 2015. doi:10.1515/9781614516873.193.
  • [20] Neil Immerman. Number of quantifiers is better than number of tape cells. J. Comput. Syst. Sci., 22(3):384–406, 1981. doi:10.1016/0022-0000(81)90039-8.
  • [21] Neil Immerman. Descriptive complexity. Graduate texts in computer science. Springer, 1999. doi:10.1007/978-1-4612-0539-5.
  • [22] Neil Immerman and Eric Lander. Describing graphs: A first-order approach to graph canonization, 1990.
  • [23] Stasys Jukna. Boolean Function Complexity - Advances and Frontiers, volume 27 of Algorithms and combinatorics. Springer, 2012. doi:10.1007/978-3-642-24508-4.
  • [24] Mauricio Karchmer and Avi Wigderson. Monotone circuits for connectivity require super-logarithmic depth. SIAM J. Discret. Math., 3(2):255–265, 1990. doi:10.1137/0403021.
  • [25] Dietrich Kuske and Nicole Schweikardt. First-order logic with counting: At least, weak hanf normal forms always exist and can be computed! In Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), volume abs/1703.01122, pages 1–12. IEEE, 2017. doi:10.48550/arXiv.1703.01122.
  • [26] Leonid Libkin. Elements of Finite Model Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2004. doi:10.1007/978-3-662-07003-1.
  • [27] Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman go neural: Higher-order graph neural networks. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, pages 4602–4609. AAAI Press, 2019. doi:10.1609/aaai.v33i01.33014602.
  • [28] Martin Otto. Bounded Variable Logics and Counting: A Study in Finite Models, volume 9 of Lecture Notes in Logic. Cambridge University Press, 2017. doi:10.1017/9781316716878.
  • [29] Martin Otto. Graded modal logic and counting bisimulation. CoRR, abs/1910.00039, 2019. doi:10.48550/arXiv.1910.00039.
  • [30] Alexander Pluska, Pascal Welke, Thomas Gärtner, and Sagar Malhotra. Logical distillation of graph neural networks. In Pierre Marquis, Magdalena Ortiz, and Maurice Pagnucco, editors, Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning, KR 2024, Hanoi, Vietnam. November 2-8, 2024, 2024. doi:10.24963/kr.2024/86.
  • [31] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Trans. Neural Networks, 20(1):61–80, 2009. doi:10.1109/TNN.2008.2005605.
  • [32] Harry Vinall-Smeeth. From quantifier depth to quantifier number: Separating structures with k variables, 2024. doi:10.48550/arXiv.2311.15885.
  • [33] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019. URL: https://openreview.net/forum?id=ryGs6iA5Km.

Appendix A Proof of Theorem 10

Proof.

We use induction on w. If w=1, Spoiler wins in CS(A,B)1m only if there is an atomic formula ϕ, so verifying |ϕ|=1, such that (A,B)ϕ. Reciprocally, if |ϕ|=1 and (A,B)ϕ, then ϕ is an atomic formula and spoiler wins in CS(A,B)1m.
We now assume the equivalence for v<w.
To prove the forward direction of the equivalence, suppose Spoiler has a winning strategy in the game CS(A,B)wm starting with:

  • ¬-move; Spoiler has a winning strategy in CS(B,A)w1m, so by induction hypothesis there is a formula ψ verifying |ψ|w1 and (B,A)ψ. Finally (A,B)¬ψ and |¬ψ|=1+|ψ|w so we get (2).

  • -move, choosing u,v,C and D such that 1 u,v<w with u+v=w, splitting A into C and D. Spoiler has a winning strategy in CS(C,B)um and CS(D,B)um, so by the induction hypothesis, there are formulae ψ and θ such that |ψ|u, |θ|v, (C,B)ψ and (D,B)θ.
    We have that Cψ and Dθ, so Aψθ. Conversely, B¬ψ and B¬θ, and consequently B¬(ψθ).
    It follows that (A,B)ψθ, and since |ψθ|=|ψ|+|θ|u+v=w, we get (2).

  • -move; and by a symmetrical argument to the -move we get (2).

  • k-move; choosing j[m],k, a k-choice function Fk on A and for every GkFBk, selecting G from Gk to form B(k/u)=GkFBkB(G/u). Spoiler has a winning strategy in CS(A(Fk/j)w1m, B(k/j)), so by the induction hypothesis, there is a formula ψ such that |ψ|w1 and (A(Fk/j), B(k/j))ψ.
    Define ϕ:=kxjψ. We have that A(Fk/j)ψ, and so for all 1ik, (𝒜,α(Fik/j))ψ and therefore Aϕ.
    Now suppose that there exists a k-choice function Gk on B and a (,β)B such that {(,β(Gik(,β)/j)):1ik}ψ. Then there is an i[k] such that (,β(Gik(,β)/j)) is part of the family B(k/j) through the selected G, but B(k/j)¬ψ, which is a contradiction. Therefore B¬ϕ.
    Finally (A,B)ϕ and |ϕ|=|ψ|+1w, so we get (2).

  • k-move; a symmetrical argument to the -move yields (2).

To prove the backward direction, assume there is a formula ϕ of size w>1 such that (A,B)ϕ. We show that Spoiler has a winning strategy in CS(A,B)wm. Let us consider the form of the formula ϕ:

  • ϕ=¬ψ: Spoiler plays the ¬-move and gets in the position CS(B,A)w1m. Since |ψ|<w and (B,A)ϕ, Spoiler has a winning strategy in CS(B,A)w1m by induction hypothesis, and therefore Spoiler has also a winning strategy in CS(A,B)wm.

  • ϕ=ψθ: Define C={(𝒜,α)A|(𝒜,α)ψ}, D={(𝒜,α)A|(𝒜,α)θ}, u and v such that w=u+v, |ψ|u and |θ|v. Spoiler plays the -move associated to u,v,C,D and gets to CS(C,B)um or CS(D,B)vm according to Duplicator’s choice. We have that (C,B)ψ, (D,B)θ and therefore by induction hypothesis Spoiler has a winning strategy in CS(C,B)um or CS(D,B)vm, and therefore Spoiler has also a winning strategy in CS(A,B)wm.

  • ϕ=ψθ: a symmetrical argument shows that Spoiler has a winning strategy in CS(A,B)wm.

  • ϕ=kxjψ: Since Aϕ, there is a k-choice function Fk on A such that
    (𝒜,α(Fik((𝒜,α)/j))ψ, for every 1ik and for all (𝒜,α)A. Thus, A(Fk/j)ψ.
    On the other hand, B¬ϕ, thus from every Gk on B we can select G such that B(G/j)¬ψ and therefore, B(k/j)¬ψ.
    Finally we have that (A(Fk/j),B(k/j))ψ and |ψ|=|ϕ|1<w, so by induction hypothesis, Spoiler has a winning strategy in the game CS(A(Fk/j),B(k/j))w1m and therefore Spoiler has also a winning strategy in CS(A,B)wm.

  • ϕ=kxjψ: a symmetrical argument shows that Spoiler has a winning strategy in CS(A,B)wm.

Appendix B Proof of Theorem 14

We want to show that Duplicator can win a k-round EF game on 𝒜n and 𝒜m taken to be of length at least (t+1)k. The key idea behind the proof is that, from a given assignment, Spoiler can “only look up to a certain distance” in the two directions on the line.

Proof.

Suppose 𝒜n and 𝒜m are linear orders of length at least (t+1)k, on which the EF game will be played.
After i moves, we denote by a the “position”: a is a tuple consisting of min𝒜n,max𝒜n concatenated to the i moves played on 𝒜n: a=(a1,a0,a1,,ai), a1=min𝒜n , a0=max𝒜n). Similarly, we define the tuple b of moves played on 𝒜m.
For 1j,li, we prove that regardless of Spoiler’s choices, Duplicator can maintain the following inequalities:

  1. 1.

    if d(aj,al)(t+1)ki, then d(bj,bl)=d(aj,al).

  2. 2.

    if d(aj,al)>(t+1)ki, then d(bj,bl)>(t+1)ki.

  3. 3.

    ajal iff bjbl.

Using those inequalities for i=k moves, Property 3. yields that Duplicator win the k-round EF game on 𝒜n and 𝒜m. Since this happens no matter what Spoiler plays, the game characterization theorem for bounded counting rank implies that 𝒜n and 𝒜m verify the same 𝒞t[k] sentences.
We now prove by induction on the moves (on i) that the inequalities can be maintained. The base case of i=0 is immediate.
For the induction step, assume the inequalities hold for i moves, and suppose without loss of generality that Spoiler makes his (i+1)th move on 𝒜n. Spoiler plays a set M of cardinality at most t in 𝒜n. We describe Duplicator’s response, a set N on 𝒜m. In the second part of the move, if Spoiler picks Nq on 𝒜m for q[t] (i.e. bi+1=Nq), Duplicator will respond with Mq on 𝒜n (i.e. ai+1=Mq).
If aj=Mq for ji and q[t], Duplicator sets Nq to be bj. Suppose there is an element MqM which has not been selected earlier. We define j,li such that aj<Mq<al and there is no other previously played moves on 𝒜n inside this interval. By Property 3., the interval between bj and bl contains no other elements of b. Then we have two cases regarding the length of the interval:

  • d(aj,al)(t+1)ki. Then by Property 1. and the inductive hypothesis, d(bj,bl)=d(aj,al), and the intervals [aj,al] and [bj,bl] are isomorphic. Duplicator picks Nq so that d(aj,Mq)=d(bj,Nq) and d(Mq,al)=d(Mq,bl), which ensures that the three properties hold for i+1 moves.

  • d(aj,al)>(t+1)ki. In this case by Property 2., d(bj,bl)>(t+1)ki. We have three possibilities:

    • d(aj,Mq)(t+1)k(i+1). Then d(Mq,al)>(t+1)k(i+1), and Duplicator picks Nq on [bj,bl] so that d(bj,Nq)=d(aj,Mq) maintaining Properties 1 and 3. Since d(Mq,bl)>(t+1)k(i+1) this maintains d(Nq,bl)>(t+1)k(i+1).

    • d(Mq,al)(t+1)k(i+1), in which case a similar reasoning applies.

    • Otherwise, Spoiler has picked Mq such that both: d(aj,Mq)>(t+1)k(i+1) and d(Mq,al)>(t+1)k(i+1). There can be at most t such Mq as |M|t.
      Since d(bj,bl)>(t+1)ki, there are at least t distinct elements in 𝒜m between bj+(t+1)k(i+1) and bl(t+1)k(i+1). Duplicator picks the first Nq on that interval that is not already in N. This ensures that, d(bj,Nq)>(t+1)k(i+1) and d(Nq,bl)>(t+1)k(i+1), therefore satisfying all three properties.

Thus, in all the cases, the induction is preserved.

Appendix C Proof of the lemmas of Section 7

C.1 Proof of Lemma 26

If Part a) fails then there is Gk for which one of the IFki is separated from JG by δ1({u,u}) for {u,u}{min,x,y,max}. As δ1δ for these pairs, then δ({u,u}) separates I,J.∎
If Part b) fails then there are u,u{x,y,min,max} such that
MIN [ d(α(u),α(u)),d(β(u),β(u))]δ1({z,u}) and d(α(u),α(u))d(β(u),β(u)).
Since δ1({z,u})δ({u,u}) we have that: d(α(u),α(u))d(β(u),β(u)) and
MIN[d(α(u),α(u)),d(β(u),β(u))]δ({u,u}), i.e., δ({u,u}) separates I,J.∎

C.2 Proof of Lemma 27

If Property 1 fails then we already know from the previous lemma that δ separates I,J. So assume Property 1 holds and Property 2 fails. Then there is an ai and a u{x,y,min,max} such that d(ai,α(u))δ1({z,u}) and there is no b𝒰 that satisfies d(ai,α(u))= d(b,β(u)) and <-type(ai)= <-type(b).

Note that there is at most one b𝒰 such that d(ai,α(u))= d(b,β(u)) and <-type(ai,α(u))= <-type(b,β(u)). We distinguish two cases depending on whether such an element exists or not.

Case 1.

There are ai and u{x,y,min,max} such that d(ai,α(u))δ1({z,u}) and there is no b𝒰 such that d(ai,α(u))= d(b,β(u)) and <-type(ai,α(u))= <-type(b,β(u)).

There are four cases, we consider min and x (the other two follow by symmetry).

  • u is min: It holds that δ({min,max})δ1({min,z}) d(ai,minA) > d(maxB,minB). Here the first inequality uses the definition of δ, the second is a property of this case and third holds as there is no such b. But d(maxA,minA) d(ai,minA), so d(maxB,minB) d(maxA,minA). With d(maxB,minB)δ({min,max}) this implies that δ({min,max}) separates I,J.

  • u is x: The reasoning is similar. If α(x)<ai, δ({x,max})δ1({x,z}) d(ai,α(x)) > d(maxB,β(x)). So d(maxA,α(x)) d(maxB,β(x)) and d(maxB,β(x))δ({x,max}). Then δ({x,max}) separates I,J. If α(x)>ai, we reach a similar conclusion.

    Note that α(x)=ai contradicts Property 1. ∎

Case 2.

Case 1 does not hold, so there is ai and u{x,y,min,max} such that d(ai,α(u))δ1({z,u}) and there is b𝒰 with d(ai,α(u))= d(b,β(u)), <-type(ai,α(u)) = <-type(b,β(u)), and <-type(ai) <-type(b). As noted above, given ai, b is unique. Let u{x,y,min,max} be such that <-type(ai,α(u)) <-type(b,β(u)), which exists by <-type(ai) <-type(b). By Property 1, it holds that <-type(α(u),α(u))= <-type(β(u),β(u)). As α(u) is on a different side of ai than β(u) of b, this implies that both: MIN[d(α(u),α(u)), d(β(u),β(u))] d(ai,α(u)) and d(α(u),α(u)) d(β(u),β(u)). Since d(ai,α(u))δ1({z,u}) δ({u,u}) we get that:
d(α(u),α(u)) d(β(u),β(u)) and MIN[d(α(u),α(u)), d(β(u),β(u))]δ({u,u}). So δ({u,u}) separatesI,J.∎

C.3 Proof of Lemma 28

If Property 1 or 2 fails, then we already know that δ separates I,J. So assume Properties 1, 2 hold and Property 3 fails. For any ai such that Si, we pick uSi. By Property 2, we can define b such that d(ai,α(u))= d(b,β(u)) and <-type(ai)= <-type(b). We consider two cases.

Case 1 (Part a) fails):

Suppose there is ai such that |Si|2 and b does not satisfy d(ai,α(u))= d(b,β(u)) for every uSi. Let uSi be such that d(ai,α(u)) d(b,β(u)). Thus d(α(u),α(u)) d(β(u),β(u)).

Notice that d(α(u),α(u)) d(ai,α(u))+ d(ai,α(u)) δ1({z,u})+δ1({z,u})δ({u,u}). So d(α(u),α(u)) d(β(u),β(u)) and d(α(u),α(u))δ({u,u}). Therefore δ({u,u}) separates I,J.

Case 2 (Part b) fails):

Suppose there are ai and u{x,y,min,max} such that d(ai,α(u))>δ1({z,u}) and b does not satisfy d(b,β(u))>δ1({z,u}).
Then d(b,β(u))δ1({z,u})<d(ai,α(u)), so we must have that d(β(u),β(u)) d(α(u),α(u)).

Notice that d(β(u),β(u)) d(b,β(u))+d(b,β(u))δ1({z,u})+δ1({z,u})δ({u,u}). So d(α(u),α(u)) d(β(u),β(u)) and d(β(u),β(u))δ({u,u}). Therefore δ({u,u}) separates I,J. ∎

C.4 Proof of Lemma 29

We first define “gap boundaries”, a pair from {x,y,min,max} bounding a given gap.

Definition 31 (Gap boundaries).

Let (𝒰,γ) be an interpretation, and let (u,u) be one of {(min,x),(x,y),(y,max)}. A pair (v,v) is the gap boundaries of Gap(𝒰,γ)({u,u}) if:

  1. 1.

    (v,v) belongs to the corresponding admissible set:

    (u,u)=(min,x) :(v,v){(min,x),(min,y),(min,max)},
    (u,u)=(x,y) :(v,v){(x,y),(min,y),(x,max),(min,max)},
    (u,u)=(y,max) :(v,v){(y,max),(x,max),(min,max)},
  2. 2.

    the following coverage inequality holds:

    δ1({z,v})+|Gap(𝒰,γ)({u,u})|+δ1({z,v})d(γ(v),γ(v)).

Among all such pairs, we choose the one with the smallest left component and the largest right component.

The definition is illustrated in Fig. 5.

Figure 5: Gap construction for variables u{𝑚𝑖𝑛,x,y,𝑚𝑎𝑥} on interpretations 𝒜 (top) and (bottom). Each variable u is represented by a box centered at α(u) (resp. β(u)) with half-length δ1({u,z}), depicting the separating power of the pair {u,z}. Regions not covered by these intervals form the gaps (in purple). On 𝒜, the {𝑚𝑖𝑛,x} gap is empty; the {x,y} gap has boundaries (𝑚𝑖𝑛,y); and the {y,𝑚𝑎𝑥} gap has boundaries (y,𝑚𝑎𝑥). On , the {𝑚𝑖𝑛,x} gap is also empty; the {x,y} gap boundaries are (x,y); and the {y,𝑚𝑎𝑥} gap boundaries remain (y,𝑚𝑎𝑥).

The gap boundaries for gap {u,u} are always defined, and may differ from {u,u}. For example, the gap {min,x} might have gap boundaries {min,y} when the δ1(y,z) neighborhood of y contains the δ1(x,z) neighborhood of x, hence covering a bigger chunk of the {min,x} interval. If the gap is nonempty, the inequalities in Definition 31 become equalities, as the two segments corresponding to the gap boundaries are non-overlapping, and so the two δ1 values added to the size of the gap add up to the length of the interval.

We derive a result for gap boundaries before proceeding to the next case.

Proposition 32.

If Property 1 holds, then the gap boundaries associated with
Gap(𝒜,α)({u,u}) and Gap(,β)({u,u}) are the same.

Proof.

Let (v,v) be the gap boundaries associated with Gap(𝒜,α)({u,u}), and (w,w) be the gap boundaries associated with Gap(,β)({u,u}).
We will first reason from (𝒜,α) to (,β), and suppose that α(v)<α(w)α(u). By the definition of the gap on (𝒜,α), it must be that δ1({z,v})d(α(w),α(v))+δ1({z,w}). Property 1 implies that d(α(w),α(u))=d(β(w),β(u)) since δ{v,w}δ1({z,v})d(α(w),α(v)). So δ1({z,v})d(β(w),β(v))+δ1({z,w}). Therefore w cannot be a gap variable for Gap(,β)({u,u}), as otherwise v would have chosen on (,β) instead of w.
If α(w)<α(v), then by Property 1 β(w)<β(v), and the same reasoning applies on the gap on (,β). By symmetry, the same analysis holds for u,v,w. We now proceed to the proof of the lemma. Suppose again that Property 1 holds and Property 4 fails.
There is (u,u){(min,x),(x,y),(y,max)} such that there are p choices of Fk in Gap(𝒜,α) and |Gap(,β)({u,u})|<p.
By Proposition 32, there is a unique pair (v,v) of gap boundaries for both Gap(𝒜,α)({u,u}) and Gap(,β)({u,u}). On one hand by the definition of gap boundaries on (,β), we have

d(β(v),β(v)) δ1({z,v})+δ1({z,v})+|Gap(,β)({u,u})|
δ1({z,v})+δ1({z,v})+(p1)
δ1({z,v})+δ1({z,v})+(k1)δ({v,v})

On the other hand by the definition of gap boundaries on (𝒜,α),

d(α(v),α(v)) = δ1({z,v})+δ1({z,v})+|Gap(𝒜,α)({u,u})|
δ1({z,v})+δ1({z,v})+p>d(β(v),β(v)).

Thus δ({v,v}) separates I,J. ∎