OctoInform Beta

OpenAI preprint, September 2026 · §8. Uniform compilation and completeness

Proposition 8.2: Polynomial order bounds, SubWL\mathrm{SubWL} correctness, and uniform port-listing compilation for exponential-time reductions

Uniform compilation of Turing machines to subcubic graphs.

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 variable-dimension Weisfeiler-Leman equivalence, an instance specifies two finite simple graphs GG and HH together with a dimension parameter k∈ℕk \in \mathbb{N} given in binary, and asks whether GG and HH are indistinguishable by the kk-dimensional joint-update Weisfeiler-Leman refinement algorithm, written G≡kHG \equiv_k H. The general decision problem WL\mathrm{WL} and its connected subcubic restriction SubWL\mathrm{SubWL} capture the complexity of this equivalence test when kk grows with the input. To establish hardness for SubWL\mathrm{SubWL}, one compiles an exponential-time multitape Turing machine MM and an input word ww into a pair of uncolored subcubic graphs of polynomial order whose rr-dimensional Weisfeiler-Leman equivalence records the output of MM on ww, together with a uniform polynomial-time compilation of the underlying prefix-tree block descriptors into port-labeled graph listings.

A binary word is a finite list of Booleans, and a formal language is a set of binary words. A finite simple graph GG consists of a vertex count |V(G)||V(G)| (its order) and a simple graph structure on {0,…,|V(G)|−1}\{0, \dots, |V(G)| - 1\}; it is subcubic if every vertex has degree at most 33. For a natural number kk, a vertex kk-tuple of GG is a function from {0,…,k−1}\{0, \dots, k - 1\} to V(G)V(G).✦ The kk-WL tuple coloring assigns each kk-tuple a round-ss color recursively: at round 00, the color records equality and adjacency for every ordered pair of coordinates, and at round s+1s + 1, it pairs the round-ss color with the multiset over z∈V(G)z \in V(G) of the kk-tuples of round-ss colors obtained by replacing each single coordinate by zz.✦ The round-ss color histogram of GG is the multiset of round-ss colors over all kk-tuples, and G≡kHG \equiv_k H holds when GG and HH have the same color histogram at every round s∈ℕs \in \mathbb{N}. Using prefix-free binary encodings of natural numbers, finite simple graphs, and triples (G,H,k)(G, H, k), the subcubic Weisfeiler-Leman equivalence problem SubWL\mathrm{SubWL} is the formal language of binary encodings of triples (G,H,k)(G, H, k) consisting of connected finite simple subcubic graphs GG and HH of equal positive order |V(G)|=|V(H)|>0|V(G)| = |V(H)| > 0 and a natural number k≥2k \ge 2 satisfying G≡kHG \equiv_k H.✦

From Turing machines to subcubic graphs

A multitape Turing machine MM is specified by its number of non-initial states, its number of work symbols, its number of extra tapes, and a partial transition function.✦ A configuration of MM records the control state, an integer head position for each tape, and the tape contents; each transition step reads the scanned tape symbols, updates the state and symbols, and shifts each head by a displacement in {−1,0,1}\{-1, 0, 1\}. On an input binary word ww encoded onto the initial tape, iterating the transition step yields the configuration after tt steps. The machine MM outputs a binary word out\mathrm{out} on input ww within a time bound T∈ℕT \in \mathbb{N} if there is a step t≤Tt \le T at which no transition applies and tape 00 holds the encoded word out\mathrm{out} at cells 0,…,|out|−10, \dots, |\mathrm{out}| - 1 (encoding false\mathrm{false} as 11 and true\mathrm{true} as 22) and the blank symbol 00 at all other integer cells.✦

