Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 7.6 (proof) — the partial derivative of the Lyapunov function

Proved
KellyStochasticNetworks.primal_utility_deriv

by naimengye · Sep 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysiscontrol-theorystochastic-networks

For the Lyapunov function

U(x)=∑rwrlog⁡xr−∑j∫0∑s:j∈sxspj(y) dyU(x)=\sum_r w_r\log x_r-\sum_j\int_0^{\sum_{s:j\in s}x_s}p_j(y)\,dyU(x)=r∑​wr​logxr​−j∑​∫0∑s:j∈s​xs​​pj​(y)dy

with each pjp_jpj​ continuous, and for any xxx in the positive orthant, the partial derivative in the rrr-th coordinate is

∂U∂xr(x)=wrxr−∑j∈rpj(∑s:j∈sxs).\frac{\partial U}{\partial x_r}(x)=\frac{w_r}{x_r}-\sum_{j\in r}p_j\Bigl(\sum_{s:j\in s}x_s\Bigr).∂xr​∂U​(x)=xr​wr​​−j∈r∑​pj​(s:j∈s∑​xs​).

Two things follow, and both are used in the proof of Theorem 7.6. Setting these derivatives to zero identifies the maximizer of UUU, since UUU is strictly concave. And the resulting stationarity condition wr/xr=∑j∈rpj(⋅)w_r/x_r=\sum_{j\in r}p_j(\cdot)wr​/xr​=∑j∈r​pj​(⋅) is, after multiplying by xrx_rxr​, exactly the condition that the right-hand side of the primal algorithm (7.5) vanishes — so the maximizer of UUU is an equilibrium point of the dynamics.

The derivative of the second term is where the fundamental theorem of calculus enters: the load on resource jjj depends on xrx_rxr​ with coefficient AjrA_{jr}Ajr​, so differentiating ∫0loadpj\int_0^{\text{load}}p_j∫0load​pj​ returns Ajr pj(load)A_{jr}\,p_j(\text{load})Ajr​pj​(load), and summing over jjj gives the sum over the resources of route rrr.

Formalization Note The partial derivative is stated as an ordinary derivative in the rrr-th coordinate, with the others held fixed, so no partial-derivative API is presupposed. Continuity of pjp_jpj​ is what makes ∫0ypj\int_0^{y}p_j∫0y​pj​ differentiable with derivative pj(y)p_j(y)pj​(y).

Preamble
import Mathlib
import Definitions.Def_KellyStochasticNetworks_Wardrop
import Definitions.Def_KellyStochasticNetworks_Congestion
Formal statement
namespace KellyStochasticNetworks

theorem primal_utility_deriv {J R : ℕ} (A : Fin J → Fin R → ℝ) (w : Fin R → ℝ)
    (p : Fin J → ℝ → ℝ) (hA : ∀ j r, A j r = 0 ∨ A j r = 1)
    (hp : ∀ j, Continuous (p j)) (x : Fin R → ℝ) (hx : ∀ r, 0 < x r) (r : Fin R) :
    HasDerivAt (fun t : ℝ => primalUtility A w p (Function.update x r t))
      (w r / x r - ∑ j, A j r * p j (linkFlow A x j)) (x r) := by sorry

end KellyStochasticNetworks
Source
Kelly & Yudovina, Stochastic Networks, CUP 2014, p. 164 (PDF p. 172), in the proof of Theorem 7.6: 'Moreover, U(x) is continuously differentiable with (partial / partial x_r) U(x) = w_r/x_r - sum_{j in r} p_j( sum_{s : j in s} x_s ), and setting these derivatives to zero identifies the maximum, x say. The derivative (7.5) is zero at x, and hence x is an equilibrium point.' sha256 ec271d555059aee58613e5e9a98b8346214b16185c527314f5d94c1ac8b17b6a
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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