OctoInform Beta

OpenAI preprint, September 2026 · §2. Joint refinement and its bijective game

§2 (setting): Recursive tuple coloring, histogram equivalence G≡kHG \equiv_k H, and the binary language WL\mathrm{WL} for k≥2k \ge 2

Joint-update Weisfeiler-Leman refinement and the equivalence problem.

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

The kk-dimensional Weisfeiler-Leman algorithm is a combinatorial color refinement procedure that iteratively partitions the kk-tuples of vertices of a finite simple graph. Starting from the isomorphism type of each kk-tuple, every refinement round updates a tuple’s color by combining its current color with a multiset of kk-tuples of colors obtained by substituting a single vertex into each of the kk coordinates simultaneously. Grouping all kk coordinate replacements for a given vertex into one kk-tuple is the joint-update convention. Two finite simple graphs GG and HH are kk-dimensional joint-update Weisfeiler-Leman equivalent, written G≡kHG \equiv_k H, when their multisets of tuple colors agree at every round.✦ Taking GG, HH, and an integer dimension k≥2k \ge 2 together as input defines the variable-dimension decision problem WL\mathrm{WL}.

Joint-update color refinement

A finite simple graph GG consists of a natural number nn, called its order, together with a simple undirected graph on the vertex set V(G)={0,…,n−1}V(G) = \{0, \dots, n - 1\}.✦ For a natural number kk, a vertex kk-tuple of GG is a function 𝒗:{0,…,k−1}→V(G)\mathbf{v} : \{0, \dots, k - 1\} \to V(G), written 𝒗=(v0,…,vk−1)∈V(G)k\mathbf{v} = (v_0, \dots, v_{k-1}) \in V(G)^k.✦

For any set XX, let ℳ(X)\mathcal{M}(X) denote the set of finite multisets with elements in XX. For natural numbers kk and ss, the set Ck,sC_{k, s} of round-ss colors is defined recursively on ss: at s=0s = 0, Ck,0C_{k, 0} is the set of all functions from {0,…,k−1}2\{0, \dots, k - 1\}^2 to {0,1}2\{0, 1\}^2, and at s+1s + 1, Ck,s+1=Ck,s×ℳ(Ck,sk).C_{k, s+1} = C_{k, s} \times \mathcal{M}(C_{k, s}^k).(1)✦ The color sets in (1) depend only on kk and ss, so colors produced on different graphs lie in a common universe.

For a finite simple graph GG and a natural number kk, the round-ss tuple coloring χsG:V(G)k→Ck,s\chi_s^G : V(G)^k \to C_{k, s} is defined recursively on s∈ℕs \in \mathbb{N}. At s=0s = 0, χ0G(𝒗)\chi_0^G(\mathbf{v}) maps each pair (i,j)∈{0,…,k−1}2(i, j) \in \{0, \dots, k - 1\}^2 to (𝟏[vi=vj],𝟏[vi∼Gvj])(\mathbf{1}[v_i = v_j], \mathbf{1}[v_i \sim_G v_j]), where 𝟏[P]∈{0,1}\mathbf{1}[P] \in \{0, 1\} equals 11 if PP holds and 00 otherwise, and vi∼Gvjv_i \sim_G v_j indicates adjacency in GG. Writing 𝒗[i←z]\mathbf{v}[i \leftarrow z] for the kk-tuple obtained from 𝒗\mathbf{v} by replacing its iith entry with z∈V(G)z \in V(G), the round-(s+1)(s + 1) coloring is defined by (2): χs+1G(𝒗)=(χsG(𝒗),{{(χsG(𝒗[i←z]))i=0k−1:z∈V(G)}}).\begin{aligned} \chi_{s+1}^G(\mathbf{v}) = \Bigl(\chi_s^G(\mathbf{v}),\; \bigl\{\!\bigl\{ &\bigl(\chi_s^G(\mathbf{v}[i \leftarrow z])\bigr)_{i=0}^{k-1} \\ &: z \in V(G) \bigr\}\!\bigr\}\Bigr). \end{aligned}(2)✦

For a finite simple graph GG and natural numbers kk and ss, the round-ss color histogram histk,s(G)∈ℳ(Ck,s)\mathrm{hist}_{k, s}(G) \in \mathcal{M}(C_{k, s}) is the multiset of colors attained on V(G)kV(G)^k: histk,s(G)={{χsG(𝒗):𝒗∈V(G)k}}.\mathrm{hist}_{k, s}(G) = \bigl\{\!\bigl\{ \chi_s^G(\mathbf{v}) : \mathbf{v} \in V(G)^k \bigr\}\!\bigr\}.(3)✦ Two finite simple graphs GG and HH are kk-dimensional joint-update Weisfeiler-Leman equivalent, written G≡kHG \equiv_k H, when their color histograms (3) coincide at every round, as in (4): G≡kH⇔∀s∈ℕ,histk,s(G)=histk,s(H).G \equiv_k H \iff \forall s \in \mathbb{N},\; \mathrm{hist}_{k, s}(G) = \mathrm{hist}_{k, s}(H).(4)✦

Binary encoding of instances

A binary word is a finite string over {0,1}\{0, 1\}, an element of {0,1}*\{0, 1\}^*✦, and a formal language is a subset of {0,1}*\{0, 1\}^*✦. For a natural number nn, let b(n)∈{0,1}*b(n) \in \{0, 1\}^* be its binary representation ordered from least to most significant bit, with b(0)b(0) the empty word, and let ℓ(n)=|b(n)|\ell(n) = |b(n)| be its length. The prefix-free integer encoding encℕ(n)∈{0,1}*\mathrm{enc}_{\mathbb{N}}(n) \in \{0, 1\}^* is given by (5): encℕ(n)=1ℓ(n)0b(n).\mathrm{enc}_{\mathbb{N}}(n) = 1^{\ell(n)} 0\, b(n).(5)✦

Each finite simple graph GG of order nn is assigned the binary encoding encG(G)∈{0,1}*\mathrm{enc}_{\mathrm{G}}(G) \in \{0, 1\}^* obtained by concatenating the prefix-free encoding encℕ(n)\mathrm{enc}_{\mathbb{N}}(n) of its order with the n2n^2 adjacency bits 𝟏[i∼Gj]\mathbf{1}[i \sim_G j] for all ordered pairs (i,j)∈{0,…,n−1}2(i, j) \in \{0, \dots, n - 1\}^2 in row-major (lexicographic) order (outer index i=0,…,n−1i = 0, \dots, n - 1, inner index j=0,…,n−1j = 0, \dots, n - 1).✦ For finite simple graphs GG and HH and a natural number kk, the binary encoding enc(G,H,k)∈{0,1}*\mathrm{enc}(G, H, k) \in \{0, 1\}^* of the instance (G,H,k)(G, H, k) is the concatenation in (6): enc(G,H,k)=encG(G)encG(H)encℕ(k).\mathrm{enc}(G, H, k) = \mathrm{enc}_{\mathrm{G}}(G)\, \mathrm{enc}_{\mathrm{G}}(H)\, \mathrm{enc}_{\mathbb{N}}(k).(6)✦

The definition

Definition. The variable-dimension Weisfeiler-Leman equivalence problem WL\mathrm{WL} is the formal language WL={enc(G,H,k):G,H finite simple graphs,k∈ℕ,k≥2,G≡kH},\mathrm{WL} = \left\{ \mathrm{enc}(G, H, k) : \begin{aligned} &\text{$G, H$ finite simple graphs,}\\ &k \in \mathbb{N},\; k \ge 2,\; G \equiv_k H \end{aligned} \right\},(7)✦ where enc(G,H,k)\mathrm{enc}(G, H, k) is given by (6) and each graph encoding encG(G)\mathrm{enc}_{\mathrm{G}}(G) for a graph GG of order nn concatenates encℕ(n)\mathrm{enc}_{\mathbb{N}}(n) with the n2n^2 adjacency bits 𝟏[i∼Gj]\mathbf{1}[i \sim_G j] for all ordered pairs (i,j)∈{0,…,n−1}2(i, j) \in \{0, \dots, n - 1\}^2 in row-major (lexicographic) order (outer index i=0,…,n−1i = 0, \dots, n - 1, inner index j=0,…,n−1j = 0, \dots, n - 1).

What is checked

In the Lean library, the formal language WL\mathrm{WL} in (7) is defined over finite simple graphs on vertex sets {0,…,n−1}\{0, \dots, n - 1\}, their vertex kk-tuples, the recursive joint-update color sets and tuple colorings, the round-by-round color histograms defining G≡kHG \equiv_k H, and the binary encodings of natural numbers, graphs, and instances (G,H,k)(G, H, k) with k≥2k \ge 2.