Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Single-location problems, (s,S)(s,S)(s,S) policies, canonical optima, mirror cost, FiF_iFi​, fL0f_{L_0}fL0​​

Definition
owmr_single_location

by Ming Hu · Nov 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmsinventoryinventory-theoryoperations-researchstochastic-control

Single-location problem. Let ρ\rhoρ be a probability law on [0,∞)[0,\infty)[0,∞), f:R→Rf:\mathbb R\to\mathbb Rf:R→R a cost function, and KKK a setup cost. In each period the position may be raised by qt≥0q_t\ge0qt​≥0, which costs KKK if qt>0q_t>0qt​>0; the post-action position xtx_txt​ incurs f(xt)f(x_t)f(xt​), and an i.i.d. demand with law ρ\rhoρ then reduces it. The single-location value Jρ(f;K)\mathcal J_\rho(f;K)Jρ​(f;K) is the infimum, over all nonanticipative (possibly randomized) policies, of

lim sup⁡T→∞1T E∑t<T[K1{qt>0}+f(xt)].\limsup_{T\to\infty}\frac1T\,\mathbb E\sum_{t<T}\big[K\mathbf 1_{\{q_t>0\}}+f(x_t)\big].T→∞limsup​T1​Et<T∑​[K1{qt​>0}​+f(xt​)].

(s,S)(s,S)(s,S) policies. Started at pre-action position SSS, the (s,S)(s,S)(s,S) policy raises the position to SSS whenever it is at most sss; base stock is the case s=Ss=Ss=S. A pair (s^,S^)(\hat s,\hat S)(s^,S^) is a canonical optimum (Lemma 1) if s^<S^\hat s<\hat Ss^<S^, the (s^,S^)(\hat s,\hat S)(s^,S^) policy attains J=Jρ(f;K)J=\mathcal J_\rho(f;K)J=Jρ​(f;K), and the canonical conditions (4) hold:

f(s^)=J,f(S^)≤J,f(x)≤J(s^≤x≤S^).f(\hat s)=J,\qquad f(\hat S)\le J,\qquad f(x)\le J\quad(\hat s\le x\le\hat S).f(s^)=J,f(S^)≤J,f(x)≤J(s^≤x≤S^).

A best half window of [s^,S^][\hat s,\hat S][s^,S^] is a pair (s,S)(s,S)(s,S) with s^≤s<S≤S^\hat s\le s<S\le\hat Ss^≤s<S≤S^ and S−s=(S^−s^)/2S-s=(\hat S-\hat s)/2S−s=(S^−s^)/2 whose long-run average holding and backlog cost is smallest among all such pairs.

Mirror cost. With the warehouse-rate loss ϕ(y)=hy++py−\phi(y)=hy^++py^-ϕ(y)=hy++py−, the mirror cost of an (s,S)(s,S)(s,S) policy with post-action positions P^t\widehat P_tPt​ is min⁡a∈Rlim sup⁡TT−1 E∑t<Tϕ(a−P^t)\min_{a\in\mathbb R}\limsup_{T}T^{-1}\,\mathbb E\sum_{t<T}\phi(a-\widehat P_t)mina∈R​limsupT​T−1E∑t<T​ϕ(a−Pt​), and a minimizing aaa is a mirror center.

Network cost functions. For retailer iii with marginal demand DiD_iDi​, Fi(y)=E[Hi(y−Zi)++p(Zi−y)+]F_i(y)=\mathbb E[H_i(y-Z_i)^++p(Z_i-y)^+]Fi​(y)=E[Hi​(y−Zi​)++p(Zi​−y)+], where ZiZ_iZi​ is a sum of Li+1L_i+1Li​+1 i.i.d. copies of DiD_iDi​, and Ji(k)=JDi(Fi;k)J_i(k)=\mathcal J_{D_i}(F_i;k)Ji​(k)=JDi​​(Fi​;k) (equation (8)). For aggregate demand D=∑iDiD=\sum_iD_iD=∑i​Di​, fL0(y)=E ϕ(y−D(L0))f_{L_0}(y)=\mathbb E\,\phi(y-D^{(L_0)})fL0​​(y)=Eϕ(y−D(L0​)), where D(L0)D^{(L_0)}D(L0​) is a sum of L0L_0L0​ i.i.d. copies of DDD (D(0)=0D^{(0)}=0D(0)=0), and J0(k)=JD(fL0;k)J_0(k)=\mathcal J_D(f_{L_0};k)J0​(k)=JD​(fL0​​;k) (equation (22)). The augmented cost of an (s,S)(s,S)(s,S) policy for retailer iii is its long-run average cost at the actual setup cost KiK_iKi​ plus its mirror cost. The renewal function is M(w)=∑k≥0P(D(k)<w)M(w)=\sum_{k\ge0}\mathbb P(D^{(k)}<w)M(w)=∑k≥0​P(D(k)<w) (equation (9)). The demand vector is associated if Cov⁡(u(Dt),v(Dt))≥0\operatorname{Cov}(u(D_t),v(D_t))\ge0Cov(u(Dt​),v(Dt​))≥0 for all bounded, coordinatewise nondecreasing u,vu,vu,v (Section 6).

These objects are the building blocks of both policies and both guarantees.

Formalization Note Every long-run average is the limsup of Cesàro averages of expected costs, valued in [0,∞][0,\infty][0,∞]; where the source writes a limit, the limit exists and equals this limsup. Averages of (s,S)(s,S)(s,S) policies start at pre-action position SSS, and J\mathcal JJ starts at position 000 (the source shows that it does not depend on the initial position). A real cost fff enters through max⁡(f,0)\max(f,0)max(f,0); every fff used in the mission is nonnegative. FiF_iFi​ and fL0f_{L_0}fL0​​ are Bochner integrals; the canonical conditions compare max⁡(f,0)\max(f,0)max(f,0) with JJJ in [0,∞][0,\infty][0,∞]. In the association condition, uuu and vvv are also required to be measurable, the standard convention.

Definition code
import Definitions.Def_owmr_network_model

/-!
# Single-location problems, (s,S) policies, and the cost functions of the OWMR paper

Source: M. Hu, "A 5/2 Guarantee for Echelon Stock (s,S) Policies in One-Warehouse
Multi-Retailer Systems": Section 3 (the single-location problems and `(s,S)` policies used by
Definition 1, mirror cost, augmented cost), Section 4.1 (the single-location value `𝒥_D(f;K)`,
Lemma 1 and the canonical conditions (4)), equations (8) (`F_i`, `J_i`), (9) (renewal measure,
`M(w)`), (14) (warehouse-rate loss `φ`, mirror cost), (22) (`f_{L₀}`, `J₀`), and Section 6
(association).
-/

open MeasureTheory
open scoped ENNReal NNReal

noncomputable section

namespace OWMR

variable {n : ℕ}

/-! ## The single-location problem (Section 4.1) -/

/-- A single-location policy with auxiliary randomness `u : U`: the order quantity in period
`t`, as a function of `u` and the demand sequence. -/
abbrev SLPolicy (U : Type) := ℕ → U → (ℕ → ℝ≥0) → ℝ

/-- Post-action position in period `t`, starting from pre-action position `y0` in period `0`:
`x_t = y0 + ∑_{s ≤ t} q_s - ∑_{s < t} D_s`. -/
def slPos {U : Type} (y0 : ℝ) (q : SLPolicy U) (u : U) (d : ℕ → ℝ≥0) (t : ℕ) : ℝ :=
  y0 + ∑ s ∈ Finset.range (t + 1), q s u d - ∑ s ∈ Finset.range t, (d s : ℝ)

/-- Period cost `K 1{q_t > 0} + f(x_t)` of the single-location problem. -/
def slPeriodCost {U : Type} (f : ℝ → ℝ) (K y0 : ℝ) (q : SLPolicy U) (u : U) (d : ℕ → ℝ≥0)
    (t : ℕ) : ℝ :=
  K * (if 0 < q t u d then 1 else 0) + f (slPos y0 q u d t)

/-- Long-run average cost `limsup_T T⁻¹ 𝔼 ∑_{t<T} (K 1{q_t>0} + f(x_t))`, demands i.i.d. with
law `ρ`, auxiliary randomness with law `ν`. -/
def slAvgCost {U : Type} [MeasurableSpace U] (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ]
    (f : ℝ → ℝ) (K y0 : ℝ) (q : SLPolicy U) (ν : Measure U) : ℝ≥0∞ :=
  Filter.limsup (fun T : ℕ => (T : ℝ≥0∞)⁻¹ *
    ∫⁻ ω, ∑ t ∈ Finset.range T, ENNReal.ofReal (slPeriodCost f K y0 q ω.1 (padHist T ω.2) t)
      ∂(ν.prod (Measure.pi fun _ : Fin T => ρ))) Filter.atTop

/-- Admissible single-location policies: nonanticipative, measurable, nonnegative orders. -/
def SLAdmissible {U : Type} [MeasurableSpace U] (q : SLPolicy U) : Prop :=
  (∀ (t : ℕ) (u : U) (d d' : ℕ → ℝ≥0), (∀ s < t, d s = d' s) → q t u d = q t u d') ∧
  (∀ t : ℕ, Measurable (fun ω : U × (ℕ → ℝ≥0) => q t ω.1 ω.2)) ∧
  (∀ t u d, 0 ≤ q t u d)

/-- The single-location value `𝒥_D(f;K)`: the infimum of the long-run average cost over all
nonanticipative policies (from initial position `0`; by Lemma 1 the value does not depend on the
initial position). -/
def slValue (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (f : ℝ → ℝ) (K : ℝ) : ℝ≥0∞ :=
  ⨅ (U : Type) (_ : MeasurableSpace U) (ν : Measure U) (_ : IsProbabilityMeasure ν)
    (q : SLPolicy U) (_ : SLAdmissible q), slAvgCost ρ f K 0 q ν

/-! ## `(s,S)` policies -/

/-- Pre-action positions of the `(s,S)` policy started at pre-action position `S`: whenever the
position is at most `s` it is raised to `S`, then demand reduces it. -/
def ssPre (s S : ℝ) (d : ℕ → ℝ≥0) : ℕ → ℝ
  | 0 => S
  | t + 1 => (if ssPre s S d t ≤ s then S else ssPre s S d t) - (d t : ℝ)

/-- Post-action position of the `(s,S)` policy in period `t`. -/
def ssPost (s S : ℝ) (d : ℕ → ℝ≥0) (t : ℕ) : ℝ :=
  if ssPre s S d t ≤ s then S else ssPre s S d t

/-- Period cost of the `(s,S)` policy: `K` for a positive order, plus `f` of the post-action
position. -/
def ssPeriodCost (f : ℝ → ℝ) (K s S : ℝ) (d : ℕ → ℝ≥0) (t : ℕ) : ℝ :=
  K * (if ssPre s S d t ≤ s ∧ ssPre s S d t < S then 1 else 0) + f (ssPost s S d t)

/-- Long-run average cost of the `(s,S)` policy started at `S` (setup cost `K` per order).
With `K = 0` this is its long-run average holding and backlog cost. -/
def ssAvgCost (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (f : ℝ → ℝ) (K s S : ℝ) : ℝ≥0∞ :=
  Filter.limsup (fun T : ℕ => (T : ℝ≥0∞)⁻¹ *
    ∫⁻ z, ∑ t ∈ Finset.range T, ENNReal.ofReal (ssPeriodCost f K s S (padHist T z) t)
      ∂(Measure.pi fun _ : Fin T => ρ)) Filter.atTop

/-- `(s,S)` is a canonical optimum (Lemma 1): `s < S`, the `(s,S)` policy is optimal (its average
cost started at `S` equals `J = 𝒥_D(f;K)`), and the canonical conditions (4) hold:
`f(s) = J`, `f(S) ≤ J`, and `f(x) ≤ J` for `s ≤ x ≤ S`. -/
def IsCanonicalOptimum (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (f : ℝ → ℝ) (K s S : ℝ) :
    Prop :=
  s < S ∧ ssAvgCost ρ f K s S = slValue ρ f K ∧
    ENNReal.ofReal (f s) = slValue ρ f K ∧ ENNReal.ofReal (f S) ≤ slValue ρ f K ∧
    ∀ y ∈ Set.Icc s S, ENNReal.ofReal (f y) ≤ slValue ρ f K

/-- `(s,S)` has the smallest long-run average holding and backlog cost among the `(s',S')`
policies with `sh ≤ s' < S' ≤ Sh` and `S' - s' = (Sh - sh)/2` (the half windows of
`[sh, Sh]`), and is itself such a policy. -/
def IsBestHalfWindow (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (f : ℝ → ℝ) (sh Sh s S : ℝ) :
    Prop :=
  sh ≤ s ∧ s < S ∧ S ≤ Sh ∧ S - s = (Sh - sh) / 2 ∧
    ∀ s' S' : ℝ, sh ≤ s' → s' < S' → S' ≤ Sh → S' - s' = (Sh - sh) / 2 →
      ssAvgCost ρ f 0 s S ≤ ssAvgCost ρ f 0 s' S'

/-! ## Warehouse-rate loss and mirror cost -/

/-- The warehouse-rate loss `φ(y) = h y⁺ + p y⁻`. -/
def whLoss (h p y : ℝ) : ℝ := h * max y 0 + p * max (-y) 0

/-- Long-run average mirror loss `φ(a - P̂_t)` of the `(s,S)` policy started at `S`, where `P̂_t`
is its post-action position. -/
def mirrorAvg (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (h p s S a : ℝ) : ℝ≥0∞ :=
  Filter.limsup (fun T : ℕ => (T : ℝ≥0∞)⁻¹ *
    ∫⁻ z, ∑ t ∈ Finset.range T, ENNReal.ofReal (whLoss h p (a - ssPost s S (padHist T z) t))
      ∂(Measure.pi fun _ : Fin T => ρ)) Filter.atTop

/-- The mirror cost of the `(s,S)` policy: the minimum over centers `a` of `mirrorAvg`. -/
def mirrorCost (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (h p s S : ℝ) : ℝ≥0∞ :=
  ⨅ a : ℝ, mirrorAvg ρ h p s S a

/-! ## Renewal function (9) -/

/-- `M(w) = U[0,w) = ∑_{k ≥ 0} ℙ(D^{(k)} < w)`, with `D^{(k)}` the sum of `k` i.i.d. demands of
law `ρ` (and `D^{(0)} = 0`). -/
def renewalM (ρ : Measure ℝ≥0) [IsProbabilityMeasure ρ] (w : ℝ) : ℝ≥0∞ :=
  ∑' k : ℕ, (Measure.pi fun _ : Fin k => ρ) {z | ∑ j, (z j : ℝ) < w}

/-! ## Network-level cost functions -/

/-- Marginal law of retailer `i`'s demand `D_i`. -/
def Network.marginal (N : Network n) (i : Fin n) : Measure ℝ≥0 := N.μ.map (fun x => x i)

instance (N : Network n) (i : Fin n) : IsProbabilityMeasure (N.marginal i) :=
  Measure.isProbabilityMeasure_map (measurable_pi_apply i).aemeasurable

/-- Law of aggregate demand `D = ∑_i D_i`. -/
def Network.aggregate (N : Network n) : Measure ℝ≥0 := N.μ.map (fun x => ∑ i, x i)

instance (N : Network n) : IsProbabilityMeasure N.aggregate :=
  Measure.isProbabilityMeasure_map (Finset.measurable_sum _ fun i _ => measurable_pi_apply i).aemeasurable

/-- `F_i(y) = 𝔼[H_i (y - Z_i)⁺ + p (Z_i - y)⁺]` from (8), where `Z_i` is a sum of `L_i + 1`
i.i.d. demands of retailer `i`. -/
def Network.F (N : Network n) (i : Fin n) (y : ℝ) : ℝ :=
  ∫ z, (N.H i * max (y - ∑ j, (z j : ℝ)) 0 + N.p * max (∑ j, (z j : ℝ) - y) 0)
    ∂(Measure.pi fun _ : Fin (N.L i + 1) => N.marginal i)

/-- `J_i(k) = 𝒥_{D_i}(F_i; k)` from (8). -/
def Network.J (N : Network n) (i : Fin n) (k : ℝ) : ℝ≥0∞ :=
  slValue (N.marginal i) (N.F i) k

/-- `f_{L₀}(y) = 𝔼 φ(y - D^{(L₀)})` from (22), where `D^{(L₀)}` is a sum of `L₀` i.i.d. aggregate
demands (`D^{(0)} = 0`). -/
def Network.fL0 (N : Network n) (y : ℝ) : ℝ :=
  ∫ z, whLoss N.h N.p (y - ∑ j, (z j : ℝ)) ∂(Measure.pi fun _ : Fin N.L0 => N.aggregate)

/-- `J₀(k) = 𝒥_D(f_{L₀}; k)` from (22). -/
def Network.J0 (N : Network n) (k : ℝ) : ℝ≥0∞ :=
  slValue N.aggregate N.fL0 k

/-- The augmented cost of the `(s,S)` policy for retailer `i` (Section 3): its long-run average
cost in the single-location problem with actual setup cost `K_i` and lead time `L_i`, plus the
mirror cost of its position. -/
def Network.augCost (N : Network n) (i : Fin n) (s S : ℝ) : ℝ≥0∞ :=
  ssAvgCost (N.marginal i) (N.F i) (N.K i) s S + mirrorCost (N.marginal i) N.h N.p s S

/-- Association of the demand vector within a period (Section 6): `Cov(u(D_t), v(D_t)) ≥ 0`
for all bounded, measurable, coordinatewise nondecreasing `u, v`. -/
def Network.Associated (N : Network n) : Prop :=
  ∀ u v : DemandVec n → ℝ, Measurable u → Measurable v → Monotone u → Monotone v →
    (∃ C, ∀ x, |u x| ≤ C) → (∃ C, ∀ x, |v x| ≤ C) →
      (∫ x, u x ∂N.μ) * (∫ x, v x ∂N.μ) ≤ ∫ x, u x * v x ∂N.μ

end OWMR
Source
M. Hu, "A 5/2 Guarantee for Echelon Stock (s,S) Policies in One-Warehouse Multi-Retailer Systems", working paper (manuscript of November 2026), Section 3 (pp. 7-8: single-location problems, (s,S) policies, mirror cost, augmented cost), Section 4.1 (p. 11: single-location value, Lemma 1 and canonical conditions (4)), equations (8) (p. 12), (9) (p. 12), (14) (p. 15), (22) (p. 21), and Section 6 (p. 27: association).
Read-back

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

Conventions used throughout. R≥0\mathbb{R}_{\ge 0}R≥0​ is the set of nonnegative reals with its Borel σ\sigmaσ-algebra. A nonnegative number that enters real arithmetic is treated as a real number. Sequences d=(d0,d1,… )∈R≥0Nd=(d_0,d_1,\dots)\in\mathbb{R}_{\ge0}^{\mathbb{N}}d=(d0​,d1​,…)∈R≥0N​ carry the product σ\sigmaσ-algebra generated by the coordinates, and R≥0T\mathbb{R}_{\ge0}^{T}R≥0T​ carries the product σ\sigmaσ-algebra. For T∈NT\in\mathbb{N}T∈N and a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, ρ⊗T\rho^{\otimes T}ρ⊗T is the TTT-fold product measure on R≥0T\mathbb{R}_{\ge0}^TR≥0T​, under which z0,…,zT−1z_0,\dots,z_{T-1}z0​,…,zT−1​ are independent with law ρ\rhoρ. For T=0T=0T=0 the space has exactly one point (the empty tuple) and ρ⊗0\rho^{\otimes 0}ρ⊗0 is the unit point mass on it. For z∈R≥0Tz\in\mathbb{R}_{\ge0}^Tz∈R≥0T​, zˉ∈R≥0N\bar z\in\mathbb{R}_{\ge0}^{\mathbb{N}}zˉ∈R≥0N​ is its zero padding (the context function padHist): zˉt=zt\bar z_t=z_tzˉt​=zt​ for t<Tt<Tt<T and zˉt=0\bar z_t=0zˉt​=0 for t≥Tt\ge Tt≥T. For real xxx, x+=max⁡(x,0)∈[0,∞)x^+=\max(x,0)\in[0,\infty)x+=max(x,0)∈[0,∞). This is how every real-valued period cost below is turned into an extended nonnegative number, so negative values become 000. In [0,∞][0,\infty][0,∞], 1/0=∞1/0=\infty1/0=∞ and ∞⋅0=0\infty\cdot 0=0∞⋅0=0. The integral of a [0,∞][0,\infty][0,∞]-valued function is always defined and may be ∞\infty∞. If the function is not measurable, it is the lower integral, meaning the supremum of the integrals of measurable simple functions lying below it. For a [0,∞][0,\infty][0,∞]-valued sequence, lim sup⁡T→∞aT=inf⁡Nsup⁡T≥NaT\limsup_{T\to\infty}a_T=\inf_N\sup_{T\ge N}a_TlimsupT→∞​aT​=infN​supT≥N​aT​, which always exists and may be ∞\infty∞.

SLPolicy. For a type UUU (an arbitrary set), an element qqq of SLPolicy U is any function that assigns a real number qt(u,d)q_t(u,d)qt​(u,d) to each time t∈Nt\in\mathbb{N}t∈N, each u∈Uu\in Uu∈U and each sequence d∈R≥0Nd\in\mathbb{R}_{\ge0}^{\mathbb{N}}d∈R≥0N​. No sign, measurability or information restriction is built in. Such restrictions appear only in SLAdmissible.

slPos, slPeriodCost. Take a type UUU, a real y0y_0y0​, q∈q\inq∈ SLPolicy U, u∈Uu\in Uu∈U, d∈R≥0Nd\in\mathbb{R}_{\ge0}^{\mathbb{N}}d∈R≥0N​ and t∈Nt\in\mathbb{N}t∈N. Then

post=y0+∑r=0tqr(u,d)−∑r=0t−1dr.\mathrm{pos}_t=y_0+\sum_{r=0}^{t}q_r(u,d)-\sum_{r=0}^{t-1}d_r .post​=y0​+r=0∑t​qr​(u,d)−r=0∑t−1​dr​.

The qqq-sum includes time ttt, while the ddd-sum stops at t−1t-1t−1. In particular pos0=y0+q0(u,d)\mathrm{pos}_0=y_0+q_0(u,d)pos0​=y0​+q0​(u,d). Given in addition an arbitrary function f:R→Rf:\mathbb{R}\to\mathbb{R}f:R→R and a real KKK, with no sign assumption on either,

ct=K⋅1{qt(u,d)>0}+f(post).c_t=K\cdot\mathbf 1\{q_t(u,d)>0\}+f(\mathrm{pos}_t).ct​=K⋅1{qt​(u,d)>0}+f(post​).

The indicator uses a strict inequality, so KKK is charged only when qt(u,d)q_t(u,d)qt​(u,d) is strictly positive. Both quantities are real and may be negative.

slAvgCost. The inputs are:

  • a type UUU with a σ\sigmaσ-algebra;
  • a measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, assumed to be a probability measure;
  • an arbitrary f:R→Rf:\mathbb{R}\to\mathbb{R}f:R→R;
  • reals KKK and y0y_0y0​;
  • an arbitrary q∈q\inq∈ SLPolicy U (no admissibility is required here);
  • an arbitrary measure ν\nuν on UUU (not required to be a probability measure here).

For u∈Uu\in Uu∈U and z∈R≥0Tz\in\mathbb{R}_{\ge0}^Tz∈R≥0T​, let

ct(u,z)=K 1{qt(u,zˉ)>0}+f(y0+∑r=0tqr(u,zˉ)−∑r=0t−1zr).c_t(u,z)=K\,\mathbf 1\{q_t(u,\bar z)>0\}+f\Big(y_0+\sum_{r=0}^{t}q_r(u,\bar z)-\sum_{r=0}^{t-1}z_r\Big).ct​(u,z)=K1{qt​(u,zˉ)>0}+f(y0​+r=0∑t​qr​(u,zˉ)−r=0∑t−1​zr​).

Then

slAvgCostρ(f,K,y0,q,ν)=lim sup⁡T→∞ 1T∫U×R≥0T ∑t=0T−1(ct(u,z))+ (ν⊗ρ⊗T)(du,dz) ∈[0,∞].\mathrm{slAvgCost}_\rho(f,K,y_0,q,\nu)=\limsup_{T\to\infty}\ \frac1T\int_{U\times\mathbb{R}_{\ge0}^T}\ \sum_{t=0}^{T-1}\big(c_t(u,z)\big)^{+}\,(\nu\otimes\rho^{\otimes T})(du,dz)\ \in[0,\infty].slAvgCostρ​(f,K,y0​,q,ν)=T→∞limsup​ T1​∫U×R≥0T​​ t=0∑T−1​(ct​(u,z))+(ν⊗ρ⊗T)(du,dz) ∈[0,∞].

For each horizon TTT, the following hold:

  • One uuu is used in all periods, and the integral is against the product measure ν⊗ρ⊗T\nu\otimes\rho^{\otimes T}ν⊗ρ⊗T. So when ν\nuν is a probability measure, uuu is independent of the i.i.d. ρ\rhoρ-distributed z0,…,zT−1z_0,\dots,z_{T-1}z0​,…,zT−1​.
  • qqq is evaluated on the whole zero-padded sequence zˉ\bar zzˉ. Nothing in this definition stops qtq_tqt​ from depending on zt,…,zT−1z_t,\dots,z_{T-1}zt​,…,zT−1​ or on the padded zeros.
  • Each period cost ctc_tct​ is clipped at 000 on its own before summing; the total is not clipped as a whole.
  • The integral of the TTT-period total is divided by TTT, and the limsup is taken over these averaged integrals. It is not the integral of a pathwise limsup.

The T=0T=0T=0 term equals ∞⋅0=0\infty\cdot 0=0∞⋅0=0 and does not affect the limsup.

SLAdmissible. For a type UUU with σ\sigmaσ-algebra U\mathcal UU, q∈q\inq∈ SLPolicy U is admissible if and only if all three of the following hold:

  1. For every ttt and uuu, and all d,d′∈R≥0Nd,d'\in\mathbb{R}_{\ge0}^{\mathbb{N}}d,d′∈R≥0N​ with dr=dr′d_r=d'_rdr​=dr′​ for every r<tr<tr<t, we have qt(u,d)=qt(u,d′)q_t(u,d)=q_t(u,d')qt​(u,d)=qt​(u,d′). So qt(u,⋅)q_t(u,\cdot)qt​(u,⋅) depends on ddd only through d0,…,dt−1d_0,\dots,d_{t-1}d0​,…,dt−1​. For t=0t=0t=0 the hypothesis is empty, so q0(u,d)q_0(u,d)q0​(u,d) does not depend on ddd at all.
  2. For every ttt, the map (u,d)↦qt(u,d)(u,d)\mapsto q_t(u,d)(u,d)↦qt​(u,d) is measurable from U×R≥0NU\times\mathbb{R}_{\ge0}^{\mathbb{N}}U×R≥0N​ (with the product of U\mathcal UU and the sequence σ\sigmaσ-algebra) to R\mathbb{R}R (Borel).
  3. qt(u,d)≥0q_t(u,d)\ge 0qt​(u,d)≥0 for all t,u,dt,u,dt,u,d.

No bound, integrability or other condition is imposed.

slValue. The inputs are a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, an arbitrary f:R→Rf:\mathbb{R}\to\mathbb{R}f:R→R (no measurability, continuity, sign or growth condition) and a real KKK of any sign. Then

slValueρ(f,K)=inf⁡(U,U), ν, q slAvgCostρ(f,K,0,q,ν).\mathrm{slValue}_\rho(f,K)=\inf_{(U,\mathcal U),\ \nu,\ q}\ \mathrm{slAvgCost}_\rho(f,K,0,q,\nu).slValueρ​(f,K)=(U,U), ν, qinf​ slAvgCostρ​(f,K,0,q,ν).

The infimum is taken in [0,∞][0,\infty][0,∞], not as a real-valued infimum. It ranges over every type UUU in the lowest universe (informally, every set UUU), every σ\sigmaσ-algebra U\mathcal UU on UUU, every probability measure ν\nuν on (U,U)(U,\mathcal U)(U,U), and every q∈q\inq∈ SLPolicy U that is admissible (conditions 1 to 3 of SLAdmissible). The starting value is fixed at y0=0y_0=0y0​=0, so the argument of fff at time ttt is ∑r≤tqr(u,zˉ)−∑r<tzr\sum_{r\le t}q_r(u,\bar z)-\sum_{r<t}z_r∑r≤t​qr​(u,zˉ)−∑r<t​zr​. By condition 1, for t<Tt<Tt<T this argument and the indicator depend on zzz only through z0,…,zt−1z_0,\dots,z_{t-1}z0​,…,zt−1​, so the zero padding has no effect. The index family is nonempty: for example, a one-point UUU with q≡0q\equiv 0q≡0 is admissible. So the value is not the empty-infimum default ∞\infty∞. It can still be ∞\infty∞, and it need not be attained.

ssPre, ssPost. Take reals s,Ss,Ss,S (no relation between them is assumed) and d∈R≥0Nd\in\mathbb{R}_{\ge0}^{\mathbb{N}}d∈R≥0N​. Two real sequences are defined by the recursion

pre0=S,postt={S,if pret≤s,pret,if pret>s,pret+1=postt−dt.\mathrm{pre}_0=S,\qquad \mathrm{post}_t=\begin{cases}S,&\text{if }\mathrm{pre}_t\le s,\\ \mathrm{pre}_t,&\text{if }\mathrm{pre}_t>s,\end{cases}\qquad \mathrm{pre}_{t+1}=\mathrm{post}_t-d_t .pre0​=S,postt​={S,pret​,​if pret​≤s,if pret​>s,​pret+1​=postt​−dt​.

ssPre returns pret\mathrm{pre}_tpret​ and ssPost returns postt\mathrm{post}_tpostt​. The sequence starts at pre0=S\mathrm{pre}_0=Spre0​=S, so post0=S\mathrm{post}_0=Spost0​=S for every sss. The reset test is non-strict: pret=s\mathrm{pre}_t=spret​=s resets to SSS. Both pret\mathrm{pre}_tpret​ and postt\mathrm{post}_tpostt​ depend on ddd only through d0,…,dt−1d_0,\dots,d_{t-1}d0​,…,dt−1​. If s<Ss<Ss<S, every postt\mathrm{post}_tpostt​ lies in (s,S](s,S](s,S]. If S≤sS\le sS≤s, then postt=S\mathrm{post}_t=Spostt​=S for all ttt.

ssPeriodCost. For an arbitrary f:R→Rf:\mathbb{R}\to\mathbb{R}f:R→R, reals K,s,SK,s,SK,s,S, a sequence ddd and t∈Nt\in\mathbb{N}t∈N,

cts,S(d)=K⋅1{pret≤s and pret<S}+f(postt).c^{s,S}_t(d)=K\cdot\mathbf 1\{\mathrm{pre}_t\le s\ \text{and}\ \mathrm{pre}_t<S\}+f(\mathrm{post}_t).cts,S​(d)=K⋅1{pret​≤s and pret​<S}+f(postt​).

For s<Ss<Ss<S the indicator equals 1{pret≤s}\mathbf 1\{\mathrm{pre}_t\le s\}1{pret​≤s}. For S≤sS\le sS≤s it equals 1{pret<S}\mathbf 1\{\mathrm{pre}_t<S\}1{pret​<S}. Since pre0=S\mathrm{pre}_0=Spre0​=S, the KKK term is never charged at t=0t=0t=0. The value is real and may be negative.

ssAvgCost. For a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, an arbitrary fff and reals K,s,SK,s,SK,s,S,

ssAvgCostρ(f,K,s,S)=lim sup⁡T→∞ 1T∫R≥0T ∑t=0T−1(cts,S(zˉ))+ ρ⊗T(dz) ∈[0,∞].\mathrm{ssAvgCost}_\rho(f,K,s,S)=\limsup_{T\to\infty}\ \frac1T\int_{\mathbb{R}_{\ge0}^T}\ \sum_{t=0}^{T-1}\big(c^{s,S}_t(\bar z)\big)^{+}\,\rho^{\otimes T}(dz)\ \in[0,\infty].ssAvgCostρ​(f,K,s,S)=T→∞limsup​ T1​∫R≥0T​​ t=0∑T−1​(cts,S​(zˉ))+ρ⊗T(dz) ∈[0,∞].

The sequence starts at pre0=S\mathrm{pre}_0=Spre0​=S, and there is no randomization variable. Each period cost is clipped at 000 on its own. The limsup is taken over averaged integrals, and the T=0T=0T=0 term is 000. Since cts,Sc^{s,S}_tcts,S​ depends only on d0,…,dt−1d_0,\dots,d_{t-1}d0​,…,dt−1​, the zero padding has no effect.

IsCanonicalOptimum. Take a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, an arbitrary fff and reals K,s,SK,s,SK,s,S. The proposition holds if and only if all five of the following hold:

  1. s<Ss<Ss<S (strict);
  2. ssAvgCostρ(f,K,s,S)=slValueρ(f,K)\mathrm{ssAvgCost}_\rho(f,K,s,S)=\mathrm{slValue}_\rho(f,K)ssAvgCostρ​(f,K,s,S)=slValueρ​(f,K);
  3. f(s)+=slValueρ(f,K)f(s)^+=\mathrm{slValue}_\rho(f,K)f(s)+=slValueρ​(f,K);
  4. f(S)+≤slValueρ(f,K)f(S)^+\le\mathrm{slValue}_\rho(f,K)f(S)+≤slValueρ​(f,K);
  5. f(y)+≤slValueρ(f,K)f(y)^+\le\mathrm{slValue}_\rho(f,K)f(y)+≤slValueρ​(f,K) for every real yyy with s≤y≤Ss\le y\le Ss≤y≤S.

All comparisons are in [0,∞][0,\infty][0,∞], and values of fff are clipped at 000 first. Condition 3 forces slValueρ(f,K)\mathrm{slValue}_\rho(f,K)slValueρ​(f,K) to be finite and equal to max⁡(f(s),0)\max(f(s),0)max(f(s),0), so by condition 2 ssAvgCostρ(f,K,s,S)\mathrm{ssAvgCost}_\rho(f,K,s,S)ssAvgCostρ​(f,K,s,S) is finite too. If f(s)≤0f(s)\le 0f(s)≤0, condition 3 forces slValueρ(f,K)=0\mathrm{slValue}_\rho(f,K)=0slValueρ​(f,K)=0. Any point yyy with f(y)≤0f(y)\le 0f(y)≤0 satisfies condition 5 automatically. Condition 4 is the case y=Sy=Sy=S of condition 5. In condition 2, the left side uses the sequence started at pre0=S\mathrm{pre}_0=Spre0​=S, while slValue\mathrm{slValue}slValue uses starting value y0=0y_0=0y0​=0. The same KKK appears on both sides.

IsBestHalfWindow. Take a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​, an arbitrary fff, and reals sh,Sh,s,Ss_h,S_h,s,Ssh​,Sh​,s,S (the arguments sh, Sh, s, S). The proposition holds if and only if both of the following hold:

  • sh≤ss_h\le ssh​≤s, s<Ss<Ss<S, S≤ShS\le S_hS≤Sh​ and S−s=(Sh−sh)/2S-s=(S_h-s_h)/2S−s=(Sh​−sh​)/2.
  • For all reals s′,S′s',S's′,S′ with sh≤s′s_h\le s'sh​≤s′, s′<S′s'<S's′<S′, S′≤ShS'\le S_hS′≤Sh​ and S′−s′=(Sh−sh)/2S'-s'=(S_h-s_h)/2S′−s′=(Sh​−sh​)/2, we have ssAvgCostρ(f,0,s,S)≤ssAvgCostρ(f,0,s′,S′)\mathrm{ssAvgCost}_\rho(f,0,s,S)\le\mathrm{ssAvgCost}_\rho(f,0,s',S')ssAvgCostρ​(f,0,s,S)≤ssAvgCostρ​(f,0,s′,S′).

The fixed-cost argument is 000 on both sides, so only f(postt)+f(\mathrm{post}_t)^+f(postt​)+ is averaged. Comparisons are in [0,∞][0,\infty][0,∞], where ∞≤∞\infty\le\infty∞≤∞ holds. The pair (s,S)(s,S)(s,S) itself belongs to the compared family, so it minimizes ssAvgCostρ(f,0,⋅,⋅)\mathrm{ssAvgCost}_\rho(f,0,\cdot,\cdot)ssAvgCostρ​(f,0,⋅,⋅) over that family. The proposition cannot hold when Sh≤shS_h\le s_hSh​≤sh​, because then S−s≤0S-s\le 0S−s≤0, which contradicts s<Ss<Ss<S.

whLoss. For reals h,p,yh,p,yh,p,y of any sign, whLoss(h,p,y)=hmax⁡(y,0)+pmax⁡(−y,0)∈R\mathrm{whLoss}(h,p,y)=h\max(y,0)+p\max(-y,0)\in\mathbb{R}whLoss(h,p,y)=hmax(y,0)+pmax(−y,0)∈R.

mirrorAvg, mirrorCost. Take a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​ and reals h,p,s,S,ah,p,s,S,ah,p,s,S,a, with postt\mathrm{post}_tpostt​ as in ssPost (started at pre0=S\mathrm{pre}_0=Spre0​=S). Let mt(z)=hmax⁡(a−postt(zˉ),0)+pmax⁡(postt(zˉ)−a,0)m_t(z)=h\max\big(a-\mathrm{post}_t(\bar z),0\big)+p\max\big(\mathrm{post}_t(\bar z)-a,0\big)mt​(z)=hmax(a−postt​(zˉ),0)+pmax(postt​(zˉ)−a,0), which is whLoss(h,p,a−postt(zˉ))\mathrm{whLoss}(h,p,a-\mathrm{post}_t(\bar z))whLoss(h,p,a−postt​(zˉ)). Then

mirrorAvgρ(h,p,s,S,a)=lim sup⁡T→∞ 1T∫R≥0T ∑t=0T−1(mt(z))+ ρ⊗T(dz) ∈[0,∞].\mathrm{mirrorAvg}_\rho(h,p,s,S,a)=\limsup_{T\to\infty}\ \frac1T\int_{\mathbb{R}_{\ge0}^T}\ \sum_{t=0}^{T-1}\big(m_t(z)\big)^{+}\,\rho^{\otimes T}(dz)\ \in[0,\infty].mirrorAvgρ​(h,p,s,S,a)=T→∞limsup​ T1​∫R≥0T​​ t=0∑T−1​(mt​(z))+ρ⊗T(dz) ∈[0,∞].

The same conventions apply. Per-period clipping matters only if hhh or ppp is negative, the limsup is of averaged integrals, and the T=0T=0T=0 term is 000. Then

mirrorCostρ(h,p,s,S)=inf⁡a∈R mirrorAvgρ(h,p,s,S,a) ∈[0,∞].\mathrm{mirrorCost}_\rho(h,p,s,S)=\inf_{a\in\mathbb{R}}\ \mathrm{mirrorAvg}_\rho(h,p,s,S,a)\ \in[0,\infty].mirrorCostρ​(h,p,s,S)=a∈Rinf​ mirrorAvgρ​(h,p,s,S,a) ∈[0,∞].

Here aaa is one constant chosen outside the limsup; it does not depend on TTT, ttt or zzz. The infimum is taken in [0,∞][0,\infty][0,∞] over all real aaa, need not be attained, and may be ∞\infty∞.

renewalM. For a probability measure ρ\rhoρ on R≥0\mathbb{R}_{\ge0}R≥0​ and a real www,

renewalMρ(w)=∑k=0∞ρ⊗k({z∈R≥0k: ∑j=0k−1zj<w}) ∈[0,∞].\mathrm{renewalM}_\rho(w)=\sum_{k=0}^{\infty}\rho^{\otimes k}\Big(\Big\{z\in\mathbb{R}_{\ge0}^k:\ \sum_{j=0}^{k-1}z_j<w\Big\}\Big)\ \in[0,\infty].renewalMρ​(w)=k=0∑∞​ρ⊗k({z∈R≥0k​: j=0∑k−1​zj​<w}) ∈[0,∞].

The kkk-th term is the probability that a sum of kkk independent ρ\rhoρ-distributed variables is strictly less than www. The series of nonnegative terms equals the supremum of its partial sums and may be ∞\infty∞. The k=0k=0k=0 term (an empty sum, which is 000, under a point mass) is 111 if w>0w>0w>0 and 000 if w≤0w\le 0w≤0. For w≤0w\le 0w≤0 every term is 000, so renewalMρ(w)=0\mathrm{renewalM}_\rho(w)=0renewalMρ​(w)=0. For w>0w>0w>0 the value is at least 111. It is ∞\infty∞, for instance, when ρ\rhoρ is the point mass at 000.

Network data (unfolded from the context file). In the remaining declarations, n∈Nn\in\mathbb{N}n∈N is an implicit parameter and may be 000. Indices i,ji,ji,j range over {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}. A network NNN bundles the following data:

  • L0∈NL_0\in\mathbb{N}L0​∈N, and Li∈NL_i\in\mathbb{N}Li​∈N for each iii;
  • a probability measure μ\muμ on R≥0n\mathbb{R}_{\ge0}^nR≥0n​ (the context calls this space DemandVec n);
  • reals K0K_0K0​, KiK_iKi​, hhh, HiH_iHi​ and ppp.

No declaration in this file imposes any sign, moment or other condition on these data. The context file has a separate predicate Network.Standing, which requires positive finite coordinate means, K0,Ki≥0K_0,K_i\ge 0K0​,Ki​≥0 and h,Hi,p>0h,H_i,p>0h,Hi​,p>0, but it is not referenced here. The field K0K_0K0​ is not used anywhere in this file.

Network.marginal, Network.aggregate, and the two instances. For a network NNN and an index iii, μi\mu_iμi​ is the image of μ\muμ under the coordinate map x↦xix\mapsto x_ix↦xi​, that is, the law of the iii-th coordinate. μΣ\mu_\SigmaμΣ​ is the image of μ\muμ under x↦x0+⋯+xn−1x\mapsto x_0+\dots+x_{n-1}x↦x0​+⋯+xn−1​, the law of the coordinate sum; when n=0n=0n=0 it is the point mass at 000. Both are measures on R≥0\mathbb{R}_{\ge0}R≥0​. The two instances record, with proof, that μi\mu_iμi​ and μΣ\mu_\SigmaμΣ​ are probability measures. They add no assumption.

Network.F. For a network NNN, an index iii and a real yyy,

Fi(y)=∫R≥0Li+1(Himax⁡(y−∑j=0Lizj, 0)+pmax⁡(∑j=0Lizj−y, 0)) μi⊗(Li+1)(dz).F_i(y)=\int_{\mathbb{R}_{\ge0}^{L_i+1}}\Big(H_i\max\Big(y-\sum_{j=0}^{L_i}z_j,\,0\Big)+p\max\Big(\sum_{j=0}^{L_i}z_j-y,\,0\Big)\Big)\,\mu_i^{\otimes(L_i+1)}(dz).Fi​(y)=∫R≥0Li​+1​​(Hi​max(y−j=0∑Li​​zj​,0)+pmax(j=0∑Li​​zj​−y,0))μi⊗(Li​+1)​(dz).

The integral is over Li+1L_i+1Li​+1 independent copies of the marginal μi\mu_iμi​, not of the joint law μ\muμ, with weights HiH_iHi​ and ppp. It is a real-valued (Bochner) integral, which by convention equals 000 when the integrand is not integrable. If p≠0p\ne 0p=0 and μi\mu_iμi​ has infinite mean, then Fi(y)=0F_i(y)=0Fi​(y)=0 for every yyy. If p=0p=0p=0 or μi\mu_iμi​ has finite mean, the integral is the genuine expectation.

Network.J. For a network NNN, an index iii and a real kkk, Ji(k)=slValueμi(Fi,k)J_i(k)=\mathrm{slValue}_{\mu_i}(F_i,k)Ji​(k)=slValueμi​​(Fi​,k). Unfolded,

Ji(k)=inf⁡(U,U), ν, q lim sup⁡T→∞ 1T∫U×R≥0T∑t=0T−1(k 1{qt(u,zˉ)>0}+Fi(∑r=0tqr(u,zˉ)−∑r=0t−1zr))+(ν⊗μi⊗T)(du,dz).J_i(k)=\inf_{(U,\mathcal U),\,\nu,\,q}\ \limsup_{T\to\infty}\ \frac1T\int_{U\times\mathbb{R}_{\ge0}^T}\sum_{t=0}^{T-1}\Big(k\,\mathbf 1\{q_t(u,\bar z)>0\}+F_i\Big(\sum_{r=0}^{t}q_r(u,\bar z)-\sum_{r=0}^{t-1}z_r\Big)\Big)^{+}(\nu\otimes\mu_i^{\otimes T})(du,dz).Ji​(k)=(U,U),ν,qinf​ T→∞limsup​ T1​∫U×R≥0T​​t=0∑T−1​(k1{qt​(u,zˉ)>0}+Fi​(r=0∑t​qr​(u,zˉ)−r=0∑t−1​zr​))+(ν⊗μi⊗T​)(du,dz).

The infimum is in [0,∞][0,\infty][0,∞]. It ranges over all types UUU with a σ\sigmaσ-algebra, all probability measures ν\nuν on UUU, and all admissible qqq. Admissible means three things: qt(u,⋅)q_t(u,\cdot)qt​(u,⋅) depends only on d0,…,dt−1d_0,\dots,d_{t-1}d0​,…,dt−1​, the map (u,d)↦qt(u,d)(u,d)\mapsto q_t(u,d)(u,d)↦qt​(u,d) is measurable, and q≥0q\ge 0q≥0. The starting value is 000, and FiF_iFi​ is as above, including its zero convention. The fixed cost is the argument kkk; the field KiK_iKi​ is not used.

Network.fL0. For a network NNN and a real yyy,

fL0(y)=∫R≥0L0(hmax⁡(y−∑j=0L0−1zj, 0)+pmax⁡(∑j=0L0−1zj−y, 0)) μΣ⊗L0(dz).f_{L_0}(y)=\int_{\mathbb{R}_{\ge0}^{L_0}}\Big(h\max\Big(y-\sum_{j=0}^{L_0-1}z_j,\,0\Big)+p\max\Big(\sum_{j=0}^{L_0-1}z_j-y,\,0\Big)\Big)\,\mu_\Sigma^{\otimes L_0}(dz).fL0​​(y)=∫R≥0L0​​​(hmax(y−j=0∑L0​−1​zj​,0)+pmax(j=0∑L0​−1​zj​−y,0))μΣ⊗L0​​(dz).

This is whLoss(h,p,⋅)\mathrm{whLoss}(h,p,\cdot)whLoss(h,p,⋅) evaluated at yyy minus a sum of L0L_0L0​ independent copies of μΣ\mu_\SigmaμΣ​. The count is L0L_0L0​, not L0+1L_0+1L0​+1, and the weight is hhh, not HiH_iHi​. If L0=0L_0=0L0​=0, then fL0(y)=hmax⁡(y,0)+pmax⁡(−y,0)f_{L_0}(y)=h\max(y,0)+p\max(-y,0)fL0​​(y)=hmax(y,0)+pmax(−y,0). Under the Bochner convention, if p≠0p\ne 0p=0, L0≥1L_0\ge 1L0​≥1 and μΣ\mu_\SigmaμΣ​ has infinite mean, then fL0≡0f_{L_0}\equiv 0fL0​​≡0. Having infinite mean is equivalent to some μi\mu_iμi​ having infinite mean. In every other case fL0(y)f_{L_0}(y)fL0​​(y) is the genuine expectation.

Network.J0. For a network NNN and a real kkk, J0(k)=slValueμΣ(fL0,k)J_0(k)=\mathrm{slValue}_{\mu_\Sigma}(f_{L_0},k)J0​(k)=slValueμΣ​​(fL0​​,k). This is the same infimum in [0,∞][0,\infty][0,∞] as for JiJ_iJi​, with μΣ\mu_\SigmaμΣ​ in place of μi\mu_iμi​, fL0f_{L_0}fL0​​ (including its zero convention) in place of FiF_iFi​, starting value 000 and fixed cost kkk. The field K0K_0K0​ is not used.

Network.augCost. For a network NNN, an index iii and reals s,Ss,Ss,S,

augCosti(s,S)=ssAvgCostμi(Fi,Ki,s,S)+mirrorCostμi(h,p,s,S) ∈[0,∞].\mathrm{augCost}_i(s,S)=\mathrm{ssAvgCost}_{\mu_i}(F_i,K_i,s,S)+\mathrm{mirrorCost}_{\mu_i}(h,p,s,S)\ \in[0,\infty].augCosti​(s,S)=ssAvgCostμi​​(Fi​,Ki​,s,S)+mirrorCostμi​​(h,p,s,S) ∈[0,∞].

This is the sum of two quantities computed separately:

  • the limsup average of (Ki1{pret≤s, pret<S}+Fi(postt))+\big(K_i\mathbf 1\{\mathrm{pre}_t\le s,\ \mathrm{pre}_t<S\}+F_i(\mathrm{post}_t)\big)^+(Ki​1{pret​≤s, pret​<S}+Fi​(postt​))+;
  • the infimum over constants aaa of the limsup average of (hmax⁡(a−postt,0)+pmax⁡(postt−a,0))+\big(h\max(a-\mathrm{post}_t,0)+p\max(\mathrm{post}_t-a,0)\big)^+(hmax(a−postt​,0)+pmax(postt​−a,0))+.

Both use the sequence started at pre0=S\mathrm{pre}_0=Spre0​=S and driven by i.i.d. μi\mu_iμi​-distributed inputs. Here the field KiK_iKi​ is used, and the weight is hhh, not HiH_iHi​. The sum is ∞\infty∞ if either term is ∞\infty∞.

Network.Associated. For a network NNN, this holds if and only if the following is true for all functions u,v:R≥0n→Ru,v:\mathbb{R}_{\ge0}^n\to\mathbb{R}u,v:R≥0n​→R that are:

  • measurable;
  • nondecreasing for the coordinatewise order, where x≤x′x\le x'x≤x′ means xi≤xi′x_i\le x'_ixi​≤xi′​ for every iii;
  • bounded, each with its own real CCC such that ∣u(x)∣≤C|u(x)|\le C∣u(x)∣≤C (respectively ∣v(x)∣≤C|v(x)|\le C∣v(x)∣≤C) for all xxx.

For every such pair,

(∫u dμ)(∫v dμ)≤∫uv dμ.\Big(\int u\,d\mu\Big)\Big(\int v\,d\mu\Big)\le\int uv\,d\mu .(∫udμ)(∫vdμ)≤∫uvdμ.

All three integrals are genuine, since the integrands are bounded and measurable and μ\muμ is a probability measure. The inequality is non-strict. Only pairs that are both nondecreasing are tested. The condition depends on NNN only through μ\muμ. For n=0n=0n=0 it holds automatically, since μ\muμ is then a point mass.

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