Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma S1, p. 38 — a positively weighted average of points within δ of each other stays within δ

Proved
LuoSunLiu.DIP.lemma_S1

by mikedeng1 · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

inequalitiesp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let S1⊆S2⊆NS_1 \subseteq S_2 \subseteq \mathbb NS1​⊆S2​⊆N with S1S_1S1​ finite and nonempty. Suppose ∣ai−aj∣≤δ|a_i - a_j| \le \delta∣ai​−aj​∣≤δ for all i,j∈S2i, j \in S_2i,j∈S2​, and let bi>0b_i > 0bi​>0 for i∈S1i \in S_1i∈S1​. Then for every j∈S2j \in S_2j∈S2​,

∣∑i∈S1biai∑i∈S1bi−aj∣≤δ.\Bigl|\frac{\sum_{i\in S_1} b_ia_i}{\sum_{i\in S_1} b_i} - a_j\Bigr| \le \delta .​∑i∈S1​​bi​∑i∈S1​​bi​ai​​−aj​​≤δ.

In the proof of Lemma 3 this bounds the distance between the shadow parameter ξ˙t\dot\xi_tξ˙​t​, a weighted average of past parameters, and the current parameter ξt\xi_tξt​ by the perturbation constant.

Formalization Note The paper states S2⊆N+S_2 \subseteq \mathbb N^+S2​⊆N+ and does not require S1S_1S1​ nonempty; for empty S1S_1S1​ the weighted average is 0/00/00/0, so nonemptiness (and finiteness) is added. Allowing 0∈S20 \in S_20∈S2​ only generalizes the statement.

Preamble
import Mathlib
Formal statement
namespace LuoSunLiu.DIP

/-- Lemma S1 (Luo, Sun and Liu, arXiv:2109.07340v2, pp. 38–39). If `S₁ ⊆ S₂`, `S₁` is finite and
nonempty, `|a_i - a_j| ≤ δ` for all `i, j ∈ S₂`, and `b_i > 0` for `i ∈ S₁`, then the weighted
average `∑_{i ∈ S₁} b_i a_i / ∑_{i ∈ S₁} b_i` is within `δ` of every `a_j`, `j ∈ S₂`. -/
theorem lemma_S1 (S1 : Finset ℕ) (S2 : Set ℕ) (hS : (S1 : Set ℕ) ⊆ S2) (hne : S1.Nonempty)
    (a b : ℕ → ℝ) (δ : ℝ) (ha : ∀ i ∈ S2, ∀ j ∈ S2, |a i - a j| ≤ δ)
    (hb : ∀ i ∈ S1, 0 < b i) :
    ∀ j ∈ S2, |(∑ i ∈ S1, b i * a i) / (∑ i ∈ S1, b i) - a j| ≤ δ := by sorry

end LuoSunLiu.DIP
Source
Luo, Sun and Liu, arXiv:2109.07340v2, pp. 38–39, Lemma S1
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 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