Provedunbiased-attentionrandomized-algorithmssoftmaxdebiasing
Explicit level law p_l ∝ 1/c_l: V_l ≤ A/c_l ⇒ cost × variance ≤ L²·A
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 range over Fin L → ℝ: the statement must hold for every choice. (
(c V : Fin L → ℝ)) - ∀For all
- The statement after the comma holds for every l. (
∀ l, 0 < c l) - <Less than
- 0 is strictly smaller than c(l). (
0 < c l) - ≤At most
- V(l) is less than or equal to A/c(l). (
V l ≤ A / c l) - ·Multiplication
- 1/c(l)/(∑ m, 1/c(m)) times c(l). (
((1 / c l) / ∑ m, 1 / c m) * c l) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - a/bDivision
- A divided by c(l). In Lean, dividing by 0 gives 0. (
A / c l) - ∑Summation
- Add up 1/c(m) for every m. (
∑ m, 1 / c m) - (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
- L raised to the power 2. (
(L : ℝ) ^ 2)
theorem ua-mlmc-inverse-cost-allocation {L : ℕ} (c V : Fin L → ℝ) (A : ℝ) (hc : ∀ l, 0 < c l) (hV : ∀ l, V l ≤ A / c l) :
(∑ l, ((1 / c l) / ∑ m, 1 / c m) * c l) * (∑ l, V l / ((1 / c l) / ∑ m, 1 / c m)) ≤ (L : ℝ) ^ 2 * AComposes the debiasing side: with level costs c_l and level variances V_l ≤ A/c_l (which the SNIS bound gives with A = O(F²(1+χ²))), the inverse-cost level law achieves expected cost × variance ≤ L²A. Part of 'Unbiased randomized attention: cost x variance thresholds' (open theory problem), round 2.
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
- 29 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.