Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eq. (17), unrolled recursion — cku[i]=min⁡{cku[1],ckui−1[1],…,cku1[1]}=min⁡j∉J[i−1]∖{u}c(ωk,ωj)c^{[i]}_{ku}=\min\{c^{[1]}_{ku},c^{[1]}_{ku_{i-1}},\dots,c^{[1]}_{ku_1}\}=\min_{j\notin J^{[i-1]}\setminus\{u\}}c(\omega_k,\omega_j)cku[i]​=min{cku[1]​,ckui−1​[1]​,…,cku1​[1]​}=minj∈/J[i−1]∖{u}​c(ωk​,ωj​)

Proved
ScenarioReduction.ForwardSelection.cStep_eq_min

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

greedy-algorithmp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1scenario-reductionstochastic-programming

Let ω1,…,ωN\omega_1,\dots,\omega_Nω1​,…,ωN​ be scenarios, ccc the cost (3), and u1,u2,…u_1,u_2,\dotsu1​,u2​,… any sequence of indices, with J[i]={1,…,N}∖{u1,…,ui}J^{[i]}=\{1,\dots,N\}\setminus\{u_1,\dots,u_i\}J[i]={1,…,N}∖{u1​,…,ui​} and c[i]c^{[i]}c[i] the recursively updated cost matrices of Algorithm 2.4. For every step i≥1i\ge 1i≥1, every u∈J[i−1]u\in J^{[i-1]}u∈J[i−1] and every kkk,

cku[i]=min⁡{cku[1],ckui−1[1],…,cku1[1]}=min⁡j∉J[i−1]∖{u}c(ωk,ωj).c^{[i]}_{ku}=\min\bigl\{c^{[1]}_{ku},c^{[1]}_{ku_{i-1}},\dots,c^{[1]}_{ku_1}\bigr\}=\min_{j\notin J^{[i-1]}\setminus\{u\}}c(\omega_k,\omega_j).cku[i]​=min{cku[1]​,ckui−1​[1]​,…,cku1​[1]​}=j∈/J[i−1]∖{u}min​c(ωk​,ωj​).

This is the step of the proof of Theorem 2.5 that unwinds the pairwise update of Algorithm 2.4 into the inner minimum of the forward selection principle (16).

Formalization Note No run hypothesis is assumed: the identity holds for every sequence uuu. The minimum on the right is Finset.inf' over the complement of J[i−1]∖{u}J^{[i-1]}\setminus\{u\}J[i−1]∖{u}, which is {u,u1,…,ui−1}\{u,u_1,\dots,u_{i-1}\}{u,u1​,…,ui−1​}.

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

/-- Eq. (17), Heitsch–Römisch 2003, p. 194 (the unrolled recursion). For any sequence `u`, any
step `i ≥ 1` and any `v ∈ J^{[i-1]}`, the recursively computed cost of Algorithm 2.4 is
`c^{[i]}_{kv} = min{c^{[1]}_{kv}, c^{[1]}_{k u_{i-1}}, …, c^{[1]}_{k u₁}} = min_{j ∉ J^{[i-1]} ∖ {v}} c(ωₖ, ωⱼ)`. -/
theorem cStep_eq_min {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {N : ℕ} (h : ℝ → ℝ) (hh : IsGrowthFunction h) (ω₀ : E)
    (ω : Fin N → E) (u : ℕ → Fin N) (i : ℕ) (hi : 1 ≤ i) (v : Fin N)
    (hv : v ∈ Jstep u (i - 1)) (k : Fin N) :
    cStep (scenCost h ω₀ ω) u i k v =
      ((Jstep u (i - 1)).erase v)ᶜ.inf' (compl_erase_nonempty _ _)
        (fun j => scenCost h ω₀ ω k j) := by sorry

end ScenarioReduction.ForwardSelection
Source
Heitsch, Römisch, Scenario Reduction Algorithms in Stochastic Programming, Comput. Optim. Appl. 24 (2003), p. 194, proof of Theorem 2.5, eq. (17), lines 2–6
Read-back

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

Setting and hypotheses.

  • EEE is a finite-dimensional real normed vector space.
  • h:R→Rh:\mathbb R\to\mathbb Rh:R→R is continuous and nondecreasing on [0,∞)[0,\infty)[0,∞), with h(0)=0h(0)=0h(0)=0 and h≥0h\ge0h≥0 there.
  • ω0∈E\omega_0\in Eω0​∈E, N∈NN\in\mathbb NN∈N, and ω0′,…,ωN−1′∈E\omega'_0,\dots,\omega'_{N-1}\in Eω0′​,…,ωN−1′​∈E indexed by [N]={0,…,N−1}[N]=\{0,\dots,N-1\}[N]={0,…,N−1}.
  • u:N→[N]u:\mathbb N\to[N]u:N→[N] is an arbitrary sequence u1,u2,…u_1,u_2,\dotsu1​,u2​,…. It need not come from any selection rule, and repeats are allowed.
  • i≥1i\ge1i≥1, and k∈[N]k\in[N]k∈[N] is arbitrary.
  • v∈J[i−1]=[N]∖{u1,…,ui−1}v\in J^{[i-1]}=[N]\setminus\{u_1,\dots,u_{i-1}\}v∈J[i−1]=[N]∖{u1​,…,ui−1​}.

Definitions.

  • Cost matrix: Ckj=max⁡{1,h(∥ωk′−ω0∥),h(∥ωj′−ω0∥)} ∥ωk′−ωj′∥C_{kj}=\max\{1,h(\|\omega'_k-\omega_0\|),h(\|\omega'_j-\omega_0\|)\}\,\|\omega'_k-\omega'_j\|Ckj​=max{1,h(∥ωk′​−ω0​∥),h(∥ωj′​−ω0​∥)}∥ωk′​−ωj′​∥.
  • Recursive costs: ckv[1]=Ckvc^{[1]}_{kv}=C_{kv}ckv[1]​=Ckv​, and ckv[i]=min⁡{ckv[i−1],ck ui−1[i−1]}c^{[i]}_{kv}=\min\{c^{[i-1]}_{kv},c^{[i-1]}_{k\,u_{i-1}}\}ckv[i]​=min{ckv[i−1]​,ckui−1​[i−1]​} for i≥2i\ge2i≥2.

Claim.

ckv[i]=min⁡j∈[N]∖(J[i−1]∖{v})Ckj.c^{[i]}_{kv}=\min_{j\in[N]\setminus(J^{[i-1]}\setminus\{v\})}C_{kj}.ckv[i]​=j∈[N]∖(J[i−1]∖{v})min​Ckj​.

Because v∈J[i−1]v\in J^{[i-1]}v∈J[i−1], the index set of the minimum is exactly {v,u1,…,ui−1}\{v,u_1,\dots,u_{i-1}\}{v,u1​,…,ui−1​}.

Degenerate cases.

  • For i=1i=1i=1: J[0]=[N]J^{[0]}=[N]J[0]=[N], the minimum is over {v}\{v\}{v} alone, and the claim reads ckv[1]=Ckvc^{[1]}_{kv}=C_{kv}ckv[1]​=Ckv​.
  • k=vk=vk=v is allowed, in which case both sides equal 000 because Cvv=0C_{vv}=0Cvv​=0.
  • The existence of vvv forces N≥1N\ge1N≥1.
  • Repeated values among u1,…,ui−1u_1,\dots,u_{i-1}u1​,…,ui−1​ simply repeat elements of the index set.
  • No weights ppp appear.
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