The setting
The -dimensional Weisfeiler-Leman algorithm is a canonical color-refinement test for graph isomorphism. For a fixed dimension , the test runs in polynomial time in the order of the input graphs. When the dimension is supplied as part of the input in binary alongside two finite simple graphs and , deciding whether and are -dimensional Weisfeiler-Leman equivalent becomes an exponential-time problem.
Theorem 1.1 of OpenAI, Variable-dimension Weisfeiler-Leman equivalence on general and subcubic graphs, OpenAI Math Release preprint, September 25, 2026, establishes the exact complexity of both the general decision problem and its restriction to connected subcubic graphs of equal positive order: both languages are -complete under deterministic polynomial-time many-one reductions.✦
Weisfeiler-Leman equivalence
A finite simple graph consists of a natural number , its order, together with a simple undirected graph on the vertex set .✦ A finite simple graph is subcubic if every vertex of has degree at most .✦ For a natural number , a vertex -tuple of is an element .✦ Given and , write for the -tuple obtained from by replacing its -th coordinate with .
For each dimension and round , the set of round- colors is defined recursively. The initial color set consists of all functions from to , and consists of all pairs whose first entry lies in and whose second entry is a finite multiset of -tuples in .✦
The joint-update -WL tuple coloring is defined by recursion on . At round , the initial color sends each ordered pair to the pair of bits recording whether and whether and are adjacent in . At round , the color is given by (1)✦ where double braces denote a multiset. In (1), all coordinate replacements associated with a single vertex are grouped into one -tuple inside the multiset.
The round- color histogram of at dimension is the multiset of colors in .✦ Two finite simple graphs and are -WL equivalent, written , if for every .✦
The decision problems
A binary word is a finite sequence of bits in with length ✦, and a formal language is a set of binary words.✦ For a natural number , let denote its binary bit sequence. The prefix-free integer encoding , the graph encoding , and the instance encoding for finite simple graphs and are given by (2) where concatenation is denoted by juxtaposition and centered dots, and is the row-major flattening of the adjacency matrix of (with if and are adjacent in and otherwise).
Using the instance encoding (2), the general Weisfeiler-Leman equivalence problem and its connected subcubic restriction are the formal languages (3) where and range over all finite simple graphs and ranges over .
Multitape Turing machines
A head motion is an element of with integer displacement , , and . A deterministic multitape Turing machine consists of natural numbers , , and together with a partial transition function : the control states are , the tape alphabet is , the machine has two-way infinite tapes indexed by , and maps each pair either to no value (halting) or to a next control state together with, for each tape , a symbol to write and a head motion .✦
A configuration of records the current control state , the integer head position on each tape , and the tape symbol in each cell of tape .✦ The tuple of scanned symbols in is .✦ A single transition step is undefined when is undefined; otherwise, when , it yields the configuration with , , and for all .✦
For any binary word , the tape encoding is given by (4)✦ Starting at from the initial configuration on input , the configuration after steps advances to whenever that transition is defined and remains fixed once halted.✦ The machine outputs a binary word on input within steps if there exists such that is undefined and the contents of tape in equal as defined in (4).✦
A formal language belongs to if there exist a deterministic multitape Turing machine and natural numbers such that, for every binary word , outputs the single-bit word if and if , within at most steps.✦ A language reduces to a language in deterministic polynomial time, written , if there exist a deterministic multitape Turing machine and natural numbers such that, for every binary word , outputs a binary word within at most steps satisfying if and only if .✦ A language is -complete if and for every .✦
The claim
Theorem 1.1. Both and are -complete under deterministic polynomial-time many-one reductions: (5)✦
What is checked
The Lean library states Theorem 1.1 in (5) over finite simple graphs equipped with joint-update -dimensional Weisfeiler-Leman equivalence, the binary-encoded languages and in (3), and the deterministic multitape Turing machine definitions of and polynomial-time many-one reducibility.