Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.6 — implied costs and revenue sensitivity

Proved
KellyStochasticNetworks.ImpliedCosts.revenue_sensitivity

by Shuze Chen · Oct 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

loss-networksoptimizationsensitivityteletraffic

Consider a network with finitely many links and routes, nonnegative integer circuit requirements AjrA_{jr}Ajr​, positive offered traffic νr\nu_rνr​, positive integer capacities CjC_jCj​, real values wrw_rwr​ per carried call, and at least one route using each link. Let BBB be the Erlang fixed point, let 1−Lr=∏j(1−Bj)Ajr1-L_r=\prod_j(1-B_j)^{A_{jr}}1−Lr​=∏j​(1−Bj​)Ajr​, λr=νr(1−Lr)\lambda_r=\nu_r(1-L_r)λr​=νr​(1−Lr​), ρj=(1−Bj)−1∑rAjrλr\rho_j=(1-B_j)^{-1}\sum_rA_{jr}\lambda_rρj​=(1−Bj​)−1∑r​Ajr​λr​, and δj=ρj[E(ρj,Cj−1)−E(ρj,Cj)]\delta_j=\rho_j[E(\rho_j,C_j-1)-E(\rho_j,C_j)]δj​=ρj​[E(ρj​,Cj​−1)−E(ρj​,Cj​)]. Define W(ν;C)=∑rwrλrW(\nu;C)=\sum_rw_r\lambda_rW(ν;C)=∑r​wr​λr​ through the fixed point; for varying capacity, linearly interpolate the scalar Erlang formula before solving the network equations.

There is exactly one pair of vectors s,cs,cs,c satisfying

sr=wr−∑jcjAjr,cj=δj∑rAjrλr(sr+cj)∑rAjrλr.s_r=w_r-\sum_jc_jA_{jr},\qquad c_j=\delta_j\frac{\sum_rA_{jr}\lambda_r(s_r+c_j)}{\sum_rA_{jr}\lambda_r}.sr​=wr​−j∑​cj​Ajr​,cj​=δj​∑r​Ajr​λr​∑r​Ajr​λr​(sr​+cj​)​.

The offered-traffic derivatives exist, the left capacity derivatives exist at the integer base capacities, and

∂W∂νr=(1−Lr)sr,∂−W∂Cj=cj.\frac{\partial W}{\partial\nu_r}=(1-L_r)s_r,\qquad \frac{\partial^-W}{\partial C_j}=c_j.∂νr​∂W​=(1−Lr​)sr​,∂Cj​∂−W​=cj​.

The selected blocking vector satisfies the published Erlang fixed-point relation with 0≤Bj<10\le B_j<10≤Bj​<1, and every link has positive carried load.

The result identifies the marginal value of traffic and capacity with quantities determined by local route-link equations.

Formalization Note Capacity sensitivity is a derivative from the left of a real function, not a finite difference of network revenues and not a derivative on natural numbers. The theorem retains arbitrary integer demands even though the printed proof only handles a 000–111 matrix (finding F2). Positive traffic and positive integer capacities specify the differentiable interior of the original network data. The used-link condition makes the printed quotient in (4.8) meaningful; isolated links are omitted. Zero-traffic marker routes in the proof are not hypotheses or assumed sensitivities. Extending the displayed formula to noninteger base capacities is not asserted (finding F3).

Preamble
import Definitions.Def_KellyStochasticNetworks_ImpliedCosts_Model
Formal statement
namespace KellyStochasticNetworks.ImpliedCosts

/-- Theorem 4.6. Capacities are positive integers and the capacity derivative is
from the left after linearly interpolating the scalar Erlang formula.
Incidence entries remain arbitrary natural numbers, not just zero or one. -/
theorem revenue_sensitivity {J R : ℕ} (A : Fin J → Fin R → ℕ)
    (w ν : Fin R → ℝ) (C : Fin J → ℕ)
    (hν : ∀ r, 0 < ν r) (hC : ∀ j, 1 ≤ C j)
    (hused : ∀ j, ∃ r, 0 < A j r) :
    let CReal : Fin J → ℝ := fun j => (C j : ℝ)
    let B := blocking A ν CReal
    let lam := carried A ν B
    let δ := improvement A ν C B
    ErlangFixedPoint A ν C B ∧ (∀ j, B j ∈ Set.Ico (0 : ℝ) 1) ∧
    (∀ j, 0 < linkLoad A lam j) ∧
    ∃ sc : (Fin R → ℝ) × (Fin J → ℝ),
      CostSystem A w lam δ sc.1 sc.2 ∧
      (∀ sc' : (Fin R → ℝ) × (Fin J → ℝ),
        CostSystem A w lam δ sc'.1 sc'.2 → sc' = sc) ∧
      (∀ r, HasDerivAt
        (fun x : ℝ => revenue A w (Function.update ν r x) CReal)
        (acceptance A B r * sc.1 r) (ν r)) ∧
      (∀ j, HasDerivWithinAt
        (fun x : ℝ => revenue A w ν (Function.update CReal j x))
        (sc.2 j) (Set.Iic (CReal j)) (CReal j)) := by sorry

end KellyStochasticNetworks.ImpliedCosts
Source
Kelly & Yudovina, Stochastic Networks (2014), supplied Lecture Notes PDF, printed p. 103 (PDF p. 111), Theorem 4.6, with definitions on printed p. 102 (PDF p. 110) and proof on printed pp. 103–105 (PDF pp. 111–113); https://doi.org/10.1017/CBO9781139565363
Read-back

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

Throughout, JJJ and RRR are natural numbers. Every vector or matrix below is indexed by the finite sets {0,…,J−1}\{0,\dots,J-1\}{0,…,J−1} (indices jjj) and {0,…,R−1}\{0,\dots,R-1\}{0,…,R−1} (indices rrr). The names blocking, carried, improvement, ErlangFixedPoint, linkLoad, CostSystem, revenue and acceptance come from the imported module Definitions.Def_KellyStochasticNetworks_ImpliedCosts_Model. Their definitions were not part of what was given to this read-back. Each one is therefore described only by the arguments it receives, and what it means is whatever that module defines. The declaration also has a documentation comment. It says the capacity derivative is taken from the left after linear interpolation of the scalar Erlang formula, and that incidence entries are arbitrary naturals. That comment is commentary: the statement itself asserts only what is set out below.

Data and hypotheses. The statement takes:

  • a matrix A=(Ajr)A = (A_{jr})A=(Ajr​) of natural numbers. Entries may be any natural number, not only 000 or 111.
  • real vectors w=(wr)w = (w_r)w=(wr​) and ν=(νr)\nu = (\nu_r)ν=(νr​).
  • a vector C=(Cj)C = (C_j)C=(Cj​) of natural numbers.

It assumes:

νr>0 for all r,Cj≥1 for all j,for every j there is some r with Ajr>0.\nu_r > 0 \ \text{for all } r, \qquad C_j \ge 1 \ \text{for all } j, \qquad \text{for every } j \text{ there is some } r \text{ with } A_{jr} > 0.νr​>0 for all r,Cj​≥1 for all j,for every j there is some r with Ajr​>0.

Nothing is assumed about www. Its entries may be negative or zero.

Abbreviations. Write Cˉj∈R\bar C_j \in \mathbb{R}Cˉj​∈R for CjC_jCj​ viewed as a real number, and define:

  • B=blocking(A,ν,Cˉ)∈RJB = \mathrm{blocking}(A,\nu,\bar C) \in \mathbb{R}^JB=blocking(A,ν,Cˉ)∈RJ, computed from the real capacities;
  • λ=carried(A,ν,B)\lambda = \mathrm{carried}(A,\nu,B)λ=carried(A,ν,B);
  • δ=improvement(A,ν,C,B)\delta = \mathrm{improvement}(A,\nu,C,B)δ=improvement(A,ν,C,B), computed from the natural-number capacities CCC.

Conclusions. The theorem asserts all of the following together.

  1. ErlangFixedPoint(A,ν,C,B)\mathrm{ErlangFixedPoint}(A,\nu,C,B)ErlangFixedPoint(A,ν,C,B) holds. This uses the natural-number CCC.
  2. 0≤Bj<10 \le B_j < 10≤Bj​<1 for every jjj.
  3. linkLoad(A,λ,j)>0\mathrm{linkLoad}(A,\lambda,j) > 0linkLoad(A,λ,j)>0 for every jjj.
  4. There is exactly one pair (s,c)(s,c)(s,c) with s∈RRs \in \mathbb{R}^Rs∈RR and c∈RJc \in \mathbb{R}^Jc∈RJ satisfying CostSystem(A,w,λ,δ,s,c)\mathrm{CostSystem}(A,w,\lambda,\delta,s,c)CostSystem(A,w,λ,δ,s,c). Uniqueness here means that any pair (s′,c′)(s',c')(s′,c′) satisfying CostSystem(A,w,λ,δ,s′,c′)\mathrm{CostSystem}(A,w,\lambda,\delta,s',c')CostSystem(A,w,λ,δ,s′,c′) equals (s,c)(s,c)(s,c). This same pair also satisfies the two derivative statements (a) and (b) below.

(a) Derivative in demand. Fix a route rrr. Let ν(r←x)\nu^{(r\leftarrow x)}ν(r←x) denote ν\nuν with its rrr-th entry replaced by the real number xxx. The function

x↦revenue(A,w,ν(r←x),Cˉ)x \mapsto \mathrm{revenue}(A, w, \nu^{(r\leftarrow x)}, \bar C)x↦revenue(A,w,ν(r←x),Cˉ)

has an ordinary two-sided derivative at x=νrx = \nu_rx=νr​, and that derivative equals

acceptance(A,B,r)⋅sr.\mathrm{acceptance}(A,B,r)\cdot s_r.acceptance(A,B,r)⋅sr​.

In this formula, BBB is the fixed vector computed from the unperturbed ν\nuν and Cˉ\bar CCˉ.

(b) Derivative in capacity. Fix a link jjj. Let Cˉ(j←x)\bar C^{(j\leftarrow x)}Cˉ(j←x) denote Cˉ\bar CCˉ with its jjj-th entry replaced by the real number xxx. The function

x↦revenue(A,w,ν,Cˉ(j←x))x \mapsto \mathrm{revenue}(A, w, \nu, \bar C^{(j\leftarrow x)})x↦revenue(A,w,ν,Cˉ(j←x))

has derivative exactly cjc_jcj​ at x=Cˉjx = \bar C_jx=Cˉj​ within the set (−∞,Cˉj](-\infty, \bar C_j](−∞,Cˉj​]. That is a one-sided derivative from the left:

lim⁡x↑Cˉjrevenue(A,w,ν,Cˉ(j←x))−revenue(A,w,ν,Cˉ)x−Cˉj=cj.\lim_{x \uparrow \bar C_j} \frac{\mathrm{revenue}(A,w,\nu,\bar C^{(j\leftarrow x)}) - \mathrm{revenue}(A,w,\nu,\bar C)}{x - \bar C_j} = c_j.x↑Cˉj​lim​x−Cˉj​revenue(A,w,ν,Cˉ(j←x))−revenue(A,w,ν,Cˉ)​=cj​.

Nothing is asserted about the behaviour to the right of Cˉj\bar C_jCˉj​. The derivative is stated as +cj+c_j+cj​, with no minus sign. For (b) to say anything, revenue must be defined at non-integer real capacities xxx; what it computes there depends on the imported definition.

Degenerate cases.

  • J≥1J \ge 1J≥1, R=0R = 0R=0. The hypothesis that every link has a route with Ajr>0A_{jr} > 0Ajr​>0 cannot be satisfied, so the theorem is vacuously true.
  • J=0J = 0J=0. That hypothesis holds vacuously, and so do conclusions 2 and 3 and the capacity-derivative clause (b). The vector ccc is the unique empty vector. What remains is ErlangFixedPoint\mathrm{ErlangFixedPoint}ErlangFixedPoint (on empty link data), unique existence of sss, and the demand derivatives (a). Whether these say anything depends entirely on the imported definitions.
  • J=0J = 0J=0 and R=0R = 0R=0. Clause (a) is also vacuous. What remains is ErlangFixedPoint\mathrm{ErlangFixedPoint}ErlangFixedPoint together with existence and uniqueness of the pair of empty vectors under CostSystem\mathrm{CostSystem}CostSystem.

Because νr>0\nu_r > 0νr​>0 and Cj≥1C_j \ge 1Cj​≥1, both derivatives are taken at points strictly inside the positive reals. Values of revenue at non-positive demands or capacities can still be computed (the functions are total), but they do not affect the derivatives. Any junk values the imported definitions produce, such as division by zero, natural-number subtraction or default values, cannot be assessed here because those definitions were not provided.

Human review
  • Endorsed by Community (Bot) · Oct 22, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 22, 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