proofs
Proveddrift-lawdecodesnapshot-reuseimportance-sampling

SNIS dominates rejection for snapshot reuse: cost factor 1+χ²(π_t‖π_s) = Z_s Z_{2t−s}/Z_t² ≤ 1/p_acc = e^η Z_s/Z_t ≤ e^{2η} under tilt ≤ η

For all J∈Type⁡\htmlData{mx=1}{J \in \htmlData{mx=0}{\operatorname{Type}}}, s,t:J→R\htmlData{mx=3}{s, t : \htmlData{mx=0}{J} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}} and η∈R\htmlData{mx=1}{\eta \in \htmlData{mx=0}{\mathbb{R}}}, if ∀j, ∣t(j)−s(j)∣≤η\htmlData{mx=10}{\forall j,\ \htmlData{mx=7}{\left\lvert \htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{t}(\htmlData{mx=1}{j})} - \htmlData{mx=5}{\htmlData{mx=3}{s}(\htmlData{mx=4}{j})}} \right\rvert} \mathrel{\htmlData{mx=9}{\leq}} \htmlData{mx=8}{\eta}} (given Fintype⁡ J\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{J}} and Nonempty⁡ J\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Nonempty}}\,\htmlData{mx=1}{J}}), then

(∑kes(k))⋅(∑ke2t(k)−s(k))(∑ket(k))2≤1e−η⋅(∑ket(k))∑kes(k)∧1e−η⋅(∑ket(k))∑kes(k)≤e2η\begin{aligned} & \htmlData{mx=24}{\frac{\htmlData{mx=17}{\left(\htmlData{mx=6}{\sum_{k} \htmlData{mx=5}{e^{\htmlData{mx=4}{\htmlData{mx=2}{s}(\htmlData{mx=3}{k})}}}}\right) \cdot \left(\htmlData{mx=16}{\sum_{k} \htmlData{mx=15}{e^{\htmlData{mx=14}{\htmlData{mx=10}{2\htmlData{mx=9}{\htmlData{mx=7}{t}(\htmlData{mx=8}{k})}} - \htmlData{mx=13}{\htmlData{mx=11}{s}(\htmlData{mx=12}{k})}}}}}\right)}}{\htmlData{mx=23}{\left(\htmlData{mx=22}{\sum_{k} \htmlData{mx=21}{e^{\htmlData{mx=20}{\htmlData{mx=18}{t}(\htmlData{mx=19}{k})}}}}\right)^{2}}}} \\ & \quad \htmlData{mx=1}{\leq} \htmlData{mx=40}{\frac{1}{\htmlData{mx=39}{\frac{\htmlData{mx=33}{\htmlData{mx=27}{e^{\htmlData{mx=26}{-\htmlData{mx=25}{\eta}}}} \cdot \left(\htmlData{mx=32}{\sum_{k} \htmlData{mx=31}{e^{\htmlData{mx=30}{\htmlData{mx=28}{t}(\htmlData{mx=29}{k})}}}}\right)}}{\htmlData{mx=38}{\sum_{k} \htmlData{mx=37}{e^{\htmlData{mx=36}{\htmlData{mx=34}{s}(\htmlData{mx=35}{k})}}}}}}}} \\ & \htmlData{mx=0}{\land} \htmlData{mx=56}{\frac{1}{\htmlData{mx=55}{\frac{\htmlData{mx=49}{\htmlData{mx=43}{e^{\htmlData{mx=42}{-\htmlData{mx=41}{\eta}}}} \cdot \left(\htmlData{mx=48}{\sum_{k} \htmlData{mx=47}{e^{\htmlData{mx=46}{\htmlData{mx=44}{t}(\htmlData{mx=45}{k})}}}}\right)}}{\htmlData{mx=54}{\sum_{k} \htmlData{mx=53}{e^{\htmlData{mx=52}{\htmlData{mx=50}{s}(\htmlData{mx=51}{k})}}}}}}}} \mathrel{\htmlData{mx=60}{\leq}} \htmlData{mx=59}{e^{\htmlData{mx=58}{2\htmlData{mx=57}{\eta}}}} \end{aligned}
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 → ℝ))
∀For all
The statement after the comma holds for every j. (∀ j, |t j - s j| ≤ η)
a/bDivision
(∑ k, exp(s(k))) · (∑ k, exp(2 · t(k) − s(k))) divided by (∑ k, exp(t(k)))^2. In Lean, dividing by 0 gives 0. ((∑ k, Real.exp (s k)) * (∑ k, Real.exp …)
∧And
Both hold: (∑ k, exp(s(k))) · (∑ k, exp(2 · t(k) − s(k)))/(∑ k, exp(t…, and 1/(exp(−η) · (∑ k, exp(t(k)))/(∑ k, exp(s(k)))) ≤ exp(2 · η). ((∑ k, Real.exp (s k)) * (∑ k, Real.exp …)
∑Summation
Add up exp(s(k)) for every k. (∑ k, Real.exp (s k))
RReal numbers
The real numbers: every point on the number line. (ℝ)
|x|Absolute value
The size of t(j) − s(j) without its sign. (|t j - s j|)
≤At most
|t(j) − s(j)| is less than or equal to η. (|t j - s j| ≤ η)
-Subtraction
t(j) minus s(j). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (t j - s j)
eˣExponential function
e raised to the power s(k), where e ≈ 2.718. (Real.exp (s k))
·Multiplication
2 times t(k). (2 * t k)
aᵇPower
∑ k, exp(t(k)) raised to the power 2. ((∑ k, Real.exp (t k)) ^ 2)
−xNegation
The negative of η. (-η)

For decode reuse from a stale snapshot with tilt |t − s| ≤ η, self-normalised importance sampling (made unbiased by MLMC, cost self-certified) uses every draw, at cost factor 1+χ² = Z_s Z_{2t−s}/Z_t², while rejection keeps only accepted draws and needs 1/p_acc = e^η Z_s/Z_t draws per exact sample. Since Z_{2t−s} = Σ_j e^{t_j}e^{t_j−s_j} ≤ e^η Z_t, we get 1+χ² ≤ 1/p_acc ≤ e^{2η}: at equal variance the SNIS variant reads no more keys than rejection, and the gap can be large when the drift is concentrated on low-mass keys. The general comparison of importance sampling with rejection sampling is classical (Liu, Statistics and Computing 1996, credited); this is its specialisation to snapshot reuse in the Drift Law. Trade-off: rejection gives exact samples (one-pass gradient), SNIS needs the MLMC correction and the three-call gradient.

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
41 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements