Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Display (4) with (7): E[Vy(b)]=w(b)[R−bq]−πDE[V^y(b)]=w(b)[R-bq]-\pi DE[Vy(b)]=w(b)[R−bq]−πD

Proved
TradeAgentNV.equation_4

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

biddingnewsvendorp2o-gran-per-chapterp2o-plan-paperp2o-v1random-yieldsupply-uncertainty

The model. On a probability space (Ω,F,P)(\Omega,\mathcal F,P)(Ω,F,P) the seller's ask price ZZZ and the yield fraction UUU are independent real random variables. The win probability is w(b)=P(Z≤b)w(b)=P(Z\le b)w(b)=P(Z≤b), with P(Z≤0)=0P(Z\le0)=0P(Z≤0)=0; www has a derivative w′(b)>0w'(b)>0w′(b)>0 (within [0,∞)[0,\infty)[0,∞)) at every b≥0b\ge0b≥0, so the support of ZZZ is Ω=[0,∞)\Omega=[0,\infty)Ω=[0,∞). The yield satisfies 0≤U≤10\le U\le10≤U≤1 almost surely and E[U]>0E[U]>0E[U]>0. The parameters D,r,t,h,πD,r,t,h,\piD,r,t,h,π are positive with r−t+π>0r-t+\pi>0r−t+π>0, and the lot size is q>0q>0q>0. The expected profit at bid bbb is

E[Vy(b)]=E[1{Z≤b}((r−t)min⁡(qU,D)−bq−h(qU−D)+−π(D−qU)+)−1{Z>b} πD],E[V^y(b)]=E\Big[\mathbf 1\{Z\le b\}\big((r-t)\min(qU,D)-bq-h(qU-D)^+-\pi(D-qU)^+\big)-\mathbf 1\{Z>b\}\,\pi D\Big],E[Vy(b)]=E[1{Z≤b}((r−t)min(qU,D)−bq−h(qU−D)+−π(D−qU)+)−1{Z>b}πD],

ρ=r−t+h+π\rho=r-t+h+\piρ=r−t+h+π, and R=ρE[min⁡(qU,D)]−hqE[U]R=\rho E[\min(qU,D)]-hqE[U]R=ρE[min(qU,D)]−hqE[U] is the expected benefit of bidding (7).

Then for every bid b≥0b\ge0b≥0,

E[Vy(b)]=w(b) [R−bq]−πD.E[V^y(b)]=w(b)\,[R-bq]-\pi D .E[Vy(b)]=w(b)[R−bq]−πD.

This reduces the agent's two-stage problem to a one-dimensional objective in bbb whose only distributional inputs are www and the scalar RRR.

Differences from the source:

  • reading: display (3) charges hhh on (D−qU)+(D-qU)^+(D−qU)+ and π\piπ on (qU−D)+(qU-D)^+(qU−D)+ → hhh on the excess supply (qU−D)+(qU-D)^+(qU−D)+ and π\piπ on the unmet demand (D−qU)+(D-qU)^+(D−qU)+; reason: p.8 defines hhh as the excess-supply cost and π\piπ as the lost-sales cost, and only this assignment gives display (4)
  • encoding: the bid outcome (Z≤bZ\le bZ≤b) and the yield UUU as two separate uncertainties, Qy(b)=qUQ^y(b)=qUQy(b)=qU w.p. w(b)w(b)w(b) (2) → ZZZ and UUU are random variables on one probability space and are independent; reason: (2) multiplies the win probability by the yield distribution, i.e. the yield is independent of the bid outcome; same instances
  • encoding: ZZZ is a nonnegative, continuous random variable → P(Z≤0)=0P(Z\le0)=0P(Z≤0)=0; reason: for a nonnegative continuous ZZZ, P(Z≤0)=P(Z=0)=0P(Z\le0)=P(Z=0)=0P(Z≤0)=P(Z=0)=0; conversely with the derivative hypothesis www is continuous and vanishes on (−∞,0](-\infty,0](−∞,0]; the proof uses w(0)=0w(0)=0w(0)=0
  • reading: www is differentiable with density w′=dw/dbw'=dw/dbw′=dw/db and Ω={b:w′(b)>0}=[0,∞)\Omega=\{b:w'(b)>0\}=[0,\infty)Ω={b:w′(b)>0}=[0,∞) → www has derivative w′(b)w'(b)w′(b) within [0,∞)[0,\infty)[0,∞) at every b≥0b\ge0b≥0, and w′(b)>0w'(b)>0w′(b)>0 for b≥0b\ge0b≥0; reason: a two-sided derivative at 000 is impossible when w=0w=0w=0 on (−∞,0](-\infty,0](−∞,0] and w′(0)>0w'(0)>0w′(0)>0; the paper uses the derivative only on Ω=[0,∞)\Omega=[0,\infty)Ω=[0,∞)
  • encoding: the seller has qqq units (D/qD/qD/q is used throughout) → q>0q>0q>0; reason: implicit in the paper; D/qD/qD/q is undefined at q=0q=0q=0
Preamble
import Mathlib
import Definitions.Def_TradeAgentNV_winProb
import Definitions.Def_TradeAgentNV_expProfit
import Definitions.Def_TradeAgentNV_expBenefit

open MeasureTheory ProbabilityTheory
Formal statement
namespace TradeAgentNV

/-- **Display (4) with (7)** (pp.10–11; also display (29), p.28) of Çakıcı & Karaesmen, *When Yield is Not the Only Supply Uncertainty: Newsvendor Model of a
Trade Agent*, SSRN 4409114 (v. Oct 14, 2023):
the expected profit simplifies to `E[Vʸ(b)] = w(b)[R − bq] − πD` for every bid `b ∈ Ω = [0, ∞)`,
where `R = ρE[min(qU, D)] − hqE[U]` is the expected benefit of bidding.

**Formalization Note.** The model: on a probability space `(Ω, P)` the ask price `Z` and the
yield fraction `U` are independent random variables (the yield is exogenous to the bid, (2));
`P(Z ≤ 0) = 0` encodes "`Z` nonnegative and continuous" (the proof uses `w(0) = 0`); `w'` is the
density, a derivative of `w` within `Ω = [0, ∞)` (a two-sided derivative at `0` is impossible
when `w = 0` on `(−∞, 0]` and `w'(0) > 0`), positive on `[0, ∞)` (`Ω = {b : w'(b) > 0} = [0, ∞)`,
p.9); `0 ≤ U ≤ 1` a.s. and `E[U] > 0` (p.9); `D, r, t, h, π > 0`, `r − t + π > 0` (p.8) and lot
size `q > 0` (implicit: `D/q` is used throughout). -/
theorem equation_4
    (Ω : Type*) [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
    (Z U : Ω → ℝ) (hZ : Measurable Z) (hU : Measurable U) (hZU : IndepFun Z U P)
    (hZ0 : P.real {ω | Z ω ≤ 0} = 0)
    (w' : ℝ → ℝ)
    (hw : ∀ b, 0 ≤ b → HasDerivWithinAt (winProb P Z) (w' b) (Set.Ici 0) b)
    (hw'pos : ∀ b, 0 ≤ b → 0 < w' b)
    (hU01 : ∀ᵐ ω ∂P, U ω ∈ Set.Icc (0 : ℝ) 1) (hEU : 0 < ∫ ω, U ω ∂P)
    (r t h π D q : ℝ) (hr : 0 < r) (ht : 0 < t) (hh : 0 < h) (hπ : 0 < π) (hD : 0 < D)
    (hq : 0 < q) (hrtπ : 0 < r - t + π) :
    ∀ b, 0 ≤ b → expProfit P Z U r t h π D q b =
      winProb P Z b * (expBenefit P U r t h π D q - b * q) - π * D := by sorry

end TradeAgentNV
Source
Çakıcı & Karaesmen, When Yield is Not the Only Supply Uncertainty: Newsvendor Model of a Trade Agent, SSRN 4409114 (v. Oct 14, 2023), https://ssrn.com/abstract=4409114, displays (4) and (7), pp.10–11 (also display (29), p.28)
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me