Provedalphabaguettenoether-checksumloss
Checksum X1: each row of the full-vocabulary cross-entropy logit gradient sums to zero
For all , and , if , then
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 V. Lean writes f x; papers write f(x). (
Fin V) - ⟹Implies
- If Fin(V), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin V → ℝ) - ∑Summation
- Add up p(v) for every v. (
∑ v, p v) - =Equality
- ∑ v, p(v) and 1 are the same. (
∑ v, p v = 1) - -Subtraction
- p(v) minus 1 if v = y, else 0. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
p v - if v = y then 1 else 0) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - { a if c; b otherwiseCases (if … then … else)
- 1 when v = y, and 0 otherwise. (
if v = y then 1 else 0)
theorem nc-cross-entropy-row-sums-to-zero {V : ℕ} (p : Fin V → ℝ) (y : Fin V) (hp : ∑ v, p v = 1) :
∑ v, (p v - if v = y then 1 else 0) = 0dlogitᵥ = pᵥ − 1[v = y] with Σᵥ pᵥ = 1 sums to zero over all 65,536 vocabulary entries. One reduction per row checks Baguette's exact-vocabulary loss kernel; an unwritten 256-entry vocabulary tile is flagged at ≈ 2·10⁵× the clean residual. Part of 'Noether checksums for Baguette's backward kernels'.
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
- 13 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.