Provedrandomized-conversionconversion-theoremattention-compute-lawmedian-of-means
Robust centre (median-free median-of-means): a strict majority of estimates within ε of p yields a selectable estimate within 3ε of p
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 k. Lean writes f x; papers write f(x). (
Fin k) - ⟹Implies
- If Fin(k), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin k → ℝ) - x ∈ TVariables
- p, ε range over real numbers: the statement must hold for every choice. (
(p ε : ℝ)) - ≤At most
- 0 is less than or equal to ε. (
0 ≤ ε) - <Less than
- k is strictly smaller than 2 · card(filter(i ↦ |a(i) − p| ≤ ε)). (
k < 2 * (Finset.univ.filter (fun i => |…) - ∧And
- Both hold: ∃ t, k ≤ 2 · card(filter(j ↦ |a(j) − a(t)| ≤ 2 · ε)), and ∀ t, k ≤ 2 · card(filter(j ↦ |a(j) − a(t)| ≤ 2 · ε)) → |a(…. (
(∃ t, k ≤ 2 * (Finset.univ.filter (fun …) - ∃There exists
- At least one t makes the statement after the comma true. (
∃ t, k ≤ 2 * (Finset.univ.filter (fun j…) - ·Multiplication
- 2 times card(filter(i ↦ |a(i) − p| ≤ ε)). (
2 * (Finset.univ.filter (fun i => |a i …) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - |s|Cardinality
- The number of elements of filter(i ↦ |a(i) − p| ≤ ε). (
(Finset.univ.filter (fun i => |a i - p|…) - 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 |a(i) − p| ≤ ε. Lean writes fun x => …; papers write x ↦ …. (
fun i => |a i - p| ≤ ε) - |x|Absolute value
- The size of a(i) − p without its sign. (
|a i - p|) - -Subtraction
- a(i) minus p. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
a i - p) - ∀For all
- The statement after the comma holds for every t. (
∀ t, k ≤ 2 * (Finset.univ.filter (fun j…)
theorem rc-robust-center {k : ℕ} (a : Fin k → ℝ) (p ε : ℝ) (hε : 0 ≤ ε) (hmaj : k < 2 * (Finset.univ.filter (fun i => |a i - p| ≤ ε)).card) :
(∃ t, k ≤ 2 * (Finset.univ.filter (fun j => |a j - a t| ≤ 2 * ε)).card) ∧ (∀ t, k ≤ 2 * (Finset.univ.filter (fun j => |a j - a t| ≤ 2 * ε)).card → |a t - p| ≤ 3 * ε)A comparison-only rule: pick any estimate that has at least half of the estimates within 2ε of it; such an estimate exists, and every such estimate is within 3ε of the truth whenever a strict majority of estimates are ε-accurate. This replaces the median in the boosting step and needs no ordering argument. Part of the Randomized Conversion Theorem: the Conversion Theorem (counting ⇒ sampling descent) extended to every randomized bounded-variance attention algorithm via median-of-means boosting, a union bound over the 2n descent nodes, and ε-smoothing of each node; closes the residual scalability crux of the Attention Compute Law.
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.