proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxhardness

Majority-vote amplification: if each run fails w.p. ≤ 1/4, P(≥ half of k i.i.d. runs fail) ≤ (7/8)^k

For all Ω∈Type⁡\htmlData{mx=1}{\Omega \in \htmlData{mx=0}{\operatorname{Type}}}, w:Ω→R\htmlData{mx=3}{w : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, bad:Ω→Prop⁡\htmlData{mx=3}{\mathit{bad} : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\operatorname{Prop}}} and k∈N\htmlData{mx=1}{k \in \htmlData{mx=0}{\mathbb{N}}}, if ∀ω, 0≤w(ω)\htmlData{mx=4}{\forall \omega,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}}, ∑ωw(ω)=1\htmlData{mx=3}{\sum_{\omega} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}} \mathrel{\htmlData{mx=4}{=}} 1 and ∑ω∈filter⁡(bad)w(ω)≤14\htmlData{mx=6}{\sum_{\omega \in \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=1}{\mathit{bad}})}} \htmlData{mx=5}{\htmlData{mx=3}{w}(\htmlData{mx=4}{\omega})}} \mathrel{\htmlData{mx=8}{\leq}} \htmlData{mx=7}{\frac{1}{4}} (given Fintype⁡ Ω\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega}} and DecidablePred⁡ bad\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{DecidablePred}}\,\htmlData{mx=1}{\mathit{bad}}}), then

∑f∈filter⁡(f↦k≤2⋅∣filter⁡(i↦bad(f(i)))∣)∏iw(f(i))≤78k\htmlData{mx=34}{\sum_{f \in \htmlData{mx=27}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=26}{f \mapsto \htmlData{mx=1}{k} \mathrel{\htmlData{mx=20}{\leq}} \htmlData{mx=19}{2 \cdot \htmlData{mx=18}{\lvert \htmlData{mx=17}{\htmlData{mx=10}{\operatorname{filter}}(\htmlData{mx=16}{i \mapsto \htmlData{mx=15}{\htmlData{mx=11}{\mathit{bad}}(\htmlData{mx=14}{\htmlData{mx=12}{f}(\htmlData{mx=13}{i})})}})} \rvert}}})}} \htmlData{mx=33}{\prod_{i} \htmlData{mx=32}{\htmlData{mx=28}{w}(\htmlData{mx=31}{\htmlData{mx=29}{f}(\htmlData{mx=30}{i})})}}} \mathrel{\htmlData{mx=39}{\leq}} \htmlData{mx=38}{\htmlData{mx=36}{\htmlData{mx=35}{\frac{7}{8}}}^{\htmlData{mx=37}{k}}}
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 Ω. Lean writes f x; papers write f(x). (Fintype Ω)
⟹Implies
If Ω, then ℝ. (Between types, A → B is the type of functions from A to B.) (Ω → ℝ)
DecidablePred
DecidablePred: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (DecidablePred)
∀For all
The statement after the comma holds for every ω. (∀ ω, 0 ≤ w ω)
∑Summation
Add up w(ω) for every ω. (∑ ω, w ω)
=Equality
∑ ω, w(ω) and 1 are the same. (∑ ω, w ω = 1)
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
RReal numbers
The real numbers: every point on the number line. (ℝ)
Prop
Prop: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Prop)
≤At most
0 is less than or equal to w(ω). (0 ≤ w ω)
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)
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)
a/bDivision
1 divided by 4. In Lean, dividing by 0 gives 0. (1 / 4)
·Multiplication
2 times card(filter(i ↦ bad(f(i)))). (2 * (Finset.univ.filter (fun i => bad (…)
|s|Cardinality
The number of elements of filter(i ↦ bad(f(i))). ((Finset.univ.filter (fun i => bad (f i)…)
x ↦ f(x)Function (λ-abstraction)
The function sending i to bad(f(i)). Lean writes fun x => …; papers write x ↦ …. (fun i => bad (f i))
∏Product
Multiply together w(f(i)) for every i. (∏ i, w (f i))
(x : T)As real numbers
7/8 read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((7 / 8 : ℝ))
aᵇPower
7/8 raised to the power k. ((7 / 8 : ℝ) ^ k)

Exponential-moment (Chernoff) bound proven exactly on the finite product space Ω^k: E[4^{#bad}] = (Σ w·g)^k ≤ (7/4)^k by product factorization, and #bad ≥ k/2 means 4^{#bad} ≥ 2^k. Replaces the cited median-of-means step of the hardness reduction. Part of 'Unbiased randomized attention: cost x variance thresholds', round 4 (amplification made formal).

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

More proved statements