proofs
Provedrandomized-conversionconversion-theoremattention-compute-lawmedian-of-means

Randomized Conversion Theorem (assembly): E[χ²] ≤ (1+2ε)^L + δ (L+2)^L for the proposal synthesised from a randomized oracle

For all Ω∈Type⁡\htmlData{mx=1}{\Omega \in \htmlData{mx=0}{\operatorname{Type}}}, w,chi:Ω→R\htmlData{mx=3}{w, \mathit{chi} : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, L∈N\htmlData{mx=1}{L \in \htmlData{mx=0}{\mathbb{N}}}, ε,δ∈R\htmlData{mx=1}{\varepsilon, \delta \in \htmlData{mx=0}{\mathbb{R}}} and good:Ω→Prop⁡\htmlData{mx=3}{\mathit{good} : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\operatorname{Prop}}}, if 0≤ε0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{\varepsilon}, ∀ω, 0≤w(ω)\htmlData{mx=4}{\forall \omega,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}}, ∑ωw(ω)=1\htmlData{mx=3}{\sum_{\omega} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}} \mathrel{\htmlData{mx=4}{=}} 1, ∀ω, good(ω)  ⟹  chi(ω)≤(1+2ε)L\htmlData{mx=13}{\forall \omega,\ \htmlData{mx=2}{\htmlData{mx=0}{\mathit{good}}(\htmlData{mx=1}{\omega})} \mathrel{\htmlData{mx=12}{\implies}} \htmlData{mx=5}{\htmlData{mx=3}{\mathit{chi}}(\htmlData{mx=4}{\omega})} \mathrel{\htmlData{mx=11}{\leq}} \htmlData{mx=10}{(\htmlData{mx=8}{1 + \htmlData{mx=7}{2\htmlData{mx=6}{\varepsilon}}})^{\htmlData{mx=9}{L}}}}, ∀ω, chi(ω)≤(L+2)L\htmlData{mx=9}{\forall \omega,\ \htmlData{mx=2}{\htmlData{mx=0}{\mathit{chi}}(\htmlData{mx=1}{\omega})} \mathrel{\htmlData{mx=8}{\leq}} \htmlData{mx=7}{(\htmlData{mx=5}{\htmlData{mx=4}{\htmlData{mx=3}{L}} + 2})^{\htmlData{mx=6}{L}}}} and ∑ω∈filter⁡(ω↦¬good(ω))w(ω)≤δ\htmlData{mx=10}{\sum_{\omega \in \htmlData{mx=6}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=5}{\omega \mapsto \htmlData{mx=4}{\lnot \htmlData{mx=3}{\htmlData{mx=1}{\mathit{good}}(\htmlData{mx=2}{\omega})}}})}} \htmlData{mx=9}{\htmlData{mx=7}{w}(\htmlData{mx=8}{\omega})}} \mathrel{\htmlData{mx=12}{\leq}} \htmlData{mx=11}{\delta} (given Fintype⁡ Ω\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega}} and DecidablePred⁡ good\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{DecidablePred}}\,\htmlData{mx=1}{\mathit{good}}}), then

∑ωw(ω)⋅chi(ω)≤(1+2ε)L+δ⋅(L+2)L\htmlData{mx=7}{\sum_{\omega} \htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})} \cdot \htmlData{mx=5}{\htmlData{mx=3}{\mathit{chi}}(\htmlData{mx=4}{\omega})}}} \mathrel{\htmlData{mx=21}{\leq}} \htmlData{mx=20}{\htmlData{mx=12}{(\htmlData{mx=10}{1 + \htmlData{mx=9}{2\htmlData{mx=8}{\varepsilon}}})^{\htmlData{mx=11}{L}}} + \htmlData{mx=19}{\htmlData{mx=13}{\delta} \cdot \htmlData{mx=18}{(\htmlData{mx=16}{\htmlData{mx=15}{\htmlData{mx=14}{L}} + 2})^{\htmlData{mx=17}{L}}}}}
What the notation means · or point at any symbol
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.) (Ω → ℝ)
x : TVariables
w, chi range over Ω → ℝ: the statement must hold for every choice. ((w chi : Ω → ℝ))
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
x ∈ TVariables
ε, δ range over real numbers: the statement must hold for every choice. ((ε δ : ℝ))
DecidablePred
DecidablePred: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (DecidablePred)
≤At most
0 is less than or equal to ε. (0 ≤ ε)
∀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)
RReal numbers
The real numbers: every point on the number line. (ℝ)
Prop
Prop: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Prop)
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)
(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 : ℝ))
aᵇPower
1 + 2 · ε raised to the power L. ((1 + 2 * ε) ^ L)
+Addition
1 plus 2 · ε. (1 + 2 * ε)
x ↦ f(x)Function (λ-abstraction)
The function sending ω to ¬good(ω). Lean writes fun x => …; papers write x ↦ …. (fun ω => ¬ good ω)
·Multiplication
2 times ε. (2 * ε)
¬Not
It is not the case that good(ω). (¬ good ω)

On the good event (all boosted node estimates within factor 1+ε) the deterministic Conversion Theorem gives χ² ≤ (1+2ε)^L; off it the smoothing floor gives χ² ≤ (L+2)^L; the good event has mass ≥ 1−δ. Hence E[χ²] ≤ (1+2ε)^L + δ (L+2)^L. Part of the Randomized Conversion Theorem: the Conversion Theorem (counting ⇒ sampling descent) extended to every randomized bounded-variance attention algorithm via median-of-means boosting, a union bound over the 2n descent nodes, and ε-smoothing of each node; closes the residual scalability crux of the Attention Compute Law.

How it was proved

Proved
4 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
35 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements