Provedunbiased-attentionrandomized-algorithmssoftmaxhardness
Padding keeps YES: extra value-1 keys of nonnegative weight keep the output ≥ 1/2
For all , if , , and , then
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)
theorem ua-padding-preserves-yes (S E P w : ℝ) (hE : 0 < E) (hS : E ≤ S) (hP : 0 ≤ P) (hw : 0 ≤ w) :
1 / 2 ≤ (S + P * w) / (E + (S + 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.