Provedbalanced-conversionconversion-theoremattention-compute-lawlower-bound
Balanced split or heavy key: if every key has mass ≤ 3/4, some prefix has mass in [1/8, 7/8]
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. (
ℕ) - ⟹Implies
- If ℕ, then ℝ. (Between types, A → B is the type of functions from A to B.) (
ℕ → ℝ) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 ≤ m j) - ∑Summation
- Add up m(j) for j = 0, 1, …, n − 1. (
∑ j ∈ Finset.range n, m j) - =Equality
- ∑ j, m(j) and 1 are the same. (
∑ j ∈ Finset.range n, m j = 1) - ∃There exists
- At least one i makes the statement after the comma true. (
∃ i, i ≤ n ∧ 1 / 8 ≤ ∑ j ∈ Finset.range…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - ≤At most
- 0 is less than or equal to m(j). (
0 ≤ m j) - <Less than
- j is strictly smaller than n. (
j < n) - f(x)Function application
- m applied to j. Lean writes f x; papers write f(x). (
m j) - ∧And
- Both hold: 1/8 ≤ (∑ j, m(j)), and (∑ j, m(j)) ≤ 7/8. (
1 / 8 ≤ ∑ j ∈ Finset.range i, m j ∧ ∑ j…) - a/bDivision
- 3 divided by 4. In Lean, dividing by 0 gives 0. (
3 / 4)
theorem bc2-balanced-prefix-exists (n : ℕ) (m : ℕ → ℝ) (hm : ∀ j, 0 ≤ m j) (hsum : ∑ j ∈ Finset.range n, m j = 1) (hmax : ∀ j, j < n → m j ≤ 3 / 4) :
∃ i, i ≤ n ∧ 1 / 8 ≤ ∑ j ∈ Finset.range i, m j ∧ ∑ j ∈ Finset.range i, m j ≤ 7 / 8The mass-balanced descent always finds a balanced prefix split by binary search on prefix masses unless a single key is heavy (mass > 3/4), in which case that key exits as a leaf. Part of Balanced Conversion: the Conversion Theorem's two-way descent factor is exactly 1 + (p−q)²/(q(1−q)), so additive oracle error is second order at mass-balanced nodes; a mass-balanced descent converts any deterministic additive-ε oracle with loss n^{O(ε²)}, and the biased product family shows this is tight. Quantifies the last residual class 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
- 28 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.