proofs
Provedalphabaguettealgorithm-ideab4

Per-dimension key bounds give an upper bound on every q·k in a tile

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}} and q,k,lo,hi:Fin⁡ n→R\htmlData{mx=5}{q, k, \mathit{lo}, \mathit{hi} : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, if ∀j, lo(j)≤k(j)\htmlData{mx=7}{\forall j,\ \htmlData{mx=2}{\htmlData{mx=0}{\mathit{lo}}(\htmlData{mx=1}{j})} \mathrel{\htmlData{mx=6}{\leq}} \htmlData{mx=5}{\htmlData{mx=3}{k}(\htmlData{mx=4}{j})}} and ∀j, k(j)≤hi(j)\htmlData{mx=7}{\forall j,\ \htmlData{mx=2}{\htmlData{mx=0}{k}(\htmlData{mx=1}{j})} \mathrel{\htmlData{mx=6}{\leq}} \htmlData{mx=5}{\htmlData{mx=3}{\mathit{hi}}(\htmlData{mx=4}{j})}}, then

∑jq(j)⋅k(j)≤∑jmax⁡(q(j)⋅lo(j),q(j)⋅hi(j))\htmlData{mx=7}{\sum_{j} \htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{q}(\htmlData{mx=1}{j})} \cdot \htmlData{mx=5}{\htmlData{mx=3}{k}(\htmlData{mx=4}{j})}}} \mathrel{\htmlData{mx=24}{\leq}} \htmlData{mx=23}{\sum_{j} \htmlData{mx=22}{\max(\htmlData{mx=14}{\htmlData{mx=10}{\htmlData{mx=8}{q}(\htmlData{mx=9}{j})} \cdot \htmlData{mx=13}{\htmlData{mx=11}{\mathit{lo}}(\htmlData{mx=12}{j})}}, \htmlData{mx=21}{\htmlData{mx=17}{\htmlData{mx=15}{q}(\htmlData{mx=16}{j})} \cdot \htmlData{mx=20}{\htmlData{mx=18}{\mathit{hi}}(\htmlData{mx=19}{j})}})}}
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
q, k, lo, hi range over Fin n → ℝ: the statement must hold for every choice. ((q k lo hi : Fin n → ℝ))
∀For all
The statement after the comma holds for every j. (∀ j, lo j ≤ k j)
∑Summation
Add up q(j) · k(j) for every j. (∑ j, q j * k j)
≤At most
lo(j) is less than or equal to k(j). (lo j ≤ k j)
·Multiplication
q(j) times k(j). (q j * k j)
RReal numbers
The real numbers: every point on the number line. (ℝ)
maxMaximum
The larger of q(j) · lo(j) and q(j) · hi(j). (max (q j * lo j) (q j * hi j))

Idea B4 (certified attention-tile skipping). If each key in a tile satisfies lo ≤ k ≤ hi coordinatewise, then q·k ≤ Σⱼ max(qⱼ·loⱼ, qⱼ·hiⱼ). The bound costs 2·64 multiplies per tile instead of 64 per key.

How it was proved

Proved
3 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