Provedquery-cover-lawdecode-attentionsoftmaxkv-cache
The greedy snapshot rule keeps centres η-separated
For all , , , and , if , and (given ), then
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) - DecidableEq
- DecidableEq: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
DecidableEq) - f(x)Function application
- DecidableEq applied to α. Lean writes f x; papers write f(x). (
DecidableEq α) - ∀For all
- The statement after the comma holds for every x, y. (
∀ x y, dist x y = dist y x) - Finset
- Finset: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset) - ⟹Implies
- If α, then ℝ. (Between types, A → B is the type of functions from A to B.) (
α → ℝ) - =Equality
- dist(x, y) and dist(y, x) are the same. (
dist x y = dist y x) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - <Less than
- η is strictly smaller than dist(q, c). (
η < dist q c) - ≠Not equal
- x and y are different. (
x ≠ y) - insert
- insert: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
insert)
theorem qc-greedy-step-separated {α : Type} [DecidableEq α] (dist : α → α → ℝ) (hsymm : ∀ x y, dist x y = dist y x) (C : Finset α) (q : α) (η : ℝ) (hfar : ∀ c ∈ C, η < dist q c) (hsep : ∀ x ∈ C, ∀ y ∈ C, x ≠ y → η < dist x y) :
∀ x ∈ insert q C, ∀ y ∈ insert q C, x ≠ y → η < dist x yA new snapshot is opened only when the query is more than η from every existing centre; by induction all centres stay pairwise more than η apart, feeding the cover comparison. Part of 'The Query-Cover Law: decode attention cost is set by where the queries go, not by how long the context is'.
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
- 17 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.