Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Sufficient optimality condition for the greedy set {l1,…,lN−n}\{l_1,\dots,l_{N-n}\}{l1​,…,lN−n​} of rule (11)

Proved
ScenarioReduction.ForwardSelection.backward_optimality

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

p2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1scenario-reductionstochastic-programming

Let N≥2N\ge 2N≥2, let ω1,…,ωN\omega_1,\dots,\omega_Nω1​,…,ωN​ be scenarios with probabilities pi>0p_i>0pi​>0, ∑ipi=1\sum_ip_i=1∑i​pi​=1, let ccc be the cost (3), let 1≤n<N1\le n<N1≤n<N, and let l1,…,lN−nl_1,\dots,l_{N-n}l1​,…,lN−n​ be selected by rule (11). Suppose that for every i=1,…,N−ni=1,\dots,N-ni=1,…,N−n the set

arg⁡min⁡j≠lic(ωli,ωj)∖{l1,…,li−1,li+1,…,lN−n}\arg\min_{j\neq l_i}c(\omega_{l_i},\omega_j)\setminus\{l_1,\dots,l_{i-1},l_{i+1},\dots,l_{N-n}\}argj=li​min​c(ωli​​,ωj​)∖{l1​,…,li−1​,li+1​,…,lN−n​}

is nonempty. Then L={l1,…,lN−n}L=\{l_1,\dots,l_{N-n}\}L={l1​,…,lN−n​} is a solution of (8): it has N−nN-nN−n elements and

DL=min⁡{DJ:J⊂{1,…,N}, #J=N−n}.D_L=\min\bigl\{D_J:J\subset\{1,\dots,N\},\ \#J=N-n\bigr\}.DL​=min{DJ​:J⊂{1,…,N}, #J=N−n}.

When the condition holds, the greedy backward choice solves the set-covering problem (8) exactly; this is the motivation the paper gives for its backward reduction algorithms.

Formalization Note The conclusion bundles the nonemptiness of the complement of LLL (needed for DLD_LDL​ to be defined) with the explicit cardinality #L=N−n\#L=N-n#L=N−n (so LLL is feasible for (8)) and the statement that DLD_LDL​ is the least element of {DJ:#J=N−n}\{D_J:\#J=N-n\}{DJ​:#J=N−n}.

Preamble
import Mathlib
import Definitions.Def_ScenarioReduction_ForwardSelection_fmCost
import Definitions.Def_ScenarioReduction_ForwardSelection_reductionCost
import Definitions.Def_ScenarioReduction_ForwardSelection_IsBackwardGreedy
Formal statement
namespace ScenarioReduction.ForwardSelection

/-- Sufficient optimality condition, Heitsch–Römisch 2003, p. 191. If `l₁, …, l_{N-n}` are selected
by rule (11) and, for every `i`, some minimizer of `c(ω_{lᵢ}, ωⱼ)` over `j ≠ lᵢ` lies outside
`{l₁, …, l_{i-1}, l_{i+1}, …, l_{N-n}}`, then `J = {l₁, …, l_{N-n}}` solves problem (8): it has
`N − n` elements and `D_J` is the minimum of `D_{J'}` over all `J'` with `#J' = N − n`. -/
theorem backward_optimality {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {N : ℕ} (h : ℝ → ℝ) (hh : IsGrowthFunction h) (ω₀ : E)
    (ω : Fin N → E) (p : Fin N → ℝ) (hp : ∀ i, 0 < p i) (hsum : ∑ i, p i = 1)
    (hN : 1 < N) (n : ℕ) (hn1 : 1 ≤ n) (hnN : n < N) (l : ℕ → Fin N)
    (hl : IsBackwardGreedy (scenCost h ω₀ ω) p hN (N - n) l)
    (hcond : ∀ i ∈ Finset.Icc 1 (N - n), ∃ j : Fin N, j ≠ l i ∧
      (∀ j' : Fin N, j' ≠ l i → scenCost h ω₀ ω (l i) j ≤ scenCost h ω₀ ω (l i) j') ∧
      j ∉ ((Finset.Icc 1 (N - n)).erase i).image l) :
    ∃ hL : ((Finset.Icc 1 (N - n)).image l)ᶜ.Nonempty,
      ((Finset.Icc 1 (N - n)).image l).card = N - n ∧
      IsLeast {x : ℝ | ∃ J : Finset (Fin N), ∃ hJ : Jᶜ.Nonempty, J.card = N - n ∧
          x = reductionCost (scenCost h ω₀ ω) p J hJ}
        (reductionCost (scenCost h ω₀ ω) p ((Finset.Icc 1 (N - n)).image l) hL) := by sorry

end ScenarioReduction.ForwardSelection
Source
Heitsch, Römisch, Scenario Reduction Algorithms in Stochastic Programming, Comput. Optim. Appl. 24 (2003), p. 191, paragraph after eq. (12)
Read-back

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

Setting. Let EEE be a finite-dimensional real normed vector space. Fix a natural number NNN and write [N]={0,1,…,N−1}[N] = \{0, 1, \dots, N-1\}[N]={0,1,…,N−1} for the index set of size NNN. The data are:

  • a function h:R→Rh : \mathbb{R} \to \mathbb{R}h:R→R satisfying the predicate IsGrowthFunction(h)\mathrm{IsGrowthFunction}(h)IsGrowthFunction(h);
  • a point ω0∈E\omega_0 \in Eω0​∈E;
  • scenarios ω0′,…\omega_0', \dotsω0′​,… given as a map ω:[N]→E\omega : [N] \to Eω:[N]→E, j↦ωjj \mapsto \omega_jj↦ωj​;
  • weights p:[N]→Rp : [N] \to \mathbb{R}p:[N]→R with pj>0p_j > 0pj​>0 for every jjj and ∑j∈[N]pj=1\sum_{j \in [N]} p_j = 1∑j∈[N]​pj​=1;
  • a natural number nnn;
  • a sequence l:N→[N]l : \mathbb{N} \to [N]l:N→[N], i↦lii \mapsto l_ii↦li​, defined for every natural number iii (including i=0i = 0i=0).

Write c=scenCost(h,ω0,ω)c = \mathrm{scenCost}(h, \omega_0, \omega)c=scenCost(h,ω0​,ω). It is a two-argument function on [N]×[N][N] \times [N][N]×[N] whose values can be compared with ≤\le≤. The statement uses four notions that are defined elsewhere and not shown here: IsGrowthFunction\mathrm{IsGrowthFunction}IsGrowthFunction, scenCost\mathrm{scenCost}scenCost, IsBackwardGreedy\mathrm{IsBackwardGreedy}IsBackwardGreedy and reductionCost\mathrm{reductionCost}reductionCost. Their definitions are not available to this read-back, so they are treated as opaque. Nothing below depends on what they unfold to.

Hypotheses.

  1. 1<N1 < N1<N.
  2. 1≤n<N1 \le n < N1≤n<N, so N−nN - nN−n lies between 111 and N−1N-1N−1.
  3. IsBackwardGreedy(c,p,N−n,l)\mathrm{IsBackwardGreedy}(c, p, N-n, l)IsBackwardGreedy(c,p,N−n,l) holds. The proof of 1<N1 < N1<N is also passed to this predicate.
  4. For every i∈{1,…,N−n}i \in \{1, \dots, N-n\}i∈{1,…,N−n} there is some j∈[N]j \in [N]j∈[N] with all three of the following properties:
    • j≠lij \ne l_ij=li​;
    • jjj minimizes c(li,⋅)c(l_i, \cdot)c(li​,⋅) over the indices other than lil_ili​:
c(li,j)≤c(li,j′)for all j′∈[N], j′≠li;c(l_i, j) \le c(l_i, j') \quad \text{for all } j' \in [N],\ j' \ne l_i;c(li​,j)≤c(li​,j′)for all j′∈[N], j′=li​;
  • j∉{ lk:k∈{1,…,N−n}, k≠i }j \notin \{\, l_k : k \in \{1, \dots, N-n\},\ k \ne i \,\}j∈/{lk​:k∈{1,…,N−n}, k=i}.

Conclusion. Let J∗={l1,…,lN−n}⊆[N]J^* = \{l_1, \dots, l_{N-n}\} \subseteq [N]J∗={l1​,…,lN−n​}⊆[N], the set of values of lll at positions 111 through N−nN-nN−n. The statement asserts three things:

  • The complement [N]∖J∗[N] \setminus J^*[N]∖J∗ is nonempty. The proof of this fact is supplied to reductionCost\mathrm{reductionCost}reductionCost.
  • ∣J∗∣=N−n|J^*| = N - n∣J∗∣=N−n. This means l1,…,lN−nl_1, \dots, l_{N-n}l1​,…,lN−n​ are pairwise distinct.
  • reductionCost(c,p,J∗)\mathrm{reductionCost}(c, p, J^*)reductionCost(c,p,J∗) is the least element of the set of real numbers
{ reductionCost(c,p,J)  :  J⊆[N], [N]∖J≠∅, ∣J∣=N−n }.\bigl\{\, \mathrm{reductionCost}(c, p, J) \;:\; J \subseteq [N],\ [N] \setminus J \ne \emptyset,\ |J| = N - n \,\bigr\}.{reductionCost(c,p,J):J⊆[N], [N]∖J=∅, ∣J∣=N−n}.

Being the least element means it belongs to the set and is ≤\le≤ every member of it.

The value reductionCost(c,p,J)\mathrm{reductionCost}(c, p, J)reductionCost(c,p,J) is a real number, and it also takes a proof that JJJ's complement is nonempty. Because N−n<NN - n < NN−n<N, every JJJ with ∣J∣=N−n|J| = N - n∣J∣=N−n automatically has a nonempty complement, so that side condition does not shrink the set being minimized over.

Degenerate and edge cases.

  • Sizes. The hypotheses rule out N≤1N \le 1N≤1, n=0n = 0n=0 and n≥Nn \ge Nn≥N, so the index set is never empty or a single point and N−n≥1N - n \ge 1N−n≥1.
  • Subtraction. N−nN - nN−n is subtraction of natural numbers, but since n<Nn < Nn<N it never truncates.
  • Distinctness. The last condition in hypothesis 4 does not forbid repeated values among the lkl_klk​. Hypothesis 4 as written does not require distinctness, and the conclusion asserts it. Whether distinctness, or anything else, is forced by IsBackwardGreedy\mathrm{IsBackwardGreedy}IsBackwardGreedy cannot be determined from the code shown.
  • Unused positions. Only l1,…,lN−nl_1, \dots, l_{N-n}l1​,…,lN−n​ appear in hypothesis 4 and in the conclusion. The values l0l_0l0​ and lil_ili​ for i>N−ni > N - ni>N−n are constrained, if at all, only through IsBackwardGreedy\mathrm{IsBackwardGreedy}IsBackwardGreedy.
  • Extreme case n=1n = 1n=1. Here J∗J^*J∗ is meant to have N−1N-1N−1 elements. For each iii, the witness jjj must avoid lil_ili​ and the other N−2N-2N−2 selected indices, and must also minimize c(li,⋅)c(l_i, \cdot)c(li​,⋅) off lil_ili​.
  • Unused data. The space EEE, the point ω0\omega_0ω0​, the scenarios ω\omegaω and the function hhh enter only through ccc and the predicate IsGrowthFunction(h)\mathrm{IsGrowthFunction}(h)IsGrowthFunction(h). The hypotheses pj>0p_j > 0pj​>0 and ∑jpj=1\sum_j p_j = 1∑j​pj​=1 are used only through whatever IsBackwardGreedy\mathrm{IsBackwardGreedy}IsBackwardGreedy and reductionCost\mathrm{reductionCost}reductionCost do with ppp.
  • Vacuity. Whether the hypotheses can all hold at once, or might be vacuous, depends on the opaque predicates IsGrowthFunction\mathrm{IsGrowthFunction}IsGrowthFunction and IsBackwardGreedy\mathrm{IsBackwardGreedy}IsBackwardGreedy. It cannot be determined from this code.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me