Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Robust capacitated sourcing with volume flexibility: LP (4), base stocks, shifting need and the LPS order

Definition
RobustVolumeFlex_Model

by jorengijsbrechts · Nov 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

inventoryoperations-researchrobust-optimization

The robust rolling-horizon model of capacitated sourcing with volume flexibility, as solved in one decision period ttt.

The planning horizon {t,…,t+H−1}\{t,\dots,t+H-1\}{t,…,t+H−1} is indexed by n∈{0,…,H−1}n\in\{0,\dots,H-1\}n∈{0,…,H−1}, with n=0n=0n=0 the current period. The data are:

  1. holding cost hhh, backorder penalty bbb, contracted unit cost ccc and flexibility premium cpc_pcp​;
  2. the starting net inventory x=xt−1x=x_{t-1}x=xt−1​;
  3. base capacities knk_nkn​;
  4. a demand uncertainty set Ω⊆RH\Omega\subseteq\mathbb{R}^HΩ⊆RH.

The worst-case cumulative demands are

D‾n=inf⁡d∈Ω∑i≤ndi,D‾n=sup⁡d∈Ω∑i≤ndi.\underline D_n=\inf_{d\in\Omega}\sum_{i\le n}d_i,\qquad \overline D_n=\sup_{d\in\Omega}\sum_{i\le n}d_i.D​n​=d∈Ωinf​i≤n∑​di​,Dn​=d∈Ωsup​i≤n∑​di​.

A triple (q,y,z)(q,y,z)(q,y,z) is feasible for the linear program (4) if, for all nnn:

  • yn≥h(x+∑i≤nqi−D‾n)y_n\ge h(x+\sum_{i\le n}q_i-\underline D_n)yn​≥h(x+∑i≤n​qi​−D​n​);
  • yn≥−b(x+∑i≤nqi−D‾n)y_n\ge -b(x+\sum_{i\le n}q_i-\overline D_n)yn​≥−b(x+∑i≤n​qi​−Dn​);
  • zn≥cp(qn−kn)z_n\ge c_p(q_n-k_n)zn​≥cp​(qn​−kn​);
  • zn≥0z_n\ge 0zn​≥0 and qn≥0q_n\ge 0qn​≥0.

It is robustly optimal if it is feasible and minimizes ∑n(c qn+yn+zn)\sum_n(c\,q_n+y_n+z_n)∑n​(cqn​+yn​+zn​) over all feasible triples.

The uncapacitated system has cumulative base stock

S^n=max⁡(bD‾n+hD‾nb+h, x).\hat S_n=\max\Bigl(\frac{b\overline D_n+h\underline D_n}{b+h},\,x\Bigr).S^n​=max(b+hbDn​+hD​n​​,x).

Its orders are q^0=S^0−x\hat q_0=\hat S_0-xq^​0​=S^0​−x and q^n=S^n−S^n−1\hat q_n=\hat S_n-\hat S_{n-1}q^​n​=S^n​−S^n−1​ in every period with c≤b(H−n)c\le b(H-n)c≤b(H−n), and q^n=0\hat q_n=0q^​n​=0 in the remaining final periods. The shifting need with lookahead sss is

τs=(max⁡1≤i≤s∑j=1i(q^j−kj))+.\tau^s=\Bigl(\max_{1\le i\le s}\sum_{j=1}^{i}(\hat q_j-k_j)\Bigr)^{+}.τs=(1≤i≤smax​j=1∑i​(q^​j​−kj​))+.

The Lookahead Peak-Shaving order is

qLPS={S^0−xx<S^0−k0,k0S^0−k0≤x<S^0+τs−k0,S^0+τs−xotherwise.q^{\mathrm{LPS}}=\begin{cases}\hat S_0-x & x<\hat S_0-k_0,\\ k_0 & \hat S_0-k_0\le x<\hat S_0+\tau^s-k_0,\\ \hat S_0+\tau^s-x&\text{otherwise.}\end{cases}qLPS=⎩⎨⎧​S^0​−xk0​S^0​+τs−x​x<S^0​−k0​,S^0​−k0​≤x<S^0​+τs−k0​,otherwise.​

These are the shared definitions for every statement drawn from the paper.

Formalization Note D‾n,D‾n\underline D_n,\overline D_nD​n​,Dn​ are real infima/suprema, so theorems using them assume Ω\OmegaΩ nonempty and bounded. The positive part in τs\tau^sτs is a fold of max⁡\maxmax starting at 000. Boundary cases of the policy go to the later case, where the order is continuous. In eq. (6) the published end-of-horizon index ranges are inconsistent; here ordering stops in exactly the periods where one unit costs more than backlogging it to the horizon end, c>b(H−n)c>b(H-n)c>b(H−n).

Definition code
import Mathlib

/-!
# Robust capacitated sourcing with volume flexibility — the model

J. Gijsbrechts, C. Imdahl, R. N. Boute, J. A. Van Mieghem (2023),
"Optimal robust inventory management with volume flexibility: Matching capacity and demand
with the lookahead peak-shaving policy", *Production and Operations Management*,
https://doi.org/10.1111/poms.14069.

One period `t` of the rolling-horizon robust model of Section 3.2. The planning horizon
`ℕ_t^{t+H-1}` is indexed by `Fin H`, where index `0` is the current period `t` and index `n`
is period `t + n`.
-/

namespace RobustVolumeFlex

open Finset

/-- Data of the robust problem solved in one period (Sections 3.1–3.2):
holding cost `h`, backorder penalty `b`, contracted unit sourcing cost `c`,
flexibility (overtime) premium `cp`, starting net inventory `x = x_{t-1}`,
base capacities `k n = k_{t+n}` and the demand uncertainty set `Ω = Ω_t ⊆ ℝ^H`. -/
structure Params (H : ℕ) where
  h : ℝ
  b : ℝ
  c : ℝ
  cp : ℝ
  x : ℝ
  k : Fin H → ℝ
  Ω : Set (Fin H → ℝ)

variable {H : ℕ}

/-- Partial sum `∑_{i=t}^{t+n} v_i` of a vector over the planning horizon. -/
def cumSum (v : Fin H → ℝ) (n : ℕ) : ℝ :=
  ∑ i ∈ univ.filter (fun i : Fin H => i.val ≤ n), v i

/-- Minimum cumulative demand `D̲_{t+n} = min_{d ∈ Ω} ∑_{i=t}^{t+n} d_i` (eq. (3)). -/
noncomputable def minCumDemand (P : Params H) (n : ℕ) : ℝ :=
  sInf ((fun d => cumSum d n) '' P.Ω)

/-- Maximum cumulative demand `D̄_{t+n} = max_{d ∈ Ω} ∑_{i=t}^{t+n} d_i` (eq. (3)). -/
noncomputable def maxCumDemand (P : Params H) (n : ℕ) : ℝ :=
  sSup ((fun d => cumSum d n) '' P.Ω)

/-- Feasibility for the linear program (4): order quantities `q`, worst-case inventory
mismatch costs `y` and premium sourcing costs `z` satisfying the constraint sets
`𝓗` (holding), `𝓑` (backlog), `𝓕` (flexibility) and the sign constraints. -/
def IsFeasible (P : Params H) (q y z : Fin H → ℝ) : Prop :=
  (∀ n : Fin H, P.h * (P.x + cumSum q n - minCumDemand P n) ≤ y n) ∧
  (∀ n : Fin H, -P.b * (P.x + cumSum q n - maxCumDemand P n) ≤ y n) ∧
  (∀ n : Fin H, P.cp * (q n - P.k n) ≤ z n) ∧
  (∀ n : Fin H, 0 ≤ z n) ∧
  (∀ n : Fin H, 0 ≤ q n)

/-- The robust objective of (4): `∑_n (c q_n + y_n + z_n)`. -/
def objective (P : Params H) (q y z : Fin H → ℝ) : ℝ :=
  ∑ n : Fin H, (P.c * q n + y n + z n)

/-- `(q, y, z)` is an optimal solution of the linear program (4). -/
def IsRobustlyOptimal (P : Params H) (q y z : Fin H → ℝ) : Prop :=
  IsFeasible P q y z ∧
    ∀ q' y' z' : Fin H → ℝ, IsFeasible P q' y' z' → objective P q y z ≤ objective P q' y' z'

/-- Cumulative base-stock level of the uncapacitated system,
`Ŝ_{t+n} = max((b D̄_{t+n} + h D̲_{t+n}) / (b + h), x_{t-1})` (eq. (7)). -/
noncomputable def baseStock (P : Params H) (n : ℕ) : ℝ :=
  max ((P.b * maxCumDemand P n + P.h * minCumDemand P n) / (P.b + P.h)) P.x

/-- Optimal order quantities `q̂_{t+n}` of the uncapacitated system (eq. (6)): in period
`t + n` the cumulative order is raised to `Ŝ_{t+n} - x_{t-1}` as long as ordering one unit
there is not more expensive than backlogging it until the end of the planning horizon,
i.e. `c ≤ b · (H - n)`; in the remaining final periods (the last `u` periods, where
`u b < c ≤ (u + 1) b`) nothing is ordered. -/
noncomputable def uncapOrder (P : Params H) (n : Fin H) : ℝ :=
  if P.c ≤ P.b * ((H : ℝ) - n.val) then
    baseStock P n.val - (if n.val = 0 then P.x else baseStock P (n.val - 1))
  else 0

/-- Shifting need over a lookahead horizon of `s` periods (Definition 1):
`τ_t^s = (max_{i ∈ ℕ_{t+1}^{t+s}} ∑_{j=t+1}^{i} (q̂_j - k_j))⁺`.
Written as a fold of `max` starting from `0`, which equals the positive part of the
maximum when `s ≥ 1`. -/
noncomputable def shiftingNeed (P : Params H) (s : ℕ) : ℝ :=
  (Icc 1 s).fold max 0 (fun i =>
    ∑ j ∈ univ.filter (fun j : Fin H => 1 ≤ j.val ∧ j.val ≤ i), (uncapOrder P j - P.k j))

/-- Order quantity in the current period `t` under the Lookahead Peak-Shaving policy with
lookahead horizon `s` (Definition 2, eq. (11)): a generalized base-stock policy with lower
base-stock level `Ŝ_t` and upper base-stock level `Ŝ_t + τ_t^s`. The three cases are
continuous at their boundaries, so assigning the boundary points to the next case does
not change the value. -/
noncomputable def lpsOrder [NeZero H] (P : Params H) (s : ℕ) : ℝ :=
  if P.x < baseStock P 0 - P.k 0 then baseStock P 0 - P.x
  else if P.x < baseStock P 0 + shiftingNeed P s - P.k 0 then P.k 0
  else baseStock P 0 + shiftingNeed P s - P.x

end RobustVolumeFlex
Source
J. Gijsbrechts, C. Imdahl, R. N. Boute, J. A. Van Mieghem, Optimal robust inventory management with volume flexibility: Matching capacity and demand with the lookahead peak-shaving policy, Production and Operations Management 32 (2023) 3357-3373, https://doi.org/10.1111/poms.14069, Section 3.2 eqs. (3)-(4); Section 4.1 eqs. (6)-(8); Section 4.2 Definition 1, Definition 2 eq. (11)
Read-back

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

Params (data of one problem instance)

For a natural number HHH (the horizon length; H=0H = 0H=0 is allowed), an instance PPP is an arbitrary tuple of:

  • five real numbers h,b,c,cp,xh, b, c, c_p, xh,b,c,cp​,x;
  • a real vector k=(k0,…,kH−1)∈RHk = (k_0, \dots, k_{H-1}) \in \mathbb{R}^Hk=(k0​,…,kH−1​)∈RH, indexed by [H]:={0,1,…,H−1}[H] := \{0, 1, \dots, H-1\}[H]:={0,1,…,H−1};
  • an arbitrary set Ω⊆RH\Omega \subseteq \mathbb{R}^HΩ⊆RH of real vectors d=(d0,…,dH−1)d = (d_0,\dots,d_{H-1})d=(d0​,…,dH−1​).

There are no constraints. Any of h,b,c,cp,x,knh, b, c, c_p, x, k_nh,b,c,cp​,x,kn​ may be negative or zero. Ω\OmegaΩ may be empty, unbounded or non-closed, and its vectors may have negative entries. When H=0H = 0H=0, both kkk and every element of Ω\OmegaΩ are the empty vector, so Ω\OmegaΩ is either ∅\emptyset∅ or the one-point set containing the empty vector.

cumSum (partial sums)

For a vector v∈RHv \in \mathbb{R}^Hv∈RH and a natural number nnn,

Cn(v):=∑i∈[H], i≤nvi=∑i=0min⁡(n, H−1)vi.C_n(v) := \sum_{i \in [H],\ i \le n} v_i = \sum_{i=0}^{\min(n,\,H-1)} v_i .Cn​(v):=i∈[H], i≤n∑​vi​=i=0∑min(n,H−1)​vi​.

For every n≥H−1n \ge H-1n≥H−1 this is the full sum ∑i=0H−1vi\sum_{i=0}^{H-1} v_i∑i=0H−1​vi​. If H=0H = 0H=0 it is the empty sum, 000. The index nnn ranges over all of N\mathbb{N}N, not just [H][H][H].

minCumDemand

For an instance PPP and n∈Nn \in \mathbb{N}n∈N,

D‾n:=inf⁡ { Cn(d):d∈Ω },\underline{D}_n := \inf\,\{\, C_n(d) : d \in \Omega \,\},D​n​:=inf{Cn​(d):d∈Ω},

using the real-number infimum with its conventions for degenerate cases:

  • If Ω=∅\Omega = \emptysetΩ=∅, then D‾n=0\underline{D}_n = 0D​n​=0.
  • If the set {Cn(d):d∈Ω}\{C_n(d) : d \in \Omega\}{Cn​(d):d∈Ω} is not bounded below, then D‾n=0\underline{D}_n = 0D​n​=0 (it is not −∞-\infty−∞).
  • Otherwise it is the true infimum, which need not be attained by any d∈Ωd \in \Omegad∈Ω.

maxCumDemand

For an instance PPP and n∈Nn \in \mathbb{N}n∈N,

D‾n:=sup⁡ { Cn(d):d∈Ω },\overline{D}_n := \sup\,\{\, C_n(d) : d \in \Omega \,\},Dn​:=sup{Cn​(d):d∈Ω},

using the real-number supremum with its conventions for degenerate cases:

  • If Ω=∅\Omega = \emptysetΩ=∅, then D‾n=0\overline{D}_n = 0Dn​=0.
  • If the set is not bounded above, then D‾n=0\overline{D}_n = 0Dn​=0 (it is not +∞+\infty+∞).
  • Otherwise it is the true supremum, which need not be attained.

Because of these conventions, D‾n≤D‾n\underline{D}_n \le \overline{D}_nD​n​≤Dn​ is not guaranteed in degenerate cases. For example, if the set is bounded below with infimum 555 but unbounded above, then D‾n=5\underline{D}_n = 5D​n​=5 and D‾n=0\overline{D}_n = 0Dn​=0.

IsFeasible

For an instance PPP and three vectors q,y,z∈RHq, y, z \in \mathbb{R}^Hq,y,z∈RH, the triple is feasible when, for every n∈[H]n \in [H]n∈[H], all of the following hold:

  • h (x+Cn(q)−D‾n)≤ynh\,\big(x + C_n(q) - \underline{D}_n\big) \le y_nh(x+Cn​(q)−D​n​)≤yn​;
  • −b (x+Cn(q)−D‾n)≤yn-b\,\big(x + C_n(q) - \overline{D}_n\big) \le y_n−b(x+Cn​(q)−Dn​)≤yn​;
  • cp (qn−kn)≤znc_p\,(q_n - k_n) \le z_ncp​(qn​−kn​)≤zn​;
  • 0≤zn0 \le z_n0≤zn​;
  • 0≤qn0 \le q_n0≤qn​.

Here Cn(q)=q0+⋯+qnC_n(q) = q_0 + \dots + q_nCn​(q)=q0​+⋯+qn​. The vector yyy has no sign constraint and is bounded only from below by the first two inequalities. With the junk values of D‾n,D‾n\underline{D}_n, \overline{D}_nD​n​,Dn​ described above, these constraints still apply as stated.

Every instance has at least one feasible triple: take q=0q = 0q=0 and y,zy, zy,z large enough. When H=0H = 0H=0 there are no constraints, and the unique (empty) triple is feasible.

objective

For an instance PPP and vectors q,y,z∈RHq, y, z \in \mathbb{R}^Hq,y,z∈RH,

J(q,y,z):=∑n=0H−1(c qn+yn+zn).J(q,y,z) := \sum_{n=0}^{H-1} \big( c\, q_n + y_n + z_n \big).J(q,y,z):=n=0∑H−1​(cqn​+yn​+zn​).

When H=0H = 0H=0 this is 000.

IsRobustlyOptimal

For an instance PPP, a triple (q,y,z)∈(RH)3(q, y, z) \in (\mathbb{R}^H)^3(q,y,z)∈(RH)3 is robustly optimal when:

  1. (q,y,z)(q,y,z)(q,y,z) is feasible in the sense of IsFeasible; and
  2. for every triple (q′,y′,z′)∈(RH)3(q', y', z') \in (\mathbb{R}^H)^3(q′,y′,z′)∈(RH)3 that is feasible for PPP, we have J(q,y,z)≤J(q′,y′,z′)J(q,y,z) \le J(q',y',z')J(q,y,z)≤J(q′,y′,z′).

In other words, (q,y,z)(q,y,z)(q,y,z) is a global minimizer of JJJ over the feasible set.

  • H=0H = 0H=0: the unique empty triple is robustly optimal.
  • No minimizer: for some instances no triple satisfies the predicate, namely whenever JJJ is unbounded below on the feasible set. For example, take H≥1H \ge 1H≥1, c=−1c = -1c=−1, h=b=cp=0h = b = c_p = 0h=b=cp​=0. Then y,z≥0y, z \ge 0y,z≥0 are the only constraints on y,zy, zy,z, and J→−∞J \to -\inftyJ→−∞ as q0→∞q_0 \to \inftyq0​→∞.
  • Not unique: the predicate does not single out one minimizer.

baseStock

For an instance PPP and n∈Nn \in \mathbb{N}n∈N,

S^n:=max⁡ ⁣(b D‾n+h D‾nb+h, x).\hat S_n := \max\!\left( \frac{b\,\overline{D}_n + h\,\underline{D}_n}{b + h},\ x \right).S^n​:=max(b+hbDn​+hD​n​​, x).
  • b+h=0b + h = 0b+h=0: division by zero yields 000, so S^n=max⁡(0,x)\hat S_n = \max(0, x)S^n​=max(0,x).
  • Lower bound: in all cases S^n≥x\hat S_n \ge xS^n​≥x.
  • Large nnn: for n≥H−1n \ge H-1n≥H−1 the value no longer depends on nnn, because D‾n\underline{D}_nD​n​ and D‾n\overline{D}_nDn​ use full sums.
  • Junk inputs: the junk values of D‾n,D‾n\underline{D}_n, \overline{D}_nD​n​,Dn​ enter the formula directly.

uncapOrder

For an instance PPP and an index n∈[H]n \in [H]n∈[H],

q^n:={S^n−x,if c≤b (H−n) and n=0,S^n−S^n−1,if c≤b (H−n) and n≥1,0,if c>b (H−n).\hat q_n := \begin{cases} \hat S_n - x, & \text{if } c \le b\,(H - n) \text{ and } n = 0,\\[2pt] \hat S_n - \hat S_{n-1}, & \text{if } c \le b\,(H - n) \text{ and } n \ge 1,\\[2pt] 0, & \text{if } c > b\,(H - n). \end{cases}q^​n​:=⎩⎨⎧​S^n​−x,S^n​−S^n−1​,0,​if c≤b(H−n) and n=0,if c≤b(H−n) and n≥1,if c>b(H−n).​
  • The test: c≤b(H−n)c \le b(H-n)c≤b(H−n) is computed in real arithmetic, with H−n∈{1,…,H}H - n \in \{1, \dots, H\}H−n∈{1,…,H}. It is applied separately to each nnn, with no reference to whether it held at other indices.
    • If b≥0b \ge 0b≥0, it holds on an initial segment of indices, possibly empty or all of [H][H][H].
    • If b<0b < 0b<0, it can hold on a final segment instead.
  • Previous index: in the second case, S^n−1\hat S_{n-1}S^n−1​ is used whether or not the test held at index n−1n-1n−1. The natural-number subtraction n−1n - 1n−1 only occurs when n≥1n \ge 1n≥1, so it never truncates.
  • Sign:
    • For n=0n = 0n=0 (when the test holds), q^0=S^0−x≥0\hat q_0 = \hat S_0 - x \ge 0q^​0​=S^0​−x≥0.
    • For n≥1n \ge 1n≥1, q^n\hat q_nq^​n​ can be negative whenever S^n<S^n−1\hat S_n < \hat S_{n-1}S^n​<S^n−1​; nothing forces S^\hat SS^ to be nondecreasing.
  • Domain: q^\hat qq^​ is defined only on [H][H][H], so it is vacuous when H=0H = 0H=0.

shiftingNeed

For an instance PPP and a natural number sss, define for each natural number iii

Fi:=∑j∈[H], 1≤j≤i(q^j−kj)=∑j=1min⁡(i, H−1)(q^j−kj),F_i := \sum_{j \in [H],\ 1 \le j \le i} \big( \hat q_j - k_j \big) = \sum_{j=1}^{\min(i,\,H-1)} \big( \hat q_j - k_j \big),Fi​:=j∈[H], 1≤j≤i∑​(q^​j​−kj​)=j=1∑min(i,H−1)​(q^​j​−kj​),

which is an empty sum (000) when min⁡(i,H−1)<1\min(i, H-1) < 1min(i,H−1)<1. The shifting need is the maximum of 000 and these values for i=1,…,si = 1, \dots, si=1,…,s:

τs:=max⁡(0, F1,F2,…,Fs)=(max⁡1≤i≤sFi)+.\tau_s := \max\big(0,\ F_1, F_2, \dots, F_s\big) = \Big( \max_{1 \le i \le s} F_i \Big)^{+}.τs​:=max(0, F1​,F2​,…,Fs​)=(1≤i≤smax​Fi​)+.
  • s=0s = 0s=0: the index range is empty and τ0=0\tau_0 = 0τ0​=0.
  • Sign: always τs≥0\tau_s \ge 0τs​≥0.
  • Large iii: for i≥H−1i \ge H-1i≥H−1 all FiF_iFi​ are equal to the full sum ∑j=1H−1(q^j−kj)\sum_{j=1}^{H-1}(\hat q_j - k_j)∑j=1H−1​(q^​j​−kj​). So taking sss larger than H−1H-1H−1 changes nothing, and sss may exceed HHH.
  • H≤1H \le 1H≤1: all Fi=0F_i = 0Fi​=0, hence τs=0\tau_s = 0τs​=0.
  • Index 0 excluded: index 000 never enters the sums.

lpsOrder

This is defined only when H≠0H \ne 0H=0. For an instance PPP and a natural number sss, write S:=S^0S := \hat S_0S:=S^0​ (which uses only the first demand coordinate, C0(d)=d0C_0(d) = d_0C0​(d)=d0​), τ:=τs\tau := \tau_sτ:=τs​ and k0k_0k0​ for the first base capacity. The value is

LPS(P,s):={S−x,if x<S−k0,k0,if S−k0≤x<S+τ−k0,S+τ−x,if x≥S+τ−k0.\mathrm{LPS}(P,s) := \begin{cases} S - x, & \text{if } x < S - k_0,\\[2pt] k_0, & \text{if } S - k_0 \le x < S + \tau - k_0,\\[2pt] S + \tau - x, & \text{if } x \ge S + \tau - k_0. \end{cases}LPS(P,s):=⎩⎨⎧​S−x,k0​,S+τ−x,​if x<S−k0​,if S−k0​≤x<S+τ−k0​,if x≥S+τ−k0​.​

Boundary points go to the later case: x=S−k0x = S - k_0x=S−k0​ falls in the second or third case, and x=S+τ−k0x = S + \tau - k_0x=S+τ−k0​ falls in the third.

Write r:=S−xr := S - xr:=S−x; note r≥0r \ge 0r≥0 always and τ≥0\tau \ge 0τ≥0. Then the three cases are r>k0r > k_0r>k0​, r≤k0<r+τr \le k_0 < r + \taur≤k0​<r+τ, and k0≥r+τk_0 \ge r + \tauk0​≥r+τ, and the value is

LPS(P,s)=max⁡ ⁣(r, min⁡(k0, r+τ)).\mathrm{LPS}(P,s) = \max\!\big( r,\ \min(k_0,\ r + \tau) \big).LPS(P,s)=max(r, min(k0​, r+τ)).
  • Negative k0k_0k0​: if k0<0k_0 < 0k0​<0, the first case always applies and the value is S−xS - xS−x.
  • τ=0\tau = 0τ=0: this happens, for example, when s=0s = 0s=0 or H=1H = 1H=1. The middle case is then empty and the value is max⁡(S−x, the third-case value)=S−x\max(S - x,\ \text{the third-case value}) = S - xmax(S−x, the third-case value)=S−x.
  • Inputs used: the value depends on xxx, on k0k_0k0​, on S^0\hat S_0S^0​, and (through τs\tau_sτs​) on q^j,kj\hat q_j, k_jq^​j​,kj​ for 1≤j≤min⁡(s,H−1)1 \le j \le \min(s, H-1)1≤j≤min(s,H−1).
  • No link to optimality: the definition makes no reference to IsFeasible or IsRobustlyOptimal.
Human review
  • Endorsed by Shuze Chen · Nov 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by jorengijsbrechts · Nov 4, 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