OctoInform Beta

OpenAI preprint, September 2026 · 4. Reverse exposure and safe samples

Lemma 9: Adaptive nonrepeating query programs certify an increasing Bernoulli event with failure probability δ\delta at most log⁡(1/δ)\log(1/\delta) times in expectation

Logarithmic bound on disjoint-query certificate transactions.

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

Consider a finite ground set V0V_0 whose coordinates are realized as independent Bernoulli random bits, together with an increasing event 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0} that fails with positive probability δ\delta. A positive certificate for 𝒜\mathcal{A} is any subset I⊆V0I \subseteq V_0 belonging to 𝒜\mathcal{A}, since setting the coordinates in II to one forces the event regardless of the remaining coordinates. An adaptive algorithm queries coordinates of V0V_0 one by one without repeating any coordinate, possibly using an independent auxiliary random seed, and groups its queries into consecutive transactions. A transaction succeeds only if the positive coordinates observed during that transaction alone form a certificate for 𝒜\mathcal{A}. Lemma 9 bounds the expected number of successful transactions by log⁡(1/δ)\log(1 / \delta), where log\log denotes the natural logarithm.

Bernoulli product laws

Let V0V_0 be a finite set and let q:V0→ℝq : V_0 \to \mathbb{R} assign a real weight to each coordinate. For finite subsets V,S⊆V0V, S \subseteq V_0, the Bernoulli subset probability wq(V,S)w_q(V, S) is defined by (1): wq(V,S)=∏e∈V{q(e)if e∈S,1−q(e)if e∉S.w_q(V, S) = \prod_{e \in V} \begin{cases} q(e) & \text{if } e \in S, \\ 1 - q(e) & \text{if } e \notin S. \end{cases}(1)✦ For a real-valued function f:2V0→ℝf : 2^{V_0} \to \mathbb{R} and a subset V⊆V0V \subseteq V_0, the Bernoulli mask expectation 𝔼q,V[f]\mathbb{E}_{q, V}[f] is given by (2): 𝔼q,V[f]=∑S⊆Vwq(V,S)f(S).\mathbb{E}_{q, V}[f] = \sum_{S \subseteq V} w_q(V, S) f(S).(2)✦

A family 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0} is increasing if I∈𝒜I \in \mathcal{A} and I⊆J⊆V0I \subseteq J \subseteq V_0 imply J∈𝒜J \in \mathcal{A}. Write 𝟏E\mathbf{1}_{E} for the indicator equal to 11 when a condition EE holds and 00 otherwise. For any family 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0} and subsets V,I⊆V0V, I \subseteq V_0, the certificate failure probability pI(V)p_I(V) with forced positives II is given by (3): pI(V)=𝔼q,V[S↦𝟏I∪S∉𝒜].p_I(V) = \mathbb{E}_{q, V}\bigl[S \mapsto \mathbf{1}_{I \cup S \notin \mathcal{A}}\bigr].(3)✦ In particular, δ=p∅(V0)\delta = p_\emptyset(V_0) is the failure probability of 𝒜\mathcal{A} over the full ground set V0V_0.

Adaptive query programs

A query program PP over V0V_0 is a finite-depth decision tree built inductively from a terminal node 𝗌𝗍𝗈𝗉\mathsf{stop}, a branching query node 𝗊𝗎𝖾𝗋𝗒(e,P0,P1)\mathsf{query}(e, P_0, P_1) with e∈V0e \in V_0 and subprograms P0,P1P_0, P_1, and a transaction boundary 𝖿𝗂𝗇𝗂𝗌𝗁(P′)\mathsf{finish}(P') with continuation P′P'.✦ Because every query program has finite depth, the number of queries and transactions along every execution path is deterministically bounded.

For a subset V⊆V0V \subseteq V_0 of available coordinates, a query program PP is fresh on VV if 𝗌𝗍𝗈𝗉\mathsf{stop} is fresh on VV, a node 𝗊𝗎𝖾𝗋𝗒(e,P0,P1)\mathsf{query}(e, P_0, P_1) is fresh on VV when e∈Ve \in V and both P0P_0 and P1P_1 are fresh on V\{e}V \setminus \{e\}, and 𝖿𝗂𝗇𝗂𝗌𝗁(P′)\mathsf{finish}(P') is fresh on VV when P′P' is fresh on VV.✦ Given a family 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0}, a realization S⊆V0S \subseteq V_0, and a set I⊆V0I \subseteq V_0 of positive coordinates collected in the current transaction, the query program certificate count N𝒜(P,S,I)∈ℝN_{\mathcal{A}}(P, S, I) \in \mathbb{R} is defined recursively by (4): N𝒜(𝗌𝗍𝗈𝗉,S,I)=0,N𝒜(𝗊𝗎𝖾𝗋𝗒(e,P0,P1),S,I)={N𝒜(P1,S,I∪{e})if e∈S,N𝒜(P0,S,I)if e∉S,N𝒜(𝖿𝗂𝗇𝗂𝗌𝗁(P′),S,I)=𝟏I∈𝒜+N𝒜(P′,S,∅).\begin{aligned} N_{\mathcal{A}}(\mathsf{stop}, S, I) &= 0, \\ N_{\mathcal{A}}(\mathsf{query}(e, P_0, P_1), S, I) &= \begin{cases} N_{\mathcal{A}}(P_1, S, I \cup \{e\}) & \text{if } e \in S, \\ N_{\mathcal{A}}(P_0, S, I) & \text{if } e \notin S, \end{cases} \\ N_{\mathcal{A}}(\mathsf{finish}(P'), S, I) &= \mathbf{1}_{I \in \mathcal{A}} + N_{\mathcal{A}}(P', S, \emptyset). \end{aligned}(4)✦

Separating the declared success flag from the certificate predicate lets an adaptive procedure decline to count a certified transaction while still forbidding uncertified declarations.

A marked query program QQ over V0V_0 is a finite-depth decision tree built from 𝗌𝗍𝗈𝗉\mathsf{stop}, 𝗊𝗎𝖾𝗋𝗒(e,Q0,Q1)\mathsf{query}(e, Q_0, Q_1) with e∈V0e \in V_0, and a marked transaction boundary 𝖿𝗂𝗇𝗂𝗌𝗁(b,Q′)\mathsf{finish}(b, Q') carrying a Boolean outcome b∈{false,true}b \in \{\mathrm{false}, \mathrm{true}\} and continuation Q′Q'. Freshness of QQ on V⊆V0V \subseteq V_0 is defined by the same recursion as for query programs, ignoring the flag bb at each 𝖿𝗂𝗇𝗂𝗌𝗁(b,Q′)\mathsf{finish}(b, Q') node.✦ For a fixed realization S⊆V0S \subseteq V_0, the program QQ has branch freshness at SS on VV if 𝗌𝗍𝗈𝗉\mathsf{stop} satisfies the condition, 𝗊𝗎𝖾𝗋𝗒(e,Q0,Q1)\mathsf{query}(e, Q_0, Q_1) satisfies it when e∈Ve \in V and the taken branch (Q1Q_1 if e∈Se \in S and Q0Q_0 if e∉Se \notin S) has branch freshness at SS on V\{e}V \setminus \{e\}, and 𝖿𝗂𝗇𝗂𝗌𝗁(b,Q′)\mathsf{finish}(b, Q') satisfies it when Q′Q' has branch freshness at SS on VV.✦

For a family 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0}, a realization S⊆V0S \subseteq V_0, and an accumulated positive set I⊆V0I \subseteq V_0, a marked query program QQ has certificate soundness at SS from II if:

  • 𝗌𝗍𝗈𝗉\mathsf{stop} has certificate soundness at SS from II;

  • 𝗊𝗎𝖾𝗋𝗒(e,Q0,Q1)\mathsf{query}(e, Q_0, Q_1) has certificate soundness at SS from II when Q1Q_1 has certificate soundness at SS from I∪{e}I \cup \{e\} if e∈Se \in S, and Q0Q_0 has certificate soundness at SS from II if e∉Se \notin S;

  • 𝖿𝗂𝗇𝗂𝗌𝗁(b,Q′)\mathsf{finish}(b, Q') has certificate soundness at SS from II when b=trueb = \mathrm{true} implies I∈𝒜I \in \mathcal{A} and Q′Q' has certificate soundness at SS from ∅\emptyset.

The marked program success count N(Q,S)∈ℝN(Q, S) \in \mathbb{R} is defined recursively by (5): N(𝗌𝗍𝗈𝗉,S)=0,N(𝗊𝗎𝖾𝗋𝗒(e,Q0,Q1),S)={N(Q1,S)if e∈S,N(Q0,S)if e∉S,N(𝖿𝗂𝗇𝗂𝗌𝗁(b,Q′),S)=𝟏b=true+N(Q′,S).\begin{aligned} N(\mathsf{stop}, S) &= 0, \\ N(\mathsf{query}(e, Q_0, Q_1), S) &= \begin{cases} N(Q_1, S) & \text{if } e \in S, \\ N(Q_0, S) & \text{if } e \notin S, \end{cases} \\ N(\mathsf{finish}(b, Q'), S) &= \mathbf{1}_{b = \mathrm{true}} + N(Q', S). \end{aligned}(5)✦

The claim

Lemma 9. Let V0V_0 be a finite set, let 𝒜⊆2V0\mathcal{A} \subseteq 2^{V_0} be an increasing family, and let q:V0→ℝq : V_0 \to \mathbb{R} satisfy 0≤q(e)≤10 \le q(e) \le 1 for every e∈V0e \in V_0. Assume that the failure probability δ=p∅(V0)\delta = p_\emptyset(V_0) is strictly positive.

  1. Let (Ω,ℱ,μ)(\Omega, \mathcal{F}, \mu) be a probability space and let ω↦Pω\omega \mapsto P_\omega assign a query program over V0V_0 to each ω∈Ω\omega \in \Omega. Suppose that PωP_\omega is fresh on V0V_0 for every ω∈Ω\omega \in \Omega, and that for every S⊆V0S \subseteq V_0 the map ω↦N𝒜(Pω,S,∅)\omega \mapsto N_{\mathcal{A}}(P_\omega, S, \emptyset) is measurable. Then ω↦𝔼q,V0[S↦N𝒜(Pω,S,∅)]\omega \mapsto \mathbb{E}_{q, V_0}[S \mapsto N_{\mathcal{A}}(P_\omega, S, \emptyset)] is μ\mu-integrable and satisfies ∫Ω𝔼q,V0[S↦N𝒜(Pω,S,∅)]dμ(ω)≤log⁡(1/δ).\int_{\Omega} \mathbb{E}_{q, V_0}\bigl[S \mapsto N_{\mathcal{A}}(P_\omega, S, \emptyset)\bigr] \, d\mu(\omega) \le \log(1 / \delta).(6)✦

  2. Let (Ω,ℱ,μ)(\Omega, \mathcal{F}, \mu) be a probability space and let ω↦Qω\omega \mapsto Q_\omega assign a marked query program over V0V_0 to each ω∈Ω\omega \in \Omega. Suppose that for μ\mu-almost every ω∈Ω\omega \in \Omega, the program QωQ_\omega is fresh on V0V_0, and for μ\mu-almost every ω∈Ω\omega \in \Omega, the program QωQ_\omega has certificate soundness at SS from ∅\emptyset for every S⊆V0S \subseteq V_0 with wq(V0,S)>0w_q(V_0, S) > 0. Suppose also that for every S⊆V0S \subseteq V_0 the map ω↦N(Qω,S)\omega \mapsto N(Q_\omega, S) is measurable. Then ω↦𝔼q,V0[S↦N(Qω,S)]\omega \mapsto \mathbb{E}_{q, V_0}[S \mapsto N(Q_\omega, S)] is μ\mu-integrable and satisfies ∫Ω𝔼q,V0[S↦N(Qω,S)]dμ(ω)≤log⁡(1/δ).\int_{\Omega} \mathbb{E}_{q, V_0}\bigl[S \mapsto N(Q_\omega, S)\bigr] \, d\mu(\omega) \le \log(1 / \delta).(7)✦

  3. Let QQ be a marked query program over V0V_0. Suppose that for every S⊆V0S \subseteq V_0 with wq(V0,S)>0w_q(V_0, S) > 0, the program QQ has branch freshness at SS on V0V_0 and certificate soundness at SS from ∅\emptyset. Then 𝔼q,V0[S↦N(Q,S)]≤log⁡(1/δ).\mathbb{E}_{q, V_0}\bigl[S \mapsto N(Q, S)\bigr] \le \log(1 / \delta).(8)✦

What is checked

In the Lean library, Lemma 9 is stated over finite ground sets, increasing subset families with strictly positive certificate failure probability under independent Bernoulli product laws, and finite-depth query programs and marked query programs, with auxiliary-seed measurability and integrability for (6) and (7) and supported-branch freshness and certificate soundness for (8).