To compile MM into a circuit, the Lean library first simulates MM by a multi-stack program using two stacks per tape, with a bounded maximum number of stack operations per label, and translates this through intermediate and base single-tape Turing programs into an equivalent one-head machine over a finite set of supported control states and a single-tape alphabet. Its tape cells, each pairing a tape symbol with an optional control state, form the reduction cellular alphabet of MM, whose cardinality is denoted LL. From the maximum stack operations and instruction counts, the simulation determines a linear simulation constant and a quadratic simulation constant qM∈ℕq_M \in \mathbb{N}. Given exponential time-bound parameters c,d∈ℕc, d \in \mathbb{N} and an input word ww of length |w||w|, the input time exponent is (c+1)(|w|+1)d+1(c + 1)(|w| + 1)^{d + 1}, the simulation time exponent combines qMq_M with this exponent, and the reduction address bit length kbitk_{\mathrm{bit}} is the simulation time exponent plus 22. The binary address length is r=2kbitr = 2 k_{\mathrm{bit}}, the subdivision parameter is n=4(r+1)n = 4(r + 1), and the marked coordinate is 0∈{0,…,r−1}0 \in \{0, \dots, r - 1\}. Two machine constants govern the size of the reduction: Csch(M)=16(L+L3+1),Cdim(M,c)=2(qM+2c+7)+1.\begin{aligned} C_{\mathrm{sch}}(M) &= 16(L + L^3 + 1), \\ C_{\mathrm{dim}}(M, c) &= 2(q_M + 2c + 7) + 1. \end{aligned}(1)

Using the binary encoding bijection between length-kbitk_{\mathrm{bit}} binary strings and {0,…,2kbit−1}\{0, \dots, 2^{k_{\mathrm{bit}}} - 1\}, together with carry, cyclic carry, and threshold bit domains and increment bit maps, the one-head machine on the encoded input ww induces a cellular automaton instance whose local transition rule acts on triples of adjacent tape cells. Joining time and position coordinates yields a succinct circuit description of address length rr over scalar gates of dimension 11, conjunction gates of dimension 22, automaton circuit edges, and seed and test requests. From this circuit description, the Lean library constructs a product image instance JJ of address length rr with primary vertices, comparison edges, and linear input and output maps over 𝔽2\mathbb{F}_2.

Subdividing each edge of JJ with parameter n=4(r+1)n = 4(r + 1) produces subdivision vertices and subdivision links. Over 𝔽2\mathbb{F}_2, the raw blocks of JJ consist of horizontal blocks and square blocks; a valid block carries horizontal and vertical block readouts, an additive block boundary map on raw block values, and a block inhomogeneity bit determined by the marked row 00. For each parity ε∈𝔽2\varepsilon \in \mathbb{F}_2 and valid block BB, the legal block values form the affine fiber ZBεZ_B^\varepsilon. Numbering block coordinates and proper shared readouts between distinct blocks yields a channel coordinate permutation and channel root depth for each block, defining its prefix gadget data.

For each block and parity ε∈𝔽2\varepsilon \in \mathbb{F}_2, the prefix gadget graph is built on a root vertex, valuation copies for z∈ZBεz \in Z_B^\varepsilon, and legal prefix tree nodes obtained by prefix bit truncation, equipped with a port slot assignment into {0,1,2}\{0, 1, 2\}. A subcubic port graph on a vertex set VV is a symmetric, functional port-edge relation on V×{0,1,2}V \times \{0, 1, 2\}.✦ Taking the disjoint union of internal block port graphs across all valid blocks and forming the edge union with the root-matching port graph across paired proper shared readouts and the anchor-chain port graph produces the wired gadget port graph, colored by enumerating its sort tags. Replacing each colored vertex by an uncoloring gadget indexed by its owner, port in {0,1,2}\{0, 1, 2\}, and level, connected by internal and external port gadget edges, yields the uncolored wired graph. Enumerating its vertices gives the finite simple graph XM,c,dε(w)X_{M,c,d}^\varepsilon(w) for each ε∈𝔽2\varepsilon \in \mathbb{F}_2, and WM,c,d(w)W_{M,c,d}(w) denotes the binary encoding of the triple consisting of XM,c,d0(w)X_{M,c,d}^0(w), XM,c,d1(w)X_{M,c,d}^1(w), and the binary address length rr.

