proofs
Provedrandomized-conversionconversion-theoremattention-compute-lawmedian-of-means

Union bound on a finite probability space: N events of mass ≤ q each have union of mass ≤ N q

For all Ω∈Type⁡\htmlData{mx=1}{\Omega \in \htmlData{mx=0}{\operatorname{Type}}}, N∈N\htmlData{mx=1}{N \in \htmlData{mx=0}{\mathbb{N}}}, w:Ω→R\htmlData{mx=3}{w : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, E:Fin⁡ N→Ω→Prop⁡\htmlData{mx=7}{E : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{N}} \mathrel{\htmlData{mx=6}{\to}} \htmlData{mx=3}{\Omega} \mathrel{\htmlData{mx=5}{\to}} \htmlData{mx=4}{\operatorname{Prop}}} and q∈R\htmlData{mx=1}{q \in \htmlData{mx=0}{\mathbb{R}}}, if ∀ω, 0≤w(ω)\htmlData{mx=4}{\forall \omega,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}} and ∀i, ∑ω∈filter⁡(E(i))w(ω)≤q\htmlData{mx=11}{\forall i,\ \htmlData{mx=8}{\sum_{\omega \in \htmlData{mx=4}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=3}{\htmlData{mx=1}{E}(\htmlData{mx=2}{i})})}} \htmlData{mx=7}{\htmlData{mx=5}{w}(\htmlData{mx=6}{\omega})}} \mathrel{\htmlData{mx=10}{\leq}} \htmlData{mx=9}{q}} (given Fintype⁡ Ω\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega}} and ∀i, DecidablePred⁡ E(i)\htmlData{mx=5}{\forall i,\ \htmlData{mx=4}{\htmlData{mx=0}{\operatorname{DecidablePred}}\,\htmlData{mx=3}{\htmlData{mx=1}{E}(\htmlData{mx=2}{i})}}}), then

∑ω∈filter⁡(ω↦∃i, E(i,ω))w(ω)≤N⋅q\htmlData{mx=11}{\sum_{\omega \in \htmlData{mx=7}{\htmlData{mx=0}{\operatorname{filter}}(\htmlData{mx=6}{\omega \mapsto \htmlData{mx=5}{\exists i,\ \htmlData{mx=4}{\htmlData{mx=1}{E}(\htmlData{mx=2}{i}, \htmlData{mx=3}{\omega})}}})}} \htmlData{mx=10}{\htmlData{mx=8}{w}(\htmlData{mx=9}{\omega})}} \mathrel{\htmlData{mx=15}{\leq}} \htmlData{mx=14}{\htmlData{mx=12}{N} \cdot \htmlData{mx=13}{q}}
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 Ω)
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
⟹Implies
If Ω, then ℝ. (Between types, A → B is the type of functions from A to B.) (Ω → ℝ)
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)
∀For all
The statement after the comma holds for every i. (∀ i, DecidablePred (E i))
RReal numbers
The real numbers: every point on the number line. (ℝ)
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 w(ω). (0 ≤ w ω)
∑Summation
Add up w(ω) for each ω in filter(E(i)). (∑ ω ∈ Finset.univ.filter (E i), 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)
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)
x ↦ f(x)Function (λ-abstraction)
The function sending ω to ∃ i, E(i, ω). Lean writes fun x => …; papers write x ↦ …. (fun ω => ∃ i, E i ω)
∃There exists
At least one i makes the statement after the comma true. (∃ i, E i ω)
·Multiplication
N times q. (N * q)

Used over the 2n nodes of the descent tree: if each boosted node estimate fails with probability ≤ q, all nodes are simultaneously accurate except with probability ≤ 2n q. 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
29 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements