Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2 — E[(B−k)+]≤1/(4ε)\mathbb E[(B-k)_+]\le 1/(4\varepsilon)E[(B−k)+​]≤1/(4ε) if (p+ε)n≤k(p+\varepsilon)n\le k(p+ε)n≤k, and E[(k−B)+]≤1/(4ε)\mathbb E[(k-B)_+]\le 1/(4\varepsilon)E[(k−B)+​]≤1/(4ε) if k≤(p−ε)nk\le(p-\varepsilon)nk≤(p−ε)n

Proved
MultiSecretary.BR.binomial_overshoot

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

binomialconcentrationp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let BBB be a binomial random variable with nnn trials and success probability p∈[0,1]p\in[0,1]p∈[0,1], let k∈Z+k\in\mathbb Z_+k∈Z+​ and ε>0\varepsilon>0ε>0. Then

E[(B−k)+]≤14εif (p+ε)n≤k,andE[(k−B)+]≤14εif k≤(p−ε)n.\mathbb E[(B-k)_+]\le\frac1{4\varepsilon}\quad\text{if }(p+\varepsilon)n\le k,\qquad\text{and}\qquad\mathbb E[(k-B)_+]\le\frac1{4\varepsilon}\quad\text{if }k\le(p-\varepsilon)n.E[(B−k)+​]≤4ε1​if (p+ε)n≤k,andE[(k−B)+​]≤4ε1​if k≤(p−ε)n.

When the budget kkk exceeds the mean pnpnpn by a linear margin, the expected overshoot of BBB beyond kkk is bounded by a constant independent of nnn, and symmetrically for the undershoot. The paper uses this repeatedly, first in Proposition 1.

Formalization Note BBB is the number of successes of b∈{0,1}nb\in\{0,1\}^nb∈{0,1}n under the product weight ∏t(p if bt=1, else 1−p)\prod_t(p\text{ if }b_t=1\text{, else }1-p)∏t​(p if bt​=1, else 1−p); expectations are finite sums. The page states the conditions as p+ε≤k/np+\varepsilon\le k/np+ε≤k/n and k/n≤p−εk/n\le p-\varepsilonk/n≤p−ε. They are written here in the multiplied form used by the proof (Appendix B, p. 32), which is equivalent for n≥1n\ge1n≥1; with Lean's convention k/0=0k/0=0k/0=0 the printed second condition would hold at n=0n=0n=0 for every kkk and the bound would fail (e.g. k=100k=100k=100, p=1p=1p=1, ε=12\varepsilon=\tfrac12ε=21​).

Preamble
import Mathlib
Formal statement
namespace MultiSecretary.BR

open Finset

/-- Lemma 2, p. 8 (proof in Appendix B, p. 32). Let `B` be binomial with `n` trials and success
probability `p`, realized as the number of successes of `b : Fin n → Bool` under the product weight
`∏_t (p if b t else 1 − p)`. For every `ε > 0`:
`E[(B − k)_+] ≤ 1/(4ε)` if `(p + ε) n ≤ k`, and `E[(k − B)_+] ≤ 1/(4ε)` if `k ≤ (p − ε) n`.
(The page writes the conditions as `p + ε ≤ k/n` and `k/n ≤ p − ε`; the multiplied form is the one
the proof uses and also covers `n = 0`.) -/
theorem binomial_overshoot (n k : ℕ) (p ε : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (hε : 0 < ε) :
    ((p + ε) * n ≤ k →
      ∑ b : Fin n → Bool, (∏ t, if b t = true then p else 1 - p) *
        max (((univ.filter (fun t => b t = true)).card : ℝ) - k) 0 ≤ 1 / (4 * ε)) ∧
    ((k : ℝ) ≤ (p - ε) * n →
      ∑ b : Fin n → Bool, (∏ t, if b t = true then p else 1 - p) *
        max ((k : ℝ) - (univ.filter (fun t => b t = true)).card) 0 ≤ 1 / (4 * ε)) := by sorry

end MultiSecretary.BR
Source
Arlotto, Gurvich, Uniformly Bounded Regret in the Multi-Secretary Problem, arXiv:1710.07719v2, Lemma 2, p. 8; proof in Appendix B, p. 32
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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