Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 2 — rounding weights to integers loses at most a factor 1−ϵ/21-\epsilon/21−ϵ/2

Proved
ApproxMWM.Scaling.rescaling_approx_mwm

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmsmatchingp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let G=(V,E)G=(V,E)G=(V,E) be a finite simple graph with n=∣V∣n=|V|n=∣V∣ vertices and nonnegative edge weights www, let wmax⁡=max⁡e∈Ew(e)>0w_{\max}=\max_{e\in E}w(e)>0wmax​=maxe∈E​w(e)>0, and let 0<ϵ<10<\epsilon<10<ϵ<1. Put γr=ϵ wmax⁡/n\gamma_r=\epsilon\,w_{\max}/nγr​=ϵwmax​/n and define the rounded weights w~(e)=⌊w(e)/γr⌋\tilde w(e)=\lfloor w(e)/\gamma_r\rfloorw~(e)=⌊w(e)/γr​⌋. If MMM is a (1−ϵ/2)(1-\epsilon/2)(1−ϵ/2)-MWM with respect to w~\tilde ww~, then for every matching M′M'M′ of GGG

w(M) > (1−ϵ) w(M′).w(M)\ >\ (1-\epsilon)\,w(M').w(M) > (1−ϵ)w(M′).

In particular MMM is a (1−ϵ)(1-\epsilon)(1−ϵ)-MWM with respect to www.

This justifies the standing assumption of the paper that edge weights are integers in {1,…,N}\{1,\dots,N\}{1,…,N} with NNN polynomial in nnn.

Formalization Note The page writes this argument as an unnumbered chain of inequalities for a maximum weight matching M∗M^*M∗; here the strict conclusion is stated for every matching M′M'M′, which follows since w(M′)≤w(M∗)w(M')\le w(M^*)w(M′)≤w(M∗) and 1−ϵ>01-\epsilon>01−ϵ>0. The page's γ=ϵwmax⁡/n\gamma=\epsilon w_{\max}/nγ=ϵwmax​/n is unrelated to γ=log⁡ϵ′−1\gamma=\log\epsilon'^{-1}γ=logϵ′−1 of Definition 3.10. wmax⁡w_{\max}wmax​ is given by the hypotheses that it bounds every edge weight and is attained.

Preamble
import Mathlib
import Definitions.Def_ApproxMWM_Scaling_Matching
Formal statement
namespace ApproxMWM.Scaling

/-- Section 2, display on pp. 1:8–1:9 (Duan–Pettie, J. ACM 61(1) 2014): rounding the weights.
Let `G` have `n = |V|` vertices and nonnegative edge weights `w` with maximum
`w_max = max_e w(e) > 0`, and let `0 < ε < 1`. Put `γ_r = ε · w_max / n` and
`w̃(e) = ⌊w(e) / γ_r⌋`. If `M` is a `(1 - ε/2)`-MWM with respect to `w̃`, then
`w(M) > (1 - ε) · w(M')` for every matching `M'` of `G`; in particular `M` is a `(1 - ε)`-MWM
with respect to `w`. -/
theorem rescaling_approx_mwm {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (w : Sym2 V → ℝ) (ε wmax : ℝ) (hε : 0 < ε) (hε1 : ε < 1)
    (hw_nonneg : ∀ e ∈ G.edgeSet, 0 ≤ w e)
    (hwmax_ge : ∀ e ∈ G.edgeSet, w e ≤ wmax)
    (hwmax_att : ∃ e ∈ G.edgeSet, w e = wmax)
    (hwmax_pos : 0 < wmax)
    (M : Finset (Sym2 V))
    (hM : IsApproxMWM G (fun e => ((⌊w e / (ε * wmax / (Fintype.card V : ℝ))⌋ : ℤ) : ℝ))
      (1 - ε / 2) M) :
    IsMatching G M ∧ ∀ M' : Finset (Sym2 V), IsMatching G M' → (1 - ε) * weight w M' < weight w M := by sorry

end ApproxMWM.Scaling
Source
Duan and Pettie, Linear-Time Approximation for Maximum Weight Matching, J. ACM 61(1), Article 1 (2014), https://doi.org/10.1145/2529989, pp. 1:8–1:9, Section 2, display on pp. 1:8–1:9
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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