proofs
Proveddrift-lawdecodesnapshot-reuseattention-compute-law

Tilt ratio bounds: if every score moved by at most η then e^{−η} ≤ Z_t/Z_s ≤ e^{η}

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

e−η≤∑ket(k)∑kes(k)∧∑ket(k)∑kes(k)≤eη\begin{aligned} & \htmlData{mx=3}{e^{\htmlData{mx=2}{-\htmlData{mx=1}{\eta}}}} \mathrel{\htmlData{mx=15}{\leq}} \htmlData{mx=14}{\frac{\htmlData{mx=8}{\sum_{k} \htmlData{mx=7}{e^{\htmlData{mx=6}{\htmlData{mx=4}{t}(\htmlData{mx=5}{k})}}}}}{\htmlData{mx=13}{\sum_{k} \htmlData{mx=12}{e^{\htmlData{mx=11}{\htmlData{mx=9}{s}(\htmlData{mx=10}{k})}}}}}} \\ & \htmlData{mx=0}{\land} \htmlData{mx=26}{\frac{\htmlData{mx=20}{\sum_{k} \htmlData{mx=19}{e^{\htmlData{mx=18}{\htmlData{mx=16}{t}(\htmlData{mx=17}{k})}}}}}{\htmlData{mx=25}{\sum_{k} \htmlData{mx=24}{e^{\htmlData{mx=23}{\htmlData{mx=21}{s}(\htmlData{mx=22}{k})}}}}}} \mathrel{\htmlData{mx=29}{\leq}} \htmlData{mx=28}{e^{\htmlData{mx=27}{\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| ≤ η)
eˣExponential function
e raised to the power −η, where e ≈ 2.718. (Real.exp (-η))
∧And
Both hold: exp(−η) ≤ (∑ k, exp(t(k)))/(∑ k, exp(s(k))), and (∑ k, exp(t(k)))/(∑ k, exp(s(k))) ≤ exp(η). (Real.exp (-η) ≤ (∑ k, Real.exp (t 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)
−xNegation
The negative of η. (-η)
a/bDivision
∑ k, exp(t(k)) divided by ∑ k, exp(s(k)). In Lean, dividing by 0 gives 0. ((∑ k, Real.exp (t k)) / ∑ k, Real.exp (…)
∑Summation
Add up exp(t(k)) for every k. (∑ k, Real.exp (t k))

The normaliser-ratio estimator has bounded relative variance, so the new-key combination is debiasable by MLMC at constant cost. Part of 'The Drift Law: decode K/V traffic is set by how far the query drifts' (exact snapshot reuse at decode).

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

More proved statements