Provedunbiased-attentionend-to-endsoftmaxhardness
END-TO-END REDUCTION: gadget rows at β = log(4n)/(1−s); per-row MSE ≤ 1/512, k runs, majority at 3/8 ⇒ NO (all x ≤ s) vs YES (some x = 1) decided except w.p. ≤ m(7/8)^k
For all , , , , , and , if , , , and (given ), then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - x ∈ TVariables
- m, n range over natural numbers: the statement must hold for every choice. (
(m n : ℕ)) - Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - Fintype
- Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fintype) - f(x)Function application
- Fintype applied to Ω. Lean writes f x; papers write f(x). (
Fintype Ω) - 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) - <Less than
- 0 is strictly smaller than n. (
0 < n) - ∀For all
- The statement after the comma holds for every ω. (
∀ ω, 0 ≤ w ω) - ∑Summation
- Add up w(ω) for every ω. (
∑ ω, w ω) - =Equality
- ∑ ω, w(ω) and 1 are the same. (
∑ ω, w ω = 1) - ≤At most
- 0 is less than or equal to w(ω). (
0 ≤ w ω) - 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) - ⟹Implies
- If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin n → ℝ) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - aᵇPower
- z(i, ω) − (∑ j, exp(log(4 · n)/(1 − s) · x(i, j)))/(exp(lo… raised to the power 2. (
(z i ω - (∑ j, Real.exp (Real.log (4 * …) - eˣExponential function
- e raised to the power log(4 · n)/(1 − s) · x(i, j), where e ≈ 2.718. (
Real.exp (Real.log (4 * n) / (1 - s) * …) - logNatural logarithm
- The logarithm of 4 · n to base e: the power e must be raised to to give 4 · n. (
Real.log (4 * n)) - a/bDivision
- log(4 · n) divided by 1 − s. In Lean, dividing by 0 gives 0. (
Real.log (4 * n) / (1 - s)) - ·Multiplication
- 4 times n. (
4 * n) - ∧And
- Both hold: (∀ i, j, x(i, j) ≤ s) → (∀ i, ¬(k ≤ 2 · card(filter(r ↦ 3/…, and (∃ i, j, x(i, j) = 1) → (∃ i, k ≤ 2 · card(filter(r ↦ 3/8 …. (
((∀ i j, x i j ≤ s) → ∀ i, ¬ (k ≤ 2 * (…) - -Subtraction
- 1 minus s. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
1 - s) - ¬Not
- It is not the case that k ≤ 2 · card(filter(r ↦ 3/8 ≤ z(i, f(r)))). (
¬ (k ≤ 2 * (Finset.univ.filter (fun r =…) - +Addition
- exp(log(4 · n)/(1 − s)) plus ∑ j, exp(log(4 · n)/(1 − s) · x(i, j)). (
Real.exp (Real.log (4 * n) / (1 - s)) +…) - |s|Cardinality
- The number of elements of filter(r ↦ 3/8 ≤ z(i, f(r))). (
(Finset.univ.filter (fun r => 3 / 8 ≤ z…) - x ↦ f(x)Function (λ-abstraction)
- The function sending r to 3/8 ≤ z(i, f(r)). Lean writes fun x => …; papers write x ↦ …. (
fun r => 3 / 8 ≤ z i (f r)) - ∃There exists
- At least one i, j makes the statement after the comma true. (
∃ i j, x i j = 1) - ∏Product
- Multiply together w(f(r)) for every r. (
∏ r, w (f r)) - (x : T)As real numbers
- 7/8 read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(7 / 8 : ℝ))
theorem ua-end-to-end-reduction {m n : ℕ} {Ω : Type} [Fintype Ω] (x : Fin m → Fin n → ℝ) (s : ℝ) (hn : 0 < n) (hs : s < 1) (w : Ω → ℝ) (hw : ∀ ω, 0 ≤ w ω) (hsum : ∑ ω, w ω = 1) (z : Fin m → Ω → ℝ) (hmse : ∀ i, ∑ ω, w ω * (z i ω - (∑ j, Real.exp (Real.log (4 * n) / (1 - s) * x i j)) / (Real.exp (Real.log (4 * n) / (1 - s)) + ∑ j, Real.exp (Real.log (4 * n) / (1 - s) * x i j))) ^ 2 ≤ 1 / 512) (k : ℕ) :
∑ f ∈ Finset.univ.filter (fun f : Fin k → Ω => ¬ ( ((∀ i j, x i j ≤ s) → ∀ i, ¬ (k ≤ 2 * (Finset.univ.filter (fun r => 3 / 8 ≤ z i (f r))).card)) ∧ ((∃ i j, x i j = 1) → ∃ i, k ≤ 2 * (Finset.univ.filter (fun r => 3 / 8 ≤ z i (f r))).card))), ∏ r, w (f r) ≤ m * (7 / 8 : ℝ) ^ kFourth single-statement composition: the whole-instance gadget (ua-reduction-all-rows) composed with the hard-side decision/amplification/union bound (ua-end-to-end-hard-side), both inlined as universally quantified haves. Together with ua-tensor-power-inner-product (soundness amplification), ua-amplification-run-count (k = O(log m)) and ua-polylog-overhead-absorbed (time accounting), only SETH/OVC and Rubinstein's vector construction remain outside Lean in the sharp-threshold hardness argument. Part of 'Unbiased randomized attention: cost x variance thresholds' (end-to-end composition round).
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
- 186 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.