OctoInform Beta

OpenAI preprint, September 2026 · 5. From safe samples to unobserved rank

Lemma 12: Lower bounds on the expected nominal rank statistic from safe samples and residual error estimates

Sample-to-rank transfer for large candidate groups.

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 fixed-vector analysis of online matroid selection with a single sample, arriving elements are filtered against a revealed mask HH and partitioned by geometrically rounded weights into candidate groups. To charge the offline optimum to the algorithm’s selections, one converts a lower bound on the number of safe sampled elements in a large candidate group into a lower bound on the expected unobserved conditional rank across the layers of its nominal flat path, conditioned on HH.

Throughout the page, let M=(E,ℐ)M = (E, \mathcal{I}) be a finite matroid on the ground set E={0,…,n−1}E = \{0, \dots, n - 1\} with matroid rank rk⁡(X)\operatorname{rk}(X), closure cl⁡(X)\operatorname{cl}(X), and conditional rank rk⁡(S∣P)=rk⁡(S∪P)−rk⁡(P)\operatorname{rk}(S \mid P) = \operatorname{rk}(S \cup P) - \operatorname{rk}(P)(1)✦ for subsets S,P⊆ES, P \subseteq E. An element weight vector is a map w:E→ℝw : E \to \mathbb{R}.✦ The construction uses five fixed positive constants: the weight rounding base B=232B = 2^{32}, the density threshold κ=2100\kappa = 2^{100}, the thinning rate 2−1402^{-140}, the retained fraction γ=2−16\gamma = 2^{-16}, and the residual error rate δ=2−26\delta = 2^{-26}.

Priority order, candidates, and groups

For any real numbers BB and xx, the logarithmic weight level of xx with base BB is the optional integer equal to ⌊log⁡Bx⌋\lfloor \log_B x \rfloor when x>0x > 0 and absent otherwise.✦ Viewing an optional integer as an element of ℤ⊥=ℤ∪{⊥}\mathbb{Z}_\bot = \mathbb{Z} \cup \{\bot\} with ⊥\bot strictly below every integer gives the optional level in ℤ⊥\mathbb{Z}_\bot. For a linearly ordered key set KK, the lexicographic key order on E×KE \times K places (e,k1)(e, k_1) before (f,k2)(f, k_2) when k2<k1k_2 < k_1, or when k1=k2k_1 = k_2 and e<fe < f.✦ Given optional integer priority levels a:E→ℤ⊥a : E \to \mathbb{Z}_\bot, the priority order relation holds between ee and ff when (e,a(e))(e, a(e)) precedes (f,a(f))(f, a(f)) in the lexicographic key order over ℤ⊥\mathbb{Z}_\bot.✦

The higher-priority element set of e∈Ee \in E under aa is the set of all f∈Ef \in E with strictly higher priority than ee✦, and the priority arrival time timea(e)\mathrm{time}_a(e) is its cardinality.✦ For any arrival-time map time:E→ℕ\mathrm{time} : E \to \mathbb{N} and subset H⊆EH \subseteq E, the earlier masked elements of ee form the set {f∈H:time(f)<time(e)}.\{f \in H : \mathrm{time}(f) < \mathrm{time}(e)\}.(2)✦ The time-ordered greedy set of HH in MM is the set {e∈H:e∉cl⁡({f∈H:time(f)<time(e)})}\{e \in H : e \notin \operatorname{cl}(\{f \in H : \mathrm{time}(f) < \mathrm{time}(e)\})\}.✦ The positive priority-greedy set I+(M,a)⊆EI^+(M, a) \subseteq E is the set of elements e∈Ee \in E with non-absent level a(e)≠⊥a(e) \neq \bot belonging to the time-ordered greedy set of EE in MM under arrival times timea\mathrm{time}_a.✦

Random partition masks on EE consist of a tuple d=(H,D,C,T,odd)d = (H, D, C, T, \mathrm{odd}) comprising four subsets of EE, namely the filter mask HH, density mask DD, guard mask CC, and test mask TT, together with a Boolean parity bit odd\mathrm{odd}.✦ For any subsets A,B,C′⊆EA, B, C' \subseteq E, the updated main masks dA,B,C′d_{A,B,C'} replace (D,C,T)(D, C, T) in dd by (A,B,C′)(A, B, C') while keeping HH and the parity bit unchanged.✦

For elements f,e∈Ef, e \in E with optional integer levels u,v∈ℤ⊥u, v \in \mathbb{Z}_\bot, the level priority order holds for (f,u)(f, u) before (e,v)(e, v) when u,v∈ℤu, v \in \mathbb{Z} with v<uv < u or with v=uv = u and f<ef < e, holds when u∈ℤu \in \mathbb{Z} and v=⊥v = \bot, and fails otherwise.✦ Given observed optional integer levels s:E→ℤ⊥s : E \to \mathbb{Z}_\bot and masks dd with filter mask HH, an element e∈Ee \in E at optional level v∈ℤ⊥v \in \mathbb{Z}_\bot is a non-spanned candidate element if v≠⊥v \neq \bot, e∉He \notin H, and ee does not belong to the closure in MM of the set of all f∈Hf \in H such that (f,s(f))(f, s(f)) precedes (e,v)(e, v) in the level priority order.✦

The active candidate weight levels form the finite set of integer levels realized by non-spanned candidate elements in the density mask DD, namely {i∈ℤ:∃e∈D,e is a non-spanned candidate at s(e) and s(e)=i}\{i \in \mathbb{Z} : \exists e \in D,\; e \text{ is a non-spanned candidate at } s(e) \text{ and } s(e) = i\}✦, and the sorted active weight groups form the list (g0,g1,…,gm−1)(g_0, g_1, \dots, g_{m-1}) obtained by sorting those levels in nondecreasing order.✦ For each integer i∈ℤi \in \mathbb{Z}, the true candidate group at level ii is the set Ui={e∈E:e is a non-spanned candidate at s(e) and s(e)=i}.U_i = \{e \in E : e \text{ is a non-spanned candidate at } s(e) \text{ and } s(e) = i\}.(3)✦ For any mask A⊆EA \subseteq E and group index h∈ℕh \in \mathbb{N}, the masked candidates in group hh form the set AhA_h of all elements e∈Ae \in A that are non-spanned candidates at s(e)s(e) and satisfy s(e)=ghs(e) = g_h (and Ah=∅A_h = \emptyset when h≥mh \ge m).✦

Flat paths and the nominal rank statistic

Let MM be a matroid on a finite ground type α\alpha whose ground set is all of α\alpha, and let κ∈ℕ\kappa \in \mathbb{N}. For subsets D,X⊆αD, X \subseteq \alpha, the density objective function is ϕκ(D,X)=|D∩X|−κrk⁡(X).\phi_\kappa(D, X) = |D \cap X| - \kappa \operatorname{rk}(X).(4)✦ Given P⊆αP \subseteq \alpha, a flat QQ of MM containing PP is a density-maximizing flat if ϕκ(D,Z)≤ϕκ(D,Q)\phi_\kappa(D, Z) \le \phi_\kappa(D, Q) for every flat ZZ of MM containing PP.✦ Such a flat containing every other density-maximizing flat exists✦; let Φκ(D,P)\Phi_\kappa(D, P) denote this largest density-maximizing flat.✦ For integers aa and kk, the activated density expansion Ψκ(D,a,k,P)\Psi_\kappa(D, a, k, P) equals Φκ(D,P)\Phi_\kappa(D, P) when a≤ka \le k and equals PP otherwise.✦

For each group index h∈ℕh \in \mathbb{N}, the group activation time is ah=−3(h+1).a_h = -3(h + 1).(5)✦ Given sequences of density masks (Dh)h∈ℕ(D_h)_{h \in \mathbb{N}} and guard masks (Ch)h∈ℕ(C_h)_{h \in \mathbb{N}} of subsets of α\alpha, the guarded flat path Fh(k)F_h(k) is defined recursively for h∈ℕh \in \mathbb{N} and k∈ℤk \in \mathbb{Z} by F0(k)={cl⁡(∅),k<0,α,k≥0,Fh+1(k)=cl⁡(Ψκ(Dh,ah,k,Fh(k))∪(Ch∩Ψκ(Dh,ah,k+1,Fh(k+1)))),\begin{aligned} F_0(k) &= \begin{cases} \operatorname{cl}(\emptyset), & k < 0, \\ \alpha, & k \ge 0, \end{cases} \\ F_{h+1}(k) &= \operatorname{cl}\Bigl( \Psi_\kappa\bigl(D_h, a_h, k, F_h(k)\bigr) \\ &\qquad \cup \bigl(C_h \cap \Psi_\kappa(D_h, a_h, k + 1, F_h(k + 1))\bigr) \Bigr), \end{aligned}(6)✦ and the nominal flat path is Xh(k)=Ψκ(Dh,ah,k,Fh(k)).X_h(k) = \Psi_\kappa\bigl(D_h, a_h, k, F_h(k)\bigr).(7)✦ Given in addition a sequence of test masks (Th)h∈ℕ(T_h)_{h \in \mathbb{N}} of subsets of α\alpha, the lower competition set Kh,bK_{h,b} at level b∈ℤb \in \mathbb{Z} is defined recursively by K0,b=∅K_{0,b} = \emptyset and Kh+1,b=Kh,b∪(Th∩(Xh(b)\Xh(b−1))).K_{h+1,b} = K_{h,b} \cup \bigl(T_h \cap (X_h(b) \setminus X_h(b - 1))\bigr).(8)✦

For an integer a∈ℤa \in \mathbb{Z}, the integer window is W(a)={k∈ℤ:a−2≤k≤1}W(a) = \{k \in \mathbb{Z} : a - 2 \le k \le 1\}✦, and for a parity bit ε∈{0,1}\varepsilon \in \{0, 1\} the parity index window is W(a,ε)={k∈W(a):k≡ε(mod⁡2)}W(a, \varepsilon) = \{k \in W(a) : k \equiv \varepsilon \pmod 2\}.✦ The boolean parity bit maps false to 00 and true to 11.✦ For a subset U⊆αU \subseteq \alpha, a group index h∈ℕh \in \mathbb{N}, a parity ε∈{0,1}\varepsilon \in \{0, 1\}, and b∈W(ah,ε)b \in W(a_h, \varepsilon), the nominal layer set is Ph,b={e∈U:ah+2≤b≤0,e∈Xh(b)\Xh(b−1)}.P_{h,b} = \{e \in U : a_h + 2 \le b \le 0,\; e \in X_h(b) \setminus X_h(b - 1)\}.(9)✦

The nominal rank statistic tracks the total conditional rank across parity layers of the nominal flat path before thinning by the test mask.

For an excluded set O⊆αO \subseteq \alpha, the nominal rank statistic is the natural number zh(U,O,ε)=∑b∈W(ah,ε)rk⁡(Ph,b\O∣Xh(b−2)∪Kh,b).z_h(U, O, \varepsilon) = \sum_{b \in W(a_h, \varepsilon)} \operatorname{rk}\bigl(P_{h,b} \setminus O \mid X_h(b - 2) \cup K_{h,b}\bigr).(10)✦ Returning to MM on E={0,…,n−1}E = \{0, \dots, n - 1\} with masks d=(H,D,C,T,odd)d = (H, D, C, T, \mathrm{odd}) and observed levels ss, the listed rank statistic zi(d,ε)z_i(d, \varepsilon) at level i∈ℤi \in \mathbb{Z}, threshold κ∈ℕ\kappa \in \mathbb{N}, and parity ε∈{0,1}\varepsilon \in \{0, 1\} equals zh(Ui,H∪D∪C,ε)z_h(U_i, H \cup D \cup C, \varepsilon), formed from the group masks (Dr,Cr,Tr)r∈ℕ(D_r, C_r, T_r)_{r \in \mathbb{N}}, when ii appears at index hh in the sorted active weight groups, and equals 00 otherwise.✦

Mask and parity expectations

Let α\alpha be a ground type, VV a finite subset of α\alpha, and q:α→ℝq : \alpha \to \mathbb{R}. For any subset S⊆VS \subseteq V, the Bernoulli subset probability is μq(V,S)=∏e∈V{q(e),e∈S,1−q(e),e∉S.\mu_q(V, S) = \prod_{e \in V} \begin{cases} q(e), & e \in S, \\ 1 - q(e), & e \notin S. \end{cases}(11)✦ For a real-valued function ff on finite subsets of α\alpha, the Bernoulli mask expectation is 𝔼q,V[f]=∑S⊆Vμq(V,S)f(S).\mathbb{E}_{q, V}[f] = \sum_{S \subseteq V} \mu_q(V, S) f(S).(12)✦ Given three maps p,q,r:α→ℝp, q, r : \alpha \to \mathbb{R} and a real-valued function gg on triples of finite subsets of α\alpha, the triple-mask expectation is the iterated expectation 𝔼p,q,r,V[g]=𝔼p,V[D↦𝔼q,V[C↦𝔼r,V[T↦g(D,C,T)]]].\mathbb{E}_{p, q, r, V}[g] = \mathbb{E}_{p, V}\Bigl[D \mapsto \mathbb{E}_{q, V}\bigl[C \mapsto \mathbb{E}_{r, V}[T \mapsto g(D, C, T)]\bigr]\Bigr].(13)✦ For a real-valued function φ\varphi on Booleans, the fair parity expectation is (φ(false)+φ(true))/2(\varphi(\mathrm{false}) + \varphi(\mathrm{true})) / 2.✦

The claim

Lemma 12. Let M=(E,ℐ)M = (E, \mathcal{I}) be a matroid on E={0,…,n−1}E = \{0, \dots, n - 1\} whose ground set is all of EE, let w:E→ℝw : E \to \mathbb{R} be an element weight vector with logarithmic weight levels a(e)a(e) at base B=232B = 2^{32}, let d=(H,D,C,T,odd)d = (H, D, C, T, \mathrm{odd}) be random partition masks on EE, and let i∈ℤi \in \mathbb{Z} be a level whose true candidate group UiU_i satisfies |Ui|≥κ|U_i| \ge \kappa, where κ=2100\kappa = 2^{100}. Set Yi={e∈I+(M,a)\H:a(e)=i}Y_i = \{e \in I^+(M, a) \setminus H : a(e) = i\}. With constant inclusion probabilities 1/41/4, 2−1402^{-140}, and 2−1402^{-140} on EE and listed rank statistic ziz_i evaluated at threshold κ=2100\kappa = 2^{100} and levels aa, γ|Yi|−2−23|Ui|κ≤𝔼1/4,2−140,2−140,E[(D,C,T)↦zi(dD,C,T,0)+zi(dD,C,T,1)2].\begin{aligned} &\frac{\gamma |Y_i| - 2^{-23} |U_i|}{\kappa} \\ &\quad \le \mathbb{E}_{1/4, 2^{-140}, 2^{-140}, E}\Bigl[ (D, C, T) \mapsto \frac{z_i(d_{D,C,T}, 0) + z_i(d_{D,C,T}, 1)}{2} \Bigr]. \end{aligned}(14)✦

Moreover, let α\alpha be any type, let p,q,r:α→ℝp, q, r : \alpha \to \mathbb{R} satisfy 0≤p(e),q(e),r(e)≤10 \le p(e), q(e), r(e) \le 1 for all e∈αe \in \alpha, let VV be a finite subset of α\alpha, let Y∈ℝY \in \mathbb{R}, and let σ,z,err\sigma, z, \mathrm{err} be real-valued functions on triples of finite subsets of α\alpha. Suppose that σ(D,C,T)≤κz(D,C,T)+err(D,C,T)\sigma(D, C, T) \le \kappa z(D, C, T) + \mathrm{err}(D, C, T) for all subsets D,C,T⊆VD, C, T \subseteq V, that γY−|V|/κ≤𝔼p,q,r,V[σ]\gamma Y - |V| / \kappa \le \mathbb{E}_{p, q, r, V}[\sigma], and that 𝔼p,q,r,V[err]≤2δ|V|\mathbb{E}_{p, q, r, V}[\mathrm{err}] \le 2 \delta |V|. Then γY−2−23|V|κ≤𝔼p,q,r,V[z].\frac{\gamma Y - 2^{-23} |V|}{\kappa} \le \mathbb{E}_{p, q, r, V}[z].(15)✦

What is checked

In the Lean library, Lemma 12 is stated both as the concrete sample-to-rank contract (14) over a finite matroid on {0,…,n−1}\{0, \dots, n - 1\} with real weights, random partition masks, logarithmic weight levels, positive priority-greedy sets, and the listed rank statistic at threshold κ=2100\kappa = 2^{100}, and as the abstract sample-to-rank bound (15) over an arbitrary ground type, a finite subset VV, inclusion probability functions taking values in [0,1][0, 1], and real-valued mask functions satisfying the deterministic transfer, safe-sample, and residual-error inequalities. The Lean library also establishes the existence of a largest density-maximizing flat containing any given subset in a matroid whose ground set is the whole ambient type.