Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.4 — Algorithm LS is a (13−ϵn)(\frac13-\frac{\epsilon}{n})(31​−nϵ​)-approximation, (12−ϵn)(\frac12-\frac{\epsilon}{n})(21​−nϵ​) for symmetric fff, with (1+ϵ/n2)k≤n(1+\epsilon/n^2)^k \le n(1+ϵ/n2)k≤n steps

Proved
NonmonotoneSubmod.LocalSearch.ls_approximation

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

approximation-algorithmslocal-searchp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1submodular-functions

Let f:2X→R≥0f : 2^X \to \mathbb{R}_{\ge 0}f:2X→R≥0​ be a nonnegative submodular function on a nonempty finite ground set XXX with n=∣X∣n = |X|n=∣X∣ elements, let OPT=max⁡S⊆Xf(S)\mathrm{OPT} = \max_{S \subseteq X} f(S)OPT=maxS⊆X​f(S), and let ϵ>0\epsilon > 0ϵ>0. Run Algorithm LS with acceptance factor 1+ϵ/n21 + \epsilon/n^21+ϵ/n2: start at a singleton {v}\{v\}{v} of maximum value, repeatedly add an element aaa with f(S∪{a})>(1+ϵ/n2)f(S)f(S \cup \{a\}) > (1+\epsilon/n^2) f(S)f(S∪{a})>(1+ϵ/n2)f(S), and only when no such addition exists remove an element aaa with f(S∖{a})>(1+ϵ/n2)f(S)f(S \setminus \{a\}) > (1+\epsilon/n^2) f(S)f(S∖{a})>(1+ϵ/n2)f(S). Then:

  1. Approximation. Whenever the algorithm terminates at a set SSS (no step applies), whatever choices it made along the way, the returned value satisfies
max⁡{f(S), f(X∖S)}≥(13−ϵn)OPT.\max\{f(S),\, f(X \setminus S)\} \ge \Big(\frac13 - \frac{\epsilon}{n}\Big)\mathrm{OPT}.max{f(S),f(X∖S)}≥(31​−nϵ​)OPT.
  1. Symmetric functions. If moreover f(X∖T)=f(T)f(X \setminus T) = f(T)f(X∖T)=f(T) for all TTT, then at termination
f(S)≥(12−ϵn)OPT.f(S) \ge \Big(\frac12 - \frac{\epsilon}{n}\Big)\mathrm{OPT}.f(S)≥(21​−nϵ​)OPT.
  1. Number of iterations. If n≥2n \ge 2n≥2, every run of kkk steps of the algorithm satisfies
(1+ϵn2)k≤n,\Big(1 + \frac{\epsilon}{n^2}\Big)^k \le n,(1+n2ϵ​)k≤n,

so k=O(1ϵn2log⁡n)k = O(\tfrac{1}{\epsilon} n^2 \log n)k=O(ϵ1​n2logn) and the algorithm terminates.

This is the deterministic 1/31/31/3-approximation for unconstrained maximization of nonnegative submodular functions, and 1/21/21/2 for symmetric ones, from the value-oracle model.

Formalization Note The printed theorem ends "The algorithm uses at most O(1ϵn3log⁡n)O(\frac1\epsilon n^3 \log n)O(ϵ1​n3logn) oracle calls"; this O(⋅)O(\cdot)O(⋅) has an unquantified constant, so part 3 states instead the explicit step bound that the proof establishes (each step makes at most 2n2n2n oracle queries). Part 3 needs n≥2n \ge 2n≥2: for n=1n = 1n=1, f(∅)=5f(\emptyset) = 5f(∅)=5, f({v})=0f(\{v\}) = 0f({v})=0 lets LS take one step, and (1+ϵ)≤1(1+\epsilon) \le 1(1+ϵ)≤1 fails. Nonnegativity of fff is the standing assumption of §3; ϵ>0\epsilon > 0ϵ>0 is implicit in the paper; X≠∅X \neq \emptysetX=∅ makes the start singleton exist. For symmetric fff the returned value max⁡{f(S),f(X∖S)}\max\{f(S), f(X\setminus S)\}max{f(S),f(X∖S)} equals f(S)f(S)f(S). The runs are quantified over every choice of maximizing singleton and of improving element.

Preamble
import Mathlib
import Definitions.Def_NonmonotoneSubmod_Shared_Submodular
import Definitions.Def_NonmonotoneSubmod_Shared_OPT
import Definitions.Def_NonmonotoneSubmod_Shared_SymmetricSetFun
import Definitions.Def_NonmonotoneSubmod_LocalSearch_LSAlgorithm
Formal statement
namespace NonmonotoneSubmod.LocalSearch

/-- Theorem 3.4 (Feige–Mirrokni–Vondrák 2011, p. 1141), in the explicit form of its proof.
Let `f ≥ 0` be submodular on a nonempty finite ground set `X` with `n = |X|`, and `ε > 0`.
(a) every terminated run of Algorithm LS returns `max(f(S), f(X \ S)) ≥ (1/3 − ε/n) OPT`;
(b) if `f` is symmetric, every terminated run ends at `S` with `f(S) ≥ (1/2 − ε/n) OPT`;
(c) if `n ≥ 2`, every run of `k` LS steps has `(1 + ε/n²)^k ≤ n`. -/
theorem ls_approximation {X : Type} [Fintype X] [DecidableEq X] [Nonempty X]
    (f : Finset X → ℝ) (hf0 : ∀ S : Finset X, 0 ≤ f S) (hf : NonmonotoneSubmod.Shared.Submodular f)
    (ε : ℝ) (hε : 0 < ε) :
    (∀ (S : ℕ → Finset X) (k : ℕ), IsLSRun ε f S k → IsLSTerminal ε f (S k) →
        (1 / 3 - ε / (Fintype.card X : ℝ)) * NonmonotoneSubmod.Shared.OPT f ≤ lsOutput f (S k)) ∧
    (NonmonotoneSubmod.Shared.SymmetricSetFun f → ∀ (S : ℕ → Finset X) (k : ℕ), IsLSRun ε f S k →
        IsLSTerminal ε f (S k) →
        (1 / 2 - ε / (Fintype.card X : ℝ)) * NonmonotoneSubmod.Shared.OPT f ≤ f (S k)) ∧
    (2 ≤ Fintype.card X → ∀ (S : ℕ → Finset X) (k : ℕ), IsLSRun ε f S k →
        (1 + ε / (Fintype.card X : ℝ) ^ 2) ^ k ≤ (Fintype.card X : ℝ)) := by sorry

end NonmonotoneSubmod.LocalSearch
Source
Feige, Mirrokni, Vondrák, Maximizing Non-Monotone Submodular Functions, SIAM J. Comput. 40(4), 2011, p. 1141, Theorem 3.4 and its proof
Read-back

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

Let XXX be a finite type with decidable equality that is nonempty. Write n=∣X∣≥1n = |X| \ge 1n=∣X∣≥1 for its number of elements, used as a real number throughout. Let f:2X→Rf : 2^X \to \mathbb{R}f:2X→R be a function on the finite subsets of XXX, and let ε\varepsilonε be a real number. The statement assumes:

  • Non-negativity: f(S)≥0f(S) \ge 0f(S)≥0 for every subset S⊆XS \subseteq XS⊆X.
  • Submodularity: fff satisfies the predicate Submodular from an imported file. That definition's code is not shown here, so its exact content cannot be stated. By its name it is a submodularity condition.
  • Positive parameter: ε>0\varepsilon > 0ε>0.

The statement also uses six notions whose code is not included in what was given to me. Their exact meaning cannot be checked from this declaration:

  • OPT(f)\mathrm{OPT}(f)OPT(f): a real number attached to fff.
  • IsLSRun(ε,f,S,k)\mathrm{IsLSRun}(\varepsilon, f, S, k)IsLSRun(ε,f,S,k): a condition on a sequence of subsets S0,S1,S2,…S_0, S_1, S_2, \dotsS0​,S1​,S2​,… (one subset of XXX for each natural number) together with a step count k∈Nk \in \mathbb{N}k∈N.
  • IsLSTerminal(ε,f,T)\mathrm{IsLSTerminal}(\varepsilon, f, T)IsLSTerminal(ε,f,T): a condition on a single subset TTT.
  • lsOutput(f,T)\mathrm{lsOutput}(f, T)lsOutput(f,T): a real number attached to a subset TTT.
  • SymmetricSetFun fff: a property of fff.
  • Submodular fff: the hypothesis listed above.

The comment above the theorem says that lsOutput(f,T)\mathrm{lsOutput}(f,T)lsOutput(f,T) is max⁡(f(T),f(X∖T))\max\big(f(T), f(X\setminus T)\big)max(f(T),f(X∖T)), that OPT\mathrm{OPT}OPT is an optimum value, and that "symmetric" and "LS run" refer to a local-search algorithm. A comment is not checked by Lean, so these descriptions are not part of what the code asserts. Under the hypotheses above, the theorem states that all three of the following hold together:

(a) For every sequence of subsets (Si)i∈N(S_i)_{i \in \mathbb{N}}(Si​)i∈N​ and every k∈Nk \in \mathbb{N}k∈N: if IsLSRun(ε,f,S,k)\mathrm{IsLSRun}(\varepsilon, f, S, k)IsLSRun(ε,f,S,k) holds and SkS_kSk​ satisfies IsLSTerminal(ε,f,Sk)\mathrm{IsLSTerminal}(\varepsilon, f, S_k)IsLSTerminal(ε,f,Sk​), then

(13−εn)OPT(f)  ≤  lsOutput(f,Sk).\left(\frac13 - \frac{\varepsilon}{n}\right)\mathrm{OPT}(f) \;\le\; \mathrm{lsOutput}(f, S_k).(31​−nε​)OPT(f)≤lsOutput(f,Sk​).

(b) If fff satisfies SymmetricSetFun, then for every sequence (Si)(S_i)(Si​) and every kkk: if IsLSRun(ε,f,S,k)\mathrm{IsLSRun}(\varepsilon, f, S, k)IsLSRun(ε,f,S,k) holds and SkS_kSk​ satisfies IsLSTerminal(ε,f,Sk)\mathrm{IsLSTerminal}(\varepsilon, f, S_k)IsLSTerminal(ε,f,Sk​), then

(12−εn)OPT(f)  ≤  f(Sk).\left(\frac12 - \frac{\varepsilon}{n}\right)\mathrm{OPT}(f) \;\le\; f(S_k).(21​−nε​)OPT(f)≤f(Sk​).

(c) If n≥2n \ge 2n≥2, then for every sequence (Si)(S_i)(Si​) and every k∈Nk \in \mathbb{N}k∈N with IsLSRun(ε,f,S,k)\mathrm{IsLSRun}(\varepsilon, f, S, k)IsLSRun(ε,f,S,k),

(1+εn2)k  ≤  n.\left(1 + \frac{\varepsilon}{n^2}\right)^{k} \;\le\; n.(1+n2ε​)k≤n.

Part (c) does not require the run to be terminal. In all three parts the same ε\varepsilonε is used in the hypotheses on the run and in the bound. Only SkS_kSk​, and whatever IsLSRun\mathrm{IsLSRun}IsLSRun says about the other terms, enters the conclusion.

Degenerate cases.

  • Division: because XXX is nonempty, n≥1n \ge 1n≥1. So ε/n\varepsilon/nε/n and ε/n2\varepsilon/n^2ε/n2 never divide by zero, and the statement uses no subtraction of natural numbers.
  • n=1n = 1n=1: the hypothesis n≥2n \ge 2n≥2 of (c) fails, so (c) asserts nothing. The coefficients in (a) and (b) become 13−ε\tfrac13 - \varepsilon31​−ε and 12−ε\tfrac12 - \varepsilon21​−ε.
  • Large ε\varepsilonε: when ε≥n/3\varepsilon \ge n/3ε≥n/3 in (a), or ε≥n/2\varepsilon \ge n/2ε≥n/2 in (b), the coefficient is zero or negative. The left-hand side is then 000 times OPT(f)\mathrm{OPT}(f)OPT(f), or a negative multiple of it. Whether that makes the inequality automatic depends on the sign of OPT(f)\mathrm{OPT}(f)OPT(f) and of lsOutput\mathrm{lsOutput}lsOutput, which the unseen definitions determine. For (b), f(Sk)≥0f(S_k) \ge 0f(Sk​)≥0 by hypothesis, so it holds automatically if OPT(f)≥0\mathrm{OPT}(f) \ge 0OPT(f)≥0.
  • k=0k = 0k=0: the conclusion of (c) reads 1≤n1 \le n1≤n, which is true whenever n≥2n \ge 2n≥2. For (a) and (b) with k=0k = 0k=0, the conclusions concern S0S_0S0​ and apply whenever the unseen IsLSRun\mathrm{IsLSRun}IsLSRun and IsLSTerminal\mathrm{IsLSTerminal}IsLSTerminal conditions are met by S0S_0S0​.
  • Vacuity: if no sequence satisfies IsLSRun\mathrm{IsLSRun}IsLSRun, or no subset satisfies IsLSTerminal\mathrm{IsLSTerminal}IsLSTerminal, parts (a) and (b) hold vacuously. If fff does not satisfy SymmetricSetFun, (b) holds vacuously. Whether any of this happens cannot be decided from the code shown.
  • Values of fff: f(∅)f(\emptyset)f(∅) and f(X)f(X)f(X) may be any non-negative reals, as far as the non-negativity hypothesis goes. The unseen submodularity predicate may restrict them further.
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