The setting
In variable-dimension Weisfeiler-Leman equivalence, an instance specifies two finite simple graphs and together with a dimension parameter given in binary, and asks whether and are indistinguishable by the -dimensional joint-update Weisfeiler-Leman refinement algorithm, written . The general decision problem and its connected subcubic restriction capture the complexity of this equivalence test when grows with the input. To establish hardness for , one compiles an exponential-time multitape Turing machine and an input word into a pair of uncolored subcubic graphs of polynomial order whose -dimensional Weisfeiler-Leman equivalence records the output of on , 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 consists of a vertex count (its order) and a simple graph structure on ; it is subcubic if every vertex has degree at most . For a natural number , a vertex -tuple of is a function from to .✦ The -WL tuple coloring assigns each -tuple a round- color recursively: at round , the color records equality and adjacency for every ordered pair of coordinates, and at round , it pairs the round- color with the multiset over of the -tuples of round- colors obtained by replacing each single coordinate by .✦ The round- color histogram of is the multiset of round- colors over all -tuples, and holds when and have the same color histogram at every round . Using prefix-free binary encodings of natural numbers, finite simple graphs, and triples , the subcubic Weisfeiler-Leman equivalence problem is the formal language of binary encodings of triples consisting of connected finite simple subcubic graphs and of equal positive order and a natural number satisfying .✦
From Turing machines to subcubic graphs
A multitape Turing machine 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 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 . On an input binary word encoded onto the initial tape, iterating the transition step yields the configuration after steps. The machine outputs a binary word on input within a time bound if there is a step at which no transition applies and tape holds the encoded word at cells (encoding as and as ) and the blank symbol at all other integer cells.✦
To compile into a circuit, the Lean library first simulates 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 , whose cardinality is denoted . From the maximum stack operations and instruction counts, the simulation determines a linear simulation constant and a quadratic simulation constant . Given exponential time-bound parameters and an input word of length , the input time exponent is , the simulation time exponent combines with this exponent, and the reduction address bit length is the simulation time exponent plus . The binary address length is , the subdivision parameter is , and the marked coordinate is . Two machine constants govern the size of the reduction: (1)
Using the binary encoding bijection between length- binary strings and , together with carry, cyclic carry, and threshold bit domains and increment bit maps, the one-head machine on the encoded input 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 over scalar gates of dimension , conjunction gates of dimension , automaton circuit edges, and seed and test requests. From this circuit description, the Lean library constructs a product image instance of address length with primary vertices, comparison edges, and linear input and output maps over .
Subdividing each edge of with parameter produces subdivision vertices and subdivision links. Over , the raw blocks of 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 . For each parity and valid block , the legal block values form the affine fiber . 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 , the prefix gadget graph is built on a root vertex, valuation copies for , and legal prefix tree nodes obtained by prefix bit truncation, equipped with a port slot assignment into . A subcubic port graph on a vertex set is a symmetric, functional port-edge relation on .✦ 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 , and level, connected by internal and external port gadget edges, yields the uncolored wired graph. Enumerating its vertices gives the finite simple graph for each , and denotes the binary encoding of the triple consisting of , , and the binary address length .
Uniform port-listing compilation
To certify that graph descriptions are generated uniformly in polynomial time, the Lean library models computation by -stack machines whose stores assign a binary word to each stack in . Programs are built from skip, head-dependent stack actions (keep, pop, or push a bit), sequencing, and bounded loops. An -ary word environment assigns a binary word to each index in .✦ A certified stack recipe on 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 -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 supplies the vertex bound and color bound as -variable polynomial-time expressions, the vertex validity predicate and vertex color map as -variable polynomial-time expressions, and the port incidence relation as an -variable polynomial-time expression; evaluating a listing at an -ary word environment produces a port graph descriptor by prepending unary encodings of the index arguments and reading numbers by output length and Booleans by whether the first output bit is .
Bounded bit vectors of length strictly below 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 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 induces a port graph descriptor 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 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 unpacks vertex indices and port slots and takes the disjunction of internal, root, and anchor incidences. A prefix descriptor listing of arity specifies these nine block-family components via polynomial-time expressions of arity (for the block count and channel bound), arity (for block validity, dimension, and channel count), and arity (for root depth, coordinate ordering, legal valuations, and root matching).✦ Evaluating at an -ary word environment produces prefix descriptor data . Compiling 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 .
The claim
Proposition 8.2. Let be a multitape Turing machine, let , let be a binary word, and let . With the machine constants and defined in (1), the order of the reduced subcubic graph satisfies (2)✦ If, in addition, and outputs the single-bit word on input within steps, meaning that at the halting step no transition applies and tape holds the exact blank-padded encoding of (symbol for or for at cell , and the blank symbol at every other integer cell), then the encoded instance satisfies (3)✦ Furthermore, for every , every prefix descriptor listing of arity , and every -ary word environment , the compiled polynomial port listing satisfies (4)✦
In the paper, the result reads: fixing a multitape Turing machine and a polynomial satisfying Proposition 3.2 and applying Proposition 3.4, on an input word of length with , , and , the two graphs and (corresponding to and ) and binary dimension can be produced deterministically in time , and each output graph has 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 , giving the explicit polynomial order bound (2), the equivalence (3), and the port-listing compilation identity (4).
What is checked
Proposition 8.2 is stated over an arbitrary multitape Turing machine , natural-number parameters and , a binary word , a parity bit , the reduced subcubic graphs and their encoded instance relative to , and an arbitrary -ary prefix descriptor listing evaluated on an -ary word environment . The Lean library also establishes the supporting properties of these constructions: binary strings of length evaluate to natural numbers below ✦, the base single-tape simulation program of is supported on its label set✦, the encoded input length fits below ✦, the subdivision parameter 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.