Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary to Lemma 4 — expected size from double coverage

Proved
KVVMatching.Ranking.corollary_lemma_4

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

bipartite-matchingonline-algorithmsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

On an n×nn\times nn×n upper-triangular adjacency matrix with unit diagonal, let MMM be the matching produced by RANKING in the rows-arrive picture, with uniformly random row order. Let D(M)D(M)D(M) be the indices whose row and column are both matched. Then

E∣M∣=n2+12E∣D(M)∣.\mathbb E|M|=\frac n2+\frac12\mathbb E|D(M)|.E∣M∣=2n​+21​E∣D(M)∣.

The assertion applies to RANKING's output itself; its coverage property follows from the algorithm and the diagonal condition. The expectation is over all n!n!n! row orders.

Preamble
import Definitions.Def_KVVMatching_Ranking_Algorithms
Formal statement
namespace KVVMatching.Ranking

/-- Corollary to Lemma 4, p. 354: expected matching cardinality in terms of
indices whose row and column are both covered. -/
theorem corollary_lemma_4 {n : ℕ} (adj : Fin n → Fin n → Prop)
    (hdiag : ∀ i, adj i i)
    (hupper : ∀ i j, adj i j → i ≤ j) :
    rowRankingExpectation adj = (n : ℝ) / 2 +
      (1 / 2 : ℝ) * ((n.factorial : ℝ)⁻¹ *
        ∑ σ : Equiv.Perm (Fin n),
          ((doubleCovered (rowRankingMatching adj σ)).card : ℝ)) := by sorry

end KVVMatching.Ranking
Source
Karp, Vazirani, Vazirani, An Optimal Algorithm for On-line Bipartite Matching, STOC 1990, p. 354, Corollary following Lemma 4
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

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