Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Periodic dyadic hitting set from pointwise failure bounds for the random window-table router

Proved
OAI.Problem310.Construction.periodic_hitting_of_window_failure

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

measure-theoryoai-mathprobability

This theorem turns a pointwise failure estimate for a random periodic set built from dyadic tables on a tree into a deterministic open periodic set that meets every dilate of the dyadic sequence.

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 and the routed set. 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; the routed leaf LS(y)L_S(y)LS​(y) is the word obtained by routing yyy from the empty word for ddd steps. The routed set of ω=(S,T)\omega=(S,T)ω=(S,T) is

Bω={y∈R: TLS(y)(κb(LS(y))(y))=1},B_\omega=\big\{y\in\mathbb{R}:\ T_{L_S(y)}\big(\kappa_{b(L_S(y))}(y)\big)=1\big\},Bω​={y∈R: TLS​(y)​(κb(LS​(y))​(y))=1},

the set of points whose routed leaf has terminal bit 111 in the cell of the point.

Exceptional centers. For B⊆RB\subseteq\mathbb{R}B⊆R, a point xxx is an exceptional center of BBB if some dilate of the dyadic sequence based at xxx misses BBB entirely:

E(B)={x∈R: ∃ t∈[1,2]  ∀n≥1: x+t 2−n∉B}.\mathcal{E}(B)=\big\{x\in\mathbb{R}:\ \exists\,t\in[1,2]\ \ \forall n\ge1:\ x+t\,2^{-n}\notin B\big\}.E(B)={x∈R: ∃t∈[1,2]  ∀n≥1: x+t2−n∈/B}.

Theorem. Let WWW be window data with parameters (M+1,d,g,r0)(M+1,d,g,r_0)(M+1,d,g,r0​) and let 0<p<10<p<10<p<1. Let λ\lambdaλ be Lebesgue measure and let G⊆RG\subseteq\mathbb{R}G⊆R be a Borel set such that λ(Gc∩[0,1])≤p\lambda(G^{c}\cap[0,1])\le pλ(Gc∩[0,1])≤p and every x∈Gx\in Gx∈G satisfies

Pp({ω∈ΩW: x∈E(Bω)})≤2p.\mathbb{P}_p\big(\{\omega\in\Omega_W:\ x\in\mathcal{E}(B_\omega)\}\big)\le 2p.Pp​({ω∈ΩW​: x∈E(Bω​)})≤2p.

Then there is an open set H⊆RH\subseteq\mathbb{R}H⊆R with x+1∈H  ⟺  x∈Hx+1\in H\iff x\in Hx+1∈H⟺x∈H for all x∈Rx\in\mathbb{R}x∈R such that

λ(H∩[0,1])≤6pand∀x∈R  ∀t∈[1,2]  ∃n≥1: x+t 2−n∈H.\lambda\big(H\cap[0,1]\big)\le 6p\qquad\text{and}\qquad \forall x\in\mathbb{R}\ \ \forall t\in[1,2]\ \ \exists n\ge1:\ x+t\,2^{-n}\in H.λ(H∩[0,1])≤6pand∀x∈R  ∀t∈[1,2]  ∃n≥1: x+t2−n∈H.

All regularity and first-moment requirements of the random construction are settled here; what remains as input is geometric: a large set GGG of good centers and the bound 2p2p2p on the probability that a good center is exceptional. Periodic hitting sets of this kind, available for every p∈(0,1)p\in(0,1)p∈(0,1), are the input from which the dyadic affine avoidance theorem is derived: combining dilated and reflected copies of them and taking the complement in [0,1][0,1][0,1] yields compact sets of measure close to 111 that contain no nondegenerate affine copy {x+s 2−n:n≥1}\{x+s\,2^{-n}:n\ge1\}{x+s2−n:n≥1} of the dyadic sequence.

Formalization Note The probability is ConcreteLabels.outcomeLaw (SelectorAddress (selectorEndpoints W)) (TerminalAddress (terminalEndpoints W)) p, where the selector table of (P,i)(P,i)(P,i) has resolution b(Pi)b(Pi)b(Pi) and the terminal table of LLL has resolution b(L)b(L)b(L). The random set is RoutedSetDensity.routedSet and the exceptional set is Auxiliary.exceptionalCenters with index set Ici 1 and the sequence n↦2−nn\mapsto2^{-n}n↦2−n. Lebesgue measure is volume with values in [0,∞][0,\infty][0,∞], the bounds enter through ENNReal.ofReal, and GGG is assumed MeasurableSet for the Borel σ\sigmaσ-algebra.

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
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_PeriodicEnvelope

open OAI OAI.Problem310
open Set MeasureTheory FiniteTableModel
Formal statement
theorem OAI.Problem310.Construction.periodic_hitting_of_window_failure
    {M d g r₀ : ℕ} (W : WindowData (M + 1) d g r₀)
    (p : ℝ) (hp : 0 < p) (hp1 : p < 1)
    (G : Set ℝ) (hG : MeasurableSet G)
    (hbad : volume (Gᶜ ∩ Icc (0 : ℝ) 1) ≤ ENNReal.ofReal p)
    (hgood : ∀ x ∈ G,
      ConcreteLabels.outcomeLaw (SelectorAddress (selectorEndpoints W))
        (TerminalAddress (terminalEndpoints W)) p hp.le hp1.le
        {ω | x ∈ Auxiliary.exceptionalCenters
          (RoutedSetDensity.routedSet (selectorEndpoints W) (terminalEndpoints W) ω)
          (Ici 1) (fun n => (2 : ℝ)⁻¹ ^ n)} ≤ ENNReal.ofReal (2 * p)) :
    ∃ H : Set ℝ, IsOpen H ∧
      (∀ x : ℝ, x + 1 ∈ H ↔ x ∈ H) ∧
      volume (H ∩ Icc (0 : ℝ) 1) ≤ ENNReal.ofReal (6 * p) ∧
      ∀ x t : ℝ, t ∈ Icc (1 : ℝ) 2 →
        ∃ n : ℕ, 1 ≤ n ∧ x + t * ((2 : ℝ)⁻¹ ^ n) ∈ H := by sorry
Source
https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/OAI/MeasureTheory/DyadicAvoidance/Construction.lean#L15-L47

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