proofs
Provedbi-cover-lawtraining-attentionclustered-attentionlaw

Bi-tilt bound: |⟨q, k_j⟩ − ⟨q_c, k_c(j)⟩| ≤ η_q + η_k from a query-cover tilt and a key-cover tilt

For all d∈N\htmlData{mx=1}{d \in \htmlData{mx=0}{\mathbb{N}}}, q,qc,kj,kcj:Fin⁡ d→R\htmlData{mx=5}{q, \mathit{qc}, \mathit{kj}, \mathit{kcj} : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{d}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}} and ηq,ηk∈R\htmlData{mx=1}{\mathit{{\eta}q}, \mathit{{\eta}k} \in \htmlData{mx=0}{\mathbb{R}}}, if ∣∑i(q(i)−qc(i))⋅kj(i)∣≤ηq\htmlData{mx=12}{\left\lvert \htmlData{mx=11}{\sum_{i} \htmlData{mx=10}{(\htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{q}(\htmlData{mx=1}{i})} - \htmlData{mx=5}{\htmlData{mx=3}{\mathit{qc}}(\htmlData{mx=4}{i})}}) \cdot \htmlData{mx=9}{\htmlData{mx=7}{\mathit{kj}}(\htmlData{mx=8}{i})}}} \right\rvert} \mathrel{\htmlData{mx=14}{\leq}} \htmlData{mx=13}{\mathit{{\eta}q}} and ∣∑iqc(i)⋅(kj(i)−kcj(i))∣≤ηk\htmlData{mx=12}{\left\lvert \htmlData{mx=11}{\sum_{i} \htmlData{mx=10}{\htmlData{mx=2}{\htmlData{mx=0}{\mathit{qc}}(\htmlData{mx=1}{i})} \cdot (\htmlData{mx=9}{\htmlData{mx=5}{\htmlData{mx=3}{\mathit{kj}}(\htmlData{mx=4}{i})} - \htmlData{mx=8}{\htmlData{mx=6}{\mathit{kcj}}(\htmlData{mx=7}{i})}})}} \right\rvert} \mathrel{\htmlData{mx=14}{\leq}} \htmlData{mx=13}{\mathit{{\eta}k}}, then

∣∑iq(i)⋅kj(i)−∑iqc(i)⋅kcj(i)∣≤ηq+ηk\htmlData{mx=17}{\left\lvert \htmlData{mx=16}{\htmlData{mx=7}{\sum_{i} \htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{q}(\htmlData{mx=1}{i})} \cdot \htmlData{mx=5}{\htmlData{mx=3}{\mathit{kj}}(\htmlData{mx=4}{i})}}} - \htmlData{mx=15}{\sum_{i} \htmlData{mx=14}{\htmlData{mx=10}{\htmlData{mx=8}{\mathit{qc}}(\htmlData{mx=9}{i})} \cdot \htmlData{mx=13}{\htmlData{mx=11}{\mathit{kcj}}(\htmlData{mx=12}{i})}}}} \right\rvert} \mathrel{\htmlData{mx=21}{\leq}} \htmlData{mx=20}{\htmlData{mx=18}{\mathit{{\eta}q}} + \htmlData{mx=19}{\mathit{{\eta}k}}}
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 d. Lean writes f x; papers write f(x). (Fin d)
⟹Implies
If Fin(d), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin d → ℝ)
x : TVariables
q, qc, kj, kcj range over Fin d → ℝ: the statement must hold for every choice. ((q qc kj kcj : Fin d → ℝ))
x ∈ TVariables
ηq, ηk range over real numbers: the statement must hold for every choice. ((ηq ηk : ℝ))
|x|Absolute value
The size of ∑ i, (q(i) − qc(i)) · kj(i) without its sign. (|∑ i, (q i - qc i) * kj i|)
≤At most
|∑ i, (q(i) − qc(i)) · kj(i)| is less than or equal to ηq. (|∑ i, (q i - qc i) * kj i| ≤ ηq)
∑Summation
Add up (q(i) − qc(i)) · kj(i) for every i. (∑ i, (q i - qc i) * kj i)
·Multiplication
q(i) − qc(i) times kj(i). ((q i - qc i) * kj i)
-Subtraction
q(i) minus qc(i). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (q i - qc i)
RReal numbers
The real numbers: every point on the number line. (ℝ)
+Addition
ηq plus ηk. (ηq + ηk)

⟨q,k_j⟩ − ⟨q_c,k_c⟩ = ⟨q − q_c, k_j⟩ + ⟨q_c, k_j − k_c⟩. With the exact-rejection lemma this makes clustered attention exact and unbiased with acceptance ≥ e^{−2(η_q+η_k)}. Part of 'Bi-Cover Law: exact, unbiased clustered attention for training'.

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

More proved statements