proofs
Provedalphabaguettebaguette-zoptimizer

The clipped gradient g·c/max(c, ‖g‖) has norm at most c

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, g:Fin⁡ n→R\htmlData{mx=5}{g : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}} and c∈R\htmlData{mx=1}{c \in \htmlData{mx=0}{\mathbb{R}}}, if 0<c0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{c}, then

∑i(g(i)⋅(cmax⁡(c,∑jg(j)2)))2≤c\htmlData{mx=16}{\sqrt{\htmlData{mx=15}{\sum_{i} \htmlData{mx=14}{\left(\htmlData{mx=13}{\htmlData{mx=2}{\htmlData{mx=0}{g}(\htmlData{mx=1}{i})} \cdot \left(\htmlData{mx=12}{\frac{\htmlData{mx=3}{c}}{\htmlData{mx=11}{\max(\htmlData{mx=4}{c}, \htmlData{mx=10}{\sqrt{\htmlData{mx=9}{\sum_{j} \htmlData{mx=8}{\htmlData{mx=7}{\htmlData{mx=5}{g}(\htmlData{mx=6}{j})}^{2}}}}})}}}\right)}\right)^{2}}}}} \mathrel{\htmlData{mx=18}{\leq}} \htmlData{mx=17}{c}
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 → ℝ)
<Less than
0 is strictly smaller than c. (0 < c)
≤At most
√(∑ i, (g(i) · (c/max(c, √(∑ j, g(j)^2))))^2) is less than or equal to c. (Real.sqrt (∑ i, (g i * (c / max c (Real…)
RReal numbers
The real numbers: every point on the number line. (ℝ)
·Multiplication
g(i) times c/max(c, √(∑ j, g(j)^2)). (g i * (c / max c (Real.sqrt (∑ j, g j ^…)
a/bDivision
c divided by max(c, √(∑ j, g(j)^2)). In Lean, dividing by 0 gives 0. (c / max c (Real.sqrt (∑ j, g j ^ 2)))
maxMaximum
The larger of c and √(∑ j, g(j)^2). (max c (Real.sqrt (∑ j, g j ^ 2)))
√Square root
The non-negative number whose square is ∑ j, g(j)^2. (Real.sqrt (∑ j, g j ^ 2))
∑Summation
Add up g(j)^2 for every j. (∑ j, g j ^ 2)
aᵇPower
g(j) raised to the power 2. (g j ^ 2)

Global-norm clipping really enforces ‖g‖₂ ≤ c for every input gradient (c > 0). 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
19 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements