proofs
Provedalphabaguettebaguette-zschedule

Grid accumulation of on-grid values reproduces the exact real sum

For all k∈N\htmlData{mx=1}{k \in \htmlData{mx=0}{\mathbb{N}}}, n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}} and m:Fin⁡ n→Z\htmlData{mx=5}{m : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{Z}}}:

∑i⌊m(i)2k⋅2k⌋2k=∑im(i)2k\htmlData{mx=15}{\frac{\htmlData{mx=12}{\sum_{i} \htmlData{mx=11}{\htmlData{mx=10}{\left\lfloor \htmlData{mx=9}{\htmlData{mx=6}{\frac{\htmlData{mx=3}{\htmlData{mx=2}{\htmlData{mx=0}{m}(\htmlData{mx=1}{i})}}}{\htmlData{mx=5}{2^{\htmlData{mx=4}{k}}}}} \cdot \htmlData{mx=8}{2^{\htmlData{mx=7}{k}}}} \right\rfloor}}}}{\htmlData{mx=14}{2^{\htmlData{mx=13}{k}}}}} \mathrel{\htmlData{mx=24}{=}} \htmlData{mx=23}{\sum_{i} \htmlData{mx=22}{\frac{\htmlData{mx=19}{\htmlData{mx=18}{\htmlData{mx=16}{m}(\htmlData{mx=17}{i})}}}{\htmlData{mx=21}{2^{\htmlData{mx=20}{k}}}}}}
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 → ℤ)
=Equality
(∑ i, ⌊m(i)/2^k · 2^k⌋)/2^k and ∑ i, m(i)/2^k are the same. ((∑ i, (⌊((m i : ℝ) / 2 ^ k) * 2 ^ k⌋ : …)
∑Summation
Add up ⌊m(i)/2^k · 2^k⌋ for every i. (∑ i, (⌊((m i : ℝ) / 2 ^ k) * 2 ^ k⌋ : ℝ))
⌊x⌋Floor
The largest integer not above m(i)/2^k · 2^k. (⌊((m i : ℝ) / 2 ^ k) * 2 ^ k⌋)
ZIntegers
The integers …, −2, −1, 0, 1, 2, …. (ℤ)
·Multiplication
m(i)/2^k times 2^k. (((m i : ℝ) / 2 ^ k) * 2 ^ k)
(x : T)As real numbers
m(i) read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((m i : ℝ))
a/bDivision
m(i) divided by 2^k. In Lean, dividing by 0 gives 0. ((m i : ℝ) / 2 ^ k)
aᵇPower
2 raised to the power k. (2 ^ k)

If every term is already a grid value m/2ᵏ, quantize-and-add has zero error. 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
14 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements