proofs
Proveddrift-lawdecodesnapshot-reuseattention-compute-law

Per-token traffic with refresh: (n + N S)/T ≤ n/T + N(1 + (e−1)c(T+1)) given the window bound S

For all n,N,c∈R\htmlData{mx=1}{n, N, c \in \htmlData{mx=0}{\mathbb{R}}}, T∈N\htmlData{mx=1}{T \in \htmlData{mx=0}{\mathbb{N}}} and S∈R\htmlData{mx=1}{S \in \htmlData{mx=0}{\mathbb{R}}}, if 0<T0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{T}, 0≤N0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{N} and S≤T+(e1−1)⋅c⋅(T⋅(T+1))\htmlData{mx=0}{S} \mathrel{\htmlData{mx=12}{\leq}} \htmlData{mx=11}{\htmlData{mx=1}{T} + \htmlData{mx=10}{\htmlData{mx=5}{(\htmlData{mx=3}{\htmlData{mx=2}{e^{1}} - 1}) \cdot \htmlData{mx=4}{c}} \cdot (\htmlData{mx=9}{\htmlData{mx=6}{T} \cdot (\htmlData{mx=8}{\htmlData{mx=7}{T} + 1})})}}, then

n+N⋅ST≤nT+N⋅(1+(e1−1)⋅c⋅(T+1))\htmlData{mx=6}{\frac{\htmlData{mx=4}{\htmlData{mx=0}{n} + \htmlData{mx=3}{\htmlData{mx=1}{N} \cdot \htmlData{mx=2}{S}}}}{\htmlData{mx=5}{T}}} \mathrel{\htmlData{mx=21}{\leq}} \htmlData{mx=20}{\htmlData{mx=9}{\frac{\htmlData{mx=7}{n}}{\htmlData{mx=8}{T}}} + \htmlData{mx=19}{\htmlData{mx=10}{N} \cdot (\htmlData{mx=18}{1 + \htmlData{mx=17}{\htmlData{mx=14}{(\htmlData{mx=12}{\htmlData{mx=11}{e^{1}} - 1}) \cdot \htmlData{mx=13}{c}} \cdot (\htmlData{mx=16}{\htmlData{mx=15}{T} + 1})}})}}
What the notation means · or point at any symbol
RReal numbers
The real numbers: every point on the number line. (ℝ)
x ∈ TVariables
n, N, c range over real numbers: the statement must hold for every choice. ((n N c : ℝ))
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
<Less than
0 is strictly smaller than T. (0 < T)
≤At most
0 is less than or equal to N. (0 ≤ N)
a/bDivision
n + N · S divided by T. In Lean, dividing by 0 gives 0. ((n + N * S) / T)
·Multiplication
exp(1) − 1 times c. ((Real.exp 1 - 1) * c)
eˣExponential function
e raised to the power 1, where e ≈ 2.718. (Real.exp 1)
-Subtraction
exp(1) minus 1. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (Real.exp 1 - 1)
+Addition
T plus 1. (T + 1)

Combines the refresh pass and N rejection draws per token into a per-token K/V traffic bound. 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
16 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements