Provedproposal-principleattentionunifiedcrux
CONVERSION THEOREM (one statement): an additively ε-accurate branch-mass oracle on the key tree yields a smoothed proposal r that is a distribution with π_b ≤ (1+2ε)^L r_b and Σπ_b²/r_b ≤ (1+2ε)^L
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. (
ℕ) - ∀For all
- The statement after the comma holds for every b. (
∀ b, 0 ≤ π b) - ∑Summation
- Add up π(b) for every b. (
∑ b, π b) - =Equality
- ∑ b, π(b) and 1 are the same. (
∑ b, π b = 1) - <Less than
- 0 is strictly smaller than ε. (
0 < ε) - x : TVariables
- pt, Q range over ℕ → (Fin L → Bool) → ℝ: the statement must hold for every choice. (
(pt Q : ℕ → (Fin L → Bool) → ℝ)) - 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 L. Lean writes f x; papers write f(x). (
Fin L) - ⟹Implies
- If Fin(L), then Bool. (Between types, A → B is the type of functions from A to B.) (
Fin L → Bool) - ≤At most
- 0 is less than or equal to π(b). (
0 ≤ π b) - Bool
- Bool: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Bool) - πPi
- The ratio of a circle's circumference to its diameter, ≈ 3.14159. (
π) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - maxMaximum
- The larger of 0 and min(1, phat(ℓ, b)). (
max 0 (min 1 (phat ℓ b))) - ∏Product
- Multiply together Q(ℓ, b) for ℓ = 0, 1, …, L − 1. (
∏ ℓ ∈ Finset.range L, Q ℓ b) - minMinimum
- The smaller of 1 and phat(ℓ, b). (
min 1 (phat ℓ b)) - then
- then: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
then) - |x|Absolute value
- The size of phat(ℓ, b) − m(ℓ + 1, update(b, ⟨ℓ, h⟩, true))/m(ℓ, b) without its sign. (
|phat ℓ b - m (ℓ + 1) (Function.update …) - -Subtraction
- phat(ℓ, b) minus m(ℓ + 1, update(b, ⟨ℓ, h⟩, true))/m(ℓ, b). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
phat ℓ b - m (ℓ + 1) (Function.update b…) - { a if c; b otherwiseCases (if … then … else)
- π(b') when ∀ i, i < ℓ → b'(i) = b(i), and 0 otherwise. (
if (∀ i : Fin L, (i : ℕ) < ℓ → b' i = b…) - a/bDivision
- m(ℓ + 1, update(b, ⟨ℓ, h⟩, true)) divided by m(ℓ, b). In Lean, dividing by 0 gives 0. (
m (ℓ + 1) (Function.update b ⟨ℓ, h⟩ tru…) - +Addition
- ℓ plus 1. (
ℓ + 1) - (x : T)As natural numbers
- i read as an element of natural numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(i : ℕ)) - update
- Function.update: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Function.update) - ·Multiplication
- 2 times ε. (
2 * ε) - ∧And
- Both hold: ∀ b, π(b) ≤ (1 + 2 · ε)^L · (∏ ℓ, Q(ℓ, b)), and (∑ b, π(b)^2/(∏ ℓ, Q(ℓ, b))) ≤ (1 + 2 · ε)^L. (
(∀ b, π b ≤ (1 + 2 * ε) ^ L * ∏ ℓ ∈ Fin…) - aᵇPower
- 1 + 2 · ε raised to the power L. (
(1 + 2 * ε) ^ L) - ⟨a, b⟩Anonymous constructor
- Builds a structure (a pair, a subtype element, …) from ℓ, h. (
⟨ℓ, h⟩) - true
- true: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
true)
theorem cv-conversion-theorem {L : ℕ} (π : (Fin L → Bool) → ℝ) (hπ : ∀ b, 0 ≤ π b) (hπs : ∑ b, π b = 1) (ε : ℝ) (hε : 0 < ε) (m : ℕ → (Fin L → Bool) → ℝ) (hm : ∀ ℓ b, m ℓ b = ∑ b' : Fin L → Bool, (if (∀ i : Fin L, (i : ℕ) < ℓ → b' i = b i) then π b' else 0)) (phat : ℕ → (Fin L → Bool) → ℝ) (hpre : ∀ ℓ (b b' : Fin L → Bool), (∀ i : Fin L, (i : ℕ) < ℓ → b i = b' i) → phat ℓ b = phat ℓ b') (hacc : ∀ ℓ (h : ℓ < L) b, 0 < m ℓ b → |phat ℓ b - m (ℓ + 1) (Function.update b ⟨ℓ, h⟩ true) / m ℓ b| ≤ ε) (pt Q : ℕ → (Fin L → Bool) → ℝ) (hpt : ∀ ℓ b, pt ℓ b = (max 0 (min 1 (phat ℓ b)) + ε) / (1 + 2 * ε)) (hQ : ∀ ℓ b, Q ℓ b = if h : ℓ < L then (if b ⟨ℓ, h⟩ then pt ℓ b else 1 - pt ℓ b) else 1) :
(∑ b : Fin L → Bool, ∏ ℓ ∈ Finset.range L, Q ℓ b = 1) ∧ (∀ b, π b ≤ (1 + 2 * ε) ^ L * ∏ ℓ ∈ Finset.range L, Q ℓ b) ∧ ∑ b : Fin L → Bool, π b ^ 2 / ∏ ℓ ∈ Finset.range L, Q ℓ b ≤ (1 + 2 * ε) ^ LThe crux half of the Proposal Principle, fully assembled: oracle phat (depends only on the node's prefix; |phat − conditional mass| ≤ ε), pt = (clip phat + ε)/(1+2ε), Q ℓ b = pt or 1−pt by the bit of b, r b = ∏_ℓ Q ℓ b. Inlines cv-end-to-end-abstract, cv-tree-proposal-sums-to-one, cv-node-mass-inheritance and cv-prefix-masses. With L = ⌈log₂ n⌉ and ε = 1/L the χ² factor is ≤ e² (cv-log-depth-constant), so any accuracy-scalable attention algorithm converts into a proposal scheme with polylog loss. Technique: Jerrum–Valiant–Vazirani counting ⇒ sampling, credited. Part of 'The Proposal Principle: attention complexity is proposal complexity'.
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
- 234 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.