Proveddrift-lawdecodechi-squareheadline-theorem
Drift cost by oscillation: if the score drift δ = t − s has oscillation ≤ Δ then 1+χ²(π_t‖π_s) ≤ cosh²(Δ/2); under |δ| ≤ η this is ≤ cosh²η
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
- s, t range over J → ℝ: the statement must hold for every choice. (
(s t : J → ℝ)) - x ∈ TVariables
- Δ, η range over real numbers: the statement must hold for every choice. (
(Δ η : ℝ)) - ∀For all
- The statement after the comma holds for every i, j. (
∀ i j, (t i - s i) - (t j - s j) ≤ Δ) - ∧And
- Both hold: (∑ j, (exp(t(j))/(∑ k, exp(t(k))))^2/(exp(s(j))/(∑ k, exp(…, and (∀ j, |t(j) − s(j)| ≤ η) → (∑ j, (exp(t(j))/(∑ k, exp(t(k)…. (
∑ j, (Real.exp (t j) / ∑ k, Real.exp (t…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - aᵇPower
- exp(t(j))/(∑ k, exp(t(k))) raised to the power 2. (
(Real.exp (t j) / ∑ k, Real.exp (t k)) …) - eˣExponential function
- e raised to the power t(j), where e ≈ 2.718. (
Real.exp (t j)) - a/bDivision
- exp(t(j)) divided by ∑ k, exp(t(k)). In Lean, dividing by 0 gives 0. (
Real.exp (t j) / ∑ k, Real.exp (t k)) - ≤At most
- t(i) − s(i) − (t(j) − s(j)) is less than or equal to Δ. (
(t i - s i) - (t j - s j) ≤ Δ) - -Subtraction
- t(i) minus s(i). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
t i - s i) - ∑Summation
- Add up exp(t(k)) for every k. (
∑ k, Real.exp (t k)) - coshHyperbolic cosine
- (eˣ + e⁻ˣ)/2 at Δ/2. (
Real.cosh (Δ / 2)) - |x|Absolute value
- The size of t(j) − s(j) without its sign. (
|t j - s j|)
theorem drift-oscillation-cosh-bound {J : Type} [Fintype J] [Nonempty J] (s t : J → ℝ) (Δ η : ℝ) (hΔ : ∀ i j, (t i - s i) - (t j - s j) ≤ Δ) :
∑ j, (Real.exp (t j) / ∑ k, Real.exp (t k)) ^ 2 / (Real.exp (s j) / ∑ k, Real.exp (s k)) ≤ Real.cosh (Δ / 2) ^ 2 ∧ ((∀ j, |t j - s j| ≤ η) → ∑ j, (Real.exp (t j) / ∑ k, Real.exp (t k)) ^ 2 / (Real.exp (s j) / ∑ k, Real.exp (s k)) ≤ Real.cosh η ^ 2)A common score shift changes no softmax row, so the right drift measure is the oscillation max δ − min δ. This sharpens the SNIS factor bound e^{2η} of drift-snis-dominates-rejection to cosh²η (1.27 instead of 2.72 at η = 0.5). It bounds the importance-sampling second-moment factor only; the rejection envelope (expected draws) is a different quantity. It also gives the operational sampleability condition: a score approximation s̃ with osc(s − s̃) ≤ Δ has C(softmax s ‖ softmax s̃) ≤ cosh²(Δ/2). From an external review, 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
- 73 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.