Provedunbiased-attentionrandomized-algorithmssoftmaxdebiasing
Cost × variance lower bound: (Σ√(c_l V_l))² ≤ (Σ p_l c_l)(Σ V_l/p_l)
For all and , if , and , then
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)
theorem ua-cost-variance-cauchy-schwarz {L : ℕ} (c V p : Fin L → ℝ) (hc : ∀ l, 0 ≤ c l) (hV : ∀ l, 0 ≤ V l) (hp : ∀ l, 0 < p l) :
(∑ l, Real.sqrt (c l * V l)) ^ 2 ≤ (∑ l, p l * c l) * (∑ l, 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.