proofs
Provedunbiased-attentionrandomized-algorithmssoftmaxhardness

Padding keeps YES: extra value-1 keys of nonnegative weight keep the output ≥ 1/2

For all S,E,P,w∈R\htmlData{mx=1}{S, E, P, w \in \htmlData{mx=0}{\mathbb{R}}}, if 0<E0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{E}, E≤S\htmlData{mx=0}{E} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{S}, 0≤P0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{P} and 0≤w0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{w}, then

12≤S+P⋅wE+(S+P⋅w)\htmlData{mx=0}{\frac{1}{2}} \mathrel{\htmlData{mx=14}{\leq}} \htmlData{mx=13}{\frac{\htmlData{mx=5}{\htmlData{mx=1}{S} + \htmlData{mx=4}{\htmlData{mx=2}{P} \cdot \htmlData{mx=3}{w}}}}{\htmlData{mx=12}{\htmlData{mx=6}{E} + (\htmlData{mx=11}{\htmlData{mx=7}{S} + \htmlData{mx=10}{\htmlData{mx=8}{P} \cdot \htmlData{mx=9}{w}}})}}}
What the notation means · or point at any symbol
RReal numbers
The real numbers: every point on the number line. (ℝ)
x ∈ TVariables
S, E, P, w range over real numbers: the statement must hold for every choice. ((S E P w : ℝ))
<Less than
0 is strictly smaller than E. (0 < E)
≤At most
E is less than or equal to S. (E ≤ S)
a/bDivision
1 divided by 2. In Lean, dividing by 0 gives 0. (1 / 2)
+Addition
S plus P · w. (S + P * w)
·Multiplication
P times w. (P * w)

Needed to square up the instance (n queries, n keys) or for causal self-attention, where query tokens act as score-0, value-1 keys. Part of 'Unbiased randomized attention: cost x variance thresholds', round 9 (true derivative, whole-instance reduction, compositions).

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

More proved statements