Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: the Lookahead Peak-Shaving policy is robustly optimal (with a no-end-effect condition)

Open
RobustVolumeFlex.lookahead_peak_shaving_optimal

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

inventoryoperations-researchrobust-optimization

Theorem 1 of Gijsbrechts et al. (2023): the Lookahead Peak-Shaving policy is robustly optimal, under one extra no-end-effect hypothesis.

Consider one period of the robust rolling-horizon model with volume flexibility, with data h,b,c,cp,x,(kn)n<H,Ωh,b,c,c_p,x,(k_n)_{n<H},\Omegah,b,c,cp​,x,(kn​)n<H​,Ω as in the definition RobustVolumeFlex_Model. Let s=⌊cp/h⌋s=\lfloor c_p/h\rfloors=⌊cp​/h⌋ be the lookahead horizon. Assume:

  1. h>0h>0h>0, c≥0c\ge 0c≥0 and kn≥0k_n\ge 0kn​≥0 for all nnn;
  2. Ω\OmegaΩ is nonempty and bounded, and every d∈Ωd\in\Omegad∈Ω has di≥0d_i\ge 0di​≥0;
  3. (Assumption 1) h<cp<bh<c_p<bh<cp​<b;
  4. (Assumption 2) ⌊cp/h⌋<H\lfloor c_p/h\rfloor<H⌊cp​/h⌋<H and ⌊c/b⌋<H\lfloor c/b\rfloor<H⌊c/b⌋<H;
  5. (no end-of-horizon effect) c+cp≤b (H−s)c+c_p\le b\,(H-s)c+cp​≤b(H−s).

Then the linear program (4) has an optimal solution (q,y,z)(q,y,z)(q,y,z) whose current-period order is the Lookahead Peak-Shaving order:

q0=qLPS={S^0−xx<S^0−k0,k0S^0−k0≤x<S^0+τs−k0,S^0+τs−xotherwise,q_0=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}q0​=qLPS=⎩⎨⎧​S^0​−xk0​S^0​+τs−x​x<S^0​−k0​,S^0​−k0​≤x<S^0​+τs−k0​,otherwise,​

where S^0\hat S_0S^0​ is the uncapacitated base stock and τs\tau^sτs the shifting need.

The theorem reduces the robust LP to an explicit two-threshold base-stock rule, the same structure as the stochastic optimum. It underlies the paper's closed-form policy parameters and sensitivity analysis.

Formalization Note Hypothesis 5 is not in the paper. Without it the statement fails: H=2H=2H=2, h=1h=1h=1, cp=1.5c_p=1.5cp​=1.5, b=2b=2b=2, c=3c=3c=3, x=0x=0x=0, k=(1,1)k=(1,1)k=(1,1), deterministic demand (10,10)(10,10)(10,10) satisfies Assumptions 1–2, but the LP optimum orders 1 unit (cost 59), while LPS orders 10 (best follow-up cost 63.5). Hypothesis 1 and the conditions on Ω\OmegaΩ are the model's standing conventions. The conclusion is existential: ties may allow other optimal first-period orders.

Preamble
import Mathlib
import Definitions.Def_RobustVolumeFlex_Model
Formal statement
namespace RobustVolumeFlex

theorem lookahead_peak_shaving_optimal {H : ℕ} [NeZero H] (P : Params H)
    (h_pos : 0 < P.h) (c_nonneg : 0 ≤ P.c) (k_nonneg : ∀ n, 0 ≤ P.k n)
    (Ω_nonempty : P.Ω.Nonempty) (Ω_bounded : Bornology.IsBounded P.Ω)
    (demand_nonneg : ∀ d ∈ P.Ω, ∀ i, 0 ≤ d i)
    (assumption1 : P.h < P.cp ∧ P.cp < P.b)
    (assumption2 : ⌊P.cp / P.h⌋₊ < H ∧ ⌊P.c / P.b⌋₊ < H)
    (no_end_effect : P.c + P.cp ≤ P.b * ((H : ℝ) - ⌊P.cp / P.h⌋₊)) :
    ∃ q y z : Fin H → ℝ, IsRobustlyOptimal P q y z ∧ q 0 = lpsOrder P ⌊P.cp / P.h⌋₊ := by
  sorry

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, p. 3365, Theorem 1 (with Assumption 1 p. 3364 and Assumption 2 p. 3365)
Read-back

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

Setting. Fix a horizon length H∈NH \in \mathbb{N}H∈N with H≠0H \neq 0H=0; this is the typeclass assumption, so the periods are n∈{0,1,…,H−1}n \in \{0,1,\dots,H-1\}n∈{0,1,…,H−1}. Fix a parameter bundle PPP made of:

  • real numbers hhh (holding), bbb (backorder), ccc (unit cost), cpc_pcp​ (premium) and xxx (starting inventory);
  • a vector k=(k0,…,kH−1)∈RHk = (k_0,\dots,k_{H-1}) \in \mathbb{R}^Hk=(k0​,…,kH−1​)∈RH;
  • a set Ω⊆RH\Omega \subseteq \mathbb{R}^HΩ⊆RH.

Hypotheses.

  1. h>0h > 0h>0.
  2. c≥0c \ge 0c≥0.
  3. kn≥0k_n \ge 0kn​≥0 for every nnn.
  4. Ω≠∅\Omega \neq \emptysetΩ=∅.
  5. Ω\OmegaΩ is bounded.
  6. Every d∈Ωd \in \Omegad∈Ω has di≥0d_i \ge 0di​≥0 for all iii.
  7. h<cp<bh < c_p < bh<cp​<b.
  8. Write s:=⌊cp/h⌋s := \lfloor c_p/h \rfloors:=⌊cp​/h⌋, the natural-number floor of the real quotient. The hypothesis requires s<Hs < Hs<H and ⌊c/b⌋<H\lfloor c/b \rfloor < H⌊c/b⌋<H.
  9. The "no end effect" condition, with HHH and sss read as reals:
c+cp≤b (H−s).c + c_p \le b\,(H - s).c+cp​≤b(H−s).

No hypothesis is placed on xxx, which may be any real number, including a negative one. There is also no hypothesis linking ccc to hhh or to cpc_pcp​.

From these, cp/h>1c_p/h > 1cp​/h>1, so s≥1s \ge 1s≥1, and therefore H≥2H \ge 2H≥2. Also b>0b > 0b>0 and b+h>0b + h > 0b+h>0. The hypotheses can all hold at once; for example h=1h=1h=1, cp=2c_p=2cp​=2, b=10b=10b=10, c=1c=1c=1, H=3H=3H=3 gives s=2s=2s=2.

Definitions, expanded.

  • Partial sums. For v∈RHv \in \mathbb{R}^Hv∈RH and n∈Nn \in \mathbb{N}n∈N,
Qnv:=∑i≤nvi,Q^v_n := \sum_{i \le n} v_i,Qnv​:=i≤n∑​vi​,

where iii ranges over {0,…,H−1}\{0,\dots,H-1\}{0,…,H−1}. For n≥H−1n \ge H-1n≥H−1 this is the full sum.

  • Demand bounds.
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​.

Because Ω\OmegaΩ is nonempty and bounded, these are a genuine real infimum and supremum. They need not be attained, since Ω\OmegaΩ is not assumed closed. Both are ≥0\ge 0≥0.

  • Feasibility. A triple (q,y,z)(q,y,z)(q,y,z) of vectors in RH\mathbb{R}^HRH is feasible if, for every n∈{0,…,H−1}n \in \{0,\dots,H-1\}n∈{0,…,H−1}:
h (x+Qnq−D‾n)≤yn,h\,(x + Q^q_n - \underline D_n) \le y_n,h(x+Qnq​−D​n​)≤yn​, −b (x+Qnq−D‾n)≤yn,-b\,(x + Q^q_n - \overline D_n) \le y_n,−b(x+Qnq​−Dn​)≤yn​, cp (qn−kn)≤zn,c_p\,(q_n - k_n) \le z_n,cp​(qn​−kn​)≤zn​, 0≤zn,0≤qn.0 \le z_n, \qquad 0 \le q_n.0≤zn​,0≤qn​.

There is no sign constraint on yyy.

  • Objective.
∑n=0H−1(c qn+yn+zn).\sum_{n=0}^{H-1} \bigl(c\,q_n + y_n + z_n\bigr).n=0∑H−1​(cqn​+yn​+zn​).
  • Robust optimality. (q,y,z)(q,y,z)(q,y,z) is robustly optimal if it is feasible and its objective is ≤\le≤ the objective of every feasible triple. That is, it is a global minimizer of this linear program.
  • Base-stock level. For n∈Nn \in \mathbb{N}n∈N,
S^n:=max⁡ ⁣(b D‾n+h D‾nb+h,  x).\hat S_n := \max\!\Bigl(\tfrac{b\,\overline D_n + h\,\underline D_n}{b+h},\; x\Bigr).S^n​:=max(b+hbDn​+hD​n​​,x).

The denominator b+hb+hb+h is positive.

  • Uncapacitated order. For n∈{0,…,H−1}n \in \{0,\dots,H-1\}n∈{0,…,H−1}:
q^n:={S^0−xif c≤b (H−n) and n=0,S^n−S^n−1if c≤b (H−n) and n≥1,0if c>b (H−n).\hat q_n := \begin{cases} \hat S_0 - x & \text{if } c \le b\,(H-n) \text{ and } n = 0,\\ \hat S_n - \hat S_{n-1} & \text{if } c \le b\,(H-n) \text{ and } n \ge 1,\\ 0 & \text{if } c > b\,(H-n).\end{cases}q^​n​:=⎩⎨⎧​S^0​−xS^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 comparison c≤b (H−n)c \le b\,(H-n)c≤b(H−n) is between reals.

  • Shifting need. For s∈Ns \in \mathbb{N}s∈N, τs\tau^sτs is defined as a fold of max⁡\maxmax that starts from 000:
τs=max⁡(0,  max⁡1≤i≤s∑j≤H−11≤j≤i(q^j−kj)).\tau^s = \max\Bigl(0,\; \max_{1 \le i \le s} \sum_{\substack{j \le H-1 \\ 1 \le j \le i}} (\hat q_j - k_j)\Bigr).τs=max(0,1≤i≤smax​j≤H−11≤j≤i​∑​(q^​j​−kj​)).

If s=0s = 0s=0, then τs=0\tau^s = 0τs=0. Here 1≤s≤H−11 \le s \le H-11≤s≤H−1, so the cap j≤H−1j \le H-1j≤H−1 never truncates.

  • Lookahead peak-shaving order.
LPS(s):={S^0−xif x<S^0−k0,k0else, if x<S^0+τs−k0,S^0+τs−xotherwise.\mathrm{LPS}(s) := \begin{cases} \hat S_0 - x & \text{if } x < \hat S_0 - k_0,\\ k_0 & \text{else, if } x < \hat S_0 + \tau^s - k_0,\\ \hat S_0 + \tau^s - x & \text{otherwise.}\end{cases}LPS(s):=⎩⎨⎧​S^0​−xk0​S^0​+τs−x​if x<S^0​−k0​,else, if x<S^0​+τs−k0​,otherwise.​

The inequalities are strict, so each boundary point falls into the later case. Note that S^0≥x\hat S_0 \ge xS^0​≥x.

Conclusion. The statement is existential, not universal. There exist vectors q,y,z∈RHq, y, z \in \mathbb{R}^Hq,y,z∈RH such that (q,y,z)(q,y,z)(q,y,z) is robustly optimal in the sense above and

q0=LPS(⌊cp/h⌋).q_0 = \mathrm{LPS}\bigl(\lfloor c_p/h \rfloor\bigr).q0​=LPS(⌊cp​/h⌋).

The statement does not claim that every optimal solution has this first-period order, and it says nothing about q1,…,qH−1q_1,\dots,q_{H-1}q1​,…,qH−1​, yyy or zzz beyond optimality. Proving it does, however, require that an optimal solution exists.

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