Provedalphabaguettebaguette-zv2
The cotangent reaching key position j is bounded by (T − j)·G, maximal at position 0
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. (
ℕ) - x ∈ TVariables
- T, j range over natural numbers: the statement must hold for every choice. (
(T j : ℕ)) - ⟹Implies
- If ℕ, then ℝ. (Between types, A → B is the type of functions from A to B.) (
ℕ → ℝ) - x : TVariables
- w, g range over ℕ → ℝ: the statement must hold for every choice. (
(w g : ℕ → ℝ)) - ∀For all
- The statement after the comma holds for every i. (
∀ i, 0 ≤ w i) - ∑Summation
- Add up w(i) · g(i) for each i in filter(range(T))(i ↦ j ≤ i). (
∑ i ∈ (Finset.range T).filter (fun i =>…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - ≤At most
- 0 is less than or equal to w(i). (
0 ≤ w i) - |x|Absolute value
- The size of g(i) without its sign. (
|g i|) - e.ffilter
- filter of range(T): Lean's dot notation e.filter means filter applied to e. (
(Finset.range T).filter) - {0,…,n−1}Range
- The numbers 0, 1, …, T − 1 (T of them). (
Finset.range T) - f(x)Function application
- w applied to i. Lean writes f x; papers write f(x). (
w i) - x ↦ f(x)Function (λ-abstraction)
- The function sending i to j ≤ i. Lean writes fun x => …; papers write x ↦ …. (
fun i => j ≤ i) - ·Multiplication
- w(i) times g(i). (
w i * g i) - (x : T)As real numbers
- T − j read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
((T - j : ℕ) : ℝ)) - (x : T)As natural numbers
- T − j read as an element of natural numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(T - j : ℕ)) - -Subtraction
- T minus j. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
T - j)
theorem bz2-fan-in-cotangent-bound (T j : ℕ) (w g : ℕ → ℝ) (hw0 : ∀ i, 0 ≤ w i) (hw1 : ∀ i, w i ≤ 1) (G : ℝ) (hg : ∀ i, |g i| ≤ G) :
|∑ i ∈ (Finset.range T).filter (fun i => j ≤ i), w i * g i| ≤ ((T - j : ℕ) : ℝ) * GWith attention weights in [0,1] and per-query cotangents |gᵢ| ≤ G, the total cotangent position j receives from the causal queries i ≥ j is at most (T − j)·G. At Baguette's T = 4096 the first token can collect up to 4096× a single row's cotangent. That matches the recorded position-0 embedding blow-ups and motivates sink-anchored windows. Part of 'Baguette-Z v2' (revision after the hostile review).
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
- 25 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.