proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxhardness

Range-aware gap, YES: one key scoring ≥ baseline + g (g ≥ 0) forces output ≥ 1/2

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, s:Fin⁡ n→R\htmlData{mx=5}{s : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, b,g∈R\htmlData{mx=1}{b, g \in \htmlData{mx=0}{\mathbb{R}}} and j∈Fin⁡ n\htmlData{mx=3}{j \in \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}}}, if 0≤g0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{g} and b+g≤s(j)\htmlData{mx=2}{\htmlData{mx=0}{b} + \htmlData{mx=1}{g}} \mathrel{\htmlData{mx=6}{\leq}} \htmlData{mx=5}{\htmlData{mx=3}{s}(\htmlData{mx=4}{j})}, then

12≤∑kes(k)eb+∑kes(k)\htmlData{mx=0}{\frac{1}{2}} \mathrel{\htmlData{mx=15}{\leq}} \htmlData{mx=14}{\frac{\htmlData{mx=5}{\sum_{k} \htmlData{mx=4}{e^{\htmlData{mx=3}{\htmlData{mx=1}{s}(\htmlData{mx=2}{k})}}}}}{\htmlData{mx=13}{\htmlData{mx=7}{e^{\htmlData{mx=6}{b}}} + \htmlData{mx=12}{\sum_{k} \htmlData{mx=11}{e^{\htmlData{mx=10}{\htmlData{mx=8}{s}(\htmlData{mx=9}{k})}}}}}}}
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
b, g range over real numbers: the statement must hold for every choice. ((b g : ℝ))
≤At most
0 is less than or equal to g. (0 ≤ g)
+Addition
b plus g. (b + g)
a/bDivision
1 divided by 2. In Lean, dividing by 0 gives 0. (1 / 2)
RReal numbers
The real numbers: every point on the number line. (ℝ)
∑Summation
Add up exp(s(k)) for every k. (∑ k, Real.exp (s k))
eˣExponential function
e raised to the power s(k), where e ≈ 2.718. (Real.exp (s k))

Generalizes the OV gadget to arbitrary real scores: value-1 keys s_k, a value-0 baseline key at score b. If some s_j ≥ b + g with g ≥ 0, the output Σe^{s}/(e^b + Σe^{s}) is ≥ 1/2. Only the gap g matters, not the absolute range. 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
16 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements