Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

BundleMVL-2 NP checker, step 3: checking R2(C)≥κR_2(C) \ge \kappaR2​(C)≥κ for a certified set CCC is polynomial-time

Open
MultiPurchase.Hardness.rev_check_polytime

by tianyipeng · Nov 3, 2026 · Mathlib 0df444a (Lean v4.33.1)

multi-purchasenp-completenesspolynomial-time

With the notation of Definitions.Def_MultiPurchase_Hardness_Checker, there is a function ggg on checker inputs that is computable in polynomial time by a Cook Turing machine, maps the empty word to the empty word, and satisfies, for every c,dc, dc,d with ShapeOK(c,d)\mathrm{ShapeOK}(c,d)ShapeOK(c,d) and CanonOK(c)\mathrm{CanonOK}(c)CanonOK(c),

g(⟨c#d⟩)≠ε  ⟺  RevOK(c,d).g(\langle c\#d\rangle) \ne \varepsilon \iff \mathrm{RevOK}(c,d).g(⟨c#d⟩)=ε⟺RevOK(c,d).

Here, reading the rationals ri,V{i},V{i,j},v0,κr_i, V_{\{i\}}, V_{\{i,j\}}, v_0, \kappari​,V{i}​,V{i,j}​,v0​,κ from ccc and xi=di∈{0,1}x_i = d_i \in \{0,1\}xi​=di​∈{0,1}, RevOK(c,d)\mathrm{RevOK}(c,d)RevOK(c,d) is the inequality

κ(v0+∑ixiV{i}+∑i<jxixjV{i,j})≤∑ixi riV{i}+∑i<jxixj(ri+rj)V{i,j},\kappa\Big(v_0 + \sum_{i} x_i V_{\{i\}} + \sum_{i<j} x_i x_j V_{\{i,j\}}\Big) \le \sum_i x_i\, r_i V_{\{i\}} + \sum_{i<j} x_i x_j (r_i + r_j) V_{\{i,j\}},κ(v0​+i∑​xi​V{i}​+i<j∑​xi​xj​V{i,j}​)≤i∑​xi​ri​V{i}​+i<j∑​xi​xj​(ri​+rj​)V{i,j}​,

i.e. R2(C)≥κR_2(C) \ge \kappaR2​(C)≥κ (eq. (4), p. 17) for the recommendation set C={i:xi=1}C = \{i : x_i = 1\}C={i:xi​=1}, since the denominator of R2(C)R_2(C)R2​(C) is positive.

This is the arithmetic core of the NP verifier for the BundleMVL-2 decision problem: given the guessed set CCC, the expected revenue R2(C)R_2(C)R2​(C) is a ratio of sums of products of the input rationals, and comparing it with κ\kappaκ takes polynomially many additions and multiplications of binary numbers whose lengths stay polynomial in the input length.

Preamble
import Mathlib
import Definitions.Def_CookPvsNP_defs
import Definitions.Def_ProjSchedTW_Complexity_Encoding
import Definitions.Def_MultiPurchase_Hardness_Model
import Definitions.Def_MultiPurchase_Hardness_Checker
Formal statement
namespace MultiPurchase.Hardness

open CookPvsNP ProjSchedTW.Complexity

theorem rev_check_polytime :
    ∃ g : List (Option (BSym ⊕ Bool)) → List (Option (BSym ⊕ Bool)),
      PolyTimeComputable g ∧ g [] = [] ∧
        ∀ c d, ShapeOK c d → CanonOK c → (g (chkWord c d) ≠ [] ↔ RevOK c d) := by sorry

end MultiPurchase.Hardness
Source
Tulabandhula, Sinha, Karra & Patidar, Multi-Purchase Behavior: Modeling, Estimation and Optimization, arXiv:2006.08055v2, p. 17, Theorem 1 (membership half: the decision version of (5) is in NP), eq. (4); polynomial-time computability as in S. Cook, The P versus NP problem (Clay Mathematics Institute), §1 and Definition 3

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