OctoInform Beta

OpenAI preprint, September 2026 · §6. From block realizations to the bijective game

Corollary 6.2: The general realization graphs of a time-bounded multitape Turing machine are rr-WL equivalent if and only if the machine accepts

Correctness of the general graph reduction for Turing machines.

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 variable-dimension Weisfeiler-Leman equivalence problem WL\mathrm{WL} asks, given two finite simple graphs GG and HH together with an integer dimension k≥2k \ge 2, whether GG and HH cannot be distinguished by the kk-dimensional Weisfeiler-Leman refinement algorithm. Corollary 6.2 establishes the correctness of the general-graph compilation of a time-bounded multitape Turing machine MM on an input binary word ww: the compiled pair of finite simple graphs G0(w)G^0(w) and G1(w)G^1(w) at dimension r(w)r(w) encodes a yes-instance of WL\mathrm{WL} if and only if MM outputs the acceptance bit on ww.

A binary word is a finite list of Boolean values✦, and a formal language is a set of binary words.✦ A finite simple graph GG consists of a natural number order NN together with a simple graph structure on the vertex set {0,…,N−1}\{0, \dots, N - 1\}.✦ For a natural number kk, a vertex kk-tuple of GG is a function v:{0,…,k−1}→{0,…,N−1}v : \{0, \dots, k - 1\} \to \{0, \dots, N - 1\}.✦ The kk-WL color types are defined recursively by round s∈ℕs \in \mathbb{N}: a round-00 color assigns to each pair (i,j)∈{0,…,k−1}2(i, j) \in \{0, \dots, k - 1\}^2 a pair of Booleans, and a round-(s+1)(s + 1) color pairs a round-ss color with a multiset of maps from {0,…,k−1}\{0, \dots, k - 1\} to round-ss colors.✦

The kk-WL tuple coloring χsG\chi_s^G assigns to each vertex kk-tuple vv its round-00 color recording, for every ordered pair (i,j)(i, j), whether v(i)=v(j)v(i) = v(j) and whether v(i)v(i) and v(j)v(j) are adjacent in GG. At round s+1s + 1, it sets χs+1G(v)=(χsG(v),{{i↦χsG(v[i←z]):z∈V(G)}}),\chi_{s+1}^G(v) = \Bigl(\chi_s^G(v),\, \bigl\{\!\!\bigl\{ i \mapsto \chi_s^G(v[i \leftarrow z]) : z \in V(G) \bigr\}\!\!\bigr\}\Bigr),(1) where v[i←z]v[i \leftarrow z] replaces coordinate ii of vv with zz. The kk-WL color histogram of GG at round ss is the multiset of colors χsG(v)\chi_s^G(v) over all vertex kk-tuples vv of GG.✦ Two finite simple graphs GG and HH are kk-WL equivalent, written G≡kHG \equiv_k H, if their kk-WL color histograms agree at every round s∈ℕs \in \mathbb{N}.✦

A fixed binary encoding represents each finite simple graph GG as a binary word. The prefix-free integer encoding of a natural number kk consists of as many 11 bits as the length of the binary representation of kk, followed by a single 00 and then the binary representation of kk.✦ Concatenating the binary encodings of GG, HH, and kk gives the instance encoding code(G,H,k)\mathrm{code}(G, H, k).✦ The decision problem WL\mathrm{WL} is the formal language WL={code(G,H,k):k≥2 and G≡kH}.\mathrm{WL} = \bigl\{\mathrm{code}(G, H, k) : k \ge 2 \text{ and } G \equiv_k H\bigr\}.(2)✦

Turing machines and one-head simulation

A multitape Turing machine MM is given by its number qq of non-initial control states, its number aa of work symbols, its number ee of extra tapes, and a partial transition function.✦ Its control states lie in {0,…,q}\{0, \dots, q\}, its tape alphabet is {0,…,a+2}\{0, \dots, a + 2\}, and its tapes are indexed by {0,…,e}\{0, \dots, e\}. A head motion direction is left, stay, or right, with integer head displacement −1-1, 00, or 11, respectively. Given a control state and the tuple of scanned symbols on all e+1e + 1 tapes, the transition function either halts or returns a next control state together with a written symbol and head motion direction for each tape.

