proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxhardness

Finite Chebyshev: mass of {|error| ≥ t} ≤ MSE / t²

For all m∈N\htmlData{mx=1}{m \in \htmlData{mx=0}{\mathbb{N}}}, w,e:Fin⁡ m→R\htmlData{mx=5}{w, e : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{m}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}} and t∈R\htmlData{mx=1}{t \in \htmlData{mx=0}{\mathbb{R}}}, if ∀i, 0≤w(i)\htmlData{mx=4}{\forall i,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{i})}} and 0<t0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{t}, then

∑i∈filter⁡(i↦t≤∣e(i)∣)w(i)≤∑iw(i)⋅e(i)2t2\htmlData{mx=12}{\sum_{i \in \htmlData{mx=8}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=7}{i \mapsto \htmlData{mx=1}{t} \mathrel{\htmlData{mx=6}{\leq}} \htmlData{mx=5}{\left\lvert \htmlData{mx=4}{\htmlData{mx=2}{e}(\htmlData{mx=3}{i})} \right\rvert}})}} \htmlData{mx=11}{\htmlData{mx=9}{w}(\htmlData{mx=10}{i})}} \mathrel{\htmlData{mx=25}{\leq}} \htmlData{mx=24}{\frac{\htmlData{mx=21}{\sum_{i} \htmlData{mx=20}{\htmlData{mx=15}{\htmlData{mx=13}{w}(\htmlData{mx=14}{i})} \cdot \htmlData{mx=19}{\htmlData{mx=18}{\htmlData{mx=16}{e}(\htmlData{mx=17}{i})}^{2}}}}}{\htmlData{mx=23}{\htmlData{mx=22}{t}^{2}}}}
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 m. Lean writes f x; papers write f(x). (Fin m)
⟹Implies
If Fin(m), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin m → ℝ)
x : TVariables
w, e range over Fin m → ℝ: the statement must hold for every choice. ((w e : Fin m → ℝ))
∀For all
The statement after the comma holds for every i. (∀ i, 0 ≤ w i)
<Less than
0 is strictly smaller than t. (0 < t)
∑Summation
Add up w(i) for each i in filter(i ↦ t ≤ |e(i)|). (∑ i ∈ Finset.univ.filter (fun i => t ≤ …)
≤At most
0 is less than or equal to w(i). (0 ≤ w i)
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)
RReal numbers
The real numbers: every point on the number line. (ℝ)
x ↦ f(x)Function (λ-abstraction)
The function sending i to t ≤ |e(i)|. Lean writes fun x => …; papers write x ↦ …. (fun i => t ≤ |e i|)
|x|Absolute value
The size of e(i) without its sign. (|e i|)
a/bDivision
∑ i, w(i) · e(i)^2 divided by t^2. In Lean, dividing by 0 gives 0. ((∑ i, w i * e i ^ 2) / t ^ 2)
·Multiplication
w(i) times e(i)^2. (w i * e i ^ 2)
aᵇPower
e(i) raised to the power 2. (e i ^ 2)

Over a finite outcome space with weights w ≥ 0, Σ_{|e_i| ≥ t} w_i ≤ (Σ w_i e_i²)/t². With MSE ≤ 1/256 and t = 1/8, failure probability ≤ 1/4, which feeds the gap decision. 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
20 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements