Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Scale representatives for the concrete selector-and-terminal tests below a node

Proved
OAI.Problem310.WindowLocalFactor.exists_concrete_local_representatives

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

measure-theoryoai-mathreal-analysis

Window data. Let q,d,g,r0∈Nq,d,g,r_0\in\mathbb{N}q,d,g,r0​∈N. Words over the alphabet {0,…,q−1}\{0,\dots,q-1\}{0,…,q−1} are the vertices of the complete qqq-ary tree; ∣P∣|P|∣P∣ is the length of a word PPP, PiPiPi is PPP followed by the letter iii, and P⊑QP\sqsubseteq QP⊑Q means that PPP is a prefix of QQQ. A word PPP is a valid edge if P≠∅P\neq\varnothingP=∅ and ∣P∣≤d|P|\le d∣P∣≤d (it names the edge entering the vertex PPP). A window datum WWW with parameters (q,d,g,r0)(q,d,g,r_0)(q,d,g,r0​) consists of a function rW:N→Nr_W:\mathbb{N}\to\mathbb{N}rW​:N→N and maps a,b,b∗a,b,b^*a,b,b∗ from words to N\mathbb{N}N such that, writing ℓ(P)=rW(d+1−∣P∣)\ell(P)=r_W(d+1-|P|)ℓ(P)=rW​(d+1−∣P∣) and letting P,QP,QP,Q range over valid edges:

  1. 1≤ℓ(P)1\le\ell(P)1≤ℓ(P), r0≤ℓ(P)r_0\le\ell(P)r0​≤ℓ(P) and a(P)≥3a(P)\ge3a(P)≥3;
  2. b(P)+1=a(P)+ℓ(P)b(P)+1=a(P)+\ell(P)b(P)+1=a(P)+ℓ(P), so the edge PPP carries the window of dyadic scales a(P),…,b(P)a(P),\dots,b(P)a(P),…,b(P);
  3. (prefix gap) if P⊑QP\sqsubseteq QP⊑Q and P≠QP\neq QP=Q, then b(P)+g<a(Q)b(P)+g<a(Q)b(P)+g<a(Q);
  4. (sibling gap) for every word VVV, letters i<ji<ji<j and word TTT such that ViViVi and VjTVjTVjT are valid edges, b(Vi)+g<a(VjT)b(Vi)+g<a(VjT)b(Vi)+g<a(VjT);
  5. (descendant bounds) if P⊑QP\sqsubseteq QP⊑Q, then b(P)≤b(Q)≤b∗(P)b(P)\le b(Q)\le b^*(P)b(P)≤b(Q)≤b∗(P);
  6. (padding) b∗(P)+1≤a(P)+2ℓ(P)b^*(P)+1\le a(P)+2\ell(P)b∗(P)+1≤a(P)+2ℓ(P).

Finite table model. Take q=M+1q=M+1q=M+1, so that the letter MMM is the default child and 0,…,M−10,\dots,M-10,…,M−1 are the nondefault children; a node is a word of length <d<d<d and a leaf is a word of length ddd. Use the window endpoints as resolutions: bS(Q,j)=b(Qj)b_S(Q,j)=b(Qj)bS​(Q,j)=b(Qj) for nodes QQQ and j<Mj<Mj<M, and bT(L)=b(L)b_T(L)=b(L)bT​(L)=b(L) for leaves LLL. With κβ(y)=⌊2β+2{y}⌋\kappa_\beta(y)=\lfloor 2^{\beta+2}\{y\}\rfloorκβ​(y)=⌊2β+2{y}⌋, where {y}=y−⌊y⌋\{y\}=y-\lfloor y\rfloor{y}=y−⌊y⌋, a selector table ωS\omega_SωS​ has bits ωS(Q,j,c)\omega_S(Q,j,c)ωS​(Q,j,c) for c<2bS(Q,j)+2c<2^{b_S(Q,j)+2}c<2bS​(Q,j)+2, a terminal table ωT\omega_TωT​ has bits ωT(L,c)\omega_T(L,c)ωT​(L,c) for c<2bT(L)+2c<2^{b_T(L)+2}c<2bT​(L)+2, and the selector bit of (Q,j)(Q,j)(Q,j) at y∈Ry\in\mathbb{R}y∈R is σQ,jωS(y)=ωS(Q,j,κbS(Q,j)(y))\sigma^{\omega_S}_{Q,j}(y)=\omega_S(Q,j,\kappa_{b_S(Q,j)}(y))σQ,jωS​​(y)=ωS​(Q,j,κbS​(Q,j)​(y)) if ∣Q∣<d|Q|<d∣Q∣<d, and false\mathrm{false}false otherwise. For every selector table ωS\omega_SωS​ let the child-choice map be χωS(Q,y)=RQ(σQ,0ωS(y),…,σQ,M−1ωS(y))\chi_{\omega_S}(Q,y)=R_Q\bigl(\sigma^{\omega_S}_{Q,0}(y),\dots,\sigma^{\omega_S}_{Q,M-1}(y)\bigr)χωS​​(Q,y)=RQ​(σQ,0ωS​​(y),…,σQ,M−1ωS​​(y)) for fixed but arbitrary rules RQ:{true,false}M→{0,…,M}R_Q:\{\mathrm{true},\mathrm{false}\}^M\to\{0,\dots,M\}RQ​:{true,false}M→{0,…,M}, and let ρmωS(P,y)\rho^{\omega_S}_m(P,y)ρmωS​​(P,y) be the word obtained from PPP by mmm successive steps of appending χωS(⋅,y)\chi_{\omega_S}(\cdot,y)χωS​​(⋅,y).

Let WWW be a window datum with parameters (M+1,d,g,r0)(M+1,d,g,r_0)(M+1,d,g,r0​). Fix a node UUU, a point x∈Rx\in\mathbb{R}x∈R and m∈Nm\in\mathbb{N}m∈N with ∣U∣+1+m=d|U|+1+m=d∣U∣+1+m=d. For an outcome ω=(ωS,ωT)\omega=(\omega_S,\omega_T)ω=(ωS​,ωT​), a letter i<Mi<Mi<M and y∈Ry\in\mathbb{R}y∈R define the local test

Q(ω,i,y)=ωS(U,i,κb(Ui)(y))∧ωT(λ,κb(λ)(y)),λ=ρmωS(Ui,y).Q(\omega,i,y)=\omega_S\bigl(U,i,\kappa_{b(Ui)}(y)\bigr)\wedge\omega_T\bigl(\lambda,\kappa_{b(\lambda)}(y)\bigr),\qquad \lambda=\rho^{\omega_S}_m(Ui,y).Q(ω,i,y)=ωS​(U,i,κb(Ui)​(y))∧ωT​(λ,κb(λ)​(y)),λ=ρmωS​​(Ui,y).

Let ℓ=rW(d−∣U∣)\ell=r_W(d-|U|)ℓ=rW​(d−∣U∣), the common window length of the edges UiUiUi.

Theorem. There is a finite set R⊆[1,2]R\subseteq[1,2]R⊆[1,2] with ∣R∣≤1+M ℓ 22ℓ+2|R|\le 1+M\,\ell\,2^{2\ell+2}∣R∣≤1+Mℓ22ℓ+2 such that for every t∈[1,2]t\in[1,2]t∈[1,2] there is t′∈Rt'\in Rt′∈R with

