Provedalphabaguettebaguette-zquantizer
Round-half-up ⌊x + 1/2⌋ is within 1/2 of x
For all :
What the notation means · or point at any symbol
- RReal numbers
- The real numbers: every point on the number line. (
ℝ) - |x|Absolute value
- The size of x − ⌊x + 1/2⌋ without its sign. (
|x - ⌊x + 1 / 2⌋|) - ≤At most
- |x − ⌊x + 1/2⌋| is less than or equal to 1/2. (
|x - ⌊x + 1 / 2⌋| ≤ 1 / 2) - -Subtraction
- x minus ⌊x + 1/2⌋. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
x - ⌊x + 1 / 2⌋) - ⌊x⌋Floor
- The largest integer not above x + 1/2. (
⌊x + 1 / 2⌋) - +Addition
- x plus 1/2. (
x + 1 / 2) - a/bDivision
- 1 divided by 2. In Lean, dividing by 0 gives 0. (
1 / 2)
theorem bz-nearest-rounding-error (x : ℝ) :
|x - ⌊x + 1 / 2⌋| ≤ 1 / 2The nearest-rounding variant of the quantizer halves the worst-case error; used for sublayer increments. 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
- 15 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.