A configuration of MM specifies a control state, an integer head position for each tape, and a tape content map assigning a tape symbol to every integer cell of every tape.✦ The scanned tape symbols of a configuration are the symbols stored at each tape’s head position.✦ A single transition step evaluates the transition function on the current state and scanned symbols and, when defined, updates the control state, shifts each head by its displacement, and overwrites each scanned cell.✦ Starting from the initial configuration of MM on a binary word ww, iterating single transition steps (and remaining fixed once halted) gives the configuration after tt steps.✦ The tape encoding of a binary word uu places 11 for false\text{false} and 22 for true\text{true} at nonnegative positions 0≤i<|u|0 \le i < |u|, and 00 everywhere else.✦ The machine MM outputs uu on input ww within time bound T∈ℕT \in \mathbb{N} if there exists t≤Tt \le T such that the configuration after tt steps has no further transition and tape 00 holds the tape encoding of uu.✦

To compile MM into a cellular automaton, the Lean library first simulates MM by a multi-stack program, where each tape j∈{0,…,e}j \in \{0, \dots, e\} is split into two stacks (j,false)(j, \text{false}) and (j,true)(j, \text{true}) over the tape alphabet {0,…,a+2}\{0, \dots, a + 2\}. The program uses registers holding the scanned symbols, optional transition output data (defaulting to state 00, symbol 00, and stay on all tapes), and a Boolean answer bit. At each simulation label for a state, the program peeks all (j,true)(j, \text{true}) stacks over the list of all tapes, evaluates the transition function, and either updates all tapes and jumps to the next simulation label or, upon halting, clears the answer bit and drains both stacks of tape 00, setting the answer bit to true\text{true} if symbol 22 appears. The stack operation count of a statement counts pushes, peeks, and pops along the longest branch✦, and the maximum stack operations BMB_M is the maximum over all multi-stack labels.✦

Translating the multi-stack program to an intermediate single-tape program gives a finite intermediate label support and a maximum instruction count IMI_M, where the instruction count of a statement counts moves and writes along the longest branch plus 11 for a jump or halt. A second translation produces a base Turing program supported on its translated base label support. Adapting that base program over its supported control states and single-tape alphabet yields an equivalent one-head machine program: moves keep the scanned symbol while shifting the head, writes overwrite the symbol with stay, and a state-symbol pair is accepting when the answer bit is false\text{false}. Each bit of an input word ww is encoded as 22 for true\text{true} and 11 for false\text{false} and mapped to the encoded one-head input on stack slot (0,true)(0, \text{true}).

For natural numbers cc and dd and an input length mm, the linear simulation constant is LM=2BM+5L_M = 2 B_M + 5✦, the quadratic simulation constant is QM=LM(1+BM(2(1+LMBM+BM)+2))IM,Q_M = L_M \bigl(1 + B_M (2 (1 + L_M B_M + B_M) + 2)\bigr) I_M,(3)✦ the input time exponent is E(c,d,m)=(c+1)(m+1)d+1E(c, d, m) = (c + 1)(m + 1)^{d + 1}✦, and the simulation time exponent is TM(c,d,m)=QM+3+2E(c,d,m)T_M(c, d, m) = Q_M + 3 + 2 E(c, d, m).✦ For a binary word ww, the reduction address bit length is δ(w)=TM(c,d,|w|)+2\delta(w) = T_M(c, d, |w|) + 2✦, the reduction dimension is r(w)=2δ(w)r(w) = 2 \delta(w)✦, the subdivision parameter is n(w)=4(r(w)+1)n(w) = 4(r(w) + 1)✦, and the marked reduction coordinate is 0∈{0,…,r(w)−1}0 \in \{0, \dots, r(w) - 1\}.✦

Cellular automata and succinct circuit descriptions

For a natural number ℓ\ell, binary strings of length ℓ\ell are maps x:{0,…,ℓ−1}→{false,true}x : \{0, \dots, \ell - 1\} \to \{\text{false}, \text{true}\}.✦ The binary value of xx is ∑i=0ℓ−1x(i)2i\sum_{i=0}^{\ell-1} x(i) 2^i, which is strictly less than 2ℓ2^\ell and defines the binary encoding bijection between binary strings of length ℓ\ell and {0,…,2ℓ−1}\{0, \dots, 2^\ell - 1\}. Given a Boolean uu, a carry index hh, and a bit position i∈{0,…,ℓ−1}i \in \{0, \dots, \ell - 1\}, the carry domain is {u}\{u\} when i<hi < h, {¬u}\{\neg u\} when i=hi = h, and {false,true}\{\text{false}, \text{true}\} when i>hi > h✦; the cyclic carry domain with an optional carry index equals {u}\{u\} when the index is absent and the carry domain when it is present.✦ The increment bit map flips a bit xx when i≤hi \le h and leaves xx unchanged when i>hi > h✦, while the cyclic increment bit map negates xx when the optional carry index is absent and applies the increment bit map otherwise.✦ Given a threshold string μ\mu and an optional index hh with μ(h)=false\mu(h) = \text{false}, the threshold bit domain at position ii is {μ(i)}\{\mu(i)\} when hh is absent or h<ih < i, {true}\{\text{true}\} when i=hi = h, and {false,true}\{\text{false}, \text{true}\} when i<hi < h.✦

For a one-head machine program over states QQ and alphabet Γ\Gamma, a one-head tape cell is a pair in Γ×(optional Q)\Gamma \times (\text{optional } Q).✦ The total transition action defaults on halt to keeping the current state and symbol with motion stay.✦ For a motion direction and a cell, the incoming head state returns the next state when the cell carries a head moving in that direction and is absent otherwise.✦ The one-head local transition rule maps a local neighborhood triple (a,b,c)(a, b, c) of cells to the cell whose symbol is written at bb (or unchanged if bb has no head) and whose head state is the first incoming state moving right from aa, staying at bb, or moving left from cc.✦ A cell is accepting when it carries a head state satisfying the program’s accepting predicate.✦ Marking index 00 of the encoded one-head input with the start state, taking the default blank symbol with no head as the blank cell, and using the length bound below 2δ(w)2^{\delta(w)} yields the reduction cellular automaton instance over one-head tape cells.

A succinct circuit description at address length rr specifies a scalar gate set SS, a conjunction gate set AA, an edge template set EE, and a request set RR. Circuit gates lie in S⊔AS \sqcup A, with gate input dimension 11 on SS and 22 on AA. Circuit ports lie in S⊔(A×{false,true})S \sqcup (A \times \{\text{false}, \text{true}\}), each mapping to its port target gate in S⊔AS \sqcup A. Let 𝔽2\mathbb{F}_2 be the field of bits and 𝔽2ℓ\mathbb{F}_2^\ell the space of length-ℓ\ell binary vectors. The port input linear form on a port pp projects to coordinate 00 for a scalar port or first conjunction port and to coordinate 11 for a second conjunction port✦; the gate output linear map projects to coordinate 00 on a scalar gate and sums both coordinates on a conjunction gate.✦ Each edge template specifies a source gate, a destination port, nonempty coordinate domains De,iD_{e,i}, and coordinate bit maps injective on De,iD_{e,i}. Each request specifies a scalar gate, a Boolean test flag, and nonempty coordinate domains.

For the reduction cellular automaton at parameter δ(w)\delta(w), the automaton circuit description has address length r(w)=2δ(w)r(w) = 2\delta(w), scalar gates given by one-head tape cells, and conjunction gates given by pairs of local neighborhood triples and Booleans. Automaton circuit edges pair a local neighborhood triple with one of four edge kinds: left-, center-, and right-neighbor wires (indexed by a time carry index and, for left and right wires, an optional position carry index) and internal gate wires (indexed by a Boolean). Neighbor wires start at the corresponding cell of the triple and advance time via carry domains and increment bit maps, shifting position cyclically via cyclic carry domains and maps on left and right wires and acting as the identity on center wires; internal wires start at the auxiliary conjunction gates and use full domains and identity maps, wiring each triple (a,b,c)(a, b, c) into the scalar gate given by the local transition rule. Time and position domains and maps are concatenated on the first and last δ(w)\delta(w) coordinates. Automaton request indices cover input-position seeds (at time 00 and the input index bits), blank-cell seeds (at time 00 and threshold domains for the input length bits), and accepting-state tests (at time 2δ(w)−12^{\delta(w)} - 1 and all positions).

A product scalar-image instance JJ at address length rr over primary vertices PP and edges EE assigns each p∈Pp \in P a dimension dp∈{1,2}d_p \in \{1, 2\}, each e∈Ee \in E endpoints src(e),tgt(e)∈P\mathrm{src}(e), \mathrm{tgt}(e) \in P, nonempty coordinate domains De,iD_{e,i}, coordinate-wise injective bit maps σe,i\sigma_{e,i} on De,iD_{e,i}, linear forms Le:𝔽2dsrc(e)→𝔽2L_e : \mathbb{F}_2^{d_{\mathrm{src}(e)}} \to \mathbb{F}_2 and Re:𝔽2dtgt(e)→𝔽2R_e : \mathbb{F}_2^{d_{\mathrm{tgt}(e)}} \to \mathbb{F}_2, and constants ceL,ceR∈𝔽2c_e^L, c_e^R \in \mathbb{F}_2.✦ From a succinct circuit description, the circuit consistency instance takes primary vertices (S⊔A)⊔(E⊔{*})(S \sqcup A) \sqcup (E \sqcup \{*\}) (of dimension 22 on AA and EE and 11 on SS and **) and comparisons (E⊔E⊔E)⊔R(E \sqcup E \sqcup E) \sqcup R. The first two copies of an edge ee connect its source gate to the edge vertex using the gate output linear map on the left, projections to coordinates 00 and 11 on the right, and identity bit maps on De,iD_{e,i}; the third copy connects the edge vertex to the destination port’s target gate using the sum of coordinates on the left, the port input linear form on the right, and the edge’s bit map on De,iD_{e,i}. Each request b∈Rb \in R connects its scalar gate to ** using coordinate 00 on the left, 00 on the right, and identity bit maps on its request domain. Every comparison has left constant 00. Applying this construction to the automaton circuit description produces the machine product image instance J(w)J(w).

Affine blocks and the general realization

For a product scalar-image instance JJ at address length rr and subdivision parameter nn, a subdivision vertex is either a primary vertex in PP or an interior vertex in E×{0,…,n−1}E \times \{0, \dots, n - 1\}✦, and a subdivision link is a pair ℓ=(e,j)\ell = (e, j) with e∈Ee \in E and j∈{0,…,n}j \in \{0, \dots, n\}.✦ The left endpoint of (e,j)(e, j) is src(e)\mathrm{src}(e) when j=0j = 0 and (e,j−1)(e, j - 1) otherwise✦; its right endpoint is tgt(e)\mathrm{tgt}(e) when j=nj = n and (e,j)(e, j) otherwise.✦ The vertex vector dimension is dpd_p at a primary vertex pp and 11 at every interior vertex, giving vertex value space 𝔽2dt\mathbb{F}_2^{d_t} at each subdivision vertex tt. The allowed vertex labels at coordinate ii are {false,true}\{\text{false}, \text{true}\} at primary vertices and De,iD_{e,i} at interior vertices of ee.✦

A horizontal block specifies a row i∈{0,…,r−1}i \in \{0, \dots, r - 1\}, a subdivision vertex tt, and first and last Boolean labels✦; it is valid if its first label is allowed at (t,i)(t, i) and its last at (t,i+1mod⁡r)(t, i + 1 \bmod r).✦ A vertical readout specifies a row ii, a link ℓ\ell, and a Boolean label.✦ A square block specifies a row ii, a link ℓ=(e,j)\ell = (e, j), and first and last Boolean labels✦; it is valid if its first label lies in De,iD_{e,i} and its last in De,i+1mod⁡rD_{e, i + 1 \bmod r}.✦ A raw block is a horizontal or square block✦, and a valid block is a valid raw block.✦ A block readout is a horizontal block or a vertical readout, with single readout value space 𝔽2dt\mathbb{F}_2^{d_t} for a horizontal readout at tt and 𝔽2\mathbb{F}_2 for a vertical readout. The raw block value space is 𝔽2dt\mathbb{F}_2^{d_t} on a horizontal block at tt, and the square value space (𝔽2dleft(ℓ)×𝔽2dright(ℓ))×(𝔽2×𝔽2)(\mathbb{F}_2^{d_{\mathrm{left}(\ell)}} \times \mathbb{F}_2^{d_{\mathrm{right}(\ell)}}) \times (\mathbb{F}_2 \times \mathbb{F}_2) on a square block over ℓ\ell.

The matched link output bit of (e,j)(e, j) at coordinate ii applies σe,i\sigma_{e,i} when j=nj = n and the identity otherwise.✦ A horizontal block contains only itself as a readout. A square block on row ii and link ℓ\ell contains four readouts: its left horizontal readout at the left endpoint of ℓ\ell with its first and last bits, its right horizontal readout at the right endpoint of ℓ\ell with the matched outputs of those bits, its bottom vertical readout at row ii with its first bit, and its top vertical readout at row i+1mod⁡ri + 1 \bmod r with its last bit. Each raw block value carries its corresponding component at each readout contained in the block, defining the block readout value.

For a link ℓ=(e,j)\ell = (e, j), the left link constant is ceLc_e^L when j=0j = 0 and 00 otherwise✦, the right link constant is ceRc_e^R when j=nj = n and 00 otherwise✦, and the total link constant is their sum in 𝔽2\mathbb{F}_2.✦ Relative to a marked row i*∈{0,…,r−1}i^* \in \{0, \dots, r - 1\}, the marked row indicator is 11 if i=i*i = i^* and 00 otherwise.✦ The block inhomogeneity bit is 00 on horizontal blocks and the product of the marked row indicator and total link constant on square blocks.✦ Each link ℓ\ell carries left and right link linear forms LℓL_\ell and RℓR_\ell from its endpoint value spaces to 𝔽2\mathbb{F}_2, and the affine boundary map sends a square value tuple ((u,v),(α,β))((u, v), (\alpha, \beta)) to Lℓ(u)+Rℓ(v)+α+βL_\ell(u) + R_\ell(v) + \alpha + \beta.✦ Each raw block BB has an additive block boundary map ∂B\partial_B from its raw block value space to 𝔽2\mathbb{F}_2, equal to 00 on horizontal blocks and to the affine boundary map of LℓL_\ell and RℓR_\ell on square blocks.✦ For a parity bit ε∈𝔽2\varepsilon \in \mathbb{F}_2, a raw block value zz is legal if ∂B(z)\partial_B(z) equals ε\varepsilon times the block inhomogeneity bit of BB.✦ The affine fiber ZBεZ_B^\varepsilon is the set of legal valuations of a valid block BB at parity ε\varepsilon.✦

Two valid blocks share a readout if some block readout is contained in both.✦ A base vertex of parity ε\varepsilon is a pair (B,z)(B, z) with BB a valid block and z∈ZBεz \in Z_B^\varepsilon.✦ Two base vertices agree if they have equal block readout values on every shared readout✦, and they are base-adjacent if their blocks are distinct, share a readout, and agree on all shared readouts.✦ Given a leaf count leaves(B)∈ℕ\mathrm{leaves}(B) \in \mathbb{N} for each valid block BB, the block vertex fiber is ZBε×({none}∪{0,…,leaves(B)−1})Z_B^\varepsilon \times (\{\text{none}\} \cup \{0, \dots, \mathrm{leaves}(B) - 1\})✦, and the general graph vertex set is the disjoint union of these fibers over all valid blocks.✦ Each vertex has an owning base vertex (B,z)(B, z) and is a base vertex when its leaf index is absent. Two vertices are adjacent in the general realization graph if both are base vertices that are base-adjacent, or one is a base vertex and the other is a leaf with the same owner.✦ When PP and EE are finite, numbering the valid blocks from 11 to JJ and letting NN be the number of parity-00 base vertices, assigning leaf count j(N+1)j(N + 1) to the jj-th block and indexing the resulting vertices by {0,…,Ntot−1}\{0, \dots, N_{\text{tot}} - 1\} gives the finite realization graphs G0G^0 and G1G^1.

Applying the finite realization to J(w)J(w) at dimension r(w)r(w), subdivision parameter n(w)n(w), and marked coordinate 00 produces the general reduction graphs G0(w)G^0(w) and G1(w)G^1(w), and their binary encoding code(G0(w),G1(w),r(w))\mathrm{code}\bigl(G^0(w), G^1(w), r(w)\bigr) is the general reduction word for ww.✦

The claim

Corollary 6.2. Let MM be a multitape Turing machine, let cc and dd be natural numbers, let ww be a binary word, and let bb be a Boolean. If MM outputs the single-bit word [b][b] on input ww within 2c(|w|+1)d2^{c(|w| + 1)^d} steps, then code(G0(w),G1(w),r(w))∈WL⇔b=true.\mathrm{code}\bigl(G^0(w), G^1(w), r(w)\bigr) \in \mathrm{WL} \iff b = \text{true}.(4)✦

In the paper, the result reads: for every product scalar-image instance at address length r≥3r \ge 3, its general realization satisfies that the instance is consistent if and only if G0≡rG1G^0 \equiv_r G^1. The Lean library states the composed machine-level equivalence directly, pairing the general realization with the compiled cellular-automaton consistency instance of MM on ww so that consistency corresponds to b=trueb = \text{true}.

What is checked

Corollary 6.2 is stated over an arbitrary multitape Turing machine MM, natural numbers cc and dd, a binary word ww, and a Boolean output bb produced within 2c(|w|+1)d2^{c(|w| + 1)^d} steps, evaluated on the binary encoding of the general realization graphs G0(w)G^0(w) and G1(w)G^1(w) at dimension r(w)r(w). For the supporting constructions, the Lean library also proves that every length-ℓ\ell binary string has binary value strictly below 2ℓ2^\ell✦, that the encoded one-head input has length strictly below 2δ(w)2^{\delta(w)}✦, that the base Turing program is supported on its base label support✦, and that every raw block value carries a readout value at each readout contained in its block.✦