Uniform port-listing compilation

To certify that graph descriptions are generated uniformly in polynomial time, the Lean library models computation by kk-stack machines whose stores assign a binary word to each stack in {0,…,k}\{0, \dots, k\}. Programs are built from skip, head-dependent stack actions (keep, pop, or push a bit), sequencing, and bounded loops. An nn-ary word environment vv assigns a binary word to each index in {0,…,n−1}\{0, \dots, n - 1\}.✦ A certified stack recipe on nn inputs pairs a word-valued function with a time bound realized by a stack procedure using auxiliary blank stacks; it is polynomial-time when its time bound grows at most polynomially in the maximum input word length. An nn-variable polynomial-time expression is a certified stack recipe equipped with a polynomial-time bound, closed under variable lookup, constant words, unary numerals, let binding, variable reindexing, unary arithmetic, length comparisons, Boolean connectives, bounded quantifiers, predicate counting, and bounded lookup tables.

A port graph descriptor specifies a finite colored port-labeled graph on an initial segment of vertex indices by a vertex bound, a vertex validity predicate, a color bound, a vertex color map, and a port incidence relation.✦ A polynomial port listing of arity nn supplies the vertex bound and color bound as nn-variable polynomial-time expressions, the vertex validity predicate and vertex color map as (n+1)(n + 1)-variable polynomial-time expressions, and the port incidence relation as an (n+2)(n + 2)-variable polynomial-time expression; evaluating a listing PP at an nn-ary word environment vv produces a port graph descriptor P(v)P(v) by prepending unary encodings of the index arguments and reading numbers by output length and Booleans by whether the first output bit is true\mathrm{true}.

Bounded bit vectors of length strictly below 77 and bounded coordinate permutations on them are enumerated canonically, with polynomial-time lookup expressions for bit access, prefix truncation, permuted prefix codes, and padded equality. A prefix descriptor data structure Δ\Delta encodes a finite family of prefix-tree blocks by its block count, block validity predicate, channel bound, block dimensions, channel counts, channel root depths, channel coordinate orderings, legal valuation predicate, and root-matching predicate. Any such Δ\Delta induces a port graph descriptor PortData(Δ)\mathrm{PortData}(\Delta) whose vertex bound is the sort bound times the bounded bit-vector count, whose vertex validity predicate unpacks raw vertex indices, whose vertex color and color bound are 11 plus the rank among valid sort tags of the unpacked vertex’s sort tag and of the sort bound respectively, and whose port incidence on port indices a,ba, b unpacks vertex indices ⌊a/3⌋,⌊b/3⌋\lfloor a/3 \rfloor, \lfloor b/3 \rfloor and port slots amod⁡3,bmod⁡3a \bmod 3, b \bmod 3 and takes the disjunction of internal, root, and anchor incidences. A prefix descriptor listing DD of arity nn specifies these nine block-family components via polynomial-time expressions of arity nn (for the block count and channel bound), arity n+1n + 1 (for block validity, dimension, and channel count), and arity n+2n + 2 (for root depth, coordinate ordering, legal valuations, and root matching).✦ Evaluating DD at an nn-ary word environment vv produces prefix descriptor data D(v)D(v). Compiling DD by expressing raw vertex unpacking, sort tags, validity predicates, color counts, and internal, root, and anchor incidences as polynomial-time expressions yields a polynomial port listing PL(D)\mathrm{PL}(D).

The claim

Proposition 8.2. Let MM be a multitape Turing machine, let c,d∈ℕc, d \in \mathbb{N}, let ww be a binary word, and let ε∈𝔽2\varepsilon \in \mathbb{F}_2. With the machine constants Csch(M)C_{\mathrm{sch}}(M) and Cdim(M,c)C_{\mathrm{dim}}(M, c) defined in (1), the order of the reduced subcubic graph XM,c,dε(w)X_{M,c,d}^\varepsilon(w) satisfies |V(XM,c,dε(w))|≤330369(40Csch(M)+1)4Cdim(M,c)16⋅(|w|+1)16(d+1).\begin{aligned} |V(X_{M,c,d}^\varepsilon(w))| &\le 330369\,(40\,C_{\mathrm{sch}}(M) + 1)^4\,C_{\mathrm{dim}}(M, c)^{16} \\ &\qquad \cdot (|w| + 1)^{16(d + 1)}. \end{aligned}(2)✦ If, in addition, b∈{false,true}b \in \{\mathrm{false}, \mathrm{true}\} and MM outputs the single-bit word [b][b] on input ww within 2c(|w|+1)d2^{c(|w| + 1)^d} steps, meaning that at the halting step t≤2c(|w|+1)dt \le 2^{c(|w| + 1)^d} no transition applies and tape 00 holds the exact blank-padded encoding of [b][b] (symbol 11 for false\mathrm{false} or 22 for true\mathrm{true} at cell 00, and the blank symbol 00 at every other integer cell), then the encoded instance WM,c,d(w)W_{M,c,d}(w) satisfies WM,c,d(w)∈SubWL⇔b=true.W_{M,c,d}(w) \in \mathrm{SubWL} \iff b = \mathrm{true}.(3)✦ Furthermore, for every n∈ℕn \in \mathbb{N}, every prefix descriptor listing DD of arity nn, and every nn-ary word environment vv, the compiled polynomial port listing PL(D)\mathrm{PL}(D) satisfies PL(D)(v)=PortData(D(v)).\mathrm{PL}(D)(v) = \mathrm{PortData}(D(v)).(4)✦

In the paper, the result reads: fixing a multitape Turing machine MM and a polynomial pp satisfying Proposition 3.2 and applying Proposition 3.4, on an input word of length mm with r=2(p(m)+2)r = 2(p(m) + 2), K=r+1K = r + 1, and b*=r+2b_* = r + 2, the two graphs X0X^0 and X1X^1 (corresponding to XM,c,d0(w)X_{M,c,d}^0(w) and XM,c,d1(w)X_{M,c,d}^1(w)) and binary dimension k=rk = r can be produced deterministically in time OM,p(b*160)O_{M,p}(b_*^{160}), and each output graph has OM(b*16)O_M(b_*^{16}) vertices, the same positive order, and is connected, simple, uncolored, undirected, and of maximum degree at most three regardless of consistency. The Lean library formulates the reduction directly for an exponential time bound 2c(|w|+1)d2^{c(|w| + 1)^d}, giving the explicit polynomial order bound (2), the SubWL\mathrm{SubWL} equivalence (3), and the port-listing compilation identity (4).

What is checked

Proposition 8.2 is stated over an arbitrary multitape Turing machine MM, natural-number parameters cc and dd, a binary word ww, a parity bit ε∈𝔽2\varepsilon \in \mathbb{F}_2, the reduced subcubic graphs XM,c,dε(w)X_{M,c,d}^\varepsilon(w) and their encoded instance WM,c,d(w)W_{M,c,d}(w) relative to SubWL\mathrm{SubWL}, and an arbitrary nn-ary prefix descriptor listing DD evaluated on an nn-ary word environment vv. The Lean library also establishes the supporting properties of these constructions: binary strings of length dd evaluate to natural numbers below 2d2^d✦, the base single-tape simulation program of MM is supported on its label set✦, the encoded input length fits below 2kbit2^{k_{\mathrm{bit}}}✦, the subdivision parameter 4(r+1)4(r + 1) is positive✦, every raw block value carries a readout value that lifts to block coordinates, prefix gadget port slots are injective on vertex neighborhoods with disjoint root-matching and anchor-chain ports, and input-variable and constant-word stack recipes run in polynomial time.