Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§1, Step D (p. 33) for Step 3 — the sum of the elements decreases by n(n − n_k)h

Proved
MunkresAlg.Assignment.step3_sum_decrease

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

assignment-problemdual-updatep2o-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 matrix Ak=(aij)A_k=(a_{ij})Ak​=(aij​). Let hhh be the smallest non-covered element of AkA_kAk​, and let ttt be a state reached from sss by the Step 3 move, with matrix Ak+1=(aij′)A_{k+1}=(a'_{ij})Ak+1​=(aij′​). With nkn_knk​ the maximal number of independent zeros of AkA_kAk​,

∑i,jaij′=∑i,jaij−n (n−nk) h.\sum_{i,j} a'_{ij}=\sum_{i,j} a_{ij}-n\,(n-n_k)\,h .i,j∑​aij′​=i,j∑​aij​−n(n−nk​)h.

Step 3 is the transformation of Step C of Flood's outline, and Step D states this decrease; for integer matrices it gives the original finiteness argument.

Formalization Note n−nkn-n_kn−nk​ is computed in the reals; it is non-negative because nk≤nn_k\le nnk​≤n.

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

/-- §1, Step D (p. 33) for the transformation of Step 3: the sum of the elements of the matrix
decreases by `n (n − n_k) h`, where `n_k` is the maximal number of independent zeros before the
transformation and `h` the smallest non-covered element. -/
theorem step3_sum_decrease {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (s t : State n) (h : ℝ)
    (hs : Reachable A s) (hph : s.phase = Phase.step3)
    (hmin : ∃ p, NonCovered s p ∧ s.A p.1 p.2 = h) (hle : ∀ q, NonCovered s q → h ≤ s.A q.1 q.2)
    (hst : Step s t) :
    ∑ i, ∑ j, t.A i j =
      ∑ i, ∑ j, s.A i j - (n : ℝ) * ((n : ℝ) - (maxIndepZeros s.A : ℝ)) * h := by sorry

end MunkresAlg.Assignment
Source
Munkres, Algorithms for the assignment and transportation problems, J. SIAM 5 (1957), p. 33, §1, Step D (applied to Step 3, p. 34, which 'is the same transformation as is specified in Step C')
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