proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxaggregate

Sum of attention outputs: NO rows each ≤ D/(8n), ≥ D YES rows each ≥ 1/2 ⇒ YES sum ≥ 4 × NO sum

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, oNo,oYes:Fin⁡ n→R\htmlData{mx=5}{\mathit{oNo}, \mathit{oYes} : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, Y∈Finset⁡ Fin⁡ n\htmlData{mx=5}{Y \in \htmlData{mx=4}{\htmlData{mx=0}{\operatorname{Finset}}\,\htmlData{mx=3}{\htmlData{mx=1}{\operatorname{Fin}}\,\htmlData{mx=2}{n}}}} and D∈R\htmlData{mx=1}{D \in \htmlData{mx=0}{\mathbb{R}}}, if 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n}, 0≤D0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{D}, ∀i, oNo(i)≤D8n\htmlData{mx=8}{\forall i,\ \htmlData{mx=2}{\htmlData{mx=0}{\mathit{oNo}}(\htmlData{mx=1}{i})} \mathrel{\htmlData{mx=7}{\leq}} \htmlData{mx=6}{\frac{\htmlData{mx=3}{D}}{\htmlData{mx=5}{8\htmlData{mx=4}{n}}}}}, D≤card⁡\htmlData{mx=0}{D} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{\operatorname{card}}, ∀i∈Y, 12≤oYes(i)\htmlData{mx=6}{\forall i \in \htmlData{mx=5}{Y},\ \htmlData{mx=0}{\frac{1}{2}} \mathrel{\htmlData{mx=4}{\leq}} \htmlData{mx=3}{\htmlData{mx=1}{\mathit{oYes}}(\htmlData{mx=2}{i})}} and ∀i, 0≤oYes(i)\htmlData{mx=4}{\forall i,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{\mathit{oYes}}(\htmlData{mx=1}{i})}}, then

4⋅∑ioNo(i)≤∑ioYes(i)\htmlData{mx=4}{4 \cdot \htmlData{mx=3}{\sum_{i} \htmlData{mx=2}{\htmlData{mx=0}{\mathit{oNo}}(\htmlData{mx=1}{i})}}} \mathrel{\htmlData{mx=9}{\leq}} \htmlData{mx=8}{\sum_{i} \htmlData{mx=7}{\htmlData{mx=5}{\mathit{oYes}}(\htmlData{mx=6}{i})}}
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 n. Lean writes f x; papers write f(x). (Fin n)
⟹Implies
If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin n → ℝ)
x : TVariables
oNo, oYes range over Fin n → ℝ: the statement must hold for every choice. ((oNo oYes : Fin n → ℝ))
Finset
Finset: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Finset)
<Less than
0 is strictly smaller than n. (0 < n)
≤At most
0 is less than or equal to D. (0 ≤ D)
∀For all
The statement after the comma holds for every i. (∀ i, oNo i ≤ D / (8 * n))
card
Y.card: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Y.card)
∑Summation
Add up oNo(i) for every i. (∑ i, oNo i)
RReal numbers
The real numbers: every point on the number line. (ℝ)
a/bDivision
D divided by 8 · n. In Lean, dividing by 0 gives 0. (D / (8 * n))
·Multiplication
8 times n. (8 * n)

Aggregates of attention OUTPUTS (ratios, the building blocks of the SGD gradient), not just partition functions: a constant-factor estimate of Σ_i o_i separates the multiplicity gadget's YES and NO instances. Part of 'Unbiased randomized attention: cost x variance thresholds', round 14 (aggregates of attention outputs).

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