Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 2.1 — swapping SiS_iSi​ and SjS_jSj​ does not increase v(Xi)v(Xj)v(X_i)v(X_j)v(Xi​)v(Xj​)

Proved
NSWBetter.lemma_2_1

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmsfair-divisionnash-social-welfarep2o-gran-per-chapterp2o-plan-paperp2o-v1

Let all agents share the additive valuation v≥0v\ge0v≥0, and let Xi,XjX_i,X_jXi​,Xj​ be the (disjoint) bundles of two agents i≠ji\ne ji=j in an allocation. Let Si⊆XiS_i\subseteq X_iSi​⊆Xi​ and Sj⊆XjS_j\subseteq X_jSj​⊆Xj​ with

v(Sj)≥v(Si),v(Xi∖Si)≥v(Xj∖Sj).v(S_j)\ge v(S_i),\qquad v(X_i\setminus S_i)\ge v(X_j\setminus S_j).v(Sj​)≥v(Si​),v(Xi​∖Si​)≥v(Xj​∖Sj​).

Swapping SiS_iSi​ and SjS_jSj​ gives Yi=(Xi∖Si)∪SjY_i=(X_i\setminus S_i)\cup S_jYi​=(Xi​∖Si​)∪Sj​ and Yj=(Xj∖Sj)∪SiY_j=(X_j\setminus S_j)\cup S_iYj​=(Xj​∖Sj​)∪Si​. Then

v(Yi) v(Yj)≤v(Xi) v(Xj),v(Y_i)\,v(Y_j)\le v(X_i)\,v(X_j),v(Yi​)v(Yj​)≤v(Xi​)v(Xj​),

with equality if and only if v(Sj)=v(Si)v(S_j)=v(S_i)v(Sj​)=v(Si​) or v(Xi∖Si)=v(Xj∖Sj)v(X_i\setminus S_i)=v(X_j\setminus S_j)v(Xi​∖Si​)=v(Xj​∖Sj​).

This exchange step is used in the proofs of Lemma 3.6 and Lemma 4.2.

Differences from the source:

  • encoding: an allocation XXX and two agents i,ji,ji,j → two disjoint bundles Xi,XjX_i,X_jXi​,Xj​ of goods; reason: the statement involves only these two bundles, and any two bundles of an allocation are disjoint
  • encoding: valuation v:2G→R≥0v:2^G\to\mathbb R_{\ge0}v:2G→R≥0​, additive → v : Fin m → ℝ with v≥0v\ge0v≥0 and bundle values as sums; reason: Lean convention; same instances
Preamble
import Mathlib
Formal statement
namespace NSWBetter

/-- **Lemma 2.1 (swap lemma).**
Viswanathan, *A Better-than-e^{1/e} Approximation Algorithm for Nash Social Welfare under Additive Valuations*, arXiv:2607.13340 (held version, sha256 08811cb4…), Lemma 2.1, p.9: "Given a fair allocation instance where all agents have the same valuation function v, let X be an allocation and let i, j ∈ N be two agents. Let Si ⊆ Xi and Sj ⊆ Xj be two sets of goods such that v(Sj) ≥ v(Si) and v(Xi \ Si) ≥ v(Xj \ Sj). Let Y be an allocation constructed by starting at X and swapping the sets of goods Si and Sj; that is, Yi = (Xi \ Si) ∪ Sj and Yj = (Xj \ Sj) ∪ Si. Then, v(Yi)v(Yj) ≤ v(Xi)v(Xj). Moreover, equality holds if and only if v(Sj) = v(Si) or v(Xi \ Si) = v(Xj \ Sj)."

**Formalization Note.** Only the two bundles `X_i`, `X_j` of the allocation matter; they are disjoint sets of goods. The common additive valuation is `v : Fin m → ℝ`, `v ≥ 0`. -/
theorem lemma_2_1 {m : ℕ} (v : Fin m → ℝ) (hv : ∀ g, 0 ≤ v g) (Xi Xj Si Sj : Finset (Fin m))
    (hdisj : Disjoint Xi Xj) (hSi : Si ⊆ Xi) (hSj : Sj ⊆ Xj)
    (h1 : ∑ g ∈ Si, v g ≤ ∑ g ∈ Sj, v g) (h2 : ∑ g ∈ Xj \ Sj, v g ≤ ∑ g ∈ Xi \ Si, v g) :
    (∑ g ∈ (Xi \ Si) ∪ Sj, v g) * (∑ g ∈ (Xj \ Sj) ∪ Si, v g) ≤
        (∑ g ∈ Xi, v g) * (∑ g ∈ Xj, v g) ∧
      ((∑ g ∈ (Xi \ Si) ∪ Sj, v g) * (∑ g ∈ (Xj \ Sj) ∪ Si, v g) =
          (∑ g ∈ Xi, v g) * (∑ g ∈ Xj, v g) ↔
        ∑ g ∈ Sj, v g = ∑ g ∈ Si, v g ∨ ∑ g ∈ Xi \ Si, v g = ∑ g ∈ Xj \ Sj, v g) := by sorry

end NSWBetter
Source
Viswanathan, A Better-than-e^{1/e} Approximation Algorithm for Nash Social Welfare under Additive Valuations, arXiv:2607.13340 (held version, sha256 08811cb468c2df39231dca4222c5af94163587c7c83e205e50bbf0b91fc1deb3), Lemma 2.1, p.9
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me