Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 16, after Definition 3 — every run of a pigeonhole design puts T/2 subjects in each group

Proved
PigeonholeDesign.Upper.assign_balanced

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

balanceexperimental-designp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1pigeonhole-design

Let TTT be even. For every partition of the covariate space into pigeonholes, every arrival sequence xxx, and every realization of the fair coins, the pigeonhole design assigns exactly T/2T/2T/2 subjects to the control group and exactly T/2T/2T/2 subjects to the treated group:

∣A∣=∣B∣=T2.|A|=|B|=\frac T2 .∣A∣=∣B∣=2T​.

This is the role of Step 1 of Definition 3. It guarantees that the discrepancy dA,Bd_{A,B}dA,B​ of every run is a genuine perfect matching between groups of equal size.

Formalization Note The statement holds for an arbitrary covariate type and an arbitrary labelling of pigeonholes. It is the guard against the junk value 000 that the formal discrepancy takes on unbalanced splits: it shows that the designs never produce one.

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

theorem assign_balanced {E ι : Type*} [DecidableEq ι] {T : ℕ} (hT : Even T)
    (hole : E → ι) (x : Fin T → E) (coin : Fin T → Bool) :
    (Finset.univ.filter (fun t => assign hole x coin t = false)).card = T / 2 ∧
    (Finset.univ.filter (fun t => assign hole x coin t = true)).card = T / 2 := by sorry

end PigeonholeDesign.Upper
Source
Zhao and Zhou, Pigeonhole Design: Balancing Sequential Experiments from an Online Matching Perspective, arXiv:2201.12936v6, p. 16, remark following Definition 3
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