OctoInform Beta

OpenAI preprint, September 2026 · §2. Weisfeiler-Leman conventions and the bijective game

Definitions 2.1 and 2.2: KK-pair bijective pebble games on [n][n] and general simple graphs, with degree preservation for K≥2K \ge 2 and pebble replacement

Bijective pebble games, vertex degrees, and pebble replacement.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

In kk-dimensional Weisfeiler-Leman refinement for k≥2k \ge 2, two graphs are compared by iteratively refining a coloring of kk-tuples of vertices using atomic types and replacement multisets, either jointly across all kk coordinates or separately for each coordinate. Both refinement conventions are characterized by KK-pair bijective pebble games played on two graphs, with K=k+1K = k + 1 pebble pairs for the joint convention and K=kK = k pebble pairs for the separate convention.

A winning strategy for Duplicator in the KK-pair bijective pebble game is given by a downward-closed family of partial isomorphisms that admits a bijective extension whenever a pebble pair is unplaced. Below we formulate this game in two settings: for uncolored simple graphs represented by adjacency matrices on a finite vertex set, and for general simple graphs equipped with a binary vertex compatibility relation.

Simple graphs and the uncolored game

For a natural number n∈ℕn \in \mathbb{N}, write [n]={0,…,n−1}[n] = \{0, \dots, n - 1\}. A simple graph GG on [n][n] is specified by its adjacency matrix aG:[n]×[n]→{0,1}a_G : [n] \times [n] \to \{0, 1\}, which is symmetric (aG(x,y)=aG(y,x)a_G(x, y) = a_G(y, x) for all x,y∈[n]x, y \in [n]) and irreflexive (aG(x,x)=0a_G(x, x) = 0 for all x∈[n]x \in [n]).✦ The degree of a vertex x∈[n]x \in [n] in GG is the number of vertices adjacent to xx: deg⁡G(x)=|{z∈[n]:aG(x,z)=1}|.\deg_G(x) = \lvert\{z \in [n] : a_G(x, z) = 1\}\rvert.(1)✦

For a natural number K∈ℕK \in \mathbb{N}, a KK-pebble position on [n][n] is a partial assignment PP mapping each pebble index i∈[K]i \in [K] either to a vertex pair (x,y)∈[n]×[n](x, y) \in [n] \times [n], written P(i)=(x,y)P(i) = (x, y), or to the unplaced state, written P(i)=⊥P(i) = \bot.✦ For an index i∈[K]i \in [K] and a vertex pair (z,w)∈[n]×[n](z, w) \in [n] \times [n], write P[i←(z,w)]P[i \leftarrow (z, w)] for the single-pebble update that maps ii to (z,w)(z, w) and agrees with PP at every j∈[K]j \in [K] with j≠ij \neq i. A KK-pebble position PP on [n][n] is a subposition of a KK-pebble position QQ on [n][n], written P⊑QP \sqsubseteq Q, if for every i∈[K]i \in [K] either P(i)=⊥P(i) = \bot or P(i)=Q(i)P(i) = Q(i).✦

For simple graphs GG and HH on [n][n], a KK-pebble position PP on [n][n] is a partial isomorphism between GG and HH if for all i,j∈[K]i, j \in [K] and all x,y,u,v∈[n]x, y, u, v \in [n] with P(i)=(x,y)P(i) = (x, y) and P(j)=(u,v)P(j) = (u, v), x=u⇔y=v,aG(x,u)=aH(y,v).\begin{aligned} x = u &\iff y = v, \\ a_G(x, u) &= a_H(y, v). \end{aligned}(2)✦

A KK-pebble game invariant for GG and HH is a family 𝒮\mathcal{S} of KK-pebble positions on [n][n] satisfying three conditions: it is downward-closed under subpositions (if Q∈𝒮Q \in \mathcal{S} and P⊑QP \sqsubseteq Q, then P∈𝒮P \in \mathcal{S}), every position in 𝒮\mathcal{S} is a partial isomorphism between GG and HH, and for every P∈𝒮P \in \mathcal{S} and every i∈[K]i \in [K] with P(i)=⊥P(i) = \bot, there exists a bijection e:[n]→[n]e : [n] \to [n] such that P[i←(z,e(z))]∈𝒮P[i \leftarrow (z, e(z))] \in \mathcal{S} for every z∈[n]z \in [n].✦ Duplicator wins the KK-pair bijective pebble game on GG and HH from a position PP if there exists a KK-pebble game invariant 𝒮\mathcal{S} for GG and HH with P∈𝒮P \in \mathcal{S}.✦

The colored game on general simple graphs

