Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4, p. 10 — SampleGreedy and Algorithm 2 produce output sets with the same probability distribution

Proved
SubsampleSubmod.SampleGreedy.lemma_4

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

greedy-algorithmsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1randomized-algorithmssubmodular-maximization

Let N\mathcal NN be a finite ground set with a fixed linear order, fff any set function, I\mathcal II any family of sets, TTT any set and qqq a real number. Let S1S^1S1 be the output of SampleGreedy with sampling probability qqq and S2S^2S2 the output of Algorithm 2 run from O=TO = TO=T, whose coins show 111 independently with probability qqq. Then for every set R⊆NR \subseteq \mathcal NR⊆N,

Pr⁡[S1=R]  =  Pr⁡[S2=R],\Pr[S^1 = R] \;=\; \Pr[S^2 = R],Pr[S1=R]=Pr[S2=R],

that is,

∑N′q∣N′∣(1−q)n−∣N′∣ [SampleGreedy(N′)=R]  =  ∑Bq∣B∣(1−q)n−∣B∣ [S2(B)=R].\sum_{\mathcal N'} q^{|\mathcal N'|}(1-q)^{n-|\mathcal N'|}\,[\mathrm{SampleGreedy}(\mathcal N') = R] \;=\; \sum_{B} q^{|B|}(1-q)^{n-|B|}\,[S^2(B) = R].N′∑​q∣N′∣(1−q)n−∣N′∣[SampleGreedy(N′)=R]=B∑​q∣B∣(1−q)n−∣B∣[S2(B)=R].

This lemma transfers every guarantee proved for Algorithm 2 to SampleGreedy.

Formalization Note The identity is stated for every real qqq, every TTT and every I\mathcal II, which includes the paper's setting (q∈[0,1]q \in [0,1]q∈[0,1], T=OPT∈IT = \mathrm{OPT} \in \mathcal IT=OPT∈I). Both algorithms break ties by the same fixed order of the ground set, as the paper assumes on p. 10.

Preamble
import Mathlib
import Definitions.Def_SubsampleSubmod_SampleGreedy_Analysis
Formal statement
namespace SubsampleSubmod.SampleGreedy

/-- Lemma 4 (p. 10). The output `S¹` of SampleGreedy and the output `S²` of Algorithm 2 (run with any
comparison set `T`) have the same distribution: for every set `R`, `Pr[S¹ = R] = Pr[S² = R]`, both
computed with the independent sampling probability `q`. -/
theorem lemma_4 {α : Type} [Fintype α] [LinearOrder α] (f : Finset α → ℝ)
    (I : Finset α → Prop) (q : ℝ) (T R : Finset α) :
    ∑ N' : Finset α, sampleWeight q N' * (if sampleGreedy f I N' = R then (1 : ℝ) else 0) =
      ∑ B : Finset α, sampleWeight q B * (if (alg2 f I T B).S = R then (1 : ℝ) else 0) := by sorry

end SubsampleSubmod.SampleGreedy
Source
Harshaw et al., arXiv:2104.02772v1, p. 10, Lemma 4 (proof pp. 10–11)
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

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