Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2 — fn(x)≤fn(y)+c(y−x)f_n(x) \le f_n(y) + c(y - x)fn​(x)≤fn​(y)+c(y−x) for x≤yx \le yx≤y

Proved
PorteusSS.valueFn_le_add_cost

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

dynamic-programminginventoryp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

In the inventory model of §§II–III under its standing assumptions, let n≥1n \ge 1n≥1 and assume, as the paper does for every function it considers, that fnf_nfn​ is real valued, i.e. each infimum inf⁡w≥x{c(w−x)+hn(w)}\inf_{w \ge x}\{c(w - x) + h_n(w)\}infw≥x​{c(w−x)+hn​(w)} is over a set bounded below. Then for all x≤yx \le yx≤y,

fn(x)≤fn(y)+c(y−x).f_n(x) \le f_n(y) + c(y - x).fn​(x)≤fn​(y)+c(y−x).

The inequality says that the optimal cost can only benefit from a lower starting inventory by at most the cost of ordering the difference; combined with (1) it shows that fn+κ⋅f_n + \kappa\cdotfn​+κ⋅ is non-KκK_\kappaKκ​-decreasing for κ∈C\kappa \in Cκ∈C, which is condition (iii) of Lemma 3 for the next period.

Formalization Note. The boundedness hypothesis is the standing convention of §X ("all functions appearing in this paper are assumed to be real valued"); without it Lean's infimum would be 000 on an unbounded set.

Preamble
import Mathlib
import Definitions.Def_PorteusSS_Functions
import Definitions.Def_PorteusSS_OrderingCost
import Definitions.Def_PorteusSS_Model

open MeasureTheory Filter Topology Set
Formal statement
namespace PorteusSS

/-- Lemma 2 (p. 418). If `x ≤ y` and `n ≥ 1`, then `f_n(x) ≤ f_n(y) + c(y - x)`. The hypothesis
`hfin` is the paper's standing convention (§X) that `f_n` is real valued, i.e. that each
infimum in (4) is over a set bounded below. -/
theorem valueFn_le_add_cost (c m φ f0 : ℝ → ℝ) (α c0 K0 cInf KInf : ℝ)
    (hmodel : IsModel c m φ α c0 K0 cInf KInf) (n : ℕ) (hn : 1 ≤ n)
    (hfin : ∀ x : ℝ, BddBelow (range fun w : Ici x => c ((w : ℝ) - x) + hFn c m φ f0 α n w))
    (x y : ℝ) (hxy : x ≤ y) :
    valueFn c m φ f0 α n x ≤ valueFn c m φ f0 α n y + c (y - x) := by sorry

end PorteusSS
Source
Porteus, On the Optimality of Generalized (s, S) Policies, Management Science 17(7):411–426 (1971), p. 418, Lemma 2
Read-back

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

Data. The model data are as follows:

  • ccc is concave and nondecreasing on [0,∞)[0,\infty)[0,∞) with c(0)=0c(0)=0c(0)=0, and its minimal-intercept supporting-line sets C2(z)C_2(z)C2​(z) converge to (c0,K0)(c_0,K_0)(c0​,K0​) as z↓0z\downarrow0z↓0 and to (c∞,K∞)(c_\infty,K_\infty)(c∞​,K∞​) as z→∞z\to\inftyz→∞.
  • 0≤α≤10\le\alpha\le10≤α≤1.
  • φ\varphiφ is a one-sided Pólya density.
  • mmm is PF-integrable and bounded below.
  • f0f_0f0​ is arbitrary.

The value functions are fj+1(x)=inf⁡y≥x{c(y−x)+h[fj](y)}f_{j+1}(x)=\inf_{y\ge x}\{c(y-x)+h[f_j](y)\}fj+1​(x)=infy≥x​{c(y−x)+h[fj​](y)} with h[g]=m∗φ+α(g∗φ)h[g]=m*\varphi+\alpha(g*\varphi)h[g]=m∗φ+α(g∗φ). The infimum is real-valued and defaults to 000 when unbounded below. Convolutions default to 000 where not integrable. Also hn=h[fn−1]h_n=h[f_{n-1}]hn​=h[fn−1​].

Hypotheses.

  • n≥1n\ge1n≥1.
  • For every x∈Rx\in\mathbb Rx∈R, the set {c(w−x)+hn(w):w≥x}\{c(w-x)+h_n(w):w\ge x\}{c(w−x)+hn​(w):w≥x} is bounded below.
  • x≤yx\le yx≤y.

Conclusion.

fn(x)≤fn(y)+c(y−x).f_n(x)\le f_n(y)+c(y-x).fn​(x)≤fn​(y)+c(y−x).

Degenerate cases:

  • The boundedness hypothesis concerns period nnn only. Earlier fjf_jfj​ (j<nj<nj<n) may still have taken the default value 000, and convolutions may have defaulted to 000.
  • x=yx=yx=y is allowed, giving fn(x)≤fn(x)+c(0)=fn(x)f_n(x)\le f_n(x)+c(0)=f_n(x)fn​(x)≤fn​(x)+c(0)=fn​(x).
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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me