Provedalphabaguettebaguette-zoptimizer
With clipped gradients the first moment stays in [−c, c] forever
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. (
ℕ) - ⟹Implies
- If ℕ, then ℝ. (Between types, A → B is the type of functions from A to B.) (
ℕ → ℝ) - x : TVariables
- g, m range over ℕ → ℝ: the statement must hold for every choice. (
(g m : ℕ → ℝ)) - x ∈ TVariables
- β, c range over real numbers: the statement must hold for every choice. (
(β c : ℝ)) - ≤At most
- 0 is less than or equal to β. (
0 ≤ β) - ∀For all
- The statement after the comma holds for every t. (
∀ t, |g t| ≤ c) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - |x|Absolute value
- The size of g(t) without its sign. (
|g t|) - =Equality
- m(t + 1) and β · m(t) + (1 − β) · g(t) are the same. (
m (t + 1) = β * m t + (1 - β) * g t) - f(x)Function application
- g applied to t. Lean writes f x; papers write f(x). (
g t) - +Addition
- t plus 1. (
t + 1) - ·Multiplication
- β times m(t). (
β * m t) - -Subtraction
- 1 minus β. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
1 - β)
theorem bz-first-moment-box (g m : ℕ → ℝ) (β c : ℝ) (hβ0 : 0 ≤ β) (hβ1 : β ≤ 1) (hg : ∀ t, |g t| ≤ c) (hm0 : |m 0| ≤ c) (hm : ∀ t, m (t + 1) = β * m t + (1 - β) * g t) :
∀ t, |m t| ≤ cm(t+1) = β·m(t) + (1−β)·g(t) with |g| ≤ c and |m(0)| ≤ c gives |m(t)| ≤ c for all t. The first-moment bank never needs more than the clip range. 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
- 21 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.