OctoInform Beta

OpenAI preprint, September 2026 · Section 3. Exact queries and independent unfoldings

Lemma 3.2: Finite exposure trees match the triangle greedy scan on injective priorities and converge to the cavity limit

Exact discrete grid queries and cavity convergence.

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

In the priority-scan formulation of the triangle-removal process on a finite graph GG on nn vertices, every triangle is assigned a priority and triangles are greedily deleted in increasing order of priority whenever all three of their edges are still present. To test whether a given edge or set of focus edges survives in the terminal triangle-free graph without executing the global scan, one uses a finite recursive paired test that queries the priorities of triangles incident to the focus and recurses on their remaining edges at strictly smaller priority thresholds.

The Lean library formalizes this recursive test on a discrete priority grid {0,…,N−1}\{0, \dots, N - 1\} using finite exposure decision trees. It establishes that the short-circuit combination of child tests matches universal falsity, that tracing visited recursive calls preserves the Boolean outcome, that the grid query tree agrees with the triangle greedy scan on every injective priority assignment, and that its independent unfolding probability converges to a product of limiting cavity values as NN grows.

The triangle greedy scan

For a natural number nn, a graph GG on nn vertices is a finite set of finite subsets of the vertex set {0,…,n−1}\{0, \dots, n - 1\}.✦ The triangles of GG, denoted 𝒯(G)\mathcal{T}(G), form the finite set of 33-element subsets t⊆{0,…,n−1}t \subseteq \{0, \dots, n - 1\} whose three 22-element subsets all belong to GG.✦ The triangle hypergraph of GG is the map HGH_G sending each finite subset T⊆{0,…,n−1}T \subseteq \{0, \dots, n - 1\} to the set of all 22-element subsets of TT when T∈𝒯(G)T \in \mathcal{T}(G), and to ∅\emptyset otherwise.✦

For a finite set KK and a clock assignment ω:K→ℕ\omega : K \to \mathbb{N}, the clock ordering πω\pi_\omega is the finite list obtained by sorting all elements of KK in nondecreasing order of ω\omega, placing aa before bb whenever ω(a)≤ω(b)\omega(a) \le \omega(b).✦ For a graph GG on nn vertices and a subset t⊆{0,…,n−1}t \subseteq \{0, \dots, n - 1\}, the single triangle scan step step⁡(G,t)\operatorname{step}(G, t) removes all 22-element subsets of tt from GG if t∈𝒯(G)t \in \mathcal{T}(G), and leaves GG unchanged otherwise.✦ Given a finite list L=(t1,…,tm)L = (t_1, \dots, t_m) of subsets of {0,…,n−1}\{0, \dots, n - 1\}, the triangle greedy scan scan⁡(G,L)\operatorname{scan}(G, L) is the graph obtained by iteratively applying the single triangle scan step from left to right along LL, starting from GG.✦

Exposure trees and grid queries

Let KK, VV, and OO be sets of query keys, observed values, and outputs. An exposure decision tree AA is built inductively either as a leaf done⁡(o)\operatorname{done}(o) returning o∈Oo \in O, or as a branching node ask⁡(k,f)\operatorname{ask}(k, f) that queries k∈Kk \in K and proceeds to the subtree f(v)f(v) upon observing v∈Vv \in V.✦ Given an assignment ω:K→V\omega : K \to V, the exposure tree evaluation eval⁡ω(A)∈O\operatorname{eval}_\omega(A) \in O returns oo at a leaf done⁡(o)\operatorname{done}(o) and eval⁡ω(f(ω(k)))\operatorname{eval}_\omega(f(\omega(k))) at a node ask⁡(k,f)\operatorname{ask}(k, f).✦ For a function g:O→Pg : O \to P, the exposure tree output map mapOutput⁡(g,A)\operatorname{mapOutput}(g, A) replaces every leaf done⁡(o)\operatorname{done}(o) by done⁡(g(o))\operatorname{done}(g(o)) and recurses through every query node.✦

Given a family ν=(νk)k∈K\nu = (\nu_k)_{k \in K} of probability mass functions on VV, the independent unfolding law fresh⁡ν(A)\operatorname{fresh}_\nu(A) is the probability mass function on OO that assigns the point mass at oo to done⁡(o)\operatorname{done}(o) and, at a branching node ask⁡(k,f)\operatorname{ask}(k, f), draws a fresh independent sample from νk\nu_k and continues in ff: fresh⁡ν(ask⁡(k,f))(o)=∑v∈Vνk(v)fresh⁡ν(f(v))(o).\operatorname{fresh}_\nu\bigl(\operatorname{ask}(k, f)\bigr)(o) = \sum_{v \in V} \nu_k(v)\,\operatorname{fresh}_\nu\bigl(f(v)\bigr)(o).(1)✦ For a finite list A1,…,ArA_1, \dots, A_r of Boolean exposure trees, the short-circuit none check checkNone⁡(A1,…,Ar)\operatorname{checkNone}(A_1, \dots, A_r) is the Boolean exposure tree returning done⁡(true)\operatorname{done}(\text{true}) on the empty list, and on a nonempty list running A1A_1 first, returning done⁡(false)\operatorname{done}(\text{false}) if A1A_1 outputs true\text{true}, and otherwise continuing with checkNone⁡(A2,…,Ar)\operatorname{checkNone}(A_2, \dots, A_r).✦

Let H:τ→𝒫fin(ι)H : \tau \to \mathcal{P}_{\mathrm{fin}}(\iota) be a hypergraph mapping each hyperedge index T∈τT \in \tau to a finite subset H(T)⊆ιH(T) \subseteq \iota, with finite hyperedge index set τ\tau. Let F⊆ιF \subseteq \iota be a finite focus set and p∈τ∪{⊥}p \in \tau \cup \{\bot\} an optional parent hyperedge, where ⊥\bot denotes the absence of a parent.

Each recursive call exposes the priorities of all candidate triangles in a fixed deterministic order before sorting them and testing only those below the threshold, so exposure trees record every candidate priority even when a child call is skipped.

For natural numbers N,d,k∈ℕN, d, k \in \mathbb{N}, the depth-dd grid query tree QH,N(d,k,F,p)Q_{H, N}(d, k, F, p) is the Boolean exposure tree with query keys in τ\tau and values in {0,…,N−1}\{0, \dots, N - 1\} defined recursively on dd. First, it exposes in a fixed deterministic order the priority of TT for every candidate pair (e,T)(e, T) in the finite candidate set CH(F,p)⊆ι×τC_H(F, p) \subseteq \iota \times \tau. At depth d=0d = 0, it returns done⁡(true)\operatorname{done}(\text{true}) regardless of the observed values. At depth d=d′+1d = d' + 1, it sorts the observed candidate-priority pairs ((e,T),v)((e, T), v) in nondecreasing order of vv, assigns to each pair the child tree QH,N(d′,v,H(T)\{e},T)Q_{H, N}(d', v, H(T) \setminus \{e\}, T) when v<kv < k and done⁡(false)\operatorname{done}(\text{false}) when v≥kv \ge k, and combines the resulting list of child trees with checkNone\operatorname{checkNone}.

A recursive query call c=(a,F,p)c = (a, F, p) consists of a finite address list aa of pairs in ι×τ\iota \times \tau, a finite focus set F⊆ιF \subseteq \iota, and an optional parent p∈τ∪{⊥}p \in \tau \cup \{\bot\}.✦ The traced grid query tree QH,Ntr(d,k,c)Q^{\mathrm{tr}}_{H, N}(d, k, c) is the exposure tree with keys in τ\tau, values in {0,…,N−1}\{0, \dots, N - 1\}, and outputs consisting of a Boolean together with a finite list of recursive query calls, defined by the same recursion as QH,NQ_{H, N} while recording visited calls. At d=0d = 0, after exposing all candidates in CH(F,p)C_H(F, p), it returns done⁡(true,[c])\operatorname{done}(\text{true}, [c]). At d=d′+1d = d' + 1, after exposing and sorting the candidates, it maps each pair ((e,T),v)((e, T), v) with v<kv < k to QH,Ntr(d′,v,c′)Q^{\mathrm{tr}}_{H, N}(d', v, c'), where c′c' prepends (e,T)(e, T) to aa, sets the focus to H(T)\{e}H(T) \setminus \{e\}, and sets the parent to TT, and maps each pair with v≥kv \ge k to done⁡(false,[])\operatorname{done}(\text{false}, []); it combines these child trees and prepends cc to the resulting trace.

For a positive integer N≥1N \ge 1, the uniform grid priorities νN\nu_N assign to every T∈τT \in \tau the uniform probability mass function on {0,…,N−1}\{0, \dots, N - 1\}.✦ For a probability mass function μ\mu on {false,true}\{\text{false}, \text{true}\}, the probability of true is ℙ(μ=true)=μ(true)∈ℝ\mathbb{P}(\mu = \text{true}) = \mu(\text{true}) \in \mathbb{R}.✦ The grid query success probability is pH,N(d,k,F,p)=ℙ(fresh⁡νN(QH,N(d,k,F,p))=true).p_{H, N}(d, k, F, p) = \mathbb{P}\!\left(\operatorname{fresh}_{\nu_N}\! \bigl(Q_{H, N}(d, k, F, p)\bigr) = \text{true}\right).(2)✦

The limiting cavity function

The cavity function space for (ι,τ)(\iota, \tau) is the space of maps assigning to each e∈ιe \in \iota and optional parent p∈τ∪{⊥}p \in \tau \cup \{\bot\} a bounded continuous real-valued function on ℝ\mathbb{R}.✦ For a hypergraph H:τ→𝒫fin(ι)H : \tau \to \mathcal{P}_{\mathrm{fin}}(\iota), the depth-kk cavity iterate ck(e,p,t)c_k(e, p, t) is defined recursively for k∈ℕk \in \mathbb{N} by c0(e,p,t)=1c_0(e, p, t) = 1 and ck+1=𝒞H(ck)c_{k + 1} = \mathcal{C}_H(c_k), where 𝒞H\mathcal{C}_H is the cavity operator associated with HH.✦

For every k∈ℕk \in \mathbb{N}, e∈ιe \in \iota, and p∈τ∪{⊥}p \in \tau \cup \{\bot\}, the function t↦ck(e,p,t)t \mapsto c_k(e, p, t) is continuous on ℝ\mathbb{R} and takes values in [0,1][0, 1]. Each iterate therefore defines a bounded continuous cavity iterate in the cavity function space with oscillation at most 11.✦ The sequence of bounded continuous cavity iterates is Cauchy in the cavity function space, so by completeness it converges to a bounded continuous cavity limit.✦ Its pointwise value at (e,p,t)(e, p, t) is the limiting cavity function c∞(e,p,t)c_\infty(e, p, t).✦

The claim

Lemma 3.2. For any natural numbers n,N∈ℕn, N \in \mathbb{N}, any graphs GG and FF on nn vertices with F⊆GF \subseteq G, and any injective priority assignment ω:𝒫({0,…,n−1})→{0,…,N−1}\omega : \mathcal{P}(\{0, \dots, n - 1\}) \to \{0, \dots, N - 1\}, eval⁡ω(QHG,N(N,N,F,⊥))=true⇔F⊆scan⁡(G,πω).\begin{aligned} &\operatorname{eval}_\omega\bigl(Q_{H_G, N}(N, N, F, \bot)\bigr) = \text{true} \\ &\qquad \iff F \subseteq \operatorname{scan}(G, \pi_\omega). \end{aligned}(3)✦ For any hypergraph H:τ→𝒫fin(ι)H : \tau \to \mathcal{P}_{\mathrm{fin}}(\iota) with finite ground set ι\iota and finite index set τ\tau, any finite focus set F⊆ιF \subseteq \iota, and any optional parent p∈τ∪{⊥}p \in \tau \cup \{\bot\}, limN→∞pH,N(N,N,F,p)=∏e∈Fc∞(e,p,1).\lim_{N \to \infty} p_{H, N}(N, N, F, p) = \prod_{e \in F} c_\infty(e, p, 1).(4)✦ For any sets KK and VV, any assignment ω:K→V\omega : K \to V, and any finite list A1,…,ArA_1, \dots, A_r of Boolean exposure trees, eval⁡ω(checkNone⁡(A1,…,Ar))=true⇔∀i∈{1,…,r},eval⁡ω(Ai)=false.\begin{aligned} &\operatorname{eval}_\omega\bigl(\operatorname{checkNone}(A_1, \dots, A_r)\bigr) = \text{true} \\ &\qquad \iff \forall i \in \{1, \dots, r\},\; \operatorname{eval}_\omega(A_i) = \text{false}. \end{aligned}(5)✦ For any hypergraph H:τ→𝒫fin(ι)H : \tau \to \mathcal{P}_{\mathrm{fin}}(\iota) with finite index set τ\tau, any N,d,k∈ℕN, d, k \in \mathbb{N}, and any recursive query call c=(a,F,p)c = (a, F, p), writing π1\pi_1 for projection onto the first coordinate, mapOutput⁡(π1,QH,Ntr(d,k,c))=QH,N(d,k,F,p).\operatorname{mapOutput}\bigl(\pi_1,\, Q^{\mathrm{tr}}_{H, N}(d, k, c)\bigr) = Q_{H, N}(d, k, F, p).(6)✦

In the paper, the result reads: for a finite simple graph with continuous distinct triangle priorities, the finite recursive paired test terminates and returns true at a root call or pair call exactly when the focus edges remain untouched before the threshold in the priority scan. The Lean library formalizes this test on a discrete priority grid via finite exposure trees, establishing exact agreement with the triangle greedy scan on injective priority assignments in (3) and convergence of the independent unfolding probability to the terminal cavity product as the grid size grows in (4).

What is checked

Lemma 3.2 is stated over finite exposure decision trees and their short-circuit none check, traced and untraced depth-dd grid query trees on a hypergraph HH, the triangle hypergraph and triangle greedy scan of a graph on nn vertices under an injective priority assignment, uniform discrete grid priorities, and the limiting cavity function in the cavity function space. In addition to (3), (4), (5), and (6), the Lean library establishes that each depth-kk cavity iterate is continuous on ℝ\mathbb{R} and bounded in [0,1][0, 1], giving rise to the bounded continuous cavity limit.