Provedunbiased-attentionrandomized-algorithmssoftmaxhardness
Sharp gadget YES: baseline key AT the top score β; a key with x = 1 forces output ≥ 1/2
For all , , and , if , then
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))
theorem ua-sharp-gap-yes {n : ℕ} (x : Fin n → ℝ) (β : ℝ) (j : Fin n) (hj : x j = 1) :
1 / 2 ≤ (∑ k, Real.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.