proofs
Provedalphabaguettebaguette-zv2

Grand capstone from primitive assumptions only: moment recurrences + folded AdamW + P2N outputs ⇒ time-uniform residual certificate

For all L,t∈N\htmlData{mx=1}{L, t \in \htmlData{mx=0}{\mathbb{N}}}, β1,β2,ε,η,lam∈R\htmlData{mx=1}{\beta_{1}, \beta_{2}, \varepsilon, \eta, \mathit{lam} \in \htmlData{mx=0}{\mathbb{R}}}, g,m,v,θ:N→N→R\htmlData{mx=5}{g, m, v, \theta : \htmlData{mx=0}{\mathbb{N}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=1}{\mathbb{N}} \mathrel{\htmlData{mx=3}{\to}} \htmlData{mx=2}{\mathbb{R}}} and x,z:N→R\htmlData{mx=3}{x, z : \htmlData{mx=0}{\mathbb{N}} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, if 0≤β10 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{\beta_{1}}, β1<1\htmlData{mx=0}{\beta_{1}} \mathrel{\htmlData{mx=1}{<}} 1, 0<β20 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{\beta_{2}}, β2<1\htmlData{mx=0}{\beta_{2}} \mathrel{\htmlData{mx=1}{<}} 1, β12<β2\htmlData{mx=1}{\htmlData{mx=0}{\beta_{1}}^{2}} \mathrel{\htmlData{mx=3}{<}} \htmlData{mx=2}{\beta_{2}}, 0<ε0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{\varepsilon}, 0≤η0 \mathrel{\htmlData{mx=1}{\leq}} \htmlData{mx=0}{\eta}, 0<lam0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{\mathit{lam}}, η⋅lam≤1\htmlData{mx=2}{\htmlData{mx=0}{\eta} \cdot \htmlData{mx=1}{\mathit{lam}}} \mathrel{\htmlData{mx=3}{\leq}} 1, ∀l, m(l,0)=0\htmlData{mx=4}{\forall l,\ \htmlData{mx=2}{\htmlData{mx=0}{m}(\htmlData{mx=1}{l}, 0)} \mathrel{\htmlData{mx=3}{=}} 0}, ∀l, v(l,0)=0\htmlData{mx=4}{\forall l,\ \htmlData{mx=2}{\htmlData{mx=0}{v}(\htmlData{mx=1}{l}, 0)} \mathrel{\htmlData{mx=3}{=}} 0}, ∀l,s, m(l,s+1)=β1⋅m(l,s)+(1−β1)⋅g(l,s)\htmlData{mx=20}{\forall l, s,\ \htmlData{mx=4}{\htmlData{mx=0}{m}(\htmlData{mx=1}{l}, \htmlData{mx=3}{\htmlData{mx=2}{s} + 1})} \mathrel{\htmlData{mx=19}{=}} \htmlData{mx=18}{\htmlData{mx=10}{\htmlData{mx=5}{\beta_{1}} \cdot \htmlData{mx=9}{\htmlData{mx=6}{m}(\htmlData{mx=7}{l}, \htmlData{mx=8}{s})}} + \htmlData{mx=17}{(\htmlData{mx=12}{1 - \htmlData{mx=11}{\beta_{1}}}) \cdot \htmlData{mx=16}{\htmlData{mx=13}{g}(\htmlData{mx=14}{l}, \htmlData{mx=15}{s})}}}}, ∀l,s, v(l,s+1)=β2⋅v(l,s)+(1−β2)⋅g(l,s)2\htmlData{mx=21}{\forall l, s,\ \htmlData{mx=4}{\htmlData{mx=0}{v}(\htmlData{mx=1}{l}, \htmlData{mx=3}{\htmlData{mx=2}{s} + 1})} \mathrel{\htmlData{mx=20}{=}} \htmlData{mx=19}{\htmlData{mx=10}{\htmlData{mx=5}{\beta_{2}} \cdot \htmlData{mx=9}{\htmlData{mx=6}{v}(\htmlData{mx=7}{l}, \htmlData{mx=8}{s})}} + \htmlData{mx=18}{(\htmlData{mx=12}{1 - \htmlData{mx=11}{\beta_{2}}}) \cdot \htmlData{mx=17}{\htmlData{mx=16}{\htmlData{mx=13}{g}(\htmlData{mx=14}{l}, \htmlData{mx=15}{s})}^{2}}}}}, ∀l, ∣θ(l,0)∣≤1\htmlData{mx=5}{\forall l,\ \htmlData{mx=3}{\left\lvert \htmlData{mx=2}{\htmlData{mx=0}{\theta}(\htmlData{mx=1}{l}, 0)} \right\rvert} \mathrel{\htmlData{mx=4}{\leq}} 1}, ∀l,s, θ(l,s+1)=(1−η⋅lam)⋅θ(l,s)−η⋅(1−β2s+11−β1s+1⋅m(l,s+1)v(l,s+1)+ε⋅1−β2s+1)\htmlData{mx=52}{\forall l, s,\ \htmlData{mx=4}{\htmlData{mx=0}{\theta}(\htmlData{mx=1}{l}, \htmlData{mx=3}{\htmlData{mx=2}{s} + 1})} \mathrel{\htmlData{mx=51}{=}} \htmlData{mx=50}{\htmlData{mx=13}{(\htmlData{mx=8}{1 - \htmlData{mx=7}{\htmlData{mx=5}{\eta} \cdot \htmlData{mx=6}{\mathit{lam}}}}) \cdot \htmlData{mx=12}{\htmlData{mx=9}{\theta}(\htmlData{mx=10}{l}, \htmlData{mx=11}{s})}} - \htmlData{mx=49}{\htmlData{mx=14}{\eta} \cdot \left(\htmlData{mx=48}{\frac{\htmlData{mx=32}{\htmlData{mx=26}{\frac{\htmlData{mx=20}{\sqrt{\htmlData{mx=19}{1 - \htmlData{mx=18}{\htmlData{mx=15}{\beta_{2}}^{\htmlData{mx=17}{\htmlData{mx=16}{s} + 1}}}}}}}{\htmlData{mx=25}{1 - \htmlData{mx=24}{\htmlData{mx=21}{\beta_{1}}^{\htmlData{mx=23}{\htmlData{mx=22}{s} + 1}}}}}} \cdot \htmlData{mx=31}{\htmlData{mx=27}{m}(\htmlData{mx=28}{l}, \htmlData{mx=30}{\htmlData{mx=29}{s} + 1})}}}{\htmlData{mx=47}{\htmlData{mx=38}{\sqrt{\htmlData{mx=37}{\htmlData{mx=33}{v}(\htmlData{mx=34}{l}, \htmlData{mx=36}{\htmlData{mx=35}{s} + 1})}}} + \htmlData{mx=46}{\htmlData{mx=39}{\varepsilon} \cdot \htmlData{mx=45}{\sqrt{\htmlData{mx=44}{1 - \htmlData{mx=43}{\htmlData{mx=40}{\beta_{2}}^{\htmlData{mx=42}{\htmlData{mx=41}{s} + 1}}}}}}}}}}\right)}}}, ∀l, ∣z(l)∣<2\htmlData{mx=5}{\forall l,\ \htmlData{mx=3}{\left\lvert \htmlData{mx=2}{\htmlData{mx=0}{z}(\htmlData{mx=1}{l})} \right\rvert} \mathrel{\htmlData{mx=4}{<}} 2} and ∀l, x(l+1)=x(l)+θ(l,t)⋅z(l)\htmlData{mx=17}{\forall l,\ \htmlData{mx=3}{\htmlData{mx=0}{x}(\htmlData{mx=2}{\htmlData{mx=1}{l} + 1})} \mathrel{\htmlData{mx=16}{=}} \htmlData{mx=15}{\htmlData{mx=6}{\htmlData{mx=4}{x}(\htmlData{mx=5}{l})} + \htmlData{mx=14}{\htmlData{mx=10}{\htmlData{mx=7}{\theta}(\htmlData{mx=8}{l}, \htmlData{mx=9}{t})} \cdot \htmlData{mx=13}{\htmlData{mx=11}{z}(\htmlData{mx=12}{l})}}}}, then

∣x(L)∣≤∣x(0)∣+L⋅(2max⁡(1,(1−β1)2(1−β2)⋅(1−β12β2)1−β1lam))\begin{aligned} & \htmlData{mx=4}{\left\lvert \htmlData{mx=3}{\htmlData{mx=1}{x}(\htmlData{mx=2}{L})} \right\rvert} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=30}{\htmlData{mx=7}{\left\lvert \htmlData{mx=6}{\htmlData{mx=5}{x}(0)} \right\rvert} + \htmlData{mx=29}{\htmlData{mx=8}{L} \cdot \left(\htmlData{mx=28}{2\htmlData{mx=27}{\max(1, \htmlData{mx=26}{\frac{\htmlData{mx=24}{\frac{\htmlData{mx=21}{\sqrt{\htmlData{mx=20}{\frac{\htmlData{mx=11}{(\htmlData{mx=10}{1 - \htmlData{mx=9}{\beta_{1}}})^{2}}}{\htmlData{mx=19}{(\htmlData{mx=13}{1 - \htmlData{mx=12}{\beta_{2}}}) \cdot \left(\htmlData{mx=18}{1 - \htmlData{mx=17}{\frac{\htmlData{mx=15}{\htmlData{mx=14}{\beta_{1}}^{2}}}{\htmlData{mx=16}{\beta_{2}}}}}\right)}}}}}}{\htmlData{mx=23}{1 - \htmlData{mx=22}{\beta_{1}}}}}}{\htmlData{mx=25}{\mathit{lam}}}})}}\right)}} \end{aligned}
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
L, t range over natural numbers: the statement must hold for every choice. ((L t : ℕ))
RReal numbers
The real numbers: every point on the number line. (ℝ)
≤At most
0 is less than or equal to β₁. (0 ≤ β₁)
<Less than
β₁ is strictly smaller than 1. (β₁ < 1)
aᵇPower
β₁ raised to the power 2. (β₁ ^ 2)
·Multiplication
η times lam. (η * lam)
x : TVariables
g, m, v, θ range over ℕ → ℕ → ℝ: the statement must hold for every choice. ((g m v θ : ℕ → ℕ → ℝ))
∀For all
The statement after the comma holds for every l. (∀ l, m l 0 = 0)
⟹Implies
If ℕ, then ℝ. (Between types, A → B is the type of functions from A to B.) (ℕ → ℝ)
f(x)Function application
m applied to l, 0. Lean writes f x; papers write f(x). (m l 0)
=Equality
m(l, 0) and 0 are the same. (m l 0 = 0)
|x|Absolute value
The size of θ(l, 0) without its sign. (|θ l 0|)
+Addition
s plus 1. (s + 1)
maxMaximum
The larger of 1 and √((1 − β₁)^2/((1 − β₂) · (1 − β₁^2/β₂)))/(1 − β₁)/lam. (max 1 (Real.sqrt ((1 - β₁) ^ 2 / ((1 - …)
-Subtraction
1 minus β₁. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (1 - β₁)
√Square root
The non-negative number whose square is 1 − β₂^(s + 1). (Real.sqrt (1 - β₂ ^ (s + 1)))
a/bDivision
√(1 − β₂^(s + 1)) divided by 1 − β₁^(s + 1). In Lean, dividing by 0 gives 0. (Real.sqrt (1 - β₂ ^ (s + 1)) / (1 - β₁ …)

Answers S1 (decisive premises were hypotheses). Assumes only:

  • zero-initialized Adam moment recurrences for each gain, driven by ARBITRARY real gradients (no clipping or magnitude assumption);
  • Baguette's folded bias-corrected AdamW update with decoupled decay;
  • initial gains in [−1, 1];
  • power-of-two-normalized sublayer outputs (|z| < 2).

It derives, at every training step t and depth L: |x(L)| ≤ |x(0)| + L·2·max(1, C/((1−β₁)λ)), with C² = (1−β₁)²/((1−β₂)(1−β₁²/β₂)). The Adam ratio, the corrected-step bound and the box are all proved inside, not assumed. 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
171 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements