The setting
The -dimensional Weisfeiler-Leman algorithm is a combinatorial color refinement procedure that iteratively partitions the -tuples of vertices of a finite simple graph. Starting from the isomorphism type of each -tuple, every refinement round updates a tuple’s color by combining its current color with a multiset of -tuples of colors obtained by substituting a single vertex into each of the coordinates simultaneously. Grouping all coordinate replacements for a given vertex into one -tuple is the joint-update convention. Two finite simple graphs and are -dimensional joint-update Weisfeiler-Leman equivalent, written , when their multisets of tuple colors agree at every round.✦ Taking , , and an integer dimension together as input defines the variable-dimension decision problem .
Joint-update color refinement
A finite simple graph consists of a natural number , called its order, together with a simple undirected graph on the vertex set .✦ For a natural number , a vertex -tuple of is a function , written .✦
For any set , let denote the set of finite multisets with elements in . For natural numbers and , the set of round- colors is defined recursively on : at , is the set of all functions from to , and at , (1)✦ The color sets in (1) depend only on and , so colors produced on different graphs lie in a common universe.
For a finite simple graph and a natural number , the round- tuple coloring is defined recursively on . At , maps each pair to , where equals if holds and otherwise, and indicates adjacency in . Writing for the -tuple obtained from by replacing its th entry with , the round- coloring is defined by (2): (2)✦
For a finite simple graph and natural numbers and , the round- color histogram is the multiset of colors attained on : (3)✦ Two finite simple graphs and are -dimensional joint-update Weisfeiler-Leman equivalent, written , when their color histograms (3) coincide at every round, as in (4): (4)✦
Binary encoding of instances
A binary word is a finite string over , an element of ✦, and a formal language is a subset of ✦. For a natural number , let be its binary representation ordered from least to most significant bit, with the empty word, and let be its length. The prefix-free integer encoding is given by (5): (5)✦
Each finite simple graph of order is assigned the binary encoding obtained by concatenating the prefix-free encoding of its order with the adjacency bits for all ordered pairs in row-major (lexicographic) order (outer index , inner index ).✦ For finite simple graphs and and a natural number , the binary encoding of the instance is the concatenation in (6): (6)✦
The definition
Definition. The variable-dimension Weisfeiler-Leman equivalence problem is the formal language (7)✦ where is given by (6) and each graph encoding for a graph of order concatenates with the adjacency bits for all ordered pairs in row-major (lexicographic) order (outer index , inner index ).
What is checked
In the Lean library, the formal language in (7) is defined over finite simple graphs on vertex sets , their vertex -tuples, the recursive joint-update color sets and tuple colorings, the round-by-round color histograms defining , and the binary encodings of natural numbers, graphs, and instances with .