Variational cost law: over proposals r, (Σ_j √(E[a_j] c_j))² ≤ (Σ_j r_j c_j)·E[Σ_j a_j/r_j], attained by r_j ∝ √(E[a_j]/c_j)
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) - x ∈ TVariables
- I, J range over Type: the statement must hold for every choice. (
(I J : 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 I. Lean writes f x; papers write f(x). (
Fintype I) - Nonempty
- Nonempty: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Nonempty) - ⟹Implies
- If I, then ℝ. (Between types, A → B is the type of functions from A to B.) (
I → ℝ) - x : TVariables
- c, r range over J → ℝ: the statement must hold for every choice. (
(c r : J → ℝ)) - ∀For all
- The statement after the comma holds for every i. (
∀ i, 0 ≤ lam i) - aᵇPower
- ∑ j, √((∑ i, lam(i) · a(i, j)) · c(j)) raised to the power 2. (
(∑ j, Real.sqrt ((∑ i, lam i * a i j) *…) - ∧And
- Both hold: (∑ j, √((∑ i, lam(i) · a(i, j)) · c(j)))^2 ≤ (∑ j, r(j) · …, and (∀ j, 0 < (∑ i, lam(i) · a(i, j))) → (∑ j, √((∑ i, lam(i) …. (
(∑ j, Real.sqrt ((∑ i, lam i * a i j) *…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - ≤At most
- 0 is less than or equal to lam(i). (
0 ≤ lam i) - <Less than
- 0 is strictly smaller than c(j). (
0 < c j) - √Square root
- The non-negative number whose square is (∑ i, lam(i) · a(i, j)) · c(j). (
Real.sqrt ((∑ i, lam i * a i j) * c j)) - ∑Summation
- Add up lam(i) · a(i, j) for every i. (
∑ i, lam i * a i j) - ·Multiplication
- lam(i) times a(i, j). (
lam i * a i j) - a/bDivision
- a(i, j) divided by r(j). In Lean, dividing by 0 gives 0. (
a i j / r j) - =Equality
- (∑ j, √((∑ i, lam(i) · a(i, j))/c(j))/(∑ k, √((∑ i, lam(i)… and (∑ j, √((∑ i, lam(i) · a(i, j)) · c(j)))^2 are the same. (
(∑ j, (Real.sqrt ((∑ i, lam i * a i j) …)
theorem vcl-bayes-optimal-proposal {I J : Type} [Fintype I] [Fintype J] [Nonempty J] (lam : I → ℝ) (a : I → J → ℝ) (c r : J → ℝ) (hlam : ∀ i, 0 ≤ lam i) (ha : ∀ i j, 0 ≤ a i j) (hc : ∀ j, 0 < c j) (hr : ∀ j, 0 < r j) :
(∑ j, Real.sqrt ((∑ i, lam i * a i j) * c j)) ^ 2 ≤ (∑ j, r j * c j) * ∑ i, lam i * ∑ j, a i j / r j ∧ ((∀ j, 0 < ∑ i, lam i * a i j) → (∑ j, (Real.sqrt ((∑ i, lam i * a i j) / c j) / ∑ k, Real.sqrt ((∑ i, lam i * a i k) / c k)) * c j) * ∑ i, lam i * ∑ j, a i j / (Real.sqrt ((∑ i, lam i * a i j) / c j) / ∑ k, Real.sqrt ((∑ i, lam i * a i k) / c k)) = (∑ j, Real.sqrt ((∑ i, lam i * a i j) * c j)) ^ 2)The single law behind every proposal scheme in the programme. For a row drawn from any finite prior (weights λ_i over rows), any nonnegative per-key weights a_ij (a = π² for the output cost factor; a = π²‖v − g‖² for a residual estimator; a = Σ_h π_h² for a shared head group) and any per-key access cost c_j > 0, every proposal r has (expected access cost) × (expected second-moment factor) at least (Σ_j √(E[a_j] c_j))², and r_j ∝ √(E[a_j]/c_j) attains it. With c ≡ 1 the least expected cost factor of any proposal built from side information T is (Σ_j √E[π_j² | T])², attained by the square root of the posterior second moment. Proof: Cauchy–Schwarz after exchanging the two sums. Reformulation from first principles, 2026-10-05.
How it was proved
- Proved
- 5 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
- 72 lines of Lean