proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxgradient-hardness

Far-key mass: all x ≤ s < 1 and β = log(8n)/(1−s) ⇒ Σ e^{β x_k} ≤ e^β/8

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}}} and s∈R\htmlData{mx=1}{s \in \htmlData{mx=0}{\mathbb{R}}}, if 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n}, s<1\htmlData{mx=0}{s} \mathrel{\htmlData{mx=1}{<}} 1, 0≤s0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{s} and ∀k, x(k)≤s\htmlData{mx=5}{\forall k,\ \htmlData{mx=2}{\htmlData{mx=0}{x}(\htmlData{mx=1}{k})} \mathrel{\htmlData{mx=4}{\leq}} \htmlData{mx=3}{s}}, then

∑kelog⁡(8n)1−s⋅x(k)≤elog⁡(8n)1−s8\begin{aligned} & \htmlData{mx=12}{\sum_{k} \htmlData{mx=11}{e^{\htmlData{mx=10}{\htmlData{mx=6}{\frac{\htmlData{mx=3}{\log (\htmlData{mx=2}{8\htmlData{mx=1}{n}})}}{\htmlData{mx=5}{1 - \htmlData{mx=4}{s}}}} \cdot \htmlData{mx=9}{\htmlData{mx=7}{x}(\htmlData{mx=8}{k})}}}}} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=20}{\frac{\htmlData{mx=19}{e^{\htmlData{mx=18}{\frac{\htmlData{mx=15}{\log (\htmlData{mx=14}{8\htmlData{mx=13}{n}})}}{\htmlData{mx=17}{1 - \htmlData{mx=16}{s}}}}}}}{8}} \end{aligned}
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 → ℝ)
<Less than
0 is strictly smaller than n. (0 < n)
≤At most
0 is less than or equal to s. (0 ≤ s)
∀For all
The statement after the comma holds for every k. (∀ k, x k ≤ s)
∑Summation
Add up exp(log(8 · n)/(1 − s) · x(k)) for every k. (∑ k, Real.exp (Real.log (8 * n) / (1 - …)
eˣExponential function
e raised to the power log(8 · n)/(1 − s) · x(k), where e ≈ 2.718. (Real.exp (Real.log (8 * n) / (1 - s) * …)
RReal numbers
The real numbers: every point on the number line. (ℝ)
logNatural logarithm
The logarithm of 8 · n to base e: the power e must be raised to to give 8 · n. (Real.log (8 * n))
a/bDivision
log(8 · n) divided by 1 − s. In Lean, dividing by 0 gives 0. (Real.log (8 * n) / (1 - s))
·Multiplication
8 times n. (8 * n)
-Subtraction
1 minus s. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (1 - s)

Gives both the NO-row bound (o ≤ 1/8) and the isolated YES row's upper bound S ≤ (9/8)e^β. Score range stays ≤ β = ln(8n)/(1−s) → α ln n after tensoring. Part of 'Unbiased randomized attention: cost x variance thresholds', round 7 (gradient hardness via isolation).

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
29 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements