Greedy adapts to sharpness
Sebastian Pokutta
v1 2026-11-28 · last 2026-11-29
Additional material: arXiv:2002.04063
Note: Formalizes Theorems 1 to 4, Corollary 1, Observation 1, Lemmas 1 and 2 and Proposition 2 of Torrico et al. (2020), with counterexamples correcting Lemma 1 (3) and Proposition 4.
Abstract. The greedy algorithm for maximizing a monotone submodular function subject to a cardinality constraint guarantees the factor , which is best possible in the worst case, yet it performs much better in practice. Sharpness, the discrete analogue of a Hölderian error bound, explains this. A function is -submodular sharp if every set with misses an element of an optimal solution with marginal value at least , and monotonic sharpness, which bounds the total marginal value of the missing elements in terms of their number, implies it. Under either condition every run of the greedy algorithm, with any tie-breaking, returns a set with , without knowing and , and with parameters that change from step to step it attains a nested guarantee, for every . The proof compares the values of the greedy sets with explicit comparison values through Bernoulli’s inequality, and the case gives the classical . For linear functions sharpness is a condition on the subsets of . Checking only sets of size , as the paper suggests, needs elements outside ; without them it fails, and so does the sharpness region given for the coverage function on which greedy attains exactly .
Maximizing a monotone submodular set function subject to a cardinality constraint is NP-hard, and the greedy algorithm, which adds an element of largest marginal value times, guarantees the factor , which is best possible in the worst case. In practice greedy does much better. The paper explains this with sharpness, the discrete analogue of the Hölderian error bounds of continuous optimization: near an optimal solution the function still gains a lot. Greedy adapts to sharpness without knowing its parameters, and the guarantee improves from to , which tends to as and equals for .
The problem and the greedy algorithm¶
Sharpness¶
Monotonic sharpness measures the distance of from by and asks for a large total marginal value of the missing elements.
Submodular sharpness measures the distance by the gap and asks for a single element with a large marginal value, a Polyak–Łojasiewicz inequality in the -norm.
By submodularity and monotonicity,
and some element has at least the average marginal value . For the first part, . For the second, monotonic sharpness gives , so the average is at least .
Both right-hand sides are powers of numbers in , namely and , which decrease as the exponent grows, divided by . So the best guarantee comes from the smallest and the largest (Lemmas 1 and 2 of the paper).
The guarantees¶
The greedy step gains at least the marginal value of the element given by sharpness, so satisfies while . The comparison sequence satisfies by Bernoulli’s inequality for the exponent ; this is the convexity of . The map increases up to , by Bernoulli’s inequality for the exponent , and all with lie below this point. So implies when lies below the point; otherwise directly. At this is the guarantee.
By Lemma 2, is -submodular sharp, and Theorem 3 applies.
With and (Lemma 2) the recursion becomes , so .
The guarantee as a function of the parameters¶
The first bound is . For , Bernoulli’s inequality for the exponent gives , which is the monotonicity in , and the limit is with . So the best guarantee comes from the smallest and the largest for which is sharp. This is the content of Proposition 1, which places the best pair on the boundary of the region of feasible parameters.
Dynamic sharpness¶
The parameters may also change with the size of the set, which is what the greedy algorithm sees step by step.
The recursion of Theorem 3 now uses the parameters in step , and the comparison values are ; Bernoulli’s inequality gives as before. The same inequality gives , so for . This keeps the nested expression well defined and puts below the point up to which increases, so the argument works for every . Theorem 2 follows from Theorem 4 as Theorem 1 follows from Theorem 3, set by set.
Linear functions¶
For a linear function the marginal values are the weights, so sharpness no longer depends on beyond the missing part .
Every is the missing part of the feasible set . With the sum of the smallest weights in , the condition reads for , as in the paper; the case is implied by .
Checking only sets of size ¶
Lemma 1 (3) of the paper states that for a submodular function the inequality of monotonic sharpness only needs to be checked for sets of size exactly : adding elements outside to keeps and decreases the marginal values. This needs enough elements outside .
A set with is padded with elements of , which exist since . The missing part stays the same, and by submodularity the marginal values at the padded set are smaller.
The only set of size 2 is itself, while has the missing element 1 with marginal value 0 against the bound .
The same gap affects the coverage function of Proposition 4, the instance on which greedy attains exactly . There has only elements.
At both missing sets and have marginal value 1, against the bound .
Coverage¶
This entry covers Definitions 1 to 4, Theorems 1 to 4, Observation 1, Corollary 1, Lemmas 1 and 2, and Proposition 2, with Lemma 1 (3) and Proposition 4 corrected by counterexamples. Proposition 1 is covered by the monotonicity of the guarantee. Not covered are the concave-over-modular functions of Proposition 3, Observations 2 to 4, the experiments, and approximate sharpness (Theorem 5). The proof of Theorem 5 starts its induction at a comparison value when , and the recursion it derives does not imply the bound: for , , and the recursion allows , below the claimed .
The formal statements at a glance¶
/-- Theorem 1: under `(c, θ)`-monotonic sharpness the greedy algorithm returns a
`1 - (1 - θ/c)^{1/θ}` approximation. -/
theorem monotonic_sharp_greedy : MonotonicSharpGreedy := Proof.monotonic_sharp_greedy
/-- Theorem 3: under `(c, θ)`-submodular sharpness the greedy algorithm returns a
`1 - (1 - θ/c)^{1/θ}` approximation. -/
theorem submodular_sharp_greedy : SubmodularSharpGreedy := Proof.submodular_sharp_greedy
/-- Corollary 1: the classical `1 - 1/e` guarantee for every monotone submodular function. -/
theorem greedy_classic : GreedyClassic := Proof.greedy_classic
/-- Lemma 2: the case `c = 1`, `θ = 0` holds for every monotone submodular function, and monotonic
sharpness implies submodular sharpness. -/
theorem submodular_sharp_facts : SubmodularSharpFacts := Proof.submodular_sharp_facts
/-- Lemmas 1 and 2: sharpness is preserved under increasing `c` and decreasing `θ`. -/
theorem sharpness_monotone : SharpnessMonotone := Proof.sharpness_monotone
/-- Theorem 2: under dynamic `(c, θ)`-monotonic sharpness the greedy algorithm returns a
`1 - G_k` approximation, for every `k`. -/
theorem dyn_monotonic_sharp_greedy : DynMonotonicSharpGreedy := Proof.dyn_monotonic_sharp_greedy
/-- Theorem 4: under dynamic `(c, θ)`-submodular sharpness the greedy algorithm returns a
`1 - G_k` approximation, for every `k`. -/
theorem dyn_submodular_sharp_greedy : DynSubmodularSharpGreedy :=
Proof.dyn_submodular_sharp_greedy
/-- Observation 1: constant parameters give `G_j = (1 - θ j/(c k))^{1/θ}`. -/
theorem dyn_constant : DynConstant := Proof.dyn_constant
/-- The guarantee `1 - (1 - θ/c)^{1/θ}` is at least `1 - e^{-1/c}`, increases with `θ`, decreases
with `c`, equals `1/c` at `θ = 1` and tends to `1 - e^{-1/c}` as `θ → 0`. -/
theorem guarantee_properties : GuaranteeProperties := Proof.guarantee_properties
/-- Proposition 2: monotonic sharpness of a linear function is a condition on the subsets of
`S⋆`. -/
theorem linear_sharp : LinearSharp := Proof.linear_sharp
/-- Lemma 1 (3), corrected: with `|V \ S⋆| ≥ k`, only sets of size `k` need to be checked. -/
theorem size_k_suffices : SizeKSuffices := Proof.size_k_suffices
/-- Lemma 1 (3) fails without room outside `S⋆`. -/
theorem size_k_counterexample : SizeKCounterexample := Proof.size_k_counterexample
/-- Proposition 4 fails for `k = 2`: sharpness forces `c ≥ 2^θ`. -/
theorem coverage_counterexample : CoverageCounterexample := Proof.coverage_counterexampleFormal verification — ✅ all 21 formal results are kernel-checked
◇ elaborated definition (Lean v4.35.0) Submodular functions —
Lemmata.GreedySharp.IsSubmodular(source)◇ elaborated definition (Lean v4.35.0) Optimal solutions —
Lemmata.GreedySharp.IsOptimal(source)◇ elaborated definition (Lean v4.35.0) The greedy algorithm —
Lemmata.GreedySharp.IsGreedyRun(source)◇ elaborated definition (Lean v4.35.0) Definition 1 —
Lemmata.GreedySharp.IsMonotonicSharp(source)◇ elaborated definition (Lean v4.35.0) Definition 3 —
Lemmata.GreedySharp.IsSubmodularSharp(source)✓ kernel-checked (Lean v4.35.0) Lemma 2 —
Lemmata.GreedySharp.submodular_sharp_facts(source)✓ kernel-checked (Lean v4.35.0) Monotonicity in the parameters —
Lemmata.GreedySharp.sharpness_monotone(source)✓ kernel-checked (Lean v4.35.0) Theorem 3 —
Lemmata.GreedySharp.submodular_sharp_greedy(source)✓ kernel-checked (Lean v4.35.0) Theorem 1 —
Lemmata.GreedySharp.monotonic_sharp_greedy(source)✓ kernel-checked (Lean v4.35.0) Corollary 1 —
Lemmata.GreedySharp.greedy_classic(source)✓ kernel-checked (Lean v4.35.0) The guarantee —
Lemmata.GreedySharp.guarantee_properties(source)◇ elaborated definition (Lean v4.35.0) Definition 2 —
Lemmata.GreedySharp.IsDynMonotonicSharp(source)◇ elaborated definition (Lean v4.35.0) Definition 4 —
Lemmata.GreedySharp.IsDynSubmodularSharp(source)◇ elaborated definition (Lean v4.35.0) The nested guarantee —
Lemmata.GreedySharp.dynG(source)✓ kernel-checked (Lean v4.35.0) Theorem 4 —
Lemmata.GreedySharp.dyn_submodular_sharp_greedy(source)✓ kernel-checked (Lean v4.35.0) Theorem 2 —
Lemmata.GreedySharp.dyn_monotonic_sharp_greedy(source)✓ kernel-checked (Lean v4.35.0) Observation 1 —
Lemmata.GreedySharp.dyn_constant(source)✓ kernel-checked (Lean v4.35.0) Proposition 2 —
Lemmata.GreedySharp.linear_sharp(source)✓ kernel-checked (Lean v4.35.0) Sets of size suffice —
Lemmata.GreedySharp.size_k_suffices(source)✓ kernel-checked (Lean v4.35.0) Without room outside —
Lemmata.GreedySharp.size_k_counterexample(source)✓ kernel-checked (Lean v4.35.0) The coverage function for —
Lemmata.GreedySharp.coverage_counterexample(source)
Checked at commit 2733eb8b2cc1. The formal statement is machine-checked; that it matches the prose is checked by review. What “checked” means.
Lean IsSubmodular · ◇ elaborated · source
Definition in Lean
/-- `f` is submodular: the marginal values have diminishing returns, `f_B(e) ≤ f_A(e)` for
`A ⊆ B` and `e ∉ B`. -/
def IsSubmodular (f : Finset α → ℝ) : Prop :=
∀ A B : Finset α, A ⊆ B → ∀ e, e ∉ B → marginal f B e ≤ marginal f A eLean IsOptimal · ◇ elaborated · source
Definition in Lean
/-- `S⋆` is an optimal solution of `max {f(S) : S ⊆ V, |S| ≤ k}` (problem (P₁)). -/
def IsOptimal (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (Sstar : Finset α) : Prop :=
Sstar ⊆ V ∧ Sstar.card ≤ k ∧ ∀ S ⊆ V, S.card ≤ k → f S ≤ f SstarLean IsGreedyRun · ◇ elaborated · source
Definition in Lean
/-- A run of the greedy algorithm (Algorithm 1) for `k` steps: `S_0 = ∅`, and `S_{i+1}` adds to
`S_i` an element of `V \ S_i` of largest marginal value. -/
def IsGreedyRun (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (S : ℕ → Finset α) : Prop :=
S 0 = ∅ ∧ ∀ i < k, ∃ e ∈ V \ S i, S (i + 1) = insert e (S i) ∧
∀ e' ∈ V \ S i, marginal f (S i) e' ≤ marginal f (S i) eLean IsMonotonicSharp · ◇ elaborated · source
Definition in Lean
/-- **Definition 1** (monotonic sharpness) with respect to the optimal solution `S⋆`:
`∑_{e ∈ S⋆ \ S} f_S(e) ≥ (|S⋆ \ S|/(kc))^{1/θ} f(S⋆)` for all `S ⊆ V` with `|S| ≤ k`. -/
def IsMonotonicSharp (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℝ) (Sstar : Finset α) :
Prop :=
∀ S ⊆ V, S.card ≤ k →
((Sstar \ S).card / (k * c) : ℝ) ^ (1 / θ) * f Sstar ≤ ∑ e ∈ Sstar \ S, marginal f S eLean IsSubmodularSharp · ◇ elaborated · source
Definition in Lean
/-- **Definition 3** (submodular sharpness) with respect to the optimal solution `S⋆`: every
`S ⊆ V` with `|S| ≤ k` and `f(S) < f(S⋆)` has an element `e ∈ S⋆ \ S` with
`f_S(e) ≥ (f(S⋆) - f(S))^{1-θ} f(S⋆)^θ/(kc)`. -/
def IsSubmodularSharp (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℝ) (Sstar : Finset α) :
Prop :=
∀ S ⊆ V, S.card ≤ k → f S < f Sstar → ∃ e ∈ Sstar \ S,
(f Sstar - f S) ^ (1 - θ) * f Sstar ^ θ / (k * c) ≤ marginal f S eLean submodular_sharp_facts · ✅ kernel-checked · source
Statement in Lean
/-- Lemma 2: the case `c = 1`, `θ = 0` holds for every monotone submodular function, and monotonic
sharpness implies submodular sharpness. -/
theorem submodular_sharp_facts : SubmodularSharpFactswhere SubmodularSharpFacts is (source):
/-- **Lemma 2** (submodular sharpness). Every monotone submodular function satisfies the
inequality of Definition 3 with `c = 1` and `θ = 0`, `max_{e ∈ S⋆ \ S} f_S(e) ≥ (f(S⋆) - f(S))/k`,
and `(c, θ)`-monotonic sharpness implies `(c, θ)`-submodular sharpness. -/
def SubmodularSharpFacts : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (Sstar : Finset α),
Monotone f → IsSubmodular f → 0 ≤ f ∅ → 1 ≤ k → IsOptimal V f k Sstar →
(∀ S ⊆ V, S.card ≤ k → f S < f Sstar →
∃ e ∈ Sstar \ S, (f Sstar - f S) / k ≤ marginal f S e) ∧
∀ c θ : ℝ, 0 < c → 0 < θ → θ ≤ 1 → IsMonotonicSharp V f k c θ Sstar →
IsSubmodularSharp V f k c θ SstarLean sharpness_monotone · ✅ kernel-checked · source
Statement in Lean
/-- Lemmas 1 and 2: sharpness is preserved under increasing `c` and decreasing `θ`. -/
theorem sharpness_monotone : SharpnessMonotonewhere SharpnessMonotone is (source):
/-- **Lemmas 1 and 2** (monotonicity in the parameters). If `f` is `(c, θ)`-monotonic
(submodular) sharp, it is `(c', θ')`-monotonic (submodular) sharp for all `c' ≥ c` and
`0 < θ' ≤ θ`. -/
def SharpnessMonotone : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (Sstar : Finset α)
(c θ c' θ' : ℝ),
Monotone f → 0 ≤ f ∅ → IsOptimal V f k Sstar → 1 ≤ c → c ≤ c' → 0 < θ' → θ' ≤ θ → θ ≤ 1 →
(IsMonotonicSharp V f k c θ Sstar → IsMonotonicSharp V f k c' θ' Sstar) ∧
(IsSubmodularSharp V f k c θ Sstar → IsSubmodularSharp V f k c' θ' Sstar)Lean submodular_sharp_greedy · ✅ kernel-checked · source
Statement in Lean
/-- Theorem 3: under `(c, θ)`-submodular sharpness the greedy algorithm returns a
`1 - (1 - θ/c)^{1/θ}` approximation. -/
theorem submodular_sharp_greedy : SubmodularSharpGreedywhere SubmodularSharpGreedy is (source):
/-- **Theorem 3.** For a monotone submodular function with `f(∅) ≥ 0` that is `(c, θ)`-submodular
sharp, `c ≥ 1` and `θ ∈ (0, 1]`, the greedy algorithm returns a set with
`f(S^g) ≥ (1 - (1 - θ/c)^{1/θ}) f(S⋆)`. -/
def SubmodularSharpGreedy : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℝ)
(Sstar : Finset α) (S : ℕ → Finset α),
Monotone f → 0 ≤ f ∅ → 1 ≤ k → 1 ≤ c → 0 < θ → θ ≤ 1 →
IsSubmodularSharp V f k c θ Sstar → IsGreedyRun V f k S →
Sstar ⊆ V → (1 - (1 - θ / c) ^ (1 / θ)) * f Sstar ≤ f (S k)Lean monotonic_sharp_greedy · ✅ kernel-checked · source
Statement in Lean
/-- Theorem 1: under `(c, θ)`-monotonic sharpness the greedy algorithm returns a
`1 - (1 - θ/c)^{1/θ}` approximation. -/
theorem monotonic_sharp_greedy : MonotonicSharpGreedywhere MonotonicSharpGreedy is (source):
/-- **Theorem 1.** For a monotone submodular function with `f(∅) ≥ 0` that is `(c, θ)`-monotonic
sharp, `c ≥ 1` and `θ ∈ (0, 1]`, the greedy algorithm returns a set with
`f(S^g) ≥ (1 - (1 - θ/c)^{1/θ}) f(S⋆)`. -/
def MonotonicSharpGreedy : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℝ)
(Sstar : Finset α) (S : ℕ → Finset α),
Monotone f → IsSubmodular f → 0 ≤ f ∅ → 1 ≤ k → 1 ≤ c → 0 < θ → θ ≤ 1 →
IsOptimal V f k Sstar → IsMonotonicSharp V f k c θ Sstar → IsGreedyRun V f k S →
(1 - (1 - θ / c) ^ (1 / θ)) * f Sstar ≤ f (S k)Lean greedy_classic · ✅ kernel-checked · source
Statement in Lean
/-- Corollary 1: the classical `1 - 1/e` guarantee for every monotone submodular function. -/
theorem greedy_classic : GreedyClassicwhere GreedyClassic is (source):
/-- **Corollary 1** (the classical guarantee). For every monotone submodular function with
`f(∅) ≥ 0`, the greedy algorithm returns a set with `f(S^g) ≥ (1 - 1/e) f(S⋆)`. -/
def GreedyClassic : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (Sstar : Finset α)
(S : ℕ → Finset α),
Monotone f → IsSubmodular f → 0 ≤ f ∅ → 1 ≤ k → IsOptimal V f k Sstar →
IsGreedyRun V f k S → (1 - Real.exp (-1)) * f Sstar ≤ f (S k)Lean guarantee_properties · ✅ kernel-checked · source
Statement in Lean
/-- The guarantee `1 - (1 - θ/c)^{1/θ}` is at least `1 - e^{-1/c}`, increases with `θ`, decreases
with `c`, equals `1/c` at `θ = 1` and tends to `1 - e^{-1/c}` as `θ → 0`. -/
theorem guarantee_properties : GuaranteePropertieswhere GuaranteeProperties is (source):
/-- **The guarantee as a function of the parameters.** For `c ≥ 1`, the guarantee
`1 - (1 - θ/c)^{1/θ}` is at least `1 - e^{-1/c}`, increases with `θ ∈ (0, 1]`, decreases with `c`,
equals `1/c` at `θ = 1`, and tends to `1 - e^{-1/c}` as `θ → 0`. -/
def GuaranteeProperties : Prop :=
∀ c : ℝ, 1 ≤ c →
(∀ θ : ℝ, 0 < θ → θ ≤ 1 → 1 - Real.exp (-(1 / c)) ≤ 1 - (1 - θ / c) ^ (1 / θ)) ∧
(∀ θ θ' : ℝ, 0 < θ' → θ' ≤ θ → θ ≤ 1 →
1 - (1 - θ' / c) ^ (1 / θ') ≤ 1 - (1 - θ / c) ^ (1 / θ)) ∧
(∀ θ c' : ℝ, 0 < θ → θ ≤ 1 → c ≤ c' →
1 - (1 - θ / c') ^ (1 / θ) ≤ 1 - (1 - θ / c) ^ (1 / θ)) ∧
1 - (1 - 1 / c) ^ (1 / (1 : ℝ)) = 1 / c ∧
Filter.Tendsto (fun θ : ℝ => 1 - (1 - θ / c) ^ (1 / θ)) (nhdsWithin 0 (Set.Ioi 0))
(nhds (1 - Real.exp (-(1 / c))))Lean IsDynMonotonicSharp · ◇ elaborated · source
Definition in Lean
/-- **Definition 2** (dynamic monotonic sharpness): monotonic sharpness with parameters
`(c_{|S|}, θ_{|S|})` that depend on the size of `S`, for all `S ⊆ V` with `|S| < k`. -/
def IsDynMonotonicSharp (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℕ → ℝ)
(Sstar : Finset α) : Prop :=
∀ S ⊆ V, S.card < k →
((Sstar \ S).card / (k * c S.card) : ℝ) ^ (1 / θ S.card) * f Sstar ≤
∑ e ∈ Sstar \ S, marginal f S eLean IsDynSubmodularSharp · ◇ elaborated · source
Definition in Lean
/-- **Definition 4** (dynamic submodular sharpness): submodular sharpness with parameters
`(c_{|S|}, θ_{|S|})`, for all `S ⊆ V` with `|S| < k` and `f(S) < f(S⋆)`. -/
def IsDynSubmodularSharp (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℕ → ℝ)
(Sstar : Finset α) : Prop :=
∀ S ⊆ V, S.card < k → f S < f Sstar → ∃ e ∈ Sstar \ S,
(f Sstar - f S) ^ (1 - θ S.card) * f Sstar ^ θ S.card / (k * c S.card) ≤ marginal f S eLean dynG · ◇ elaborated · source
Definition in Lean
/-- The nested expression of Theorems 2 and 4: `G_0 = 1` and
`G_{j+1} = (G_j^{θ_j} - θ_j/(c_j k))^{1/θ_j}`, so that
`G_k = ((((1 - θ_0/(c_0 k))^{θ_1/θ_0} - θ_1/(c_1 k))^{θ_2/θ_1} - ⋯)`
`- θ_{k-1}/(c_{k-1} k))^{1/θ_{k-1}}`. -/
noncomputable def dynG (c θ : ℕ → ℝ) (k : ℕ) : ℕ → ℝ
| 0 => 1
| j + 1 => (dynG c θ k j ^ θ j - θ j / (c j * k)) ^ (1 / θ j)Lean dyn_submodular_sharp_greedy · ✅ kernel-checked · source
Statement in Lean
/-- Theorem 4: under dynamic `(c, θ)`-submodular sharpness the greedy algorithm returns a
`1 - G_k` approximation, for every `k`. -/
theorem dyn_submodular_sharp_greedy : DynSubmodularSharpGreedywhere DynSubmodularSharpGreedy is (source):
/-- **Theorem 4.** For a monotone function with `f(∅) ≥ 0` that is dynamic `(c, θ)`-submodular
sharp with respect to `S⋆ ⊆ V`, `c_j ≥ 1` and `θ_j ∈ (0, 1]`, the greedy algorithm returns a set
with `f(S^g) ≥ (1 - G_k) f(S⋆)`. -/
def DynSubmodularSharpGreedy : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℕ → ℝ)
(Sstar : Finset α) (S : ℕ → Finset α),
Monotone f → 0 ≤ f ∅ → 1 ≤ k → (∀ j, 1 ≤ c j) → (∀ j, 0 < θ j) → (∀ j, θ j ≤ 1) →
IsDynSubmodularSharp V f k c θ Sstar → IsGreedyRun V f k S → Sstar ⊆ V →
(1 - dynG c θ k k) * f Sstar ≤ f (S k)Lean dyn_monotonic_sharp_greedy · ✅ kernel-checked · source
Statement in Lean
/-- Theorem 2: under dynamic `(c, θ)`-monotonic sharpness the greedy algorithm returns a
`1 - G_k` approximation, for every `k`. -/
theorem dyn_monotonic_sharp_greedy : DynMonotonicSharpGreedywhere DynMonotonicSharpGreedy is (source):
/-- **Theorem 2.** For a monotone submodular function with `f(∅) ≥ 0` that is dynamic
`(c, θ)`-monotonic sharp, `c_j ≥ 1` and `θ_j ∈ (0, 1]`, the greedy algorithm returns a set with
`f(S^g) ≥ (1 - G_k) f(S⋆)`. -/
def DynMonotonicSharpGreedy : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℕ → ℝ)
(Sstar : Finset α) (S : ℕ → Finset α),
Monotone f → IsSubmodular f → 0 ≤ f ∅ → 1 ≤ k → (∀ j, 1 ≤ c j) → (∀ j, 0 < θ j) →
(∀ j, θ j ≤ 1) → IsOptimal V f k Sstar → IsDynMonotonicSharp V f k c θ Sstar →
IsGreedyRun V f k S → (1 - dynG c θ k k) * f Sstar ≤ f (S k)Lean dyn_constant · ✅ kernel-checked · source
Statement in Lean
/-- Observation 1: constant parameters give `G_j = (1 - θ j/(c k))^{1/θ}`. -/
theorem dyn_constant : DynConstantwhere DynConstant is (source):
/-- **Observation 1.** For constant parameters, `G_j = (1 - θ j/(c k))^{1/θ}`, so Theorems 2 and 4
recover Theorems 1 and 3. -/
def DynConstant : Prop :=
∀ (c θ : ℝ) (k : ℕ), 1 ≤ k → 1 ≤ c → 0 < θ → θ ≤ 1 → ∀ j ≤ k,
dynG (fun _ => c) (fun _ => θ) k j = (1 - θ * j / (c * k)) ^ (1 / θ)Lean linear_sharp · ✅ kernel-checked · source
Statement in Lean
/-- Proposition 2: monotonic sharpness of a linear function is a condition on the subsets of
`S⋆`. -/
theorem linear_sharp : LinearSharpwhere LinearSharp is (source):
/-- **Proposition 2** (linear functions). A linear function `f(S) = ∑_{e ∈ S} w_e` is
`(c, θ)`-monotonic sharp with respect to `S⋆ ⊆ V` with `|S⋆| ≤ k` if and only if
`∑_{e ∈ T} w_e ≥ (|T|/(kc))^{1/θ} f(S⋆)` for every `T ⊆ S⋆`. -/
def LinearSharp : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (w : α → ℝ) (k : ℕ) (c θ : ℝ)
(Sstar : Finset α), Sstar ⊆ V → Sstar.card ≤ k →
(IsMonotonicSharp V (fun S => ∑ e ∈ S, w e) k c θ Sstar ↔
∀ T ⊆ Sstar, ((T.card : ℝ) / (k * c)) ^ (1 / θ) * ∑ e ∈ Sstar, w e ≤ ∑ e ∈ T, w e)Lean size_k_suffices · ✅ kernel-checked · source
Statement in Lean
/-- Lemma 1 (3), corrected: with `|V \ S⋆| ≥ k`, only sets of size `k` need to be checked. -/
theorem size_k_suffices : SizeKSufficeswhere SizeKSuffices is (source):
/-- **Lemma 1** (3), corrected. For a submodular function and `|V \ S⋆| ≥ k`, the inequality of
monotonic sharpness needs to be checked only for sets of size exactly `k`. -/
def SizeKSuffices : Prop :=
∀ {α : Type u} [DecidableEq α] (V : Finset α) (f : Finset α → ℝ) (k : ℕ) (c θ : ℝ)
(Sstar : Finset α), IsSubmodular f → Sstar ⊆ V → k ≤ (V \ Sstar).card →
(∀ S ⊆ V, S.card = k → ((Sstar \ S).card / (k * c) : ℝ) ^ (1 / θ) * f Sstar ≤
∑ e ∈ Sstar \ S, marginal f S e) →
IsMonotonicSharp V f k c θ SstarLean size_k_counterexample · ✅ kernel-checked · source
Statement in Lean
/-- Lemma 1 (3) fails without room outside `S⋆`. -/
theorem size_k_counterexample : SizeKCounterexamplewhere SizeKCounterexample is (source):
/-- **Lemma 1** (3) fails without room outside `S⋆`. For `V = {0, 1}`, `k = 2` and
`f(S) = min(|S|, 1)`, every set of size `2` satisfies the inequality of monotonic sharpness with
respect to the optimal solution `S⋆ = V`, for all parameters, but `f` is not `(c, θ)`-monotonic
sharp with respect to `S⋆` for any `c ≥ 1` and `θ > 0`. -/
def SizeKCounterexample : Prop :=
IsOptimal Finset.univ (fun S : Finset (Fin 2) => min (S.card : ℝ) 1) 2 Finset.univ ∧
Monotone (fun S : Finset (Fin 2) => min (S.card : ℝ) 1) ∧
IsSubmodular (fun S : Finset (Fin 2) => min (S.card : ℝ) 1) ∧
(∀ c θ : ℝ, 0 < θ → ∀ S : Finset (Fin 2), S.card = 2 →
(((Finset.univ \ S).card : ℝ) / ((2 : ℕ) * c)) ^ (1 / θ) *
min ((Finset.univ : Finset (Fin 2)).card : ℝ) 1 ≤
∑ e ∈ Finset.univ \ S, marginal (fun S : Finset (Fin 2) => min (S.card : ℝ) 1) S e) ∧
∀ c θ : ℝ, 1 ≤ c → 0 < θ →
¬ IsMonotonicSharp Finset.univ (fun S : Finset (Fin 2) => min (S.card : ℝ) 1) 2 c θ
Finset.univLean coverage_counterexample · ✅ kernel-checked · source
Statement in Lean
/-- Proposition 4 fails for `k = 2`: sharpness forces `c ≥ 2^θ`. -/
theorem coverage_counterexample : CoverageCounterexamplewhere CoverageCounterexample is (source):
/-- **Proposition 4** fails for `k = 2`. The optimal solution `S⋆ = {B₁, B₂}` is unique, and if the
coverage function is `(c, θ)`-monotonic sharp with respect to it, then `c ≥ 2^θ`. So it is not
`(1, θ)`-monotonic sharp for any `θ > 0`, although Proposition 4 places `(1, 1/2)` in its sharpness
region. -/
def CoverageCounterexample : Prop :=
IsOptimal Finset.univ coverFn 2 {1, 2} ∧
(∀ S : Finset (Fin 3), S.card ≤ 2 → coverFn {1, 2} ≤ coverFn S → S = {1, 2}) ∧
∀ c θ : ℝ, 0 < c → 0 < θ → IsMonotonicSharp Finset.univ coverFn 2 c θ {1, 2} →
(2 : ℝ) ^ θ ≤ cAI use. The formalization and this page were developed with Claude (Anthropic) under the author’s direction and review, on top of Mathlib.
Acknowledgements. This research was conducted in the context of the Agentic AI in Mathematics (EF-LiOpt-3) project at the Berlin Mathematics Research Center MATH (EXC-2046/2, project ID 390685689), funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy. This work has been partially supported by OpenAI’s Academic Researchers program.
License: CC BY 4.0
Comments.
- Torrico, A., Singh, M., & Pokutta, S. (2020). On the Unreasonable Effectiveness of the Greedy Algorithm: Greedy Adapts to Sharpness. 10.48550/arXiv.2002.04063