The setting
The -dimensional Weisfeiler-Leman refinement algorithm iteratively colors -tuples of vertices of a graph to test whether two graphs can be distinguished without computing an isomorphism directly. Increasing the dimension reveals finer structural invariants while increasing the tuple space on which refinement operates. For a given graph , the least positive dimension at which refinement distinguishes from every non-isomorphic graph is its Weisfeiler-Leman dimension .
The decision problem studied here takes as input a nonempty finite simple undirected uncolored graph , given by its binary adjacency matrix, and a positive integer , given in binary, and asks whether . All graphs on this page are finite, simple, undirected, and uncolored. Dimension uses ordinary neighbor color refinement, and dimensions use the joint-update convention.
Weisfeiler-Leman refinement and dimension
A graph of order consists of the vertex set together with a Boolean adjacency function that is symmetric, , and loopless, , for all .✦ Two graphs and are isomorphic, written , if there exists a bijection such that for all .✦
For any set , write for the set of finite multisets over , and denote multisets by . The -WL color spaces for are defined recursively by taking to be a singleton and setting .✦ For a graph , the round- -WL vertex coloring assigns to every vertex at , and at round updates each by (1)✦ The round- -WL color histogram of is the multiset in formed from the colors in (1).✦
For any , the -WL color spaces for are defined recursively by and .✦ For a tuple , an index , and a vertex , write for the tuple obtained from by replacing coordinate with . The round- -WL tuple coloring assigns to at the pair of Boolean matrices recording coordinate equalities and adjacencies , and at round updates by the joint-update rule (2)✦ The round- -WL color histogram of is the multiset in formed from the tuple colors in (2).✦
Two graphs and are -WL equivalent, written , if for all when , and for all when .✦ We say that -WL identifies if implies for every graph .✦ The Weisfeiler-Leman dimension of is the infimum in of the positive integers that identify : (3)✦
Encoding the dimension problem
A binary word is a finite string of length ✦, and a binary language is a subset .✦ The binary value of a binary word is its big-endian integer value , with for the empty word .✦ For a graph of order , its adjacency matrix encoding is the row-major concatenation of the rows for .✦
Given a graph of order and a binary word , their input encoding is the binary word (4)✦ where denotes consecutive ones. Using (3) and (4), the Weisfeiler-Leman dimension language is defined by (5)✦ Any binary word not of the form with and beginning with lies outside .
Turing machines and EXPTIME-completeness
A deterministic single-tape Turing machine consists of natural numbers defining the finite state set and tape alphabet , together with a transition function .✦ The head moves , , and have integer displacements , , and .✦
A configuration of is a triple where is the current state, is the head position, and is the two-way infinite tape content.✦ A configuration is halted if , where state is the start state, is the accept state, and is the reject state.✦ Each input bit is represented by the input tape symbol , while symbol is blank.✦ On an input word , the initial configuration has state , head position , and tape for and for all other .✦
The one-step transition map fixes every halted configuration; on a non-halted configuration with , it produces the configuration , where and for all .✦ For , the -step run on is the -fold iterate .✦ A configuration has tape output word if for every and .✦
Given a time bound , a machine decides a binary language within time if for every there exists such that is halted and its state is if and only if .✦ A machine computes a function within time if for every there exists such that is in state and has tape output word .✦ A binary language belongs to if there exist a machine and such that decides within time .✦ A binary language reduces to by a polynomial-time many-one reduction, written , if there exist a function , a machine , and such that computes within time and if and only if for all .✦ A binary language is -complete if and for every .✦
The claim
Theorem 1.1. The Weisfeiler-Leman dimension language of (5) is -complete under deterministic polynomial-time many-one reductions: (6)✦
What is checked
In the Lean library, Theorem 1.1 (6) is stated for the binary language encoding nonempty finite simple undirected uncolored graphs by their row-major adjacency matrices together with positive binary integers without leading zeros, where is defined by ordinary neighbor color refinement at and joint-update tuple refinement at , and -completeness is defined over deterministic single-tape Turing machines with time bounds for membership and for many-one reductions.