Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8 — the derivative dπs(yr(w1),q)/dw1d\pi_s(y_r(w_1), q)/dw_1dπs​(yr​(w1​),q)/dw1​

Proved
CachonPushPull.ShippingCost.supplier_profit_deriv

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

contractsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1supply-chain

Fix w2≤pw_2 \le pw2​≤p, a shipping cost τ>0\tau > 0τ>0 and a production quantity qqq. For v<w1<w2v < w_1 < w_2v<w1​<w2​ let yr(w1)≥0y_r(w_1) \ge 0yr​(w1​)≥0 be the retailer's prebook of Eq. (22), F(yr(w1))=(w2−w1)/(w2−v)F(y_r(w_1)) = (w_2 - w_1)/(w_2 - v)F(yr​(w1​))=(w2​−w1​)/(w2​−v). At a point w1∈(v,w2)w_1 \in (v, w_2)w1​∈(v,w2​) where the density is positive at the prebook, f(yr(w1))>0f(y_r(w_1)) > 0f(yr​(w1​))>0:

  1. yry_ryr​ is differentiable at w1w_1w1​ with ∂yr(w1)∂w1=−[(w2−v)f(yr(w1))]−1\dfrac{\partial y_r(w_1)}{\partial w_1} = -\bigl[(w_2 - v) f(y_r(w_1))\bigr]^{-1}∂w1​∂yr​(w1​)​=−[(w2​−v)f(yr​(w1​))]−1;
  2. the supplier's profit along the retailer's prebook is differentiable at w1w_1w1​ with
dπs(yr(w1),q)dw1=yr(w1)−(w1−v)−(w2−τ−v)(1−F(yr(w1)))(w2−v) f(yr(w1)).\frac{d\pi_s(y_r(w_1), q)}{dw_1} = y_r(w_1) - \frac{(w_1 - v) - (w_2 - \tau - v)\bigl(1 - F(y_r(w_1))\bigr)}{(w_2 - v)\, f(y_r(w_1))}.dw1​dπs​(yr​(w1​),q)​=yr​(w1​)−(w2​−v)f(yr​(w1​))(w1​−v)−(w2​−τ−v)(1−F(yr​(w1​)))​.

This display is how the proof of Theorem 8 measures the supplier's gain from deepening the discount.

Formalization Note The positivity f(yr(w1))>0f(y_r(w_1)) > 0f(yr​(w1​))>0 is the hypothesis of the paper's implicit-function step, stated here explicitly; the model only gives a density on (0,∞)(0, \infty)(0,∞). The prebook is a function yry_ryr​ pinned on (v,w2)(v, w_2)(v,w2​) by the equation of (22), which determines it uniquely because FFF is strictly increasing on [0,∞)[0, \infty)[0,∞).

Preamble
import Mathlib
import Definitions.Def_CachonPushPull_ShippingCost_Game
Formal statement
namespace CachonPushPull.ShippingCost

open MeasureTheory ProbabilityTheory

/-- The derivative display in the proof of Theorem 8, p. 234. Fix `w₂ ≤ p`, a production `q` and
the retailer's prebook `y_r(w₁) ≥ 0`, `F(y_r(w₁)) = (w₂ - w₁)/(w₂ - v)` (Eq. (22)), for
`v < w₁ < w₂`. At a point `w₁` of that interval where the density at `y_r(w₁)` is positive
(the hypothesis of the implicit function step), `y_r` is differentiable with
`y_r'(w₁) = -[(w₂ - v) f(y_r(w₁))]⁻¹`, and
`d π_s(y_r(w₁), q)/d w₁ = y_r(w₁) - [(w₁ - v) - (w₂ - τ - v)(1 - F(y_r(w₁)))]/((w₂ - v) f(y_r(w₁)))`. -/
theorem supplier_profit_deriv (μ : Measure ℝ) [IsProbabilityMeasure μ] (f : ℝ → ℝ)
    (hD : DemandModel μ f) (p c v : ℝ) (hvc : v < c) (hcp : c < p)
    (τ : ℝ) (hτ : 0 < τ) (w₂ : ℝ) (hw₂p : w₂ ≤ p) (yr : ℝ → ℝ)
    (hyr : ∀ w : ℝ, w ∈ Set.Ioo v w₂ → 0 ≤ yr w ∧ cdf μ (yr w) = (w₂ - w) / (w₂ - v))
    (q w₁ : ℝ) (hw₁ : w₁ ∈ Set.Ioo v w₂) (hf : 0 < f (yr w₁)) :
    HasDerivAt yr (-((w₂ - v) * f (yr w₁))⁻¹) w₁ ∧
    HasDerivAt (fun w : ℝ => supplierProfit μ c v τ w w₂ (yr w) q)
      (yr w₁ - ((w₁ - v) - (w₂ - τ - v) * (1 - cdf μ (yr w₁))) / ((w₂ - v) * f (yr w₁)))
      w₁ := by sorry

end CachonPushPull.ShippingCost
Source
Cachon, The Allocation of Inventory Risk in a Supply Chain: Push, Pull, and Advance-Purchase Discount Contracts, Management Science 50(2), 2004, p. 234, proof of Theorem 8 (derivative display)
Read-back

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

Setting. Let μ\muμ be a probability measure on R\mathbb{R}R with F(x)=μ((−∞,x])F(x)=\mu((-\infty,x])F(x)=μ((−∞,x]). Let fff be such that (μ,f)(\mu,f)(μ,f) satisfies the demand model:

  • F(0)=0F(0)=0F(0)=0;
  • FFF is strictly increasing on [0,∞)[0,\infty)[0,∞);
  • F′(x)=f(x)F'(x)=f(x)F′(x)=f(x) for x>0x>0x>0;
  • yf(y)/(1−F(y))yf(y)/(1-F(y))yf(y)/(1−F(y)) has a strictly positive derivative on (0,∞)(0,\infty)(0,∞).

Let p,c,v,τ,w2p,c,v,\tau,w_2p,c,v,τ,w2​ be reals with

v<c<p,τ>0,w2≤p.v<c<p,\qquad\tau>0,\qquad w_2\le p.v<c<p,τ>0,w2​≤p.

Let yr:R→Ry_r:\mathbb{R}\to\mathbb{R}yr​:R→R be any function such that, for every w∈(v,w2)w\in(v,w_2)w∈(v,w2​),

yr(w)≥0,F(yr(w))=w2−ww2−v.y_r(w)\ge0,\qquad F(y_r(w))=\frac{w_2-w}{w_2-v}.yr​(w)≥0,F(yr​(w))=w2​−vw2​−w​.

Outside (v,w2)(v,w_2)(v,w2​), yry_ryr​ is arbitrary. Let qqq be any real. Let w1∈(v,w2)w_1\in(v,w_2)w1​∈(v,w2​) satisfy f(yr(w1))>0f(y_r(w_1))>0f(yr​(w1​))>0.

Conclusion. Both of the following hold:

  1. yry_ryr​ is differentiable at w1w_1w1​ with
yr′(w1)=−1(w2−v) f(yr(w1)).y_r'(w_1)=-\frac{1}{(w_2-v)\,f(y_r(w_1))}.yr′​(w1​)=−(w2​−v)f(yr​(w1​))1​.
  1. The function
Φ(w)=πsw,w2(yr(w),q)=(w−v) yr(w)+(w2−τ−v)(S(q)−S(yr(w)))−(c−v) q\Phi(w)=\pi_s^{w,w_2}(y_r(w),q)=(w-v)\,y_r(w)+(w_2-\tau-v)\bigl(S(q)-S(y_r(w))\bigr)-(c-v)\,qΦ(w)=πsw,w2​​(yr​(w),q)=(w−v)yr​(w)+(w2​−τ−v)(S(q)−S(yr​(w)))−(c−v)q

is differentiable at w1w_1w1​. In Φ\PhiΦ, the prebook price and the prebook both vary with www, while w2w_2w2​ and qqq stay fixed. Its derivative is

Φ′(w1)=yr(w1)−(w1−v)−(w2−τ−v)(1−F(yr(w1)))(w2−v) f(yr(w1)).\Phi'(w_1)=y_r(w_1)-\frac{(w_1-v)-(w_2-\tau-v)\bigl(1-F(y_r(w_1))\bigr)}{(w_2-v)\,f(y_r(w_1))}.Φ′(w1​)=yr​(w1​)−(w2​−v)f(yr​(w1​))(w1​−v)−(w2​−τ−v)(1−F(yr​(w1​)))​.

Degenerate cases. The hypothesis w1∈(v,w2)w_1\in(v,w_2)w1​∈(v,w2​) can only be met when v<w2v<w_2v<w2​. No relation between w2w_2w2​ and ccc or τ\tauτ is assumed, so w2−τ−vw_2-\tau-vw2​−τ−v may be negative. The positivity of f(yr(w1))f(y_r(w_1))f(yr​(w1​)) is a separate hypothesis. The demand model does not require fff to be positive anywhere; it only identifies fff with F′F'F′ on (0,∞)(0,\infty)(0,∞). So this hypothesis is a genuine restriction, and if it fails the statement is vacuous. Because both denominators are nonzero under it, the division-by-zero convention plays no role.

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