proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxhardness

Sharp gadget YES: baseline key AT the top score β; a key with x = 1 forces output ≥ 1/2

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, x:Fin⁡ n→R\htmlData{mx=5}{x : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, β∈R\htmlData{mx=1}{\beta \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 x(j)=1\htmlData{mx=2}{\htmlData{mx=0}{x}(\htmlData{mx=1}{j})} \mathrel{\htmlData{mx=3}{=}} 1, then

12≤∑keβ⋅x(k)eβ+∑keβ⋅x(k)\htmlData{mx=0}{\frac{1}{2}} \mathrel{\htmlData{mx=19}{\leq}} \htmlData{mx=18}{\frac{\htmlData{mx=7}{\sum_{k} \htmlData{mx=6}{e^{\htmlData{mx=5}{\htmlData{mx=1}{\beta} \cdot \htmlData{mx=4}{\htmlData{mx=2}{x}(\htmlData{mx=3}{k})}}}}}}{\htmlData{mx=17}{\htmlData{mx=9}{e^{\htmlData{mx=8}{\beta}}} + \htmlData{mx=16}{\sum_{k} \htmlData{mx=15}{e^{\htmlData{mx=14}{\htmlData{mx=10}{\beta} \cdot \htmlData{mx=13}{\htmlData{mx=11}{x}(\htmlData{mx=12}{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 → ℝ)
=Equality
x(j) and 1 are the same. (x j = 1)
a/bDivision
1 divided by 2. In Lean, dividing by 0 gives 0. (1 / 2)
≤At most
1/2 is less than or equal to (∑ k, exp(β · x(k)))/(exp(β) + (∑ k, exp(β · x(k)))). (1 / 2 ≤ (∑ k, Real.exp (β * x k)) / (Re…)
RReal numbers
The real numbers: every point on the number line. (ℝ)
∑Summation
Add up exp(β · x(k)) for every k. (∑ k, Real.exp (β * x k))
eˣExponential function
e raised to the power β · x(k), where e ≈ 2.718. (Real.exp (β * x k))
·Multiplication
β times x(k). (β * x k)
+Addition
exp(β) plus ∑ k, exp(β · x(k)). (Real.exp β + ∑ k, Real.exp (β * x k))

Scores β·x_k for value-1 keys, value-0 baseline key at score β. If some x_j = 1 the output is ≥ 1/2, for every β: the YES side costs no score range at all. Part of 'Unbiased randomized attention: cost x variance thresholds', round 3 (sharp threshold at score range ln n).

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