Provedalphabaguettealgorithm-ideab4
Per-dimension key bounds give an upper bound on every q·k in a tile
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 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))
theorem tile-box-score-bound {n : ℕ} (q k lo hi : Fin n → ℝ) (hlo : ∀ j, lo j ≤ k j) (hhi : ∀ j, k j ≤ hi j) :
∑ j, q j * k j ≤ ∑ 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.