proofs
Provedfisher-cover-lawdecode-attentionexponential-familylaw

Exponential-family χ²: reusing snapshot π_q for π_{q+Δ} costs Σ π_{q+Δ}²/π_q = Z(q) Z(q+2Δ)/Z(q+Δ)²

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}} and a,d:Fin⁡ n→R\htmlData{mx=5}{a, d : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, if 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n}, then

∑j(ea(j)+d(j)∑kea(k)+d(k))2ea(j)∑kea(k)=(∑kea(k))⋅(∑kea(k)+2d(k))(∑kea(k)+d(k))2\begin{aligned} & \htmlData{mx=31}{\sum_{j} \htmlData{mx=30}{\frac{\htmlData{mx=19}{\left(\htmlData{mx=18}{\frac{\htmlData{mx=8}{e^{\htmlData{mx=7}{\htmlData{mx=3}{\htmlData{mx=1}{a}(\htmlData{mx=2}{j})} + \htmlData{mx=6}{\htmlData{mx=4}{d}(\htmlData{mx=5}{j})}}}}}{\htmlData{mx=17}{\sum_{k} \htmlData{mx=16}{e^{\htmlData{mx=15}{\htmlData{mx=11}{\htmlData{mx=9}{a}(\htmlData{mx=10}{k})} + \htmlData{mx=14}{\htmlData{mx=12}{d}(\htmlData{mx=13}{k})}}}}}}}\right)^{2}}}{\htmlData{mx=29}{\frac{\htmlData{mx=23}{e^{\htmlData{mx=22}{\htmlData{mx=20}{a}(\htmlData{mx=21}{j})}}}}{\htmlData{mx=28}{\sum_{k} \htmlData{mx=27}{e^{\htmlData{mx=26}{\htmlData{mx=24}{a}(\htmlData{mx=25}{k})}}}}}}}}} \\ & \quad \htmlData{mx=0}{=} \htmlData{mx=58}{\frac{\htmlData{mx=47}{\left(\htmlData{mx=36}{\sum_{k} \htmlData{mx=35}{e^{\htmlData{mx=34}{\htmlData{mx=32}{a}(\htmlData{mx=33}{k})}}}}\right) \cdot \left(\htmlData{mx=46}{\sum_{k} \htmlData{mx=45}{e^{\htmlData{mx=44}{\htmlData{mx=39}{\htmlData{mx=37}{a}(\htmlData{mx=38}{k})} + \htmlData{mx=43}{2\htmlData{mx=42}{\htmlData{mx=40}{d}(\htmlData{mx=41}{k})}}}}}}\right)}}{\htmlData{mx=57}{\left(\htmlData{mx=56}{\sum_{k} \htmlData{mx=55}{e^{\htmlData{mx=54}{\htmlData{mx=50}{\htmlData{mx=48}{a}(\htmlData{mx=49}{k})} + \htmlData{mx=53}{\htmlData{mx=51}{d}(\htmlData{mx=52}{k})}}}}}\right)^{2}}}} \end{aligned}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
Fin
Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Fin)
f(x)Function application
Fin applied to n. Lean writes f x; papers write f(x). (Fin n)
⟹Implies
If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin n → ℝ)
x : TVariables
a, d range over Fin n → ℝ: the statement must hold for every choice. ((a d : Fin n → ℝ))
<Less than
0 is strictly smaller than n. (0 < n)
=Equality
∑ j, (exp(a(j) + d(j))/(∑ k, exp(a(k) + d(k))))^2/(exp(a(j… and (∑ k, exp(a(k))) · (∑ k, exp(a(k) + 2 · d(k)))/(∑ k, exp(a… are the same. (∑ j, (Real.exp (a j + d j) / ∑ k, Real.…)
aᵇPower
exp(a(j) + d(j))/(∑ k, exp(a(k) + d(k))) raised to the power 2. ((Real.exp (a j + d j) / ∑ k, Real.exp (…)
eˣExponential function
e raised to the power a(j) + d(j), where e ≈ 2.718. (Real.exp (a j + d j))
a/bDivision
exp(a(j) + d(j)) divided by ∑ k, exp(a(k) + d(k)). In Lean, dividing by 0 gives 0. (Real.exp (a j + d j) / ∑ k, Real.exp (a…)
RReal numbers
The real numbers: every point on the number line. (ℝ)
+Addition
a(j) plus d(j). (a j + d j)
∑Summation
Add up exp(a(k) + d(k)) for every k. (∑ k, Real.exp (a k + d k))
·Multiplication
2 times d(k). (2 * d k)

Attention rows form an exponential family in the query with sufficient statistic the key; the importance-sampling cost of snapshot reuse is exp of the second difference of the log-partition, locally Δᵀ Cov_{π_q}(k) Δ (the Fisher metric). Classical identity applied to attention reuse. Part of 'Fisher-Cover Law: snapshot reuse is governed by the Fisher geometry of the attention exponential family'.

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

More proved statements