Q(ω,i, x+t′ 2−(a(Ui)+j))=Q(ω,i, x+t 2−(a(Ui)+j))Q\bigl(\omega,i,\,x+t'\,2^{-(a(Ui)+j)}\bigr)=Q\bigl(\omega,i,\,x+t\,2^{-(a(Ui)+j)}\bigr)Q(ω,i,x+t′2−(a(Ui)+j))=Q(ω,i,x+t2−(a(Ui)+j))

for every outcome ω=(ωS,ωT)\omega=(\omega_S,\omega_T)ω=(ωS​,ωT​), every i<Mi<Mi<M and every j∈{0,…,ℓ−1}j\in\{0,\dots,\ell-1\}j∈{0,…,ℓ−1}.

Thus the continuum of scales t∈[1,2]t\in[1,2]t∈[1,2] can be replaced, simultaneously for all outcomes of the selector and terminal tables, all nondefault children iii of UUU and all scales a(Ui)+ja(Ui)+ja(Ui)+j in their windows, by a deterministic set of at most 1+Mℓ 22ℓ+21+M\ell\,2^{2\ell+2}1+Mℓ22ℓ+2 representatives. No grid-factorization or padding hypotheses remain: both are supplied by the window datum.

Formalization Note The test QQQ enters as an arbitrary function together with its defining equation hQ; the resolutions are FiniteTableModel.selectorEndpoints W and FiniteTableModel.terminalEndpoints W; the choice map χωS\chi_{\omega_S}χωS​​ is choose ωS, linked to rule by hchoose; and ℓ\ellℓ is W.r (d - U.val.length). The depth condition is hdepth : ∀ i : Fin M, (U.val ++ [i.castSucc]).length + r = d with our mmm being r; for M≥1M\ge1M≥1 it is the condition ∣U∣+1+m=d|U|+1+m=d∣U∣+1+m=d, and for M=0M=0M=0 it is vacuous (there are then no tests to compare).

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

open OAI OAI.Problem310
universe u_Ω
open RoutingPath GridSeparation
Formal statement
theorem OAI.Problem310.WindowLocalFactor.exists_concrete_local_representatives {M d g r₀ : ℕ}
    (W : WindowData (M + 1) d g r₀) (U : FiniteTableModel.Node M d) (x : ℝ)
    (choose : FiniteTableModel.SelectorTable (FiniteTableModel.selectorEndpoints W) →
      List (FiniteTableModel.Child M) → ℝ → FiniteTableModel.Child M)
    (rule : List (FiniteTableModel.Child M) → (Fin M → Bool) → FiniteTableModel.Child M)
    (hchoose : ∀ ωS P y, choose ωS P y = rule P (fun j =>
      FiniteTableModel.selectorValue (FiniteTableModel.selectorEndpoints W) ωS P j y))
    (r : ℕ) (hdepth : ∀ i : Fin M, (U.val ++ [i.castSucc]).length + r = d)
    (Q : (FiniteTableModel.SelectorTable (FiniteTableModel.selectorEndpoints W) ×
      FiniteTableModel.TerminalTable (FiniteTableModel.terminalEndpoints W)) →
        Fin M → ℝ → Bool)
    (hQ : ∀ ω i y, Q ω i y =
      (ω.1 (FiniteTableModel.selectorAddress (FiniteTableModel.selectorEndpoints W) U i y) &&
        ω.2 (FiniteTableModel.terminalAddress (FiniteTableModel.terminalEndpoints W)
          (FiniteLocalPredicate.localLeaf (choose ω.1) r (U.val ++ [i.castSucc]) (hdepth i) y) y))) :
    ∃ R : Finset ℝ,
      (∀ t ∈ R, t ∈ Set.Icc (1 : ℝ) 2) ∧
      R.card ≤ 1 + M * W.r (d - U.val.length) * 2 ^ (2 * W.r (d - U.val.length) + 2) ∧
      ∀ t ∈ Set.Icc (1 : ℝ) 2, ∃ t' ∈ R,
        ∀ ω (i : Fin M) (j : Fin (W.r (d - U.val.length))),
          Q ω i (x + t' * ((2 : ℝ)⁻¹) ^ (W.a (U.val ++ [i.castSucc]) + j.val)) =
            Q ω i (x + t * ((2 : ℝ)⁻¹) ^ (W.a (U.val ++ [i.castSucc]) + j.val)) := by sorry
Source
https://github.com/openai/math/blob/1581d4cbdd69a0faf34b2089614fe2a814316a6a/lean/OAI/MeasureTheory/DyadicAvoidance/WindowLocalFactor.lean#L123-L160

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