Let AA and BB be arbitrary vertex sets, let GG be a simple graph on AA with symmetric, irreflexive adjacency relation ∼G\sim_G, let HH be a simple graph on BB with adjacency relation ∼H\sim_H, and let C⊆A×BC \subseteq A \times B be a binary vertex compatibility relation. For K∈ℕK \in \mathbb{N}, a KK-pebble position on AA and BB is a partial assignment PP mapping each i∈[K]i \in [K] either to a vertex pair (x,y)∈A×B(x, y) \in A \times B or to ⊥\bot.✦ Subpositions P⊑QP \sqsubseteq Q and single-pebble updates P[i←(z,w)]P[i \leftarrow (z, w)] are defined as before: P⊑QP \sqsubseteq Q holds when every i∈[K]i \in [K] satisfies P(i)=⊥P(i) = \bot or P(i)=Q(i)P(i) = Q(i)✦, and P[i←(z,w)]P[i \leftarrow (z, w)] maps ii to (z,w)(z, w) while preserving P(j)P(j) for j≠ij \neq i.

A KK-pebble position PP on AA and BB is a CC-preserving partial isomorphism between GG and HH if C(x,y)C(x, y) holds whenever P(i)=(x,y)P(i) = (x, y), and for all i,j∈[K]i, j \in [K] with P(i)=(x,y)P(i) = (x, y) and P(j)=(u,v)P(j) = (u, v), x=u⇔y=v,x∼Gu⇔y∼Hv.\begin{aligned} x = u &\iff y = v, \\ x \sim_G u &\iff y \sim_H v. \end{aligned}(3)✦

A KK-pebble colored game invariant for GG, HH, and CC is a family 𝒮\mathcal{S} of KK-pebble positions on AA and BB that is downward-closed under subpositions, consists exclusively of CC-preserving partial isomorphisms between GG and HH, and satisfies bijective extension: for every P∈𝒮P \in \mathcal{S} and every i∈[K]i \in [K] with P(i)=⊥P(i) = \bot, there exists a bijection e:A→Be : A \to B such that P[i←(z,e(z))]∈𝒮P[i \leftarrow (z, e(z))] \in \mathcal{S} for every z∈Az \in A.✦ Duplicator wins the CC-colored KK-pair bijective pebble game on GG and HH from a position PP if there exists a KK-pebble colored game invariant 𝒮\mathcal{S} for GG, HH, and CC with P∈𝒮P \in \mathcal{S}.✦

The claim

Definition. For a finite vertex set AA, a simple graph GG on AA, and a vertex x∈Ax \in A, the degree of xx in GG is the cardinality of its neighborhood: deg⁡G(x)=|{z∈A:x∼Gz}|.\deg_G(x) = \lvert\{z \in A : x \sim_G z\}\rvert.(4)✦

Theorem.

  1. Let n,K∈ℕn, K \in \mathbb{N} with K≥2K \ge 2, let GG and HH be simple graphs on [n][n], and let PP be a KK-pebble position on [n][n] from which Duplicator wins the KK-pair bijective pebble game on GG and HH. For every i∈[K]i \in [K] and all x,y∈[n]x, y \in [n] with P(i)=(x,y)P(i) = (x, y), deg⁡G(x)=deg⁡H(y).\deg_G(x) = \deg_H(y).(5)✦

  2. Let K∈ℕK \in \mathbb{N}, let GG and HH be simple graphs on arbitrary vertex sets AA and BB, let C⊆A×BC \subseteq A \times B be a vertex compatibility relation, and let PP be a KK-pebble position on AA and BB from which Duplicator wins the CC-colored KK-pair bijective pebble game on GG and HH. For any distinct pebble indices i,s∈[K]i, s \in [K] with P(s)=⊥P(s) = \bot and any vertex x∈Ax \in A, there exists a vertex y∈By \in B such that Duplicator wins the CC-colored KK-pair bijective pebble game on GG and HH from P[i←(x,y)]P[i \leftarrow (x, y)], the compatibility condition C(x,y)C(x, y) holds, and whenever P(i)=(u,v)P(i) = (u, v) for u∈Au \in A and v∈Bv \in B, u=x⇔v=y,u∼Gx⇔v∼Hy.\begin{aligned} u = x &\iff v = y, \\ u \sim_G x &\iff v \sim_H y. \end{aligned}(6)✦

In the paper, the result reads: Definitions 2.1 and 2.2 are stated for finite, simple, nonempty vertex-colored graphs, defining the joint and separate kk-Weisfeiler-Leman refinement conventions for k≥2k \ge 2 and the KK-pair bijective pebble game.

What is checked

The Lean library states the vertex degree definition in (4) for any simple graph on a finite vertex set, degree preservation in (5) for any two simple graphs on [n][n] and any Duplicator winning position in the KK-pair bijective pebble game with K≥2K \ge 2, and pebble replacement in (6) for any two simple graphs on arbitrary vertex sets with a binary compatibility relation and any Duplicator winning position having an unplaced pebble pair distinct from the moved pebble.