Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Lemma 3, p. ec8 — at most one unmatched subject per pigeonhole, H ≤ ⌈T^η⌉ and |H⁰_τ − H¹_τ| = T − τ

Proved
PigeonholeDesign.Upper.unmatched_imbalance

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

experimental-designp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1pigeonhole-designstopping-time

Fix η∈(0,1)\eta\in(0,1)η∈(0,1), an even T≥1T\ge1T≥1, an arrival sequence x∈[0,1]Tx\in[0,1]^Tx∈[0,1]T, and a realization of the coins. Run the pigeonhole design with the K=⌈Tη⌉K=\lceil T^{\eta}\rceilK=⌈Tη⌉ uniform pigeonholes of [0,1][0,1][0,1], and let τ\tauτ, the matched set TM\mathcal T_MTM​, the unmatched set TU\mathcal T_UTU​, and the counts Hτ0H^0_\tauHτ0​, Hτ1H^1_\tauHτ1​ be as in the proof of Lemma 3. Then:

  1. every pigeonhole contains at most one unmatched subject;
  2. in every pigeonhole, the matched subjects are split evenly between control and treatment (each pair consists of one control and one treated subject);
  3. H=Hτ0+Hτ1≤K=⌈Tη⌉H=H^0_\tau+H^1_\tau\le K=\lceil T^{\eta}\rceilH=Hτ0​+Hτ1​≤K=⌈Tη⌉;
∣Hτ0−Hτ1∣=T−τ.\bigl|H^0_\tau-H^1_\tau\bigr|=T-\tau .​Hτ0​−Hτ1​​=T−τ.

The identity in item 4 says that the number of subjects forced by the balancing step equals the imbalance among the unmatched subjects; it converts the concentration of the unmatched assignments (Lemma EC.1) into a bound on T−τT-\tauT−τ.

Formalization Note The paper's bound H≤TηH\le T^{\eta}H≤Tη becomes H≤⌈Tη⌉H\le\lceil T^{\eta}\rceilH≤⌈Tη⌉ because the number of pigeonholes is pinned to ⌈Tη⌉\lceil T^\eta\rceil⌈Tη⌉. Item 2 is the content behind the paper's phrase "matched subjects": the pairing of the first τ\tauτ subjects of each pigeonhole in arrival order (the definition of TM\mathcal T_MTM​) produces opposite pairs. The difference in item 4 is taken in the integers.

Preamble
import Mathlib
import Definitions.Def_PigeonholeDesign_Upper_Setting
import Definitions.Def_PigeonholeDesign_Upper_Stopping
Formal statement
namespace PigeonholeDesign.Upper

theorem unmatched_imbalance (η : ℝ) (hη0 : 0 < η) (hη1 : η < 1) (T : ℕ) (hT1 : 1 ≤ T)
    (hT : Even T) (x : Fin T → ℝ) (hx : ∀ t, x t ∈ Set.Icc (0 : ℝ) 1) (coin : Fin T → Bool) :
    (∀ k : ℕ, ((unmatched (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin).filter
        (fun s => uniformHole ⌈(T : ℝ) ^ η⌉₊ (x s) = k)).card ≤ 1) ∧
    (∀ k : ℕ, ((matched (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin).filter
        (fun s => uniformHole ⌈(T : ℝ) ^ η⌉₊ (x s) = k ∧
          assign (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin s = false)).card =
      ((matched (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin).filter
        (fun s => uniformHole ⌈(T : ℝ) ^ η⌉₊ (x s) = k ∧
          assign (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin s = true)).card) ∧
    H0 (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin + H1 (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin
      ≤ ⌈(T : ℝ) ^ η⌉₊ ∧
    |(H0 (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin : ℤ) - H1 (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin|
      = (T : ℤ) - tau (uniformHole ⌈(T : ℝ) ^ η⌉₊) x coin := by sorry

end PigeonholeDesign.Upper
Source
Zhao and Zhou, Pigeonhole Design: Balancing Sequential Experiments from an Online Matching Perspective, arXiv:2201.12936v6, pp. ec7-ec8 (PDF pp. 45-46), proof of Lemma 3, Component 2 (|H⁰_τ − H¹_τ| = T − τ)
Human review
  • Endorsed by Shuze Chen · Oct 14, 2026

    Confirmed by the moderator at approval.

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