Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Claim 7.1 — rank matching of two 0/1 lists with close prefix counts: at most (ε+ε1/2)m(\varepsilon+\varepsilon^{1/2})m(ε+ε1/2)m bad indices

Proved
NonMarkovColorings.Main.claim_7_1

by Shuze Chen · Nov 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsinequalitiesp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let 1≥p1≥⋯≥pm≥01\ge p_1\ge\dots\ge p_m\ge01≥p1​≥⋯≥pm​≥0 and Xi,Yi∈{0,1}X_i,Y_i\in\{0,1\}Xi​,Yi​∈{0,1} satisfy ∣∑i≤j(Xi−Yi)∣≤εm\big|\sum_{i\le j}(X_i-Y_i)\big|\le\varepsilon m​∑i≤j​(Xi​−Yi​)​≤εm whenever j=mj=mj=m or pj>pj+1p_j>p_{j+1}pj​>pj+1​. Define index(R)=min⁡{j:∑i≤jYi≥R}\mathrm{index}(R)=\min\{j:\sum_{i\le j}Y_i\ge R\}index(R)=min{j:∑i≤j​Yi​≥R} when this set is nonempty. For each jjj with Xj=1X_j=1Xj​=1 let R=∑i≤jXiR=\sum_{i\le j}X_iR=∑i≤j​Xi​. Then at most (ε+ε1/2)m(\varepsilon+\varepsilon^{1/2})m(ε+ε1/2)m such indices jjj have index(R)\mathrm{index}(R)index(R) undefined or satisfy

∣pj−pindex(R)∣>ε1/2.|p_j-p_{\mathrm{index}(R)}|>\varepsilon^{1/2}.∣pj​−pindex(R)​∣>ε1/2.

A deterministic order-statistics fact used to compare the blocking and unblocked neighbours in §7.

Formalization Note. Indices are 1,…,m1,\dots,m1,…,m; p,X,Yp,X,Yp,X,Y are functions on N\mathbb NN used on [1,m][1,m][1,m]; ε1/2\varepsilon^{1/2}ε1/2 is Real.sqrt ε.

Differences from the source:

  • encoding: ε ≥ 0 implicit (ε^{1/2}) → ε : ℝ arbitrary, ε^{1/2} = Real.sqrt ε; reason: for ε < 0 and m ≥ 1 the hypothesis at j = m is unsatisfiable, and m = 0 gives 0 ≤ 0; no instance changes
  • encoding: lists p_1..p_m, X_1..X_m, Y_1..Y_m → functions ℕ → ℝ, ℕ → ℕ constrained on Finset.Icc 1 m; index ranges over [1, m]; reason: 1-based indices as in the paper
Preamble
import Mathlib
Formal statement
namespace NonMarkovColorings.Main

/-- Claim 7.1. Let `1 ≥ p_1 ≥ ⋯ ≥ p_m ≥ 0` and `X_i, Y_i ∈ {0, 1}` with
`|Σ_{i ≤ j} (X_i − Y_i)| ≤ ε m` whenever `j = m` or `p_j > p_{j+1}`. With
`index(R) = min{j : Σ_{i ≤ j} Y_i ≥ R}`, at most `(ε + ε^{1/2}) m` indices `j` with `X_j = 1`
have, for `R = Σ_{i ≤ j} X_i`, `index(R)` undefined or `|p_j − p_{index(R)}| > ε^{1/2}`.
Indices run over `1, …, m`. -/
theorem claim_7_1 (m : ℕ) (ε : ℝ) (p : ℕ → ℝ) (X Y : ℕ → ℕ)
    (hp1 : ∀ i ∈ Finset.Icc 1 m, p i ≤ 1) (hp0 : ∀ i ∈ Finset.Icc 1 m, 0 ≤ p i)
    (hmono : ∀ i ∈ Finset.Icc 1 m, ∀ j ∈ Finset.Icc 1 m, i ≤ j → p j ≤ p i)
    (hX : ∀ i ∈ Finset.Icc 1 m, X i = 0 ∨ X i = 1)
    (hY : ∀ i ∈ Finset.Icc 1 m, Y i = 0 ∨ Y i = 1)
    (hsum : ∀ j ∈ Finset.Icc 1 m, (j = m ∨ p (j + 1) < p j) →
      |∑ i ∈ Finset.Icc 1 j, ((X i : ℝ) - (Y i : ℝ))| ≤ ε * m) :
    (((Finset.Icc 1 m).filter fun j => X j = 1 ∧
        let S := (Finset.Icc 1 m).filter fun j' =>
          ∑ i ∈ Finset.Icc 1 j, X i ≤ ∑ i ∈ Finset.Icc 1 j', Y i
        S = ∅ ∨ ∃ h : S.Nonempty, Real.sqrt ε < |p j - p (S.min' h)|).card : ℝ) ≤
      (ε + Real.sqrt ε) * m := by sorry

end NonMarkovColorings.Main
Source
Jain, Mizgerd, Vigoda, Sampling Colorings Close to the Maximum Degree: Non-Markovian Coupling and Local Uniformity, arXiv:2604.11938 (PDF of 2026-11-03, sha256 f3bf0cf0…), p. 56, Claim 7.1
Human review
  • Endorsed by Community (Bot) · Nov 11, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Nov 11, 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