proofs
Provedalphabaguettebaguette-zquantizer

Round-half-up ⌊x + 1/2⌋ is within 1/2 of x

For all x∈R\htmlData{mx=1}{x \in \htmlData{mx=0}{\mathbb{R}}}:

∣x−⌊x+12⌋∣≤12\htmlData{mx=6}{\left\lvert \htmlData{mx=5}{\htmlData{mx=0}{x} - \htmlData{mx=4}{\left\lfloor \htmlData{mx=3}{\htmlData{mx=1}{x} + \htmlData{mx=2}{\frac{1}{2}}} \right\rfloor}} \right\rvert} \mathrel{\htmlData{mx=8}{\leq}} \htmlData{mx=7}{\frac{1}{2}}
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)

The 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.

More proved statements