Provedalphabaguettebaguette-zcapstone
Closed loop: AdamW-updated output gains keep the residual inside a linear, time-uniform certificate
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
- g, u range over ℕ → ℕ → ℝ: the statement must hold for every choice. (
(g u : ℕ → ℕ → ℝ)) - x ∈ TVariables
- a, η, K range over real numbers: the statement must hold for every choice. (
(a η K : ℝ)) - <Less than
- 0 is strictly smaller than a. (
0 < a) - ≤At most
- a is less than or equal to 1. (
a ≤ 1) - ∀For all
- The statement after the comma holds for every l, t. (
∀ l t, |u l t| ≤ K) - ⟹Implies
- If ℕ, then ℝ. (Between types, A → B is the type of functions from A to B.) (
ℕ → ℝ) - |x|Absolute value
- The size of u(l, t) without its sign. (
|u l t|) - =Equality
- g(l, t + 1) and (1 − a) · g(l, t) − η · u(l, t) are the same. (
g l (t + 1) = (1 - a) * g l t - η * u l…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - f(x)Function application
- u applied to l, t. Lean writes f x; papers write f(x). (
u l t) - +Addition
- t plus 1. (
t + 1) - ·Multiplication
- 1 − a times g(l, t). (
(1 - a) * g l t) - -Subtraction
- 1 minus a. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
1 - a) - maxMaximum
- The larger of 1 and η · K/a. (
max 1 (η * K / a)) - a/bDivision
- η · K divided by a. In Lean, dividing by 0 gives 0. (
η * K / a)
theorem bz-closed-loop-residual-certificate (g u : ℕ → ℕ → ℝ) (a η K : ℝ) (ha0 : 0 < a) (ha1 : a ≤ 1) (hη : 0 ≤ η) (hu : ∀ l t, |u l t| ≤ K) (hg0 : ∀ l, |g l 0| ≤ 1) (hg : ∀ l t, g l (t + 1) = (1 - a) * g l t - η * u l t) (t : ℕ) (x z : ℕ → ℝ) (hz : ∀ l, |z l| < 2) (hx : ∀ l, x (l + 1) = x l + g l t * z l) :
∀ L : ℕ, |x L| ≤ |x 0| + L * (2 * max 1 (η * K / a))Output gains start at |g(l,0)| ≤ 1 and evolve by AdamW with decay (any directions |u| ≤ K). Sublayer outputs are power-of-two normalized (|z| < 2). Then at EVERY training step t and depth L, the residual satisfies |x(L)| ≤ |x(0)| + L·2·max(1, ηK/a). The integer width of the residual stream is fixed at compile time for an unbounded training run. Part of the plan 'Baguette-Z: closed-loop certified integer-state training'.
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
- 39 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.