Provedunbiased-attentionrandomized-algorithmssoftmaxhardness
Composed hard side: MSE ≤ 1/256 ⇒ thresholding at 3/8 decides the gap with probability ≥ 3/4
For all , and , if , and , 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 m. Lean writes f x; papers write f(x). (
Fin m) - ⟹Implies
- If Fin(m), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin m → ℝ) - x : TVariables
- w, z range over Fin m → ℝ: the statement must hold for every choice. (
(w z : Fin m → ℝ)) - ∀For all
- The statement after the comma holds for every i. (
∀ i, 0 ≤ w i) - ∑Summation
- Add up w(i) for every i. (
∑ i, w i) - =Equality
- ∑ i, w(i) and 1 are the same. (
∑ i, w i = 1) - ∧And
- Both hold: 1/2 ≤ o → 3/4 ≤ (∑ i, w(i)), and o ≤ 1/4 → 3/4 ≤ (∑ i, w(i)). (
(1 / 2 ≤ o → 3 / 4 ≤ ∑ i ∈ Finset.univ.…) - ≤At most
- 0 is less than or equal to w(i). (
0 ≤ w i) - ·Multiplication
- w(i) times (z(i) − o)^2. (
w i * (z i - o) ^ 2) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - aᵇPower
- z(i) − o raised to the power 2. (
(z i - o) ^ 2) - -Subtraction
- z(i) minus o. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
z i - o) - a/bDivision
- 1 divided by 256. In Lean, dividing by 0 gives 0. (
1 / 256) - filter
- Finset.univ.filter: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset.univ.filter) - x ↦ f(x)Function (λ-abstraction)
- The function sending i to 3/8 < z(i). Lean writes fun x => …; papers write x ↦ …. (
fun i => 3 / 8 < z i) - <Less than
- 3/8 is strictly smaller than z(i). (
3 / 8 < z i)
theorem ua-hard-side-decision {m : ℕ} (w z : Fin m → ℝ) (o : ℝ) (hw : ∀ i, 0 ≤ w i) (hsum : ∑ i, w i = 1) (hmse : ∑ i, w i * (z i - o) ^ 2 ≤ 1 / 256) :
(1 / 2 ≤ o → 3 / 4 ≤ ∑ i ∈ Finset.univ.filter (fun i => 3 / 8 < z i), w i) ∧ (o ≤ 1 / 4 → 3 / 4 ≤ ∑ i ∈ Finset.univ.filter (fun i => z i < 3 / 8), w i)Over any finite probability space, an estimator z of the row output o with E(z−o)² ≤ 1/256 satisfies P(z > 3/8) ≥ 3/4 when o ≥ 1/2 and P(z < 3/8) ≥ 3/4 when o ≤ 1/4 (Chebyshev + gap, composed in one statement). Part of 'Unbiased randomized attention: cost x variance thresholds' (open theory problem), round 2.
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
- 42 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.