proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxdebiasing

Cost × variance lower bound: (Σ√(c_l V_l))² ≤ (Σ p_l c_l)(Σ V_l/p_l)

For all L∈N\htmlData{mx=1}{L \in \htmlData{mx=0}{\mathbb{N}}} and c,V,p:Fin⁡ L→R\htmlData{mx=5}{c, V, p : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{L}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, if ∀l, 0≤c(l)\htmlData{mx=4}{\forall l,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{c}(\htmlData{mx=1}{l})}}, ∀l, 0≤V(l)\htmlData{mx=4}{\forall l,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{V}(\htmlData{mx=1}{l})}} and ∀l, 0<p(l)\htmlData{mx=4}{\forall l,\ 0 \mathrel{\htmlData{mx=3}{<}} \htmlData{mx=2}{\htmlData{mx=0}{p}(\htmlData{mx=1}{l})}}, then

(∑lc(l)⋅V(l))2≤(∑lp(l)⋅c(l))⋅(∑lV(l)p(l))\htmlData{mx=9}{\left(\htmlData{mx=8}{\sum_{l} \htmlData{mx=7}{\sqrt{\htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{c}(\htmlData{mx=1}{l})} \cdot \htmlData{mx=5}{\htmlData{mx=3}{V}(\htmlData{mx=4}{l})}}}}}\right)^{2}} \mathrel{\htmlData{mx=27}{\leq}} \htmlData{mx=26}{\left(\htmlData{mx=17}{\sum_{l} \htmlData{mx=16}{\htmlData{mx=12}{\htmlData{mx=10}{p}(\htmlData{mx=11}{l})} \cdot \htmlData{mx=15}{\htmlData{mx=13}{c}(\htmlData{mx=14}{l})}}}\right) \cdot \left(\htmlData{mx=25}{\sum_{l} \htmlData{mx=24}{\frac{\htmlData{mx=20}{\htmlData{mx=18}{V}(\htmlData{mx=19}{l})}}{\htmlData{mx=23}{\htmlData{mx=21}{p}(\htmlData{mx=22}{l})}}}}\right)}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
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)
f(x)Function application
Fin applied to L. Lean writes f x; papers write f(x). (Fin L)
⟹Implies
If Fin(L), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin L → ℝ)
x : TVariables
c, V, p range over Fin L → ℝ: the statement must hold for every choice. ((c V p : Fin L → ℝ))
∀For all
The statement after the comma holds for every l. (∀ l, 0 ≤ c l)
aᵇPower
∑ l, √(c(l) · V(l)) raised to the power 2. ((∑ l, Real.sqrt (c l * V l)) ^ 2)
∑Summation
Add up √(c(l) · V(l)) for every l. (∑ l, Real.sqrt (c l * V l))
≤At most
0 is less than or equal to c(l). (0 ≤ c l)
<Less than
0 is strictly smaller than p(l). (0 < p l)
√Square root
The non-negative number whose square is c(l) · V(l). (Real.sqrt (c l * V l))
RReal numbers
The real numbers: every point on the number line. (ℝ)
·Multiplication
c(l) times V(l). (c l * V l)
a/bDivision
V(l) divided by p(l). In Lean, dividing by 0 gives 0. (V l / p l)

For any level law p > 0, expected cost Σ p c times variance bound Σ V/p is at least (Σ √(cV))² (Cauchy–Schwarz). This is the work-normalized variance floor of randomized MLMC. Part of 'Unbiased randomized attention: cost x variance thresholds' (open theory problem).

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

More proved statements