OctoInform Beta

OpenAI preprint, September 2026 · §7. A subcubic realization of the affine blocks

Lemma 7.2: Prefix gadgets have degree at most 33, wired port graphs are connected, and block realizations have quadratic vertex and sort bounds

Degree, connectedness, and size bounds for prefix-wired graphs.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

Reducing the general variable-dimension Weisfeiler-Leman decision problem WL\mathrm{WL} to the connected subcubic problem SubWL\mathrm{SubWL} 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 SubWL\mathrm{SubWL}, the resulting colored prefix-wired graphs must be simple, connected, and of maximum degree at most 33, 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 YY on a vertex set VV is a symmetric relation on V×{0,1,2}V \times \{0, 1, 2\} such that each vertex-port pair is adjacent to at most one pair and every two adjacent pairs (v,j)(v, j) and (w,k)(w, k) satisfy v≠wv \neq w.✦ Its underlying simple graph G(Y)G(Y) on VV joins two vertices vv and ww whenever (v,j)(v, j) and (w,k)(w, k) are adjacent in YY for some j,k∈{0,1,2}j, k \in \{0, 1, 2\}.✦

Given a simple graph GG on VV and a slot map s:V×V→{0,1,2}s : V \times V \to \{0, 1, 2\} that is injective on the neighborhood of each vertex x∈Vx \in V, the port graph from slots on VV connects (x,i)(x, i) to (y,j)(y, j) whenever xx and yy are adjacent in GG, i=s(x,y)i = s(x, y), and j=s(y,x)j = s(y, x).✦ For a family (Yb)b∈B(Y_b)_{b \in B} of subcubic port graphs on sets (Ab)b∈B(A_b)_{b \in B}, the disjoint union port graph on ⨆b∈BAb\bigsqcup_{b \in B} A_b connects two vertex-port pairs if they lie in the same component b∈Bb \in B and their local vertex-port pairs are adjacent in YbY_b.✦ Two subcubic port graphs YY and ZZ on VV are port-disjoint if no vertex-port pair is incident to edges in both YY and ZZ; their edge union port graph on VV takes the union of their port-edge relations.✦

Prefix gadgets and wiring

Write 𝔽2\mathbb{F}_2 for the ring of integers modulo 22 and 𝔽2d\mathbb{F}_2^d for the space of binary vectors of length d∈ℕd \in \mathbb{N}. For a natural number hh and a vector u∈𝔽2au \in \mathbb{F}_2^a, the prefix bit truncation trunch(u)∈𝔽2a\mathrm{trunc}_h(u) \in \mathbb{F}_2^a agrees with uu at every coordinate i<hi < h and equals 00 at all coordinates i≥hi \ge h.

A prefix gadget data structure DD consists of a dimension d∈ℕd \in \mathbb{N}, a positive channel count m∈ℕm \in \mathbb{N}, a root depth function root:{0,…,m−1}→{0,…,d}\mathrm{root} : \{0, \dots, m-1\} \to \{0, \dots, d\} with root(0)=0\mathrm{root}(0) = 0, a coordinate permutation πc∈Sd\pi_c \in S_d for each channel c∈{0,…,m−1}c \in \{0, \dots, m-1\}, and for each parity bit ε∈𝔽2\varepsilon \in \mathbb{F}_2 a nonempty set Lε⊆𝔽2dL^\varepsilon \subseteq \mathbb{F}_2^d of legal valuations such that for every ξ∈L1\xi \in L^1 and every z∈𝔽2dz \in \mathbb{F}_2^d, the vector zz lies in L0L^0 if and only if z+ξz + \xi lies in L1L^1.

A raw prefix tree node of DD is a triple (c,h,u)(c, h, u) with c∈{0,…,m−1}c \in \{0, \dots, m-1\}, h∈{0,…,d}h \in \{0, \dots, d\}, and u∈𝔽2du \in \mathbb{F}_2^d.✦ It is legal for parity ε∈𝔽2\varepsilon \in \mathbb{F}_2 if root(c)≤h\mathrm{root}(c) \le h and there exists z∈Lεz \in L^\varepsilon such that trunch(z∘πc)=u\mathrm{trunc}_h(z \circ \pi_c) = u. Let TDεT_D^\varepsilon be the set of legal prefix tree nodes of DD for parity ε\varepsilon.✦ The prefix gadget vertex set VDεV_D^\varepsilon is the disjoint union of a distinguished anchor vertex, the valuation copies {0,…,m−1}×Lε\{0, \dots, m-1\} \times L^\varepsilon, and the legal tree nodes TDεT_D^\varepsilon.✦

A prefix tree step edge joins t=(c,h,u)t = (c, h, u) to t′=(c′,h′,u′)t' = (c', h', u') in TDεT_D^\varepsilon when c=c′c = c', h+1=h′h + 1 = h', and trunch(u′)=u\mathrm{trunc}_h(u') = u.✦ A prefix gadget forward edge in VDεV_D^\varepsilon connects the anchor to a tree node (0,0,u)(0, 0, u), connects a valuation copy (c,z)(c, z) to (c+1,z)(c + 1, z), connects two tree nodes by a prefix tree step edge, or connects a tree node (c,d,u)(c, d, u) to a valuation copy (c,z)(c, z) satisfying u=z∘πcu = z \circ \pi_c.✦ The prefix gadget graph GDεG_D^\varepsilon is the simple graph on VDεV_D^\varepsilon in which xx and yy are adjacent whenever (x,y)(x, y) or (y,x)(y, x) is a forward edge.✦

For a bit b∈𝔽2b \in \mathbb{F}_2 with integer representative val(b)∈{0,1}\mathrm{val}(b) \in \{0, 1\}, its bit port index is val(b)+1∈{1,2}\mathrm{val}(b) + 1 \in \{1, 2\}.✦ The prefix gadget port slot map VDε×VDε→{0,1,2}V_D^\varepsilon \times V_D^\varepsilon \to \{0, 1, 2\} assigns port 00 at the anchor; at a valuation copy (c,z)(c, z), it assigns port 00 to a valuation copy with channel c′<cc' < c, port 11 to a valuation copy with c′≥cc' \ge c, and port 22 to any tree node; at a tree node t=(c,h,u)t = (c, h, u), it assigns port 00 to the anchor or to a tree node of height h′<hh' < h, port 11 to a valuation copy, and for a tree node t′=(c′,h′,u′)t' = (c', h', u') with h′≥hh' \ge h, it assigns the bit port index of uh′u'_h when h<dh < d and port 11 otherwise.✦ Because this slot map is injective on every neighborhood in GDεG_D^\varepsilon, it defines the prefix gadget port graph PDεP_D^\varepsilon on VDεV_D^\varepsilon.✦

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 SDS_D of prefix gadget sort tags of DD is the disjoint union of a single anchor tag, one valuation tag for each channel c∈{0,…,m−1}c \in \{0, \dots, m-1\}, and one tree tag for each pair (c,h)(c, h) with c∈{0,…,m−1}c \in \{0, \dots, m-1\} and root(c)≤h≤d\mathrm{root}(c) \le h \le d.✦

Now let 𝒟=(Db)b∈B\mathcal{D} = (D_b)_{b \in B} be a family of prefix gadget data indexed by a finite set BB equipped with a finite set numbering, that is, a chosen bijection νB:B→{0,…,|B|−1}\nu_B : B \to \{0, \dots, |B| - 1\} (its finite set enumeration). Write dbd_b, mbm_b, and rootb\mathrm{root}_b for the dimension, channel count, and root depth of DbD_b. A nonzero gadget channel of 𝒟\mathcal{D} is a pair (b,c)(b, c) with b∈Bb \in B and 1≤c<mb1 \le c < m_b.✦ A prefix gadget wiring WW for 𝒟\mathcal{D} is an involution μ\mu on the nonzero gadget channels such that μ(b,c)=(b′,c′)\mu(b, c) = (b', c') satisfies b′≠bb' \neq b and rootb′(c′)=rootb(c)\mathrm{root}_{b'}(c') = \mathrm{root}_b(c).✦

The wired gadget vertex set and wired gadget sort tag set of 𝒟\mathcal{D} are the disjoint unions V𝒟ε=⨆b∈BVDbεV_{\mathcal{D}}^\varepsilon = \bigsqcup_{b \in B} V_{D_b}^\varepsilon and S𝒟=⨆b∈BSDbS_{\mathcal{D}} = \bigsqcup_{b \in B} S_{D_b}. The internal wired port graph on V𝒟εV_{\mathcal{D}}^\varepsilon is the disjoint union port graph of (PDbε)b∈B(P_{D_b}^\varepsilon)_{b \in B}.✦ For each nonzero channel (b,c)(b, c), a channel root tree node is a node t∈TDbεt \in T_{D_b}^\varepsilon with channel cc and height rootb(c)\mathrm{root}_b(c); pairing (b,c)(b, c) with tt forms a wired channel root label, whose wired root vertex is the vertex (b,t)∈V𝒟ε(b, t) \in V_{\mathcal{D}}^\varepsilon. For a bit vector v∈𝔽2av \in \mathbb{F}_2^a, its zero-padded bit sequence pad(v):ℕ→𝔽2\mathrm{pad}(v) : \mathbb{N} \to \mathbb{F}_2 equals vjv_j for j<aj < a and 00 for j≥aj \ge a.✦ The root matching port graph on V𝒟εV_{\mathcal{D}}^\varepsilon connects port 00 of the wired root vertex of ((b,c),t)((b, c), t) to port 00 of the wired root vertex of ((b′,c′),t′)((b', c'), t') whenever μ(b,c)=(b′,c′)\mu(b, c) = (b', c') and the bit vectors u,u′u, u' of t,t′t, t' satisfy pad(u)=pad(u′)\mathrm{pad}(u) = \mathrm{pad}(u').✦ The anchor chain port graph connects port 22 of the wired block anchor vertex of x∈Bx \in B to port 11 of the wired block anchor vertex of y∈By \in B whenever νB(x)+1=νB(y)\nu_B(x) + 1 = \nu_B(y).✦ Because the internal, root matching, and anchor chain port graphs are pairwise port-disjoint, their edge union is the wired gadget port graph Y𝒟,WεY_{\mathcal{D}, W}^\varepsilon on V𝒟εV_{\mathcal{D}}^\varepsilon.✦

Affine blocks and realization data

Let r≥2r \ge 2 be the binary address length, n>0n > 0 a subdivision parameter, PP a set of primary vertices, and EE a set of edges. A product image instance JJ over (P,E,r)(P, E, r) assigns to each p∈Pp \in P a dimension δJ(p)∈{1,2}\delta_J(p) \in \{1, 2\}, to each e∈Ee \in E endpoints src(e),dst(e)∈P\mathrm{src}(e), \mathrm{dst}(e) \in P, to each pair (e,i)∈E×{0,…,r−1}(e, i) \in E \times \{0, \dots, r-1\} a nonempty finite domain ΩJ(e,i)⊆{0,1}\Omega_J(e, i) \subseteq \{0, 1\} and a map fe,i:{0,1}→{0,1}f_{e, i} : \{0, 1\} \to \{0, 1\} injective on ΩJ(e,i)\Omega_J(e, i), together with 𝔽2\mathbb{F}_2-linear forms Le:𝔽2δJ(src(e))→𝔽2L_e : \mathbb{F}_2^{\delta_J(\mathrm{src}(e))} \to \mathbb{F}_2 and Re:𝔽2δJ(dst(e))→𝔽2R_e : \mathbb{F}_2^{\delta_J(\mathrm{dst}(e))} \to \mathbb{F}_2, and constants ceL,ceR∈𝔽2c_e^{\mathrm{L}}, c_e^{\mathrm{R}} \in \mathbb{F}_2.✦

A subdivision vertex is either a primary vertex p∈Pp \in P or an interior vertex (e,j)∈E×{0,…,n−1}(e, j) \in E \times \{0, \dots, n-1\}.✦ Its vertex vector dimension δJ(t)\delta_J(t) is δJ(p)\delta_J(p) for t=p∈Pt = p \in P and 11 for an interior vertex, giving the vertex value vector space 𝔽2δJ(t)\mathbb{F}_2^{\delta_J(t)}. Its allowed vertex labels at row i∈{0,…,r−1}i \in \{0, \dots, r-1\} are {0,1}\{0, 1\} for p∈Pp \in P and ΩJ(e,i)\Omega_J(e, i) for (e,j)(e, j).✦ A subdivision link is a pair ℓ=(e,k)∈E×{0,…,n}\ell = (e, k) \in E \times \{0, \dots, n\}.✦ Its left endpoint left(ℓ)\mathrm{left}(\ell) is src(e)\mathrm{src}(e) when k=0k = 0 and (e,k−1)(e, k-1) otherwise; its right endpoint right(ℓ)\mathrm{right}(\ell) is dst(e)\mathrm{dst}(e) when k=nk = n and (e,k)(e, k) otherwise. The left link constant cL(ℓ)c^{\mathrm{L}}(\ell) is ceLc_e^{\mathrm{L}} if k=0k = 0 and 00 otherwise, the right link constant cR(ℓ)c^{\mathrm{R}}(\ell) is ceRc_e^{\mathrm{R}} if k=nk = n and 00 otherwise, and their sum c(ℓ)=cL(ℓ)+cR(ℓ)c(\ell) = c^{\mathrm{L}}(\ell) + c^{\mathrm{R}}(\ell) is the total link constant. The matched link output bit of a∈{0,1}a \in \{0, 1\} at row ii is fe,i(a)f_{e, i}(a) if k=nk = n and aa otherwise.✦

For natural numbers dd and ee, a square value tuple is an element ((u,v),(a,b))∈(𝔽2d×𝔽2e)×(𝔽2×𝔽2)((u, v), (a, b)) \in (\mathbb{F}_2^d \times \mathbb{F}_2^e) \times (\mathbb{F}_2 \times \mathbb{F}_2). For 𝔽2\mathbb{F}_2-linear forms L:𝔽2d→𝔽2L : \mathbb{F}_2^d \to \mathbb{F}_2 and R:𝔽2e→𝔽2R : \mathbb{F}_2^e \to \mathbb{F}_2, the affine boundary map βL,R\beta_{L, R} sends a square value tuple to βL,R((u,v),(a,b))=L(u)+R(v)+a+b.\beta_{L, R}\bigl((u, v), (a, b)\bigr) = L(u) + R(v) + a + b.(1)✦

Let ρ(i)=(i+1)mod⁡r\rho(i) = (i + 1) \bmod r denote cyclic succession on {0,…,r−1}\{0, \dots, r-1\}. A horizontal block h=(i,t,a,b)h = (i, t, a, b) consists of a row ii, a subdivision vertex tt, and Boolean labels a,b∈{0,1}a, b \in \{0, 1\}; it is valid if aa is an allowed label of tt at row ii and bb is an allowed label of tt at row ρ(i)\rho(i). A square block s=(i,ℓ,a,b)s = (i, \ell, a, b) consists of a row ii, a subdivision link ℓ=(e,k)\ell = (e, k), and Boolean labels a,b∈{0,1}a, b \in \{0, 1\}; it is valid if a∈ΩJ(e,i)a \in \Omega_J(e, i) and b∈ΩJ(e,ρ(i))b \in \Omega_J(e, \rho(i)). A raw block is either a horizontal block or a square block, and a valid block is a valid raw block. Write ℬ(J)\mathcal{B}(J) for the set of valid blocks of JJ.

A vertical readout is a triple (i,ℓ,a)(i, \ell, a) 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 hh contains only the readout hh itself. A square block s=(i,ℓ,a,b)s = (i, \ell, a, b) contains four readouts: its left horizontal readout (i,left(ℓ),a,b)(i, \mathrm{left}(\ell), a, b), its right horizontal readout (i,right(ℓ),aˆ,bˆ)(i, \mathrm{right}(\ell), \hat{a}, \hat{b}) where aˆ\hat{a} and bˆ\hat{b} are the matched link output bits of aa at ii and bb at ρ(i)\rho(i), its bottom vertical readout (i,ℓ,a)(i, \ell, a), and its top vertical readout (ρ(i),ℓ,b)(\rho(i), \ell, b).

The raw block value space is 𝔽2δJ(t)\mathbb{F}_2^{\delta_J(t)} for a horizontal block h=(i,t,a,b)h = (i, t, a, b), and the square value tuple space for dimensions δJ(left(ℓ))\delta_J(\mathrm{left}(\ell)) and δJ(right(ℓ))\delta_J(\mathrm{right}(\ell)) for a square block s=(i,ℓ,a,b)s = (i, \ell, a, b).✦ The single readout value space is 𝔽2δJ(t)\mathbb{F}_2^{\delta_J(t)} for a horizontal readout hh and 𝔽2\mathbb{F}_2 for a vertical readout.✦ A raw value zz on a block bb carries a readout value vv at a readout aa if either bb is horizontal with a=ba = b and v=zv = z, or bb is a square block and aa is its left, right, bottom, or top readout with vv equal to the corresponding component of zz.✦ Whenever bb contains aa, such a carried value exists and defines the block readout value of zz at aa.

Fix a marked row i*∈{0,…,r−1}i^* \in \{0, \dots, r-1\}, and let the marked row indicator 𝟏i=i*∈𝔽2\mathbf{1}_{i = i^*} \in \mathbb{F}_2 be 11 if i=i*i = i^* and 00 otherwise.✦ The block inhomogeneity bit ι(b)∈𝔽2\iota(b) \in \mathbb{F}_2 is 00 for a horizontal block and 𝟏i=i*c(ℓ)\mathbf{1}_{i = i^*} c(\ell) for a square block s=(i,ℓ,a,b)s = (i, \ell, a, b).✦ Each raw block bb has an additive block boundary map ∂b\partial_b from its raw block value space to 𝔽2\mathbb{F}_2, built on links from the left and right link linear forms via the affine boundary map (1). A raw value zz on bb is a legal block value for parity ε∈𝔽2\varepsilon \in \mathbb{F}_2 if ∂b(z)=ε⋅ι(b).\partial_b(z) = \varepsilon \cdot \iota(b).(2)✦

The block coordinate index set Coord(b)\mathrm{Coord}(b) of a raw block bb is {0,…,δJ(t)−1}\{0, \dots, \delta_J(t) - 1\} when bb is horizontal with vertex tt, and the disjoint union of {0,…,δJ(left(ℓ))−1}\{0, \dots, \delta_J(\mathrm{left}(\ell)) - 1\}, {0,…,δJ(right(ℓ))−1}\{0, \dots, \delta_J(\mathrm{right}(\ell)) - 1\}, and {0,1}\{0, 1\} when bb is a square block with link ℓ\ell.✦ Composing the additive raw value coordinate isomorphism (identifying raw values of bb with functions Coord(b)→𝔽2\mathrm{Coord}(b) \to \mathbb{F}_2) with the inverse of the canonical block coordinate numbering Coord(b)→{0,…,|Coord(b)|−1}\mathrm{Coord}(b) \to \{0, \dots, |\mathrm{Coord}(b)| - 1\} yields the raw value vector encoding onto 𝔽2|Coord(b)|\mathbb{F}_2^{|\mathrm{Coord}(b)|}. The readout bit dimension dim⁡(a)\dim(a) of a readout aa is δJ(t)\delta_J(t) for a horizontal readout with vertex tt and 11 for a vertical readout, and the readout value vector isomorphism identifies its readout values with 𝔽2dim⁡(a)\mathbb{F}_2^{\dim(a)}. When r≥2r \ge 2 and n>0n > 0, every readout aa contained in bb lifts to an injection {0,…,dim⁡(a)−1}↪Coord(b)\{0, \dots, \dim(a) - 1\} \hookrightarrow \mathrm{Coord}(b) matching these two isomorphisms, and composing with the block coordinate numbering gives the readout coordinate embedding.

A proper shared readout of a valid block b∈ℬ(J)b \in \mathcal{B}(J) is a pair (b′,a)(b', a) with b′∈ℬ(J)b' \in \mathcal{B}(J), b′≠bb' \neq b, and a readout aa contained in both bb and b′b'.✦ Write Prop(b)\mathrm{Prop}(b) for the set of proper shared readouts of bb; its proper readout numbering bijects Prop(b)\mathrm{Prop}(b) with {1,…,|Prop(b)|}\{1, \dots, |\mathrm{Prop}(b)|\} via the finite set enumeration. For each channel c∈{0,…,|Prop(b)|}c \in \{0, \dots, |\mathrm{Prop}(b)|\}, the channel root depth is 00 if c=0c = 0 and dim⁡(a)\dim(a) for the corresponding readout (b′,a)(b', a) otherwise, and the channel coordinate permutation is the identity if c=0c = 0 and a chosen coordinate ordering for that readout otherwise. These data define the block prefix gadget data Db(J,i*)D_b(J, i^*) of dimension |Coord(b)||\mathrm{Coord}(b)| and channel count |Prop(b)|+1|\mathrm{Prop}(b)| + 1, whose legal set LεL^\varepsilon consists of all vectors in 𝔽2|Coord(b)|\mathbb{F}_2^{|\mathrm{Coord}(b)|} whose inverse raw value vector encoding satisfies (2).✦ Write 𝒟J=(Db(J,i*))b∈ℬ(J)\mathcal{D}_J = (D_b(J, i^*))_{b \in \mathcal{B}(J)} for the resulting family of block prefix gadget data.

The claim

Lemma 7.2. Let DD be a prefix gadget data structure, let ε∈𝔽2\varepsilon \in \mathbb{F}_2, and let x∈VDεx \in V_D^\varepsilon be a prefix gadget vertex. The degree of xx in the prefix gadget graph GDεG_D^\varepsilon satisfies deg⁡GDε(x)≤3.\deg_{G_D^\varepsilon}(x) \le 3.(3)✦

Let BB be a nonempty finite set equipped with a finite set numbering, let 𝒟=(Db)b∈B\mathcal{D} = (D_b)_{b \in B} be a family of prefix gadget data, and let WW be a prefix gadget wiring for 𝒟\mathcal{D}. For every parity ε∈𝔽2\varepsilon \in \mathbb{F}_2, the underlying simple graph of the wired gadget port graph Y𝒟,WεY_{\mathcal{D}, W}^\varepsilon satisfies G(Y𝒟,Wε) is connected.G(Y_{\mathcal{D}, W}^\varepsilon) \text{ is connected}.(4)✦

Let r≥2r \ge 2 and n>0n > 0 be natural numbers, let PP and EE be finite sets, let JJ be a product image instance over (P,E,r)(P, E, r), and let i*∈{0,…,r−1}i^* \in \{0, \dots, r-1\} be a marked row. Writing M=|ℬ(J)|M = |\mathcal{B}(J)| for the number of valid blocks of JJ, for every parity ε∈𝔽2\varepsilon \in \mathbb{F}_2 the number of wired gadget vertices of the block realization family 𝒟J\mathcal{D}_J satisfies |V𝒟Jε|≤M(1+512(4M+1)),\bigl|V_{\mathcal{D}_J}^\varepsilon\bigr| \le M\bigl(1 + 512(4M + 1)\bigr),(5)✦ and the number of wired gadget sort tags satisfies |S𝒟J|≤M(1+8(4M+1)).\bigl|S_{\mathcal{D}_J}\bigr| \le M\bigl(1 + 8(4M + 1)\bigr).(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 r≥2r \ge 2, n>0n > 0, 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 GDεG_D^\varepsilon✦, 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 r≥2r \ge 2 and n>0n > 0✦.