Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§1, Step 3, pp. 34–35 — h exists and is positive; non-covered −h, twice-covered +h; 0* and 0′ stay zeros; n_{k+1} ≥ n_k

Proved
MunkresAlg.Assignment.step3_transformation

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

assignment-problemdual-updateinvariantp2o-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 Ak=(aij)A_k=(a_{ij})Ak​=(aij​), covered rows RRR and covered columns CCC. Then there is a real hhh with:

  1. h>0h>0h>0, and hhh is the smallest non-covered element: h=apqh=a_{pq}h=apq​ for some p∉R,q∉Cp\notin R,q\notin Cp∈/R,q∈/C, and h≤aijh\le a_{ij}h≤aij​ whenever i∉Ri\notin Ri∈/R, j∉Cj\notin Cj∈/C;
  2. each starred and each primed zero is once-covered (lies in exactly one covered line);

and for every state ttt reached from sss by the Step 3 move, with matrix Ak+1=(aij′)A_{k+1}=(a'_{ij})Ak+1​=(aij′​):

  1. aij′=aij−ha'_{ij}=a_{ij}-haij′​=aij​−h if (i,j)(i,j)(i,j) is non-covered, aij′=aij+ha'_{ij}=a_{ij}+haij′​=aij​+h if it is twice-covered, and aij′=aija'_{ij}=a_{ij}aij′​=aij​ if it is once-covered;
  2. every starred and every primed zero of sss is still a zero of Ak+1A_{k+1}Ak+1​;
  3. nk+1≥nkn_{k+1}\ge n_knk+1​≥nk​, where nkn_knk​ and nk+1n_{k+1}nk+1​ are the maximal numbers of independent zeros of AkA_kAk​ and Ak+1A_{k+1}Ak+1​.

Part 1 rules out the algorithm getting stuck at Step 3, and part 5 is the monotonicity used in the finiteness argument.

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

/-- §1, Step 3, pp. 34–35: at Step 3 the smallest non-covered element `h` exists and is positive;
the transformation decreases each non-covered element by `h`, increases each twice-covered element
by `h` and leaves each once-covered element unaltered; each starred and primed zero is
once-covered and is still a zero afterwards; and `n_{k+1} ≥ n_k`. -/
theorem step3_transformation {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (s : State n)
    (hs : Reachable A s) (hph : s.phase = Phase.step3) :
    ∃ h : ℝ, 0 < h ∧ (∃ p, NonCovered s p ∧ s.A p.1 p.2 = h) ∧
      (∀ q, NonCovered s q → h ≤ s.A q.1 q.2) ∧
      (∀ p ∈ s.starred ∪ s.primed,
        (p.1 ∈ s.rowCov ∧ p.2 ∉ s.colCov) ∨ (p.1 ∉ s.rowCov ∧ p.2 ∈ s.colCov)) ∧
      ∀ t, Step s t →
        (∀ i j, i ∉ s.rowCov → j ∉ s.colCov → t.A i j = s.A i j - h) ∧
        (∀ i j, i ∈ s.rowCov → j ∈ s.colCov → t.A i j = s.A i j + h) ∧
        (∀ i j, (i ∈ s.rowCov ∧ j ∉ s.colCov) ∨ (i ∉ s.rowCov ∧ j ∈ s.colCov) →
          t.A i j = s.A i j) ∧
        (∀ p ∈ s.starred ∪ s.primed, t.A p.1 p.2 = 0) ∧
        maxIndepZeros s.A ≤ maxIndepZeros t.A := by sorry

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