Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.3 — rounding error as total variation

Proved
CalibratedMA.Randomized.lemma_3_3

by mikedeng1 · Nov 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

calibrationp2o-batch-stoc27ap2o-gran-per-chapterp2o-plan-paperp2o-v1randomized-rounding

Let Γ=(γ0,…,γM)\Gamma=(\gamma_0,\dots,\gamma_M)Γ=(γ0​,…,γM​) be a grid partition, ν\nuν a distribution on [0,1][0,1][0,1], S∼νS\sim\nuS∼ν and P=RoundΓ(S)P=\mathrm{Round}_\Gamma(S)P=RoundΓ​(S). Write qj=qj(ν,Γ)q_j=q_j(\nu,\Gamma)qj​=qj​(ν,Γ) for 0≤j≤M−10\le j\le M-10≤j≤M−1 and set q−1=qM=0q_{-1}=q_M=0q−1​=qM​=0. Then

RoundErr(ν,Γ)=sup⁡h:{γ0,…,γM}→[−1,1]∣E[h(P)(S−P)]∣=q0+qM−1+∑j=1M−1∣qj−qj−1∣=∑j=0M∣qj−qj−1∣.\mathrm{RoundErr}(\nu,\Gamma)=\sup_{h:\{\gamma_0,\dots,\gamma_M\}\to[-1,1]}\big|\mathbb E[h(P)(S-P)]\big|=q_0+q_{M-1}+\sum_{j=1}^{M-1}|q_j-q_{j-1}|=\sum_{j=0}^{M}|q_j-q_{j-1}|.RoundErr(ν,Γ)=h:{γ0​,…,γM​}→[−1,1]sup​​E[h(P)(S−P)]​=q0​+qM−1​+j=1∑M−1​∣qj​−qj−1​∣=j=0∑M​∣qj​−qj−1​∣.

So the largest calibration residual that rounding can create is the total variation of the sequence of interval contributions (qj)(q_j)(qj​). Lemma 3.4 chooses the partition to make this small.

Formalization Note. The expectation E[h(P)(S−P)]\mathbb E[h(P)(S-P)]E[h(P)(S−P)] is the iterated integral ∫ ⁣∫h(p)(s−p) RoundΓ(s)(dp) ν(ds)\int\!\int h(p)(s-p)\,\mathrm{Round}_\Gamma(s)(dp)\,\nu(ds)∫∫h(p)(s−p)RoundΓ​(s)(dp)ν(ds). The supremum is stated with IsLUB over all h:R→Rh:\mathbb R\to\mathbb Rh:R→R whose values at the partition points lie in [−1,1][-1,1][−1,1]; only those values enter. The boundary conventions q−1=qM=0q_{-1}=q_M=0q−1​=qM​=0 are built into the auxiliary sequences q and qprev.

Differences from the source:

  • encoding: sup⁡h∣⋅∣\sup_h|\cdot|suph​∣⋅∣ over h:{γ0,…,γM}→[−1,1]h:\{\gamma_0,\dots,\gamma_M\}\to[-1,1]h:{γ0​,…,γM​}→[−1,1] → IsLUB of the set of values ∣E[h(P)(S−P)]∣|\mathbb E[h(P)(S-P)]|∣E[h(P)(S−P)]∣ over h:R→Rh:\mathbb R\to\mathbb Rh:R→R with h(γj)∈[−1,1]h(\gamma_j)\in[-1,1]h(γj​)∈[−1,1]; reason: only the values at partition points enter, and IsLUB is the supremum without junk values.
  • encoding: ρ>0\rho>0ρ>0 with 1/ρ1/\rho1/ρ an integer → K∈NK\in\mathbb NK∈N, ρ=1/K\rho=1/Kρ=1/K; reason: same instances.
  • encoding: the joint expectation for S ∼ ν and P = Round_Γ(S) → an iterated integral under a probability measure ν on ℝ carried by [0,1] and roundMeasure; reason: the rounding law has finite support and is measurable, so the iterated integral is the source expectation.
Preamble
import Mathlib
import Definitions.Def_CalibratedMA_Randomized_Rounding

open MeasureTheory
Formal statement
namespace CalibratedMA.Randomized

/-- Lemma 3.3 (p. 14), rounding error as total variation. `S ∼ ν` with `ν` a distribution on
`[0,1]`, `P = Round_Γ(S)`, `q_j = q_j(ν, Γ)` and `q_{−1} = q_M = 0`. -/
theorem lemma_3_3 (K M : ℕ) (γ : ℕ → ℝ) (hΓ : IsGridPartition K M γ) (ν : Measure ℝ)
    [IsProbabilityMeasure ν] (hν : ν (Set.Icc (0 : ℝ) 1)ᶜ = 0) :
    let q : ℕ → ℝ := fun j => if j < M then qj ν γ j else 0
    let qprev : ℕ → ℝ := fun j => if j = 0 then 0 else q (j - 1)
    IsLUB {v : ℝ | ∃ h : ℝ → ℝ, (∀ j ≤ M, h (γ j) ∈ Set.Icc (-1 : ℝ) 1) ∧
        v = |∫ s, (∫ p, h p * (s - p) ∂(roundMeasure M γ s)) ∂ν|} (RoundErr ν M γ) ∧
    RoundErr ν M γ = qj ν γ 0 + qj ν γ (M - 1) +
        ∑ j ∈ Finset.Ico 1 M, |qj ν γ j - qj ν γ (j - 1)| ∧
    RoundErr ν M γ = ∑ j ∈ Finset.range (M + 1), |q j - qprev j| := by sorry

end CalibratedMA.Randomized
Source
Jiuyao Lu, Georgy Noarov, Aaron Roth, Calibrated Multiaccuracy: Deterministic and Randomized Sample Complexity, STOC 2027 submission #900 (October 2026), p. 14, Lemma 3.3
Human review
  • Endorsed by Shuze Chen · Nov 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 10, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me