Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§1, Step 3, first bracket, p. 34 — at Step 3 the starred zeros are a maximal independent set and the covered lines a minimal cover

Proved
MunkresAlg.Assignment.step3_maximal_minimal

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

assignment-problemindependent-zerosinvariantline-coverp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let AAA be a real n×nn\times nn×n matrix and let sss be a state reachable by Munkres' algorithm from AAA that is at Step 3, with current matrix BBB, covered rows RRR, covered columns CCC and starred zeros SSS. Then:

  1. all the zeros of BBB are covered: every bij=0b_{ij}=0bij​=0 has i∈Ri\in Ri∈R or j∈Cj\in Cj∈C;
  2. each starred zero is covered by precisely one line: for (i,j)∈S(i,j)\in S(i,j)∈S, exactly one of i∈Ri\in Ri∈R, j∈Cj\in Cj∈C holds;
  3. there are exactly as many covered lines as starred zeros: ∣R∣+∣C∣=∣S∣|R|+|C|=|S|∣R∣+∣C∣=∣S∣;
  4. the starred zeros form a maximal set of independent zeros: SSS is a set of independent zeros of BBB and ∣S∣=ν(B)|S|=\nu(B)∣S∣=ν(B);
  5. the covered lines form a minimal set of lines containing all the zeros: for every R′,C′R',C'R′,C′ containing all the zeros of BBB, ∣R∣+∣C∣≤∣R′∣+∣C′∣|R|+|C|\le |R'|+|C'|∣R∣+∣C∣≤∣R′∣+∣C′∣.

Here ν(B)\nu(B)ν(B) is the maximal number of independent zeros. Steps 1 and 2 thus carry out Step B of Flood's outline, finding a minimal cover and a maximal independent set.

Preamble
import Mathlib
import Definitions.Def_MunkresAlg_Assignment_Basic
import Definitions.Def_MunkresAlg_Assignment_Algorithm
Formal statement
namespace MunkresAlg.Assignment

/-- §1, Step 3, first bracket, p. 34: at Step 3 all zeros are covered, each starred zero is
covered by exactly one line, there are as many covered lines as starred zeros, the starred zeros
form a maximum set of independent zeros, and the covered lines form a minimum set of lines
containing all the zeros. -/
theorem step3_maximal_minimal {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (s : State n)
    (hs : Reachable A s) (hph : s.phase = Phase.step3) :
    CoversZeros s.A s.rowCov s.colCov ∧
    (∀ p ∈ s.starred, (p.1 ∈ s.rowCov ∧ p.2 ∉ s.colCov) ∨ (p.1 ∉ s.rowCov ∧ p.2 ∈ s.colCov)) ∧
    s.rowCov.card + s.colCov.card = s.starred.card ∧
    (IsIndepZeros s.A s.starred ∧ s.starred.card = maxIndepZeros s.A) ∧
    (∀ R C : Finset (Fin n), CoversZeros s.A R C →
      s.rowCov.card + s.colCov.card ≤ R.card + C.card) := by sorry

end MunkresAlg.Assignment
Source
Munkres, Algorithms for the assignment and transportation problems, J. SIAM 5 (1957), p. 34, §1, Step 3, first bracket
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