OctoInform Beta

OpenAI preprint, September 2026 · §1. Introduction

§1 (setting): Invariance of WLdim⁡(G)\operatorname{WLdim}(G) under isomorphism, binary encoding of WLdim⁡(G)≤k\operatorname{WLdim}(G) \le k, and tt-step Turing machine runs

Weisfeiler-Leman dimension, binary encoding, and Turing machine runs.

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

Weisfeiler-Leman (WL) color refinement iteratively partitions the vertices or kk-tuples of vertices of a finite simple undirected uncolored graph according to their local isomorphism types and neighborhood multisets. Two graphs are kk-WL equivalent when their color histograms match at every refinement round, and kk-WL identifies a graph GG when no non-isomorphic graph is kk-WL equivalent to GG. The Weisfeiler-Leman dimension WLdim⁡(G)\operatorname{WLdim}(G) is the least positive integer kk that identifies GG, measuring the refinement dimension required to distinguish GG up to isomorphism. To formulate the decision problem asking whether WLdim⁡(G)≤k\operatorname{WLdim}(G) \le k as a formal language, nonempty graphs and positive integers are encoded as binary words, and deterministic single-tape Turing machines provide the computational model.

Graphs and Weisfeiler-Leman refinement

A finite simple graph GG consists of a natural number order n=|V(G)|∈ℕn = |V(G)| \in \mathbb{N} (possibly zero), with vertex set V(G)={0,…,n−1}V(G) = \{0, \dots, n - 1\}, and an adjacency indicator AG:V(G)×V(G)→{0,1}A_G : V(G) \times V(G) \to \{0, 1\} that is symmetric (AG(u,v)=AG(v,u)A_G(u, v) = A_G(v, u) for all u,v∈V(G)u, v \in V(G)) and loopless (AG(u,u)=0A_G(u, u) = 0 for all u∈V(G)u \in V(G)).✦ Two graphs GG and HH are isomorphic, written G≅HG \cong H, if there exists a bijection e:V(G)→V(H)e : V(G) \to V(H) such that AG(u,v)=AH(e(u),e(v))A_G(u, v) = A_H(e(u), e(v)) for all u,v∈V(G)u, v \in V(G).✦

For 11-WL refinement, the round-ss color space 𝒞1(s)\mathcal{C}_1^{(s)} is defined recursively for s∈ℕs \in \mathbb{N} by 𝒞1(0)={*}\mathcal{C}_1^{(0)} = \{\ast\}, a singleton set, and 𝒞1(s+1)=𝒞1(s)×ℳ(𝒞1(s))\mathcal{C}_1^{(s+1)} = \mathcal{C}_1^{(s)} \times \mathcal{M}(\mathcal{C}_1^{(s)}), where ℳ(X)\mathcal{M}(X) denotes the set of finite multisets over XX.✦ The 11-WL vertex coloring cG,1(s):V(G)→𝒞1(s)c_{G, 1}^{(s)} : V(G) \to \mathcal{C}_1^{(s)} of a graph GG is defined by cG,1(0)(v)=*,cG,1(s+1)(v)=(cG,1(s)(v),{{cG,1(s)(w):w∈V(G),AG(v,w)=1}}),\begin{aligned} c_{G, 1}^{(0)}(v) &= \ast, \\ c_{G, 1}^{(s+1)}(v) &= \bigl(c_{G, 1}^{(s)}(v),\; \{\!\{ c_{G, 1}^{(s)}(w) : w \in V(G),\; A_G(v, w) = 1 \}\!\}\bigr), \end{aligned}(1)✦ and the round-ss 11-WL color histogram is the multiset HG,1(s)={{cG,1(s)(v):v∈V(G)}}∈ℳ(𝒞1(s))H_{G, 1}^{(s)} = \{\!\{ c_{G, 1}^{(s)}(v) : v \in V(G) \}\!\} \in \mathcal{M}(\mathcal{C}_1^{(s)}).✦

For any k∈ℕk \in \mathbb{N}, the round-ss kk-WL color space 𝒞k(s)\mathcal{C}_k^{(s)} is defined recursively by 𝒞k(0)={0,1}k×k×{0,1}k×k\mathcal{C}_k^{(0)} = \{0, 1\}^{k \times k} \times \{0, 1\}^{k \times k} and 𝒞k(s+1)=𝒞k(s)×ℳ((𝒞k(s))k)\mathcal{C}_k^{(s+1)} = \mathcal{C}_k^{(s)} \times \mathcal{M}((\mathcal{C}_k^{(s)})^k).✦ Given a kk-tuple 𝒗=(v0,…,vk−1)∈V(G)k\mathbf{v} = (v_0, \dots, v_{k-1}) \in V(G)^k, let 𝒗[i↦z]\mathbf{v}[i \mapsto z] denote the tuple obtained by replacing coordinate ii of 𝒗\mathbf{v} with z∈V(G)z \in V(G). The joint-update kk-WL tuple coloring cG,k(s):V(G)k→𝒞k(s)c_{G, k}^{(s)} : V(G)^k \to \mathcal{C}_k^{(s)} is defined by cG,k(0)(𝒗)=((𝟏vi=vj)i,j,(AG(vi,vj))i,j),cG,k(s+1)(𝒗)=(cG,k(s)(𝒗),{{(cG,k(s)(𝒗[i↦z]))i=0k−1:z∈V(G)}}),\begin{aligned} c_{G, k}^{(0)}(\mathbf{v}) &= \bigl((\mathbf{1}_{v_i = v_j})_{i, j},\; (A_G(v_i, v_j))_{i, j}\bigr), \\ c_{G, k}^{(s+1)}(\mathbf{v}) &= \bigl(c_{G, k}^{(s)}(\mathbf{v}),\; \{\!\{ (c_{G, k}^{(s)}(\mathbf{v}[i \mapsto z]))_{i=0}^{k-1} : z \in V(G) \}\!\}\bigr), \end{aligned}(2)✦ where 𝟏vi=vj∈{0,1}\mathbf{1}_{v_i = v_j} \in \{0, 1\} indicates whether vi=vjv_i = v_j. The round-ss kk-WL color histogram is HG,k(s)={{cG,k(s)(𝒗):𝒗∈V(G)k}}∈ℳ(𝒞k(s))H_{G, k}^{(s)} = \{\!\{ c_{G, k}^{(s)}(\mathbf{v}) : \mathbf{v} \in V(G)^k \}\!\} \in \mathcal{M}(\mathcal{C}_k^{(s)}).✦

Two graphs GG and HH are kk-WL equivalent, written G≡kHG \equiv_k H, if HG,1(s)=HH,1(s)H_{G, 1}^{(s)} = H_{H, 1}^{(s)} for every s∈ℕs \in \mathbb{N} when k=1k = 1, and HG,k(s)=HH,k(s)H_{G, k}^{(s)} = H_{H, k}^{(s)} for every s∈ℕs \in \mathbb{N} when k≠1k \neq 1.✦ A dimension k∈ℕk \in \mathbb{N} identifies GG if every graph HH with G≡kHG \equiv_k H satisfies G≅HG \cong H.✦ The Weisfeiler-Leman dimension of GG is the infimum in ℕ\mathbb{N} given by WLdim⁡(G)=inf⁡{k∈ℕ:k>0 and k-WL identifies G},\operatorname{WLdim}(G) = \inf \{ k \in \mathbb{N} : k > 0 \text{ and } k\text{-WL identifies } G \},(3)✦ taking the value 00 if the set is empty and the least such positive integer otherwise.

Binary encoding and the dimension language

A binary word is a finite bit string w∈{0,1}*w \in \{0, 1\}^*✦, and a binary language is a subset L⊆{0,1}*L \subseteq \{0, 1\}^*.✦ The binary value val⁡(w)∈ℕ\operatorname{val}(w) \in \mathbb{N} of a word w=b0b1⋯bm−1w = b_0 b_1 \cdots b_{m-1} is its unsigned big-endian value ∑j=0m−1bj2m−1−j\sum_{j=0}^{m-1} b_j 2^{m-1-j} (with val⁡(ε)=0\operatorname{val}(\varepsilon) = 0 for the empty word ε\varepsilon).✦ For each n∈ℕn \in \mathbb{N}, the canonical binary representation bin⁡(n)∈{0,1}*\operatorname{bin}(n) \in \{0, 1\}^* is the big-endian bit string of nn with no leading zeros (bin⁡(0)=ε\operatorname{bin}(0) = \varepsilon).✦

For a graph GG of order nn, its adjacency matrix encoding mat⁡(G)∈{0,1}n2\operatorname{mat}(G) \in \{0, 1\}^{n^2} is the row-major concatenation of the rows (AG(i,0),…,AG(i,n−1))(A_G(i, 0), \dots, A_G(i, n - 1)) for i=0,…,n−1i = 0, \dots, n - 1.✦ Given also a binary word u∈{0,1}*u \in \{0, 1\}^*, the input encoding of the pair (G,u)(G, u) is enc⁡(G,u)=1n0mat⁡(G)u.\operatorname{enc}(G, u) = 1^n 0 \, \operatorname{mat}(G) \, u.(4)✦ The WL dimension language LWL⊆{0,1}*L_{\mathrm{WL}} \subseteq \{0, 1\}^* consists of all validly encoded positive instances: LWL={w∈{0,1}*:∃G,u∈{0,1}* with |V(G)|>0,u beginning with 1,val⁡(u)>0,w=enc⁡(G,u),WLdim⁡(G)≤val⁡(u)}.\begin{aligned} L_{\mathrm{WL}} = \bigl\{\, w \in \{0, 1\}^* :{}& \exists\, G,\; u \in \{0, 1\}^* \text{ with } |V(G)| > 0, \\ & u \text{ beginning with } 1,\; \operatorname{val}(u) > 0, \\ & w = \operatorname{enc}(G, u),\; \operatorname{WLdim}(G) \le \operatorname{val}(u) \,\bigr\}. \end{aligned}(5)✦

Deterministic Turing machines

A head move is an element d∈{left,stay,right}d \in \{\text{left}, \text{stay}, \text{right}\}✦ with integer displacement δ(left)=−1\delta(\text{left}) = -1, δ(stay)=0\delta(\text{stay}) = 0, and δ(right)=1\delta(\text{right}) = 1.✦ A deterministic Turing machine MM is specified by natural numbers msym,mst∈ℕm_{\mathrm{sym}}, m_{\mathrm{st}} \in \mathbb{N}, which determine its tape alphabet ΣM={0,…,msym+2}\Sigma_M = \{0, \dots, m_{\mathrm{sym}} + 2\} and state set QM={0,…,mst+2}Q_M = \{0, \dots, m_{\mathrm{st}} + 2\}, together with a transition function τM:QM×ΣM→QM×ΣM×{left,stay,right}\tau_M : Q_M \times \Sigma_M \to Q_M \times \Sigma_M \times \{\text{left}, \text{stay}, \text{right}\}.✦

A configuration of MM is a triple c=(q,h,σ)c = (q, h, \sigma) consisting of a state q∈QMq \in Q_M, a head position h∈ℤh \in \mathbb{Z}, and a two-way infinite tape σ:ℤ→ΣM\sigma : \mathbb{Z} \to \Sigma_M.✦ The input tape symbol map ιM:{0,1}→ΣM\iota_M : \{0, 1\} \to \Sigma_M sends 00 to 11 and 11 to 22, reserving 0∈ΣM0 \in \Sigma_M for the blank symbol.✦ On a binary word w=b0b1⋯bm−1∈{0,1}*w = b_0 b_1 \cdots b_{m-1} \in \{0, 1\}^*, the initial configuration init⁡(M,w)=(0,0,σw)\operatorname{init}(M, w) = (0, 0, \sigma_w) starts in state 00 at head position 00 with tape contents σw(z)=ιM(bz)\sigma_w(z) = \iota_M(b_z) for 0≤z<m0 \le z < m and σw(z)=0\sigma_w(z) = 0 for all z<0z < 0 or z≥mz \ge m.✦

The one-step transition function step⁡M\operatorname{step}_M maps a configuration c=(q,h,σ)c = (q, h, \sigma) to itself whenever q∈{1,2}q \in \{1, 2\} (the halting states). For q∉{1,2}q \notin \{1, 2\}, writing τM(q,σ(h))=(q′,s′,d)\tau_M(q, \sigma(h)) = (q', s', d), it sets step⁡M(q,h,σ)=(q′,h+δ(d),σ[h↦s′]),\operatorname{step}_M(q, h, \sigma) = (q',\; h + \delta(d),\; \sigma[h \mapsto s']),(6)✦ where σ[h↦s′]\sigma[h \mapsto s'] agrees with σ\sigma on ℤ\{h}\mathbb{Z} \setminus \{h\} and takes the value s′s' at hh.

The claim

Definition. For every deterministic Turing machine MM, every binary word w∈{0,1}*w \in \{0, 1\}^*, and every step count t∈ℕt \in \mathbb{N}, the configuration of MM on input ww after tt steps is the tt-fold iterate of step⁡M\operatorname{step}_M applied to the initial configuration: run⁡(M,w,t)=step⁡Mt(init⁡(M,w)).\operatorname{run}(M, w, t) = \operatorname{step}_M^{\,t}(\operatorname{init}(M, w)).(7)✦ For every nonempty graph GG (|V(G)|>0|V(G)| > 0) and every positive integer k>0k > 0, the encoded input belongs to the WL dimension language if and only if WLdim⁡(G)≤k\operatorname{WLdim}(G) \le k: enc⁡(G,bin⁡(k))∈LWL⇔WLdim⁡(G)≤k.\operatorname{enc}(G, \operatorname{bin}(k)) \in L_{\mathrm{WL}} \iff \operatorname{WLdim}(G) \le k.(8)✦ For any two isomorphic graphs GG and HH (G≅HG \cong H), their Weisfeiler-Leman dimensions coincide: WLdim⁡(G)=WLdim⁡(H).\operatorname{WLdim}(G) = \operatorname{WLdim}(H).(9)✦

In the paper, the result reads: all graphs are finite, simple, undirected, and uncolored; for k≥2k \ge 2 refinement uses the joint-update convention and for k=1k = 1 ordinary neighbor color refinement; G≡kHG \equiv_k H means their tuple-color histograms agree at every round; kk-WL identifies GG if G≡kHG \equiv_k H implies G≅HG \cong H for every graph HH; and WLdim⁡(G)\operatorname{WLdim}(G) is the least positive integer kk identifying GG.

What is checked

The Lean library states the tt-step run (7) over deterministic single-tape Turing machines with integer-indexed tapes, halting states 11 and 22, and binary input words; it states the membership equivalence (8) over nonempty finite simple graphs and positive integers encoded via unary vertex count, row-major adjacency matrix, and canonical big-endian binary words; and it states isomorphism invariance (9) over all finite simple graphs under the 11-WL neighbor refinement and kk-WL joint-update refinement rules.