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 , , and , if , and (given and ), then
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)
theorem ua-majority-vote-amplification {Ω : Type} [Fintype Ω] (w : Ω → ℝ) (bad : Ω → Prop) [DecidablePred bad] (hw : ∀ ω, 0 ≤ w ω) (hsum : ∑ ω, w ω = 1) (hp : ∑ ω ∈ Finset.univ.filter bad, w ω ≤ 1 / 4) (k : ℕ) :
∑ f ∈ Finset.univ.filter (fun f : Fin k → Ω => k ≤ 2 * (Finset.univ.filter (fun i => bad (f i))).card), ∏ i, w (f i) ≤ (7 / 8 : ℝ) ^ kExponential-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.