The setting
In the priority-scan formulation of the triangle-removal process on a finite graph on 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 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 grows.
The triangle greedy scan
For a natural number , a graph on vertices is a finite set of finite subsets of the vertex set .✦ The triangles of , denoted , form the finite set of -element subsets whose three -element subsets all belong to .✦ The triangle hypergraph of is the map sending each finite subset to the set of all -element subsets of when , and to otherwise.✦
For a finite set and a clock assignment , the clock ordering is the finite list obtained by sorting all elements of in nondecreasing order of , placing before whenever .✦ For a graph on vertices and a subset , the single triangle scan step removes all -element subsets of from if , and leaves unchanged otherwise.✦ Given a finite list of subsets of , the triangle greedy scan is the graph obtained by iteratively applying the single triangle scan step from left to right along , starting from .✦
Exposure trees and grid queries
Let , , and be sets of query keys, observed values, and outputs. An exposure decision tree is built inductively either as a leaf returning , or as a branching node that queries and proceeds to the subtree upon observing .✦ Given an assignment , the exposure tree evaluation returns at a leaf and at a node .✦ For a function , the exposure tree output map replaces every leaf by and recurses through every query node.✦
Given a family of probability mass functions on , the independent unfolding law is the probability mass function on that assigns the point mass at to and, at a branching node , draws a fresh independent sample from and continues in : (1)✦ For a finite list of Boolean exposure trees, the short-circuit none check is the Boolean exposure tree returning on the empty list, and on a nonempty list running first, returning if outputs , and otherwise continuing with .✦
Let be a hypergraph mapping each hyperedge index to a finite subset , with finite hyperedge index set . Let be a finite focus set and an optional parent hyperedge, where 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 , the depth- grid query tree is the Boolean exposure tree with query keys in and values in defined recursively on . First, it exposes in a fixed deterministic order the priority of for every candidate pair in the finite candidate set . At depth , it returns regardless of the observed values. At depth , it sorts the observed candidate-priority pairs in nondecreasing order of , assigns to each pair the child tree when and when , and combines the resulting list of child trees with .
A recursive query call consists of a finite address list of pairs in , a finite focus set , and an optional parent .✦ The traced grid query tree is the exposure tree with keys in , values in , and outputs consisting of a Boolean together with a finite list of recursive query calls, defined by the same recursion as while recording visited calls. At , after exposing all candidates in , it returns . At , after exposing and sorting the candidates, it maps each pair with to , where prepends to , sets the focus to , and sets the parent to , and maps each pair with to ; it combines these child trees and prepends to the resulting trace.
For a positive integer , the uniform grid priorities assign to every the uniform probability mass function on .✦ For a probability mass function on , the probability of true is .✦ The grid query success probability is (2)✦
The limiting cavity function
The cavity function space for is the space of maps assigning to each and optional parent a bounded continuous real-valued function on .✦ For a hypergraph , the depth- cavity iterate is defined recursively for by and , where is the cavity operator associated with .✦
For every , , and , the function is continuous on and takes values in . Each iterate therefore defines a bounded continuous cavity iterate in the cavity function space with oscillation at most .✦ 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 is the limiting cavity function .✦
The claim
Lemma 3.2. For any natural numbers , any graphs and on vertices with , and any injective priority assignment , (3)✦ For any hypergraph with finite ground set and finite index set , any finite focus set , and any optional parent , (4)✦ For any sets and , any assignment , and any finite list of Boolean exposure trees, (5)✦ For any hypergraph with finite index set , any , and any recursive query call , writing for projection onto the first coordinate, (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- grid query trees on a hypergraph , the triangle hypergraph and triangle greedy scan of a graph on 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- cavity iterate is continuous on and bounded in , giving rise to the bounded continuous cavity limit.