Provedsampleability-lawself-certifying-proposalimportance-samplingattention-compute-law
Proposal objective is convex: θ ↦ log Σ a_j e^{θ f_j} is midpoint-convex (Cauchy–Schwarz), for positive weights a
For all , and , if (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 J. Lean writes f x; papers write f(x). (
Fintype J) - 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 J, then ℝ. (Between types, A → B is the type of functions from A to B.) (
J → ℝ) - x : TVariables
- a, f range over J → ℝ: the statement must hold for every choice. (
(a f : J → ℝ)) - x ∈ TVariables
- θ, φ range over real numbers: the statement must hold for every choice. (
(θ φ : ℝ)) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 < a j) - logNatural logarithm
- The logarithm of ∑ j, a(j) · exp((θ + φ)/2 · f(j)) to base e: the power e must be raised to to give ∑ j, a(j) · exp((θ + φ)/2 · f(j)). (
Real.log (∑ j, a j * Real.exp ((θ + φ) …) - ≤At most
- log(∑ j, a(j) · exp((θ + φ)/2 · f(j))) is less than or equal to (log(∑ j, a(j) · exp(θ · f(j))) + log(∑ j, a(j) · exp(φ · …. (
Real.log (∑ j, a j * Real.exp ((θ + φ) …) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - <Less than
- 0 is strictly smaller than a(j). (
0 < a j) - ∑Summation
- Add up a(j) · exp((θ + φ)/2 · f(j)) for every j. (
∑ j, a j * Real.exp ((θ + φ) / 2 * f j)) - eˣExponential function
- e raised to the power (θ + φ)/2 · f(j), where e ≈ 2.718. (
Real.exp ((θ + φ) / 2 * f j)) - a/bDivision
- θ + φ divided by 2. In Lean, dividing by 0 gives 0. (
(θ + φ) / 2) - ·Multiplication
- (θ + φ)/2 times f(j). (
(θ + φ) / 2 * f j) - +Addition
- θ plus φ. (
θ + φ)
theorem sc-log-sum-exp-midpoint-convex {J : Type} [Fintype J] [Nonempty J] (a f : J → ℝ) (θ φ : ℝ) (ha : ∀ j, 0 < a j) :
Real.log (∑ j, a j * Real.exp ((θ + φ) / 2 * f j)) ≤ (Real.log (∑ j, a j * Real.exp (θ * f j)) + Real.log (∑ j, a j * Real.exp (φ * f j))) / 2Makes the convexity in sc-log-cost-exponential-family formal: each log-sum-exp term of the log cost of a score-shaped proposal is midpoint-convex, hence (with continuity) convex, so gradient training of the proposal has no spurious local minima. Part of 'The Sampleability Law: a transformer can be trained to make its own attention cheap to sample, and the samples certify the saving' (self-certifying learned proposals inside 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
- 30 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.