Provedrandomized-conversionconversion-theoremattention-compute-lawmedian-of-means
Randomized Conversion Theorem (assembly): E[χ²] ≤ (1+2ε)^L + δ (L+2)^L for the proposal synthesised from a randomized oracle
For all , , , and , if , , , , and (given and ), then
What the notation means · or point at any symbol
- 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 Ω) - ⟹Implies
- If Ω, then ℝ. (Between types, A → B is the type of functions from A to B.) (
Ω → ℝ) - x : TVariables
- w, chi range over Ω → ℝ: the statement must hold for every choice. (
(w chi : Ω → ℝ)) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - x ∈ TVariables
- ε, δ range over real numbers: the statement must hold for every choice. (
(ε δ : ℝ)) - DecidablePred
- DecidablePred: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
DecidablePred) - ≤At most
- 0 is less than or equal to ε. (
0 ≤ ε) - ∀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) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - Prop
- Prop: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Prop) - 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 : T)As real numbers
- L read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(L : ℝ)) - aᵇPower
- 1 + 2 · ε raised to the power L. (
(1 + 2 * ε) ^ L) - +Addition
- 1 plus 2 · ε. (
1 + 2 * ε) - x ↦ f(x)Function (λ-abstraction)
- The function sending ω to ¬good(ω). Lean writes fun x => …; papers write x ↦ …. (
fun ω => ¬ good ω) - ·Multiplication
- 2 times ε. (
2 * ε) - ¬Not
- It is not the case that good(ω). (
¬ good ω)
theorem rc-randomized-conversion-theorem {Ω : Type} [Fintype Ω] (w chi : Ω → ℝ) (L : ℕ) (ε δ : ℝ) (good : Ω → Prop) [DecidablePred good] (hε : 0 ≤ ε) (hw : ∀ ω, 0 ≤ w ω) (hsum : ∑ ω, w ω = 1) (hgood : ∀ ω, good ω → chi ω ≤ (1 + 2 * ε) ^ L) (hbad : ∀ ω, chi ω ≤ ((L : ℝ) + 2) ^ L) (hδ : ∑ ω ∈ Finset.univ.filter (fun ω => ¬ good ω), w ω ≤ δ) :
∑ ω, w ω * chi ω ≤ (1 + 2 * ε) ^ L + δ * ((L : ℝ) + 2) ^ LOn the good event (all boosted node estimates within factor 1+ε) the deterministic Conversion Theorem gives χ² ≤ (1+2ε)^L; off it the smoothing floor gives χ² ≤ (L+2)^L; the good event has mass ≥ 1−δ. Hence E[χ²] ≤ (1+2ε)^L + δ (L+2)^L. 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
- 35 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.