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 , and , if and , then
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)
theorem bc-bi-tilt-bound {d : ℕ} (q qc kj kcj : Fin d → ℝ) (ηq ηk : ℝ) (hq : |∑ i, (q i - qc i) * kj i| ≤ ηq) (hk : |∑ i, qc i * (kj i - kcj i)| ≤ ηk) :
|∑ i, q i * kj i - ∑ i, qc i * kcj i| ≤ η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.