Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§4.2 — balanced queries cannot distinguish fCf_CfC​ from the cut function ggg

Proved
NonmonotoneSubmod.QueryLB.balanced_queries_indistinguishable

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

p2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1query-complexity

Let AAA be a deterministic adaptive algorithm making qqq value queries on [n][n][n], let C⊆[n]C \subseteq [n]C⊆[n], and let g(S)=∣S∣(n−∣S∣)g(S) = |S|(n-|S|)g(S)=∣S∣(n−∣S∣). Suppose that every query Q1,…,QqQ_1, \dots, Q_qQ1​,…,Qq​ that AAA issues when run against the oracle ggg is balanced for (C,[n]∖C)(C, [n]\setminus C)(C,[n]∖C). Then, run against fCf_CfC​ instead, AAA receives the same answers after each of its first iii queries for every i≤qi \le qi≤q, and so issues the same queries and returns the same set:

A(fC)=A(g).A(f_C) = A(g).A(fC​)=A(g).

This is the step "as long as queries are balanced, the algorithm gets the same answer regardless of (C,D)(C, D)(C,D)": the algorithm's whole computation path is determined by ggg.

Formalization Note No hypothesis on nnn, mmm or ∣C∣|C|∣C∣ is needed; the statement holds for every CCC because fCf_CfC​ and ggg agree on balanced sets.

Preamble
import Mathlib
import Definitions.Def_NonmonotoneSubmod_QueryLB_HardInstance
import Definitions.Def_NonmonotoneSubmod_QueryLB_QueryAlgorithm
Formal statement
namespace NonmonotoneSubmod.QueryLB

/-- §4.2, proof of Theorem 4.5 (p. 1150, first paragraph): if every query that a deterministic
`q`-query algorithm `A` issues against the cut oracle `g(S) = |S|(n − |S|)` is balanced for
`(C, Cᶜ)`, then `A` receives the same answers from `f_C` as from `g`, issues the same queries
and returns the same set. -/
theorem balanced_queries_indistinguishable (n m q : ℕ) (A : DetAlg (Fin n) q)
    (C : Finset (Fin n)) (hbal : ∀ i < q, Balanced n m C (A.queryAt (gCut n) i)) :
    (∀ i ≤ q, A.answers (fC n m C) i = A.answers (gCut n) i) ∧
      A.run (fC n m C) = A.run (gCut n) := by sorry

end NonmonotoneSubmod.QueryLB
Source
Feige, Mirrokni, Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4), 2011, p. 1150, §4.2, proof of Theorem 4.5, first paragraph
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting.

  • n,m,qn, m, qn,m,q are arbitrary natural numbers. Nothing is assumed about them: no evenness, no m≥1m \ge 1m≥1, no relation between them.
  • AAA is a deterministic qqq-query algorithm on [n]={0,…,n−1}[n] = \{0,\dots,n-1\}[n]={0,…,n−1}:
    • a query rule maps each finite list of reals aaa to a set queryA(a)⊆[n]\mathrm{query}_A(a) \subseteq [n]queryA​(a)⊆[n];
    • an output rule maps each such list to a set outputA(a)\mathrm{output}_A(a)outputA​(a).
  • Against an oracle hhh, the answer lists are a0(h)=( )a_0(h) = (\,)a0​(h)=() and ai+1(h)=ai(h)a_{i+1}(h) = a_i(h)ai+1​(h)=ai​(h) followed by h(queryA(ai(h)))h(\mathrm{query}_A(a_i(h)))h(queryA​(ai​(h))).
  • The iii-th query is Qi(h)=queryA(ai(h))Q_i(h) = \mathrm{query}_A(a_i(h))Qi​(h)=queryA​(ai​(h)), and the returned set is runA(h)=outputA(aq(h))\mathrm{run}_A(h) = \mathrm{output}_A(a_q(h))runA​(h)=outputA​(aq​(h)).
  • C⊆[n]C \subseteq [n]C⊆[n] is any subset; no size is required.
  • The two oracles compared are:
    • the cut function g(S)=∣S∣(n−∣S∣)g(S) = |S|(n-|S|)g(S)=∣S∣(n−∣S∣);
    • the hard instance fC(S)=fn,m(∣S∩C∣,∣S∩Cc∣)f_C(S) = f_{n,m}(|S\cap C|, |S\cap C^c|)fC​(S)=fn,m​(∣S∩C∣,∣S∩Cc∣), where fn,m(k,ℓ)f_{n,m}(k,\ell)fn,m​(k,ℓ) is (k+ℓ)(n−k−ℓ)(k+\ell)(n-k-\ell)(k+ℓ)(n−k−ℓ) if ∣k−ℓ∣≤m|k-\ell|\le m∣k−ℓ∣≤m, and k(n−2ℓ)+(n−2k)ℓ+m2−2m∣k−ℓ∣k(n-2\ell)+(n-2k)\ell+m^2-2m|k-\ell|k(n−2ℓ)+(n−2k)ℓ+m2−2m∣k−ℓ∣ otherwise (all in the reals).

Hypothesis. Each of the first qqq queries issued against the cut oracle is balanced:

∣∣Qi(g)∩C∣−∣Qi(g)∩Cc∣∣≤mfor every i<q.\big||Q_i(g)\cap C| - |Q_i(g)\cap C^c|\big| \le m \qquad \text{for every } i < q.​∣Qi​(g)∩C∣−∣Qi​(g)∩Cc∣​≤mfor every i<q.

Claim. Both of the following hold:

  • ai(fC)=ai(g)a_i(f_C) = a_i(g)ai​(fC​)=ai​(g) for every i≤qi \le qi≤q;
  • runA(fC)=runA(g)\mathrm{run}_A(f_C) = \mathrm{run}_A(g)runA​(fC​)=runA​(g).

Degenerate cases:

  • q=0q = 0q=0: the hypothesis is vacuous, and the conclusion only compares a0=( )a_0 = (\,)a0​=() with itself and outputA( )\mathrm{output}_A(\,)outputA​() with itself.
  • m=0m = 0m=0: "balanced" requires exactly equal counts.
  • n=0n = 0n=0: every query is ∅\emptyset∅, which is balanced.
  • Answers beyond qqq: the conclusion says nothing about aia_iai​ for i>qi > qi>q.
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

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