proofs
Provedconversion-theoremrandomized-conversionheadline-theoremattention-compute-law

Unbiased algorithm ⇒ proposal, end-to-end: averaged and robust-centred runs of any unbiased variance-σ² attention algorithm give E[Σπ²/r] ≤ (1+6ε)^L + L2^L(7/8)^k((1+6ε)/3ε)^L

For all L,k,k1∈N\htmlData{mx=1}{L, k, k_{1} \in \htmlData{mx=0}{\mathbb{N}}}, Ω1∈Type⁡\htmlData{mx=1}{\Omega_{1} \in \htmlData{mx=0}{\operatorname{Type}}}, w1:Ω1→R\htmlData{mx=3}{w_{1} : \htmlData{mx=0}{\Omega_{1}} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, π:(Fin⁡ L→Bool⁡)→R\htmlData{mx=7}{\pi : (\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{L}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\operatorname{Bool}}) \mathrel{\htmlData{mx=6}{\to}} \htmlData{mx=5}{\mathbb{R}}}, ε,σ2∈R\htmlData{mx=1}{\varepsilon, \sigma_{2} \in \htmlData{mx=0}{\mathbb{R}}}, m:N→(Fin⁡ L→Bool⁡)→R\htmlData{mx=9}{m : \htmlData{mx=0}{\mathbb{N}} \mathrel{\htmlData{mx=8}{\to}} (\htmlData{mx=3}{\htmlData{mx=1}{\operatorname{Fin}}\,\htmlData{mx=2}{L}} \mathrel{\htmlData{mx=5}{\to}} \htmlData{mx=4}{\operatorname{Bool}}) \mathrel{\htmlData{mx=7}{\to}} \htmlData{mx=6}{\mathbb{R}}}, X:Ω1→N→(Fin⁡ L→Bool⁡)→R\htmlData{mx=11}{X : \htmlData{mx=0}{\Omega_{1}} \mathrel{\htmlData{mx=10}{\to}} \htmlData{mx=1}{\mathbb{N}} \mathrel{\htmlData{mx=9}{\to}} (\htmlData{mx=4}{\htmlData{mx=2}{\operatorname{Fin}}\,\htmlData{mx=3}{L}} \mathrel{\htmlData{mx=6}{\to}} \htmlData{mx=5}{\operatorname{Bool}}) \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=7}{\mathbb{R}}}, phat:(Fin⁡ k→Fin⁡ k1→Ω1)→N→(Fin⁡ L→Bool⁡)→R\htmlData{mx=19}{\mathit{phat} : (\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{k}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=5}{\htmlData{mx=3}{\operatorname{Fin}}\,\htmlData{mx=4}{k_{1}}} \mathrel{\htmlData{mx=7}{\to}} \htmlData{mx=6}{\Omega_{1}}) \mathrel{\htmlData{mx=18}{\to}} \htmlData{mx=9}{\mathbb{N}} \mathrel{\htmlData{mx=17}{\to}} (\htmlData{mx=12}{\htmlData{mx=10}{\operatorname{Fin}}\,\htmlData{mx=11}{L}} \mathrel{\htmlData{mx=14}{\to}} \htmlData{mx=13}{\operatorname{Bool}}) \mathrel{\htmlData{mx=16}{\to}} \htmlData{mx=15}{\mathbb{R}}}, pt,Q:(Fin⁡ k→Fin⁡ k1→Ω1)→N→(Fin⁡ L→Bool⁡)→R\htmlData{mx=19}{\mathit{pt}, Q : (\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{k}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=5}{\htmlData{mx=3}{\operatorname{Fin}}\,\htmlData{mx=4}{k_{1}}} \mathrel{\htmlData{mx=7}{\to}} \htmlData{mx=6}{\Omega_{1}}) \mathrel{\htmlData{mx=18}{\to}} \htmlData{mx=9}{\mathbb{N}} \mathrel{\htmlData{mx=17}{\to}} (\htmlData{mx=12}{\htmlData{mx=10}{\operatorname{Fin}}\,\htmlData{mx=11}{L}} \mathrel{\htmlData{mx=14}{\to}} \htmlData{mx=13}{\operatorname{Bool}}) \mathrel{\htmlData{mx=16}{\to}} \htmlData{mx=15}{\mathbb{R}}} and hQ∈∀f,ℓ,b, Q(f,ℓ,b)={:(ℓ)<Lif hthen⁡({pt(f,ℓ,b)if b(⟨ℓ,h⟩)1−pt(f,ℓ,b)otherwise)otherwise else 1\htmlData{mx=33}{\mathit{hQ} \in \htmlData{mx=32}{\htmlData{mx=31}{\forall f, \ell, b,\ \htmlData{mx=4}{\htmlData{mx=0}{Q}(\htmlData{mx=1}{f}, \htmlData{mx=2}{\ell}, \htmlData{mx=3}{b})} \mathrel{\htmlData{mx=30}{=}} \htmlData{mx=29}{\begin{cases} \htmlData{mx=6}{\mathtt{:}(\htmlData{mx=5}{\ell})} \mathrel{\htmlData{mx=8}{<}} \htmlData{mx=7}{L} & \text{if } \htmlData{mx=9}{h} \\ \htmlData{mx=28}{\htmlData{mx=10}{\operatorname{then}}\left(\htmlData{mx=27}{\begin{cases} \htmlData{mx=15}{\htmlData{mx=11}{\mathit{pt}}(\htmlData{mx=12}{f}, \htmlData{mx=13}{\ell}, \htmlData{mx=14}{b})} & \text{if } \htmlData{mx=20}{\htmlData{mx=16}{b}(\htmlData{mx=19}{\left\langle \htmlData{mx=17}{\ell}, \htmlData{mx=18}{h} \right\rangle})} \\ \htmlData{mx=26}{1 - \htmlData{mx=25}{\htmlData{mx=21}{\mathit{pt}}(\htmlData{mx=22}{f}, \htmlData{mx=23}{\ell}, \htmlData{mx=24}{b})}} & \text{otherwise} \end{cases}}\right)} & \text{otherwise} \end{cases}}}\,\mathtt{else\ 1}}}, if ∀ω, 0≤w1(ω)\htmlData{mx=4}{\forall \omega,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w_{1}}(\htmlData{mx=1}{\omega})}}, ∑ωw1(ω)=1\htmlData{mx=3}{\sum_{\omega} \htmlData{mx=2}{\htmlData{mx=0}{w_{1}}(\htmlData{mx=1}{\omega})}} \mathrel{\htmlData{mx=4}{=}} 1, ∀b, 0≤π(b)\htmlData{mx=4}{\forall b,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{b})}}, ∑bπ(b)=1\htmlData{mx=3}{\sum_{b} \htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{b})}} \mathrel{\htmlData{mx=4}{=}} 1, 0<ε0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{\varepsilon}, ∀ℓ,b, m(ℓ,b)=∑b′:Fin⁡ L→Bool⁡({π(b′)if (∀i:Fin⁡ L, i<ℓ  ⟹  b′(i)=b(i))0otherwise)\htmlData{mx=31}{\forall \ell, b,\ \htmlData{mx=3}{\htmlData{mx=0}{m}(\htmlData{mx=1}{\ell}, \htmlData{mx=2}{b})} \mathrel{\htmlData{mx=30}{=}} \htmlData{mx=29}{\sum_{b' : \htmlData{mx=6}{\htmlData{mx=4}{\operatorname{Fin}}\,\htmlData{mx=5}{L}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=7}{\operatorname{Bool}}} \left(\htmlData{mx=28}{\begin{cases} \htmlData{mx=11}{\htmlData{mx=9}{\pi}(\htmlData{mx=10}{b'})} & \text{if } (\htmlData{mx=27}{\forall i : \htmlData{mx=26}{\htmlData{mx=24}{\operatorname{Fin}}\,\htmlData{mx=25}{L}},\ \htmlData{mx=13}{\htmlData{mx=12}{i}} \mathrel{\htmlData{mx=15}{<}} \htmlData{mx=14}{\ell} \mathrel{\htmlData{mx=23}{\implies}} \htmlData{mx=18}{\htmlData{mx=16}{b'}(\htmlData{mx=17}{i})} \mathrel{\htmlData{mx=22}{=}} \htmlData{mx=21}{\htmlData{mx=19}{b}(\htmlData{mx=20}{i})}}) \\ 0 & \text{otherwise} \end{cases}}\right)}}, 0<k10 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{k_{1}}, 4σ2≤k1⋅ε2\htmlData{mx=1}{4\htmlData{mx=0}{\sigma_{2}}} \mathrel{\htmlData{mx=6}{\leq}} \htmlData{mx=5}{\htmlData{mx=2}{k_{1}} \cdot \htmlData{mx=4}{\htmlData{mx=3}{\varepsilon}^{2}}}, ∀ℓ, h:ℓ<L, b:Fin⁡ L→Bool⁡, 0<m(ℓ,b)  ⟹  ∑ωw1(ω)⋅X(ω,ℓ,b)=m(ℓ+1,update⁡(b,⟨ℓ,h⟩,true⁡))m(ℓ,b)\htmlData{mx=41}{\forall \ell,\ h : \htmlData{mx=33}{\ell} \mathrel{\htmlData{mx=35}{<}} \htmlData{mx=34}{L},\ b : \htmlData{mx=38}{\htmlData{mx=36}{\operatorname{Fin}}\,\htmlData{mx=37}{L}} \mathrel{\htmlData{mx=40}{\to}} \htmlData{mx=39}{\operatorname{Bool}},\ 0 \mathrel{\htmlData{mx=4}{<}} \htmlData{mx=3}{\htmlData{mx=0}{m}(\htmlData{mx=1}{\ell}, \htmlData{mx=2}{b})} \mathrel{\htmlData{mx=32}{\implies}} \htmlData{mx=14}{\sum_{\omega} \htmlData{mx=13}{\htmlData{mx=7}{\htmlData{mx=5}{w_{1}}(\htmlData{mx=6}{\omega})} \cdot \htmlData{mx=12}{\htmlData{mx=8}{X}(\htmlData{mx=9}{\omega}, \htmlData{mx=10}{\ell}, \htmlData{mx=11}{b})}}} \mathrel{\htmlData{mx=31}{=}} \htmlData{mx=30}{\frac{\htmlData{mx=25}{\htmlData{mx=15}{m}(\htmlData{mx=17}{\htmlData{mx=16}{\ell} + 1}, \htmlData{mx=24}{\htmlData{mx=18}{\operatorname{update}}(\htmlData{mx=19}{b}, \htmlData{mx=22}{\left\langle \htmlData{mx=20}{\ell}, \htmlData{mx=21}{h} \right\rangle}, \htmlData{mx=23}{\operatorname{true}})})}}{\htmlData{mx=29}{\htmlData{mx=26}{m}(\htmlData{mx=27}{\ell}, \htmlData{mx=28}{b})}}}}, ∀ℓ, h:ℓ<L, b:Fin⁡ L→Bool⁡, 0<m(ℓ,b)  ⟹  ∑ωw1(ω)⋅(X(ω,ℓ,b)−m(ℓ+1,update⁡(b,⟨ℓ,h⟩,true⁡))m(ℓ,b))2≤σ2\htmlData{mx=44}{\forall \ell,\ h : \htmlData{mx=36}{\ell} \mathrel{\htmlData{mx=38}{<}} \htmlData{mx=37}{L},\ b : \htmlData{mx=41}{\htmlData{mx=39}{\operatorname{Fin}}\,\htmlData{mx=40}{L}} \mathrel{\htmlData{mx=43}{\to}} \htmlData{mx=42}{\operatorname{Bool}},\ 0 \mathrel{\htmlData{mx=4}{<}} \htmlData{mx=3}{\htmlData{mx=0}{m}(\htmlData{mx=1}{\ell}, \htmlData{mx=2}{b})} \mathrel{\htmlData{mx=35}{\implies}} \htmlData{mx=32}{\sum_{\omega} \htmlData{mx=31}{\htmlData{mx=7}{\htmlData{mx=5}{w_{1}}(\htmlData{mx=6}{\omega})} \cdot \htmlData{mx=30}{\left(\htmlData{mx=29}{\htmlData{mx=12}{\htmlData{mx=8}{X}(\htmlData{mx=9}{\omega}, \htmlData{mx=10}{\ell}, \htmlData{mx=11}{b})} - \htmlData{mx=28}{\frac{\htmlData{mx=23}{\htmlData{mx=13}{m}(\htmlData{mx=15}{\htmlData{mx=14}{\ell} + 1}, \htmlData{mx=22}{\htmlData{mx=16}{\operatorname{update}}(\htmlData{mx=17}{b}, \htmlData{mx=20}{\left\langle \htmlData{mx=18}{\ell}, \htmlData{mx=19}{h} \right\rangle}, \htmlData{mx=21}{\operatorname{true}})})}}{\htmlData{mx=27}{\htmlData{mx=24}{m}(\htmlData{mx=25}{\ell}, \htmlData{mx=26}{b})}}}}\right)^{2}}}} \mathrel{\htmlData{mx=34}{\leq}} \htmlData{mx=33}{\sigma_{2}}}, ∀f,ℓ, b,b′:Fin⁡ L→Bool⁡, (∀i:Fin⁡ L, i<ℓ  ⟹  b(i)=b′(i))  ⟹  phat(f,ℓ,b)=phat(f,ℓ,b′)\htmlData{mx=33}{\forall f, \ell,\ b, b' : \htmlData{mx=30}{\htmlData{mx=28}{\operatorname{Fin}}\,\htmlData{mx=29}{L}} \mathrel{\htmlData{mx=32}{\to}} \htmlData{mx=31}{\operatorname{Bool}},\ (\htmlData{mx=15}{\forall i : \htmlData{mx=14}{\htmlData{mx=12}{\operatorname{Fin}}\,\htmlData{mx=13}{L}},\ \htmlData{mx=1}{\htmlData{mx=0}{i}} \mathrel{\htmlData{mx=3}{<}} \htmlData{mx=2}{\ell} \mathrel{\htmlData{mx=11}{\implies}} \htmlData{mx=6}{\htmlData{mx=4}{b}(\htmlData{mx=5}{i})} \mathrel{\htmlData{mx=10}{=}} \htmlData{mx=9}{\htmlData{mx=7}{b'}(\htmlData{mx=8}{i})}}) \mathrel{\htmlData{mx=27}{\implies}} \htmlData{mx=20}{\htmlData{mx=16}{\mathit{phat}}(\htmlData{mx=17}{f}, \htmlData{mx=18}{\ell}, \htmlData{mx=19}{b})} \mathrel{\htmlData{mx=26}{=}} \htmlData{mx=25}{\htmlData{mx=21}{\mathit{phat}}(\htmlData{mx=22}{f}, \htmlData{mx=23}{\ell}, \htmlData{mx=24}{b'})}}, ∀f,ℓ,b, (∃t, k≤2⋅∣filter⁡(j↦∣∑iX(f(j,i),ℓ,b)k1−∑iX(f(t,i),ℓ,b)k1∣≤2ε)∣)  ⟹  ∃t, k≤2⋅∣filter⁡(j↦∣∑iX(f(j,i),ℓ,b)k1−∑iX(f(t,i),ℓ,b)k1∣≤2ε)∣∧phat(f,ℓ,b)=∑iX(f(t,i),ℓ,b)k1\htmlData{mx=149}{\forall f, \ell, b,\ \left(\htmlData{mx=64}{\exists t,\ \htmlData{mx=0}{k} \mathrel{\htmlData{mx=63}{\leq}} \htmlData{mx=62}{2 \cdot \htmlData{mx=61}{\lvert \htmlData{mx=60}{\htmlData{mx=31}{\operatorname{filter}}\left(\htmlData{mx=59}{j \mapsto \htmlData{mx=55}{\left\lvert \htmlData{mx=54}{\htmlData{mx=42}{\frac{\htmlData{mx=40}{\sum_{i} \htmlData{mx=39}{\htmlData{mx=32}{X}(\htmlData{mx=36}{\htmlData{mx=33}{f}(\htmlData{mx=34}{j}, \htmlData{mx=35}{i})}, \htmlData{mx=37}{\ell}, \htmlData{mx=38}{b})}}}{\htmlData{mx=41}{k_{1}}}} - \htmlData{mx=53}{\frac{\htmlData{mx=51}{\sum_{i} \htmlData{mx=50}{\htmlData{mx=43}{X}(\htmlData{mx=47}{\htmlData{mx=44}{f}(\htmlData{mx=45}{t}, \htmlData{mx=46}{i})}, \htmlData{mx=48}{\ell}, \htmlData{mx=49}{b})}}}{\htmlData{mx=52}{k_{1}}}}} \right\rvert} \mathrel{\htmlData{mx=58}{\leq}} \htmlData{mx=57}{2\htmlData{mx=56}{\varepsilon}}}\right)} \rvert}}}\right) \mathrel{\htmlData{mx=148}{\implies}} \htmlData{mx=147}{\exists t,\ \htmlData{mx=65}{k} \mathrel{\htmlData{mx=128}{\leq}} \htmlData{mx=127}{2 \cdot \htmlData{mx=126}{\lvert \htmlData{mx=125}{\htmlData{mx=96}{\operatorname{filter}}\left(\htmlData{mx=124}{j \mapsto \htmlData{mx=120}{\left\lvert \htmlData{mx=119}{\htmlData{mx=107}{\frac{\htmlData{mx=105}{\sum_{i} \htmlData{mx=104}{\htmlData{mx=97}{X}(\htmlData{mx=101}{\htmlData{mx=98}{f}(\htmlData{mx=99}{j}, \htmlData{mx=100}{i})}, \htmlData{mx=102}{\ell}, \htmlData{mx=103}{b})}}}{\htmlData{mx=106}{k_{1}}}} - \htmlData{mx=118}{\frac{\htmlData{mx=116}{\sum_{i} \htmlData{mx=115}{\htmlData{mx=108}{X}(\htmlData{mx=112}{\htmlData{mx=109}{f}(\htmlData{mx=110}{t}, \htmlData{mx=111}{i})}, \htmlData{mx=113}{\ell}, \htmlData{mx=114}{b})}}}{\htmlData{mx=117}{k_{1}}}}} \right\rvert} \mathrel{\htmlData{mx=123}{\leq}} \htmlData{mx=122}{2\htmlData{mx=121}{\varepsilon}}}\right)} \rvert}} \mathbin{\htmlData{mx=146}{\land}} \htmlData{mx=133}{\htmlData{mx=129}{\mathit{phat}}(\htmlData{mx=130}{f}, \htmlData{mx=131}{\ell}, \htmlData{mx=132}{b})} \mathrel{\htmlData{mx=145}{=}} \htmlData{mx=144}{\frac{\htmlData{mx=142}{\sum_{i} \htmlData{mx=141}{\htmlData{mx=134}{X}(\htmlData{mx=138}{\htmlData{mx=135}{f}(\htmlData{mx=136}{t}, \htmlData{mx=137}{i})}, \htmlData{mx=139}{\ell}, \htmlData{mx=140}{b})}}}{\htmlData{mx=143}{k_{1}}}}}} and ∀f,ℓ,b, pt(f,ℓ,b)=max⁡(0,min⁡(1,phat(f,ℓ,b)))+3ε1+2(3ε)\htmlData{mx=21}{\forall f, \ell, b,\ \htmlData{mx=4}{\htmlData{mx=0}{\mathit{pt}}(\htmlData{mx=1}{f}, \htmlData{mx=2}{\ell}, \htmlData{mx=3}{b})} \mathrel{\htmlData{mx=20}{=}} \htmlData{mx=19}{\frac{\htmlData{mx=14}{\htmlData{mx=11}{\max(0, \htmlData{mx=10}{\min(1, \htmlData{mx=9}{\htmlData{mx=5}{\mathit{phat}}(\htmlData{mx=6}{f}, \htmlData{mx=7}{\ell}, \htmlData{mx=8}{b})})})} + \htmlData{mx=13}{3\htmlData{mx=12}{\varepsilon}}}}{\htmlData{mx=18}{1 + \htmlData{mx=17}{2(\htmlData{mx=16}{3\htmlData{mx=15}{\varepsilon}})}}}}} (given Fintype⁡ Ω1\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega_{1}}}), then

∑f:Fin⁡ k→Fin⁡ k1→Ω1(∏i∏jw1(f(i,j)))⋅∑b:Fin⁡ L→Bool⁡π(b)2∏ℓ=0L−1Q(f,ℓ,b)≤(1+2(3ε))L+L⋅2L⋅78k⋅(1+2(3ε)3ε)L\begin{aligned} & \htmlData{mx=37}{\sum_{f : \htmlData{mx=3}{\htmlData{mx=1}{\operatorname{Fin}}\,\htmlData{mx=2}{k}} \mathrel{\htmlData{mx=9}{\to}} \htmlData{mx=6}{\htmlData{mx=4}{\operatorname{Fin}}\,\htmlData{mx=5}{k_{1}}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=7}{\Omega_{1}}} \htmlData{mx=36}{\left(\htmlData{mx=17}{\prod_{i} \htmlData{mx=16}{\prod_{j} \htmlData{mx=15}{\htmlData{mx=10}{w_{1}}(\htmlData{mx=14}{\htmlData{mx=11}{f}(\htmlData{mx=12}{i}, \htmlData{mx=13}{j})})}}}\right) \cdot \htmlData{mx=35}{\sum_{b : \htmlData{mx=20}{\htmlData{mx=18}{\operatorname{Fin}}\,\htmlData{mx=19}{L}} \mathrel{\htmlData{mx=22}{\to}} \htmlData{mx=21}{\operatorname{Bool}}} \htmlData{mx=34}{\frac{\htmlData{mx=26}{\htmlData{mx=25}{\htmlData{mx=23}{\pi}(\htmlData{mx=24}{b})}^{2}}}{\htmlData{mx=33}{\prod_{\ell=0}^{\htmlData{mx=27}{L} - 1} \htmlData{mx=32}{\htmlData{mx=28}{Q}(\htmlData{mx=29}{f}, \htmlData{mx=30}{\ell}, \htmlData{mx=31}{b})}}}}}}} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=64}{\htmlData{mx=43}{(\htmlData{mx=41}{1 + \htmlData{mx=40}{2(\htmlData{mx=39}{3\htmlData{mx=38}{\varepsilon}})}})^{\htmlData{mx=42}{L}}} + \htmlData{mx=63}{\htmlData{mx=53}{\htmlData{mx=48}{\htmlData{mx=45}{\htmlData{mx=44}{L}} \cdot \htmlData{mx=47}{2^{\htmlData{mx=46}{L}}}} \cdot \htmlData{mx=52}{\htmlData{mx=50}{\htmlData{mx=49}{\frac{7}{8}}}^{\htmlData{mx=51}{k}}}} \cdot \htmlData{mx=62}{\left(\htmlData{mx=60}{\frac{\htmlData{mx=57}{1 + \htmlData{mx=56}{2(\htmlData{mx=55}{3\htmlData{mx=54}{\varepsilon}})}}}{\htmlData{mx=59}{3\htmlData{mx=58}{\varepsilon}}}}\right)^{\htmlData{mx=61}{L}}}}} \end{aligned}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
x ∈ TVariables
L, k, k₁ range over natural numbers: the statement must hold for every choice. ((L k k₁ : ℕ))
Type
Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Type)
Fintype
Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Fintype)
f(x)Function application
Fintype applied to Ω₁. Lean writes f x; papers write f(x). (Fintype Ω₁)
⟹Implies
If Ω₁, then ℝ. (Between types, A → B is the type of functions from A to B.) (Ω₁ → ℝ)
∀For all
The statement after the comma holds for every ω. (∀ ω, 0 ≤ w₁ ω)
∑Summation
Add up w₁(ω) for every ω. (∑ ω, w₁ ω)
=Equality
∑ ω, w₁(ω) and 1 are the same. (∑ ω, w₁ ω = 1)
<Less than
0 is strictly smaller than ε. (0 < ε)
·Multiplication
4 times σ2. (4 * σ2)
x : TVariables
pt, Q range over (Fin k → Fin k₁ → Ω₁) → ℕ → (Fin L → Bool) → ℝ: the statement must hold for every choice. ((pt Q : (Fin k → Fin k₁ → Ω₁) → ℕ → (Fi…)
Fin
Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Fin)
RReal numbers
The real numbers: every point on the number line. (ℝ)
≤At most
0 is less than or equal to w₁(ω). (0 ≤ w₁ ω)
Bool
Bool: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Bool)
πPi
The ratio of a circle's circumference to its diameter, ≈ 3.14159. (π)
∃There exists
At least one t makes the statement after the comma true. (∃ t, k ≤ 2 * (Finset.univ.filter (fun j…)
aᵇPower
ε raised to the power 2. (ε ^ 2)
maxMaximum
The larger of 0 and min(1, phat(f, ℓ, b)). (max 0 (min 1 (phat f ℓ b)))
|s|Cardinality
The number of elements of filter(j ↦ |(∑ i, X(f(j, i), ℓ, b))/k₁ − (∑ i, X(f(t, i), …. ((Finset.univ.filter (fun j => |(∑ i, X …)
filter
Finset.univ.filter: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Finset.univ.filter)
minMinimum
The smaller of 1 and phat(f, ℓ, b). (min 1 (phat f ℓ b))
then
then: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (then)
∏Product
Multiply together w₁(f(i, j)) for every j. (∏ j, w₁ (f i j))
{ a if c; b otherwiseCases (if … then … else)
π(b') when ∀ i, i < ℓ → b'(i) = b(i), and 0 otherwise. (if (∀ i : Fin L, (i : ℕ) < ℓ → b' i = b…)
x ↦ f(x)Function (λ-abstraction)
The function sending j to |(∑ i, X(f(j, i), ℓ, b))/k₁ − (∑ i, X(f(t, i), ℓ, b))/k₁| …. Lean writes fun x => …; papers write x ↦ …. (fun j => |(∑ i, X (f j i) ℓ b) / k₁ - (…)
|x|Absolute value
The size of (∑ i, X(f(j, i), ℓ, b))/k₁ − (∑ i, X(f(t, i), ℓ, b))/k₁ without its sign. (|(∑ i, X (f j i) ℓ b) / k₁ - (∑ i, X (f…)
(x : T)As natural numbers
i read as an element of natural numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((i : ℕ))
-Subtraction
X(ω, ℓ, b) minus m(ℓ + 1, update(b, ⟨ℓ, h⟩, true))/m(ℓ, b). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (X ω ℓ b - m (ℓ + 1) (Function.update b …)
a/bDivision
m(ℓ + 1, update(b, ⟨ℓ, h⟩, true)) divided by m(ℓ, b). In Lean, dividing by 0 gives 0. (m (ℓ + 1) (Function.update b ⟨ℓ, h⟩ tru…)
+Addition
ℓ plus 1. (ℓ + 1)
update
Function.update: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Function.update)
⟨a, b⟩Anonymous constructor
Builds a structure (a pair, a subtype element, …) from ℓ, h. (⟨ℓ, h⟩)
true
true: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (true)
∧And
Both hold: k ≤ 2 · card(filter(j ↦ |(∑ i, X(f(j, i), ℓ, b))/k₁ − (∑ i…, and phat(f, ℓ, b) = (∑ i, X(f(t, i), ℓ, b))/k₁. (k ≤ 2 * (Finset.univ.filter (fun j => |…)
(x : T)As real numbers
L read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((L : ℝ))

The Randomized Conversion Theorem from its true premise, in one statement. Assume an algorithm whose output on each sub-instance (indicator values on a child block, i.e. the conditional mass) is an exactly unbiased estimate with variance at most σ² per run. Average k₁ runs per round (k₁ε² ≥ 4σ²), take a robust centre across k rounds per node, smooth by 3ε, and descend. Then the induced proposal over the 2^L keys satisfies E[Σ_b π_b²/r(b)] ≤ (1+6ε)^L + L·2^L·(7/8)^k·((1+6ε)/(3ε))^L over the product of all k·k₁ runs. Every step is inside the statement: Chebyshev for the average (rc-average-chebyshev) gives per-node success ≥ 3/4; majority amplification and the robust-centre lemma give per-node failure ≤ (7/8)^k; the union bound, the smoothing floor and the deterministic Conversion Theorem bound the expectation. With ε = 1/(6L) and k = O(L log(L+2)) the bound is a constant: any unbiased bounded-variance attention algorithm converts to a proposal of constant expected cost at polylog overhead.

How it was proved

Proved
5 October 2026
By
Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
Checked by
Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
Axioms
Classical.choice, Quot.sound, propext
Proof
577 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements