Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.1 — without a perfect matching, after ℓ≥14n2log⁡(mAmax⁡/Amin⁡)\ell\ge\frac14 n^2\log(mA_{\max}/A_{\min})ℓ≥41​n2log(mAmax​/Amin​) Sinkhorn iterations every step-2 output is a Hall blocker

Proved
SinkhornHall.theorem_4_1

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

bipartite-matchinghall-theoremmatrix-scalingp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1sinkhorn-algorithmsinkhorn-hall-blocker

Let AAA be a nonnegative n×nn\times nn×n real matrix with no zero row or column, and let G=G(A)G=G(A)G=G(A) be its support graph (row iii and column jjj adjacent iff Aij>0A_{ij}>0Aij​>0). Let mmm be the number of nonzero entries of AAA, Amax⁡A_{\max}Amax​ its largest entry and Amin⁡A_{\min}Amin​ its least positive entry. Run the algorithm Sinkhorn & Sorting Scaling Vectors with (r,c)=(1,1)(r,c)=(\mathbf 1,\mathbf 1)(r,c)=(1,1):

  1. Step 0. x=y:=1x=y:=\mathbf 1x=y:=1, then y←C(x)y\leftarrow C(x)y←C(x), where C(x)j=1/∑iAijxiC(x)_j=1/\sum_iA_{ij}x_iC(x)j​=1/∑i​Aij​xi​.
  2. Step 1. Repeat ℓ\ellℓ times: x←R(y)x\leftarrow R(y)x←R(y), y←C(x)y\leftarrow C(x)y←C(x), where R(y)i=1/∑jAijyjR(y)_i=1/\sum_jA_{ij}y_jR(y)i​=1/∑j​Aij​yj​.
  3. Step 2. Sort xi1≥⋯≥xinx_{i_1}\ge\dots\ge x_{i_n}xi1​​≥⋯≥xin​​ and yj1≤⋯≤yjny_{j_1}\le\dots\le y_{j_n}yj1​​≤⋯≤yjn​​, choose k∗k^*k∗ with (xik∗yjk∗)n≥x1⋯xny1⋯yn(x_{i_{k^*}}y_{j_{k^*}})^n\ge x_1\cdots x_ny_1\cdots y_n(xik∗​​yjk∗​​)n≥x1​⋯xn​y1​⋯yn​, and output X={i1,…,ik∗}X=\{i_1,\dots,i_{k^*}\}X={i1​,…,ik∗​}.

Theorem. Suppose GGG has no perfect matching and

ℓ ≥ 14 n2log⁡mAmax⁡Amin⁡.\ell\ \ge\ \frac14\,n^2\log\frac{mA_{\max}}{A_{\min}} .ℓ ≥ 41​n2logAmin​mAmax​​.

Then step 2 has an output, and every output XXX of step 2 (for every tie-break in the two sorts and every admissible k∗k^*k∗) is a Hall blocker: ∣Γ(X)∣<∣X∣|\Gamma(X)|<|X|∣Γ(X)∣<∣X∣, where Γ(X)\Gamma(X)Γ(X) is the set of columns adjacent to XXX.

A Hall blocker certifies, by Hall's theorem, that GGG has no perfect matching. The theorem shows that O(n2log⁡(mAmax⁡/Amin⁡))O(n^2\log(mA_{\max}/A_{\min}))O(n2log(mAmax​/Amin​)) Sinkhorn iterations not only detect the absence of a perfect matching but also produce such a certificate by sorting the scaling vectors.

Formalization Note The scaling vectors after ℓ\ellℓ iterations are sinkhorn A ℓ (ℓ=0\ell=0ℓ=0 is the state right after step 0); step 2 is the relation IsStep2Output; mmm is numEdges A; log⁡\loglog is the natural logarithm and the threshold is a real inequality.

Differences from the source:

  • reading: step 2 leaves the sort tie-breaks and the choice of k* open; 'the output is a Hall blocker' → every X with IsStep2Output (sinkhorn A ℓ) X is a Hall blocker; reason: the proof works for every admissible choice; this is the stronger reading
  • generalization: 'the output is a Hall blocker' (existence of an output presupposed) → adds the conjunct ∃ X, IsStep2Output (sinkhorn A ℓ) X; reason: the paper presupposes step 2 is well posed; the Lean statement implies the source's claim and rules out a vacuous reading
  • reading: log (base not named) → Real.log (natural logarithm); reason: the constants 1/2 (Pinsker), 4/n² and 1/4 are derived in the natural log
  • reading: §4 standing assumptions (p.15): G = G(A) for a nonnegative n × n matrix A, no isolated node, n = |U| = |V|, (r, c) = (1, 1) → A : Matrix (Fin n) (Fin n) ℝ with hA, hrow, hcol, and marginals 1; reason: stated once at the top of §4 and in force for Theorem 4.1 and its proof
  • encoding: m, the number of nonzero elements of A → numEdges A; reason: §2 uses m for the column count
  • encoding: 'G has no perfect matching' → ¬ ∃ permutation σ with A i (σ i) > 0 for all i; reason: |U| = |V| = n, so a perfect matching is a bijection along edges
  • encoding: 1-based indices i_1, …, i_n and k* ∈ {1, …, n} → Fin n (0-based), i_t = σ (t − 1), k = k* − 1, output σ '' {0, …, k}; reason: Lean convention; the output has k* elements as in the paper
  • encoding: the vectors after ℓ iterations of step 1 → sinkhorn A ℓ, ℓ = 0 being the state after step 0; reason: Lean convention for the algorithm's state
Preamble
import Mathlib
import Definitions.Def_SinkhornHall_Model
import Definitions.Def_SinkhornHall_Analysis

open Finset
Formal statement
namespace SinkhornHall

/-- **Theorem 4.1.**
Hayashi–Hirai–Sakabe, arXiv:2204.07425v2, Theorem 4.1, p.15: "Suppose that G has no perfect
matching. For ℓ ≥ (1/4)n² log mA_max/A_min, the output is a Hall blocker."

The algorithm is "Sinkhorn & Sorting Scaling Vectors" (§4.1, p.15): step 0 sets `x = y := 1` and
`y ← C(x)`; step 1 repeats `x ← R(y)`, `y ← C(x)` `ℓ` times; step 2 sorts `x` decreasingly and `y`
increasingly, chooses `k*` with `(x_{i_{k*}} y_{j_{k*}})ⁿ ≥ x₁⋯xₙy₁⋯yₙ` and outputs
`{i₁, …, i_{k*}}`. Setting of §4 (p.15): `G = G(A)` for a nonnegative `n × n` matrix `A` with no
isolated node (no zero row or column), `(r, c) = (1, 1)`; `m` is the number of nonzero entries of
`A`, `A_max` its largest entry and `A_min` its least positive entry.

Conclusion: an output of step 2 exists, and every output of step 2 (every tie-break of the sorts,
every admissible `k*`) is a Hall blocker, `|Γ(X)| < |X|`.

**Formalization Note.** `(x, y) = sinkhorn A ℓ`; `ℓ = 0` is the state right after step 0. Indices
are `Fin n` (0-based). `log` is `Real.log`, and the threshold is the real inequality
`(1/4) n² log(m A_max / A_min) ≤ ℓ` with `m = numEdges A`. -/
theorem theorem_4_1 {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : ∀ i j, 0 ≤ A i j)
    (hrow : ∀ i, ∃ j, 0 < A i j) (hcol : ∀ j, ∃ i, 0 < A i j)
    (hpm : ¬ HasPerfectMatching A) (ℓ : ℕ)
    (hℓ : (1 / 4 : ℝ) * (n : ℝ) ^ 2 * Real.log ((numEdges A : ℝ) * Amax A / Amin A) ≤ ℓ) :
    (∃ X, IsStep2Output (sinkhorn A ℓ).1 (sinkhorn A ℓ).2 X) ∧
      ∀ X, IsStep2Output (sinkhorn A ℓ).1 (sinkhorn A ℓ).2 X → IsHallBlocker A X := by sorry

end SinkhornHall
Source
Hayashi–Hirai–Sakabe, Finding Hall blockers by matrix scaling, arXiv:2204.07425v2, Theorem 4.1, p.15 (algorithm: §4.1, Algorithm: Sinkhorn & Sorting Scaling Vectors, p.15; setting: §4, p.15; proof pp.15–16)
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 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