The setting
Reducing the general variable-dimension Weisfeiler-Leman decision problem to the connected subcubic problem requires realizing each affine block of a product image instance as a bounded-degree gadget and wiring those gadgets together into a single connected graph. Each block gadget is built from prefix trees that expose shared readouts at their roots, and the block gadgets are linked both by matching shared readout roots across distinct blocks and by chaining block anchors along a path.
To serve as an input to , the resulting colored prefix-wired graphs must be simple, connected, and of maximum degree at most , and both their vertex counts and their color-class counts must grow polynomially in the number of valid blocks. Lemma 7.2 records these structural and size guarantees: the degree bound on each prefix gadget graph, the connectedness of the wired port graph, and explicit quadratic bounds on the numbers of vertices and sort tags in the block realization.
Subcubic port graphs
A subcubic port graph on a vertex set is a symmetric relation on such that each vertex-port pair is adjacent to at most one pair and every two adjacent pairs and satisfy .✦ Its underlying simple graph on joins two vertices and whenever and are adjacent in for some .✦
Given a simple graph on and a slot map that is injective on the neighborhood of each vertex , the port graph from slots on connects to whenever and are adjacent in , , and .✦ For a family of subcubic port graphs on sets , the disjoint union port graph on connects two vertex-port pairs if they lie in the same component and their local vertex-port pairs are adjacent in .✦ Two subcubic port graphs and on are port-disjoint if no vertex-port pair is incident to edges in both and ; their edge union port graph on takes the union of their port-edge relations.✦
Prefix gadgets and wiring
Write for the ring of integers modulo and for the space of binary vectors of length . For a natural number and a vector , the prefix bit truncation agrees with at every coordinate and equals at all coordinates .
A prefix gadget data structure consists of a dimension , a positive channel count , a root depth function with , a coordinate permutation for each channel , and for each parity bit a nonempty set of legal valuations such that for every and every , the vector lies in if and only if lies in .
A raw prefix tree node of is a triple with , , and .✦ It is legal for parity if and there exists such that . Let be the set of legal prefix tree nodes of for parity .✦ The prefix gadget vertex set is the disjoint union of a distinguished anchor vertex, the valuation copies , and the legal tree nodes .✦
A prefix tree step edge joins to in when , , and .✦ A prefix gadget forward edge in connects the anchor to a tree node , connects a valuation copy to , connects two tree nodes by a prefix tree step edge, or connects a tree node to a valuation copy satisfying .✦ The prefix gadget graph is the simple graph on in which and are adjacent whenever or is a forward edge.✦
For a bit with integer representative , its bit port index is .✦ The prefix gadget port slot map assigns port at the anchor; at a valuation copy , it assigns port to a valuation copy with channel , port to a valuation copy with , and port to any tree node; at a tree node , it assigns port to the anchor or to a tree node of height , port to a valuation copy, and for a tree node with , it assigns the bit port index of when and port otherwise.✦ Because this slot map is injective on every neighborhood in , it defines the prefix gadget port graph on .✦
The sort tags partition the vertices into color classes shared between the two parity versions, grouping together all vertices that differ only in their label. The set of prefix gadget sort tags of is the disjoint union of a single anchor tag, one valuation tag for each channel , and one tree tag for each pair with and .✦
Now let be a family of prefix gadget data indexed by a finite set equipped with a finite set numbering, that is, a chosen bijection (its finite set enumeration). Write , , and for the dimension, channel count, and root depth of . A nonzero gadget channel of is a pair with and .✦ A prefix gadget wiring for is an involution on the nonzero gadget channels such that satisfies and .✦
The wired gadget vertex set and wired gadget sort tag set of are the disjoint unions and . The internal wired port graph on is the disjoint union port graph of .✦ For each nonzero channel , a channel root tree node is a node with channel and height ; pairing with forms a wired channel root label, whose wired root vertex is the vertex . For a bit vector , its zero-padded bit sequence equals for and for .✦ The root matching port graph on connects port of the wired root vertex of to port of the wired root vertex of whenever and the bit vectors of satisfy .✦ The anchor chain port graph connects port of the wired block anchor vertex of to port of the wired block anchor vertex of whenever .✦ Because the internal, root matching, and anchor chain port graphs are pairwise port-disjoint, their edge union is the wired gadget port graph on .✦
Affine blocks and realization data
Let be the binary address length, a subdivision parameter, a set of primary vertices, and a set of edges. A product image instance over assigns to each a dimension , to each endpoints , to each pair a nonempty finite domain and a map injective on , together with -linear forms and , and constants .✦
A subdivision vertex is either a primary vertex or an interior vertex .✦ Its vertex vector dimension is for and for an interior vertex, giving the vertex value vector space . Its allowed vertex labels at row are for and for .✦ A subdivision link is a pair .✦ Its left endpoint is when and otherwise; its right endpoint is when and otherwise. The left link constant is if and otherwise, the right link constant is if and otherwise, and their sum is the total link constant. The matched link output bit of at row is if and otherwise.✦
For natural numbers and , a square value tuple is an element . For -linear forms and , the affine boundary map sends a square value tuple to (1)✦
Let denote cyclic succession on . A horizontal block consists of a row , a subdivision vertex , and Boolean labels ; it is valid if is an allowed label of at row and is an allowed label of at row . A square block consists of a row , a subdivision link , and Boolean labels ; it is valid if and . A raw block is either a horizontal block or a square block, and a valid block is a valid raw block. Write for the set of valid blocks of .
A vertical readout is a triple of a row, a link, and a Boolean label, and a block readout is either a horizontal block or a vertical readout. A horizontal block contains only the readout itself. A square block contains four readouts: its left horizontal readout , its right horizontal readout where and are the matched link output bits of at and at , its bottom vertical readout , and its top vertical readout .
The raw block value space is for a horizontal block , and the square value tuple space for dimensions and for a square block .✦ The single readout value space is for a horizontal readout and for a vertical readout.✦ A raw value on a block carries a readout value at a readout if either is horizontal with and , or is a square block and is its left, right, bottom, or top readout with equal to the corresponding component of .✦ Whenever contains , such a carried value exists and defines the block readout value of at .
Fix a marked row , and let the marked row indicator be if and otherwise.✦ The block inhomogeneity bit is for a horizontal block and for a square block .✦ Each raw block has an additive block boundary map from its raw block value space to , built on links from the left and right link linear forms via the affine boundary map (1). A raw value on is a legal block value for parity if (2)✦
The block coordinate index set of a raw block is when is horizontal with vertex , and the disjoint union of , , and when is a square block with link .✦ Composing the additive raw value coordinate isomorphism (identifying raw values of with functions ) with the inverse of the canonical block coordinate numbering yields the raw value vector encoding onto . The readout bit dimension of a readout is for a horizontal readout with vertex and for a vertical readout, and the readout value vector isomorphism identifies its readout values with . When and , every readout contained in lifts to an injection matching these two isomorphisms, and composing with the block coordinate numbering gives the readout coordinate embedding.
A proper shared readout of a valid block is a pair with , , and a readout contained in both and .✦ Write for the set of proper shared readouts of ; its proper readout numbering bijects with via the finite set enumeration. For each channel , the channel root depth is if and for the corresponding readout otherwise, and the channel coordinate permutation is the identity if and a chosen coordinate ordering for that readout otherwise. These data define the block prefix gadget data of dimension and channel count , whose legal set consists of all vectors in whose inverse raw value vector encoding satisfies (2).✦ Write for the resulting family of block prefix gadget data.
The claim
Lemma 7.2. Let be a prefix gadget data structure, let , and let be a prefix gadget vertex. The degree of in the prefix gadget graph satisfies (3)✦
Let be a nonempty finite set equipped with a finite set numbering, let be a family of prefix gadget data, and let be a prefix gadget wiring for . For every parity , the underlying simple graph of the wired gadget port graph satisfies (4)✦
Let and be natural numbers, let and be finite sets, let be a product image instance over , and let be a marked row. Writing for the number of valid blocks of , for every parity the number of wired gadget vertices of the block realization family satisfies (5)✦ and the number of wired gadget sort tags satisfies (6)✦
What is checked
In the Lean library, Lemma 7.2 is stated over arbitrary prefix gadget data for the degree bound (3), over a nonempty finite indexed family of prefix gadget data with a finite set numbering and a prefix gadget wiring for the connectedness claim (4), and over the block prefix gadget data family of a product image instance with , , and a marked row for the vertex and sort bounds (5) and (6). The Lean library also proves that the prefix gadget port slot map is injective on every neighborhood in ✦, that the root matching and anchor chain port graphs are port-disjoint✦, that every readout contained in a raw block admits a carried readout value✦, and that every readout of a raw block lifts to an injection into its block coordinate index set when and ✦.