Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Polynomial-time encoding of the Nash social welfare reduction instance

Proved
NSWApxHard.Reduction.reduction_encode_polyTime

by kmehltretter82 · Oct 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmic-game-theoryapproximation-hardnesscombinatorial-optimizationcomplexity-theory

Let m0≥1m_0 \ge 1m0​≥1 and 0≤a<b0 \le a < b0≤a<b be fixed natural numbers with b>0b > 0b>0, and define the rational parameter

α′=m0+23m0+3∈(13,12)\alpha' = \frac{m_0 + 2}{3m_0 + 3} \in \left(\frac{1}{3}, \frac{1}{2}\right)α′=3m0​+3m0​+2​∈(31​,21​)

so that 1+α′=4m0+53m0+31 + \alpha' = \frac{4m_0 + 5}{3m_0 + 3}1+α′=3m0​+34m0​+5​. Given a 3-regular graph input I=(N,G)I = (N, G)I=(N,G) on N>0N > 0N>0 vertices, set k=⌊aN/b⌋<Nk = \lfloor a N / b \rfloor < Nk=⌊aN/b⌋<N. In Lee's reduction (Section 2, p. 2), the reduced Nash social welfare instance has n=∣Agent(G)∣=52Nn = |\mathrm{Agent}(G)| = \frac{5}{2} Nn=∣Agent(G)∣=25​N agents (the NNN vertices and 32N\frac{3}{2} N23​N edges of GGG) and m=∣Item(G,k)∣=k+92Nm = |\mathrm{Item}(G, k)| = k + \frac{9}{2} Nm=∣Item(G,k)∣=k+29​N items (kkk vertex items and 3∣E∣=92N3|E| = \frac{9}{2} N3∣E∣=29​N edge-endpoint items), with rational utilities redUtil(G,k,α′)\mathrm{redUtil}(G, k, \alpha')redUtil(G,k,α′) taking values in {0,1,2m0+13m0+3,m0+13m0+3,m0+23m0+3}\{0, 1, \frac{2m_0 + 1}{3m_0 + 3}, \frac{m_0 + 1}{3m_0 + 3}, \frac{m_0 + 2}{3m_0 + 3}\}{0,1,3m0​+32m0​+1​,3m0​+3m0​+1​,3m0​+3m0​+2​}.

Scaling all utilities by the common integer factor S=(3m0+3)(4m0+5)S = (3m_0 + 3)(4m_0 + 5)S=(3m0​+3)(4m0​+5) yields integer utilities

u(ag,it)=(3m0+3)(4m0+5)⋅redUtil(G,k,α′)(ag,it)∈N,u(\text{ag}, \text{it}) = (3m_0 + 3)(4m_0 + 5) \cdot \mathrm{redUtil}(G, k, \alpha')(\text{ag}, \text{it}) \in \mathbb{N},u(ag,it)=(3m0​+3)(4m0​+5)⋅redUtil(G,k,α′)(ag,it)∈N,

and scaling the target welfare threshold (1+α′)(3k−1.5N)/n(1 + \alpha')^{(3k - 1.5N)/n}(1+α′)(3k−1.5N)/n by SSS raises its nnn-th power (where n=2.5Nn = 2.5 Nn=2.5N) to the exact positive integer product threshold

T=Sn(1+α′)3k−1.5N=(3m0+3)4N−3k(4m0+5)N+3k.T = S^n (1 + \alpha')^{3k - 1.5N} = (3m_0 + 3)^{4N - 3k} (4m_0 + 5)^{N + 3k}.T=Sn(1+α′)3k−1.5N=(3m0​+3)4N−3k(4m0​+5)N+3k.

There exist a reduction map P:GraphInput→NSWInputP : \mathrm{GraphInput} \to \mathrm{NSWInput}P:GraphInput→NSWInput and a polynomial-time computable bit-list transducer g:List Bool→List Boolg : \mathrm{List\ Bool} \to \mathrm{List\ Bool}g:List Bool→List Bool such that for every valid 3-regular graph input I=(N,G)I = (N, G)I=(N,G) with N>0N > 0N>0, encNSW(P(I))=g(encGraph(I))\mathrm{encNSW}(P(I)) = g(\mathrm{encGraph}(I))encNSW(P(I))=g(encGraph(I)), (P(I)).T=T(P(I)).T = T(P(I)).T=T, and the agents and items of P(I)P(I)P(I) are in bijection with Agent(G)\mathrm{Agent}(G)Agent(G) and Item(G,k)\mathrm{Item}(G, k)Item(G,k) with the scaled integer utilities above.

Preamble
import Mathlib
import Definitions.Def_SetCoverThreshold_SetCover_Complexity
import Definitions.Def_NSWApxHard_Reduction_Welfare
import Definitions.Def_NSWApxHard_Reduction_CubicVC
import Definitions.Def_NSWApxHard_Reduction_Instance
Formal statement
namespace NSWApxHard.Reduction

/-- Lee, §2, p. 2: for fixed integer parameters `m₀ ≥ 1` and `a < b` with `b > 0`, the reduction
from a 3-regular graph input `I = (N, G)` with `k = ⌊a N / b⌋` to an integer-utility Nash social
welfare instance `P I` (obtained by scaling the rational utilities `redUtil I.G k α'` with
`α' = (m₀ + 2) / (3m₀ + 3)` by the common denominator `(3m₀ + 3)(4m₀ + 5)` and setting the
product threshold `T = (3m₀ + 3)^{4N - 3k} (4m₀ + 5)^{N + 3k}`) is computable in polynomial time
with respect to the canonical encodings `encGraph` and `encNSW`. -/
theorem reduction_encode_polyTime (m₀ a b : ℕ) (hm₀ : 1 ≤ m₀) (hb : 0 < b) (hab : a < b) :
    ∃ (P : GraphInput → NSWInput) (g : List Bool → List Bool),
      CookPvsNP.PolyTimeComputable g ∧
      ∀ (I : GraphInput) [DecidableRel I.G.Adj], 0 < I.N → IsCubic I.G →
        let k := (a * I.N) / b
        encNSW (P I) = g (encGraph I) ∧
        (P I).T = (3 * m₀ + 3) ^ (4 * I.N - 3 * k) * (4 * m₀ + 5) ^ (I.N + 3 * k) ∧
        ∃ (eA : Fin (P I).n ≃ Agent I.G) (eB : Fin (P I).m ≃ Item I.G k),
          ∀ (ag : Fin (P I).n) (it : Fin (P I).m),
            ((P I).u ag it : ℝ) =
              ((3 * (m₀ : ℝ) + 3) * (4 * (m₀ : ℝ) + 5)) *
                redUtil I.G k (((m₀ : ℝ) + 2) / (3 * (m₀ : ℝ) + 3)) (eA ag) (eB it) := by sorry

end NSWApxHard.Reduction
Source
Euiwoong Lee, APX-Hardness of Maximizing Nash Social Welfare with Indivisible Items, Information Processing Letters 122 (2017), 17–20, https://arxiv.org/pdf/1507.01159, Section 2, p. 2

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