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

Worst-case chi-square: if the proposal is ≥ f everywhere, Σπ²/r ≤ 1/f

For all J∈Type⁡\htmlData{mx=1}{J \in \htmlData{mx=0}{\operatorname{Type}}}, π,r:J→R\htmlData{mx=3}{\pi, r : \htmlData{mx=0}{J} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}} and f∈R\htmlData{mx=1}{f \in \htmlData{mx=0}{\mathbb{R}}}, if 0<f0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{f}, ∀j, 0≤π(j)\htmlData{mx=4}{\forall j,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{j})}}, ∑jπ(j)=1\htmlData{mx=3}{\sum_{j} \htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{j})}} \mathrel{\htmlData{mx=4}{=}} 1, ∀j, π(j)≤1\htmlData{mx=4}{\forall j,\ \htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{j})} \mathrel{\htmlData{mx=3}{\leq}} 1} and ∀j, f≤r(j)\htmlData{mx=5}{\forall j,\ \htmlData{mx=0}{f} \mathrel{\htmlData{mx=4}{\leq}} \htmlData{mx=3}{\htmlData{mx=1}{r}(\htmlData{mx=2}{j})}} (given Fintype⁡ J\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{J}}), then

∑jπ(j)2r(j)≤1f\htmlData{mx=8}{\sum_{j} \htmlData{mx=7}{\frac{\htmlData{mx=3}{\htmlData{mx=2}{\htmlData{mx=0}{\pi}(\htmlData{mx=1}{j})}^{2}}}{\htmlData{mx=6}{\htmlData{mx=4}{r}(\htmlData{mx=5}{j})}}}} \mathrel{\htmlData{mx=11}{\leq}} \htmlData{mx=10}{\frac{1}{\htmlData{mx=9}{f}}}
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 J. Lean writes f x; papers write f(x). (Fintype J)
⟹Implies
If J, then ℝ. (Between types, A → B is the type of functions from A to B.) (J → ℝ)
x : TVariables
π, r range over J → ℝ: the statement must hold for every choice. ((π r : J → ℝ))
<Less than
0 is strictly smaller than f. (0 < f)
∀For all
The statement after the comma holds for every j. (∀ j, 0 ≤ π j)
∑Summation
Add up π(j) for every j. (∑ j, π j)
=Equality
∑ j, π(j) and 1 are the same. (∑ j, π j = 1)
RReal numbers
The real numbers: every point on the number line. (ℝ)
≤At most
0 is less than or equal to π(j). (0 ≤ π j)
aᵇPower
π(j) raised to the power 2. (π j ^ 2)
a/bDivision
π(j)^2 divided by r(j). In Lean, dividing by 0 gives 0. (π j ^ 2 / r j)
πPi
The ratio of a circle's circumference to its diameter, ≈ 3.14159. (π)

The chi-square cost factor of any proposal floored by f is at most 1/f; with f = (ε/(1+2ε))^L this is the bad-event bound. 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
17 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements