Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§6.2.1, p. 10 — expected sales S(q) = q − ∫₀^q F, leftover inventory I(q) = q − S(q), lost sales L(q) = μ − S(q)

Proved
CachonCoord.Newsvendor.p10_expected_sales

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

expected-salesnewsvendorp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1

Let D≥0D \ge 0D≥0 be the demand with distribution function FFF and finite mean μ=E[D]\mu = E[D]μ=E[D]. Expected sales S(q)=E[min⁡(q,D)]S(q) = E[\min(q, D)]S(q)=E[min(q,D)], expected leftover inventory I(q)=E[(q−D)+]I(q) = E[(q-D)^+]I(q)=E[(q−D)+] and expected lost sales L(q)=E[(D−q)+]L(q) = E[(D-q)^+]L(q)=E[(D−q)+] satisfy, for every order quantity qqq,

S(q)=q−∫0qF(y) dy,I(q)=q−S(q),L(q)=μ−S(q).S(q) = q - \int_0^q F(y)\,dy, \qquad I(q) = q - S(q), \qquad L(q) = \mu - S(q).S(q)=q−∫0q​F(y)dy,I(q)=q−S(q),L(q)=μ−S(q).

These identities are the basis of every profit function in Cachon's chapter: they turn the retailer's and supplier's expected profits into functions of S(q)S(q)S(q) alone.

Formalization Note The local expSales, expLeftover, and meanDemand are Bochner expectations. The probability measure is supported on [0,∞)[0,\infty)[0,∞) and has integrable demand, so the expectations are well defined. The chapter’s continuous, strictly increasing, differentiable cdf assumptions are included; the identities also hold for negative qqq. The intermediate density integral from the page is omitted.

Preamble
import Mathlib
import Definitions.Def_CachonCoord_Newsvendor_Contracts

open MeasureTheory ProbabilityTheory
Formal statement
namespace CachonCoord.Newsvendor

/-- Cachon (2003), 3rd draft, §6.2.1, p. 10: for a demand law on `[0, ∞)` with finite mean,
expected sales `S(q) = E[min(q, D)] = q − ∫_0^q F(y) dy`, expected leftover inventory
`I(q) = E[(q − D)⁺] = q − S(q)` and expected lost sales `L(q) = E[(D − q)⁺] = μ − S(q)`. -/
theorem p10_expected_sales (D : Measure ℝ) [IsProbabilityMeasure D] [NullSingletonClass D]
    (hD : Integrable (fun x => x) D) (hD0 : D (Set.Iio 0) = 0)
    (hF : ∀ x y : ℝ, 0 ≤ x → x < y → cdf D x < 1 → cdf D x < cdf D y)
    (density : ℝ → ℝ)
    (hFderiv : ∀ x : ℝ, 0 < x → cdf D x < 1 → HasDerivAt (cdf D) (density x) x) (q : ℝ) :
    expSales D q = q - ∫ y in (0 : ℝ)..q, cdf D y ∧
      expLeftover D q = q - expSales D q ∧
      ∫ d, max (d - q) 0 ∂D = meanDemand D - expSales D q := by sorry

end CachonCoord.Newsvendor
Source
Cachon (2003), Supply Chain Coordination with Contracts, 3rd draft (Jan. 2003), §6.2.1, p. 10 (displays for S(q), I(q), L(q))
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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