Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Exact miss probability (1−p/2)Mr(1-p/2)^{Mr}(1−p/2)Mr of the local window trials on a center atom

Proved
OAI.Problem310.ConcreteWindowAtom.localMiss_mass

by Shuze Chen · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

measure-theoryoai-mathprobability

This theorem computes, in a finite random model of dyadic tables attached to a tree, the exact probability that the selector bits read at a point xxx take prescribed values while every local trial below a fixed node fails at one fixed scale ttt.

Tree and window data. Fix natural numbers M,d,g,r0M,d,g,r_0M,d,g,r0​. A word is a finite sequence over the alphabet {0,1,…,M}\{0,1,\dots,M\}{0,1,…,M}; the letter MMM is the default child and 0,…,M−10,\dots,M-10,…,M−1 are the nondefault children. Write ∣P∣|P|∣P∣ for the length of a word PPP and PcPcPc for PPP followed by the letter ccc. A node is a word of length <d<d<d, a leaf is a word of length exactly ddd, and an edge is a nonempty word of length ≤d\le d≤d. Window data WWW with parameters (M+1,d,g,r0)(M+1,d,g,r_0)(M+1,d,g,r0​) consist of functions r:N→Nr:\mathbb{N}\to\mathbb{N}r:N→N and a,b,b∗a,b,b^{\ast}a,b,b∗ from words to N\mathbb{N}N such that, writing ℓ(P)=r(d+1−∣P∣)\ell(P)=r(d+1-|P|)ℓ(P)=r(d+1−∣P∣), the following hold for all edges P,QP,QP,Q:

  • (W1) 1≤ℓ(P)1\le\ell(P)1≤ℓ(P) and r0≤ℓ(P)r_0\le\ell(P)r0​≤ℓ(P);
  • (W2) a(P)≥3a(P)\ge3a(P)≥3 and b(P)+1=a(P)+ℓ(P)b(P)+1=a(P)+\ell(P)b(P)+1=a(P)+ℓ(P);
  • (W3) b(P)+g<a(Q)b(P)+g<a(Q)b(P)+g<a(Q) whenever PPP is a proper prefix of QQQ;
  • (W4) b(Pi)+g<a(PjT)b(Pi)+g<a(PjT)b(Pi)+g<a(PjT) whenever i<ji<ji<j are letters, TTT is a word, and PiPiPi and PjTPjTPjT are edges;
  • (W5) b(P)≤b(Q)≤b∗(P)b(P)\le b(Q)\le b^{\ast}(P)b(P)≤b(Q)≤b∗(P) whenever PPP is a prefix of QQQ;
  • (W6) b∗(P)+1≤a(P)+2ℓ(P)b^{\ast}(P)+1\le a(P)+2\ell(P)b∗(P)+1≤a(P)+2ℓ(P).

Thus the edge PPP owns the window a(P),a(P)+1,…,b(P)a(P),a(P)+1,\dots,b(P)a(P),a(P)+1,…,b(P) of ℓ(P)\ell(P)ℓ(P) consecutive dyadic exponents.

Dyadic keys, tables and the law. For β∈N\beta\in\mathbb{N}β∈N and y∈Ry\in\mathbb{R}y∈R put κβ(y)=⌊2β+2{y}⌋∈{0,1,…,2β+2−1}\kappa_\beta(y)=\lfloor 2^{\beta+2}\{y\}\rfloor\in\{0,1,\dots,2^{\beta+2}-1\}κβ​(y)=⌊2β+2{y}⌋∈{0,1,…,2β+2−1}, where {y}=y−⌊y⌋\{y\}=y-\lfloor y\rfloor{y}=y−⌊y⌋; this is the index of the dyadic cell of length 2−β−22^{-\beta-2}2−β−2 that contains yyy modulo 111. An outcome ω=(S,T)\omega=(S,T)ω=(S,T) consists of a selector table SP,i:{0,…,2b(Pi)+2−1}→{0,1}S_{P,i}:\{0,\dots,2^{b(Pi)+2}-1\}\to\{0,1\}SP,i​:{0,…,2b(Pi)+2−1}→{0,1} for every node PPP and every i∈{0,…,M−1}i\in\{0,\dots,M-1\}i∈{0,…,M−1}, and a terminal table TL:{0,…,2b(L)+2−1}→{0,1}T_L:\{0,\dots,2^{b(L)+2}-1\}\to\{0,1\}TL​:{0,…,2b(L)+2−1}→{0,1} for every leaf LLL; different tables are different coordinates even when their cell indices coincide. Let ΩW\Omega_WΩW​ be the finite set of all outcomes. For 0≤p≤10\le p\le10≤p≤1, Pp\mathbb{P}_pPp​ denotes the product probability measure on ΩW\Omega_WΩW​ under which every selector entry is a fair bit, every terminal entry equals 111 with probability ppp, and all entries are independent.

Routing. Given selector tables SSS, a word PPP and a point y∈Ry\in\mathbb{R}y∈R, the selector i<Mi<Mi<M fires at (P,y)(P,y)(P,y) if ∣P∣<d|P|<d∣P∣<d and SP,i(κb(Pi)(y))=1S_{P,i}(\kappa_{b(Pi)}(y))=1SP,i​(κb(Pi)​(y))=1. The choice cS(P,y)c_S(P,y)cS​(P,y) is the smallest firing iii, or the default child MMM if no selector fires. Routing yyy from a word QQQ for mmm steps produces the words Q0=QQ_0=QQ0​=Q and Qk+1=Qk cS(Qk,y)Q_{k+1}=Q_k\,c_S(Q_k,y)Qk+1​=Qk​cS​(Qk​,y) for k<mk<mk<m.

Center atoms and local trials. Fix x∈Rx\in\mathbb{R}x∈R. An exposure is a function ξ\xiξ assigning a bit ξ(P,i)∈{0,1}\xi(P,i)\in\{0,1\}ξ(P,i)∈{0,1} to every node PPP and every i<Mi<Mi<M. Its center atom is the event

Ax,ξ={ω=(S,T)∈ΩW: SP,i(κb(Pi)(x))=ξ(P,i)  for every node P and every i<M}A_{x,\xi}=\big\{\omega=(S,T)\in\Omega_W:\ S_{P,i}(\kappa_{b(Pi)}(x))=\xi(P,i)\ \text{ for every node } P \text{ and every } i<M\big\}Ax,ξ​={ω=(S,T)∈ΩW​: SP,i​(κb(Pi)​(x))=ξ(P,i)  for every node P and every i<M}

that the selector entries read at xxx equal ξ\xiξ (the terminal tables are unrestricted). Fix a node UUU and put rU=r(d−∣U∣)r_U=r(d-|U|)rU​=r(d−∣U∣), the common window length ℓ(Ui)\ell(Ui)ℓ(Ui) of the child edges UiUiUi. For ω=(S,T)\omega=(S,T)ω=(S,T), i<Mi<Mi<M and y∈Ry\in\mathbb{R}y∈R, the local test Qω(U,i,y)Q_\omega(U,i,y)Qω​(U,i,y) equals 111 exactly when SU,i(κb(Ui)(y))=1S_{U,i}(\kappa_{b(Ui)}(y))=1SU,i​(κb(Ui)​(y))=1 and TΛ(κb(Λ)(y))=1T_\Lambda(\kappa_{b(\Lambda)}(y))=1TΛ​(κb(Λ)​(y))=1, where Λ\LambdaΛ is the leaf obtained by routing yyy from the word UiUiUi for d−∣U∣−1d-|U|-1d−∣U∣−1 steps. For a scale ttt the trial points are yi,j(t)=x+t 2−(a(Ui)+j)y_{i,j}(t)=x+t\,2^{-(a(Ui)+j)}yi,j​(t)=x+t2−(a(Ui)+j) for 0≤i<M0\le i<M0≤i<M and 0≤j<rU0\le j<r_U0≤j<rU​, and the local miss event is

MissU(x,t,ξ)=Ax,ξ∩{ω: Qω(U,i,yi,j(t))=0  for all i<M and j<rU}.\mathrm{Miss}_U(x,t,\xi)=A_{x,\xi}\cap\big\{\omega:\ Q_\omega(U,i,y_{i,j}(t))=0\ \text{ for all } i<M \text{ and } j<r_U\big\}.MissU​(x,t,ξ)=Ax,ξ​∩{ω: Qω​(U,i,yi,j​(t))=0  for all i<M and j<rU​}.

Theorem. Let WWW be window data with parameters (M+1,d,g,r0)(M+1,d,g,r_0)(M+1,d,g,r0​), let UUU be a node, x∈Rx\in\mathbb{R}x∈R, t∈[1,2]t\in[1,2]t∈[1,2], 0≤p≤10\le p\le10≤p≤1, and let ξ\xiξ be an exposure. Then

Pp(MissU(x,t,ξ))=(1−p2)M rU Pp(Ax,ξ).\mathbb{P}_p\big(\mathrm{Miss}_U(x,t,\xi)\big)=\Big(1-\frac{p}{2}\Big)^{M\,r_U}\,\mathbb{P}_p\big(A_{x,\xi}\big).Pp​(MissU​(x,t,ξ))=(1−2p​)MrU​Pp​(Ax,ξ​).

Relative to the center atom, the MrUM r_UMrU​ local trials at a single scale therefore fail together exactly as if they were independent events of probability p/2p/2p/2 each (a fair selector fires and an independent terminal bit equals 111). This exact per-scale formula is the term of a union bound over finitely many representative scales ttt, which shows that on a good center atom the point xxx is an exceptional center of the random routed set with conditional probability at most ppp.

Formalization Note Pp\mathbb{P}_pPp​ is ConcreteLabels.outcomeLaw, the product of a uniform law on selector tables and an independent Bernoulli(ppp) law on terminal tables; table coordinates are dependent pairs (table name, cell index). The local miss event is localMiss W U x t ξ, the center atom is centerAtom, the local test is localQ, and the trials range over Fin M × Fin (W.r (d - U.val.length)). The factor 1−p/21-p/21−p/2 enters as ENNReal.ofReal (1 - p / 2), which loses nothing because 1−p/2≥1/21-p/2\ge1/21−p/2≥1/2.

Preamble
import Mathlib
import Definitions.Def_DyadicAvoidance
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_PeriodicBasic
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_GridSeparation
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FiniteTableModel
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_OrderedRouting
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutingPath
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterRouteExposure
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_ExceptionalCenters
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterFailureBound
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FirstDefault
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_ConcreteLabelMeasures
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterFirstDefault
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RandomSetDensity
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutedSetDensity
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutedExposure
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FirstDefaultSelection
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FiniteLocalPredicate
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowData
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowTableModel
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_StableRoutingBridge
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowExceptionalTransfer
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_TrialAddresses
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowTrialAddresses
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_ConcreteWindowAtom

open OAI OAI.Problem310 OAI.Problem310.ConcreteWindowAtom
open Set MeasureTheory
open scoped ENNReal BigOperators
open FiniteTableModel RoutedSetDensity RoutingPath FiniteLocalPredicate
open CenterRouteExposure CenterFailureBound WindowExceptionalTransfer WindowTrialAddresses
variable {M d g r₀ : ℕ}
Formal statement
theorem OAI.Problem310.ConcreteWindowAtom.localMiss_mass (W : WindowData (M + 1) d g r₀) (U : Node M d)
    (x t : ℝ) (ht : t ∈ Set.Icc (1 : ℝ) 2)
    (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1)
    (ξ : Node M d × Fin M → Bool) :
    ConcreteLabels.outcomeLaw (SelectorAddress (selectorEndpoints W))
      (TerminalAddress (terminalEndpoints W)) p hp0 hp1 (localMiss W U x t ξ) =
    (ENNReal.ofReal (1 - p / 2)) ^ (M * W.r (d - U.val.length)) *
      ConcreteLabels.outcomeLaw (SelectorAddress (selectorEndpoints W))
        (TerminalAddress (terminalEndpoints W)) p hp0 hp1
        (centerAtom (selectorEndpoints W) (terminalEndpoints W) x ξ) := by sorry
Source
https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/OAI/MeasureTheory/DyadicAvoidance/ConcreteWindowAtom.lean#L47-L78

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me