Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma B.10 — flow-balance identity for the traffic equations

Proved
ProcessingNetworks.EntropyIneq.lemma_B_10

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

p2o-gran-per-chapterp2o-plan-bookp2o-v1processing-networksrelative-entropyspectral-radiustextbooktraffic-equations

Throughout, I≥1I\ge1I≥1 is an integer, I={1,…,I}\mathcal I=\{1,\dots,I\}I={1,…,I} is the set of classes, λ∈R+I\lambda\in\mathbb R^I_+λ∈R+I​ is the vector of external arrival rates and PPP is a non-negative I×II\times II×I routing matrix with spectral radius ρ(P)<1\rho(P)<1ρ(P)<1; Pi0:=1−∑j∈IPijP_{i0}:=1-\sum_{j\in\mathcal I}P_{ij}Pi0​:=1−∑j∈I​Pij​, I+=I∪{0}\mathcal I_+=\mathcal I\cup\{0\}I+​=I∪{0}, α:=(I−P′)−1λ\alpha:=(I-P')^{-1}\lambdaα:=(I−P′)−1λ is assumed positive and α0:=1\alpha_0:=1α0​:=1 (Section B.4, (B.13)–(B.17)).

Set d0=1d_0=1d0​=1 by convention and let d1,…,dId_1,\dots,d_Id1​,…,dI​ be arbitrary real numbers. Then

∑i∈Idi+∑i∈Iλi=∑i∈Iαi∑j∈I+Pijdjαj+∑i∈Idiλiαi.\sum_{i\in\mathcal I}d_i+\sum_{i\in\mathcal I}\lambda_i=\sum_{i\in\mathcal I}\alpha_i\sum_{j\in\mathcal I_+}P_{ij}\frac{d_j}{\alpha_j}+\sum_{i\in\mathcal I}d_i\frac{\lambda_i}{\alpha_i} .i∈I∑​di​+i∈I∑​λi​=i∈I∑​αi​j∈I+​∑​Pij​αj​dj​​+i∈I∑​di​αi​λi​​.

The identity is what makes the two vectors built from ddd in the proof of Lemma B.13 have equal total mass, so that the unnormalized Pinsker inequality (Lemma B.12) applies.

Formalization Note The inner sum over I+\mathcal I_+I+​ is the sum over the classes plus the class-000 term Pi0 d0/α0=Pi0P_{i0}\,d_0/\alpha_0=P_{i0}Pi0​d0​/α0​=Pi0​.

Differences from the source:

  • encoding: sums over 𝓘₊ = 𝓘 ∪ {0} with d₀ = α₀ = 1 → a sum over Fin I plus the explicit class-0 term outflow P i = P_{i0}; reason: class 0 is not an element of Fin I; same values
  • encoding: ρ(P) < 1, ρ the largest modulus of an eigenvalue → RobustToDynamics.specRadius P < 1, the supremum of the moduli of the points of the spectrum of P over ℂ; reason: that spectrum is the set of complex eigenvalues, a finite nonempty set for I ≥ 1, so the supremum is the maximum
  • encoding: α := (I − P′)⁻¹λ → traffic lam P, defined with Matrix.inv; reason: ρ(P) < 1 makes I − P′ invertible (Theorem F.1), so Matrix.inv is the true inverse
Preamble
import Mathlib
import Definitions.Def_ProcessingNetworks_EntropyIneq_SectionB4Assumptions
import Definitions.Def_ProcessingNetworks_EntropyIneq_outflow
Formal statement
namespace ProcessingNetworks.EntropyIneq

/-- **Lemma B.10** (Dai & Harrison, *Processing Networks*, pre-publication draft 2020-4-2,
spnbook.org, Appendix B §B.4, Lemma B.10, eq. (B.21), p.270 (PDF 286)). Under the standing
assumptions of Section B.4, with `α = (I − P′)⁻¹λ`, set `d₀ = 1` by convention and let
`d₁, …, d_I` be arbitrary. Then
`Σ_{i∈𝓘} dᵢ + Σ_{i∈𝓘} λᵢ = Σ_{i∈𝓘} αᵢ Σ_{j∈𝓘₊} P_{ij} d_j/α_j + Σ_{i∈𝓘} dᵢ λᵢ/αᵢ`.

**Formalization Note** `𝓘₊ = 𝓘 ∪ {0}`: the inner sum is `Σ_{j ∈ Fin I} P_{ij} d_j/α_j` plus the
class-0 term `P_{i0} · d₀/α₀ = outflow P i` (with `d₀ = α₀ = 1`). `d` is an arbitrary real vector. -/
theorem lemma_B_10 {I : ℕ} (lam : Fin I → ℝ) (P : Matrix (Fin I) (Fin I) ℝ)
    (hB4 : SectionB4Assumptions lam P) (d : Fin I → ℝ) :
    ∑ i, d i + ∑ i, lam i =
      ∑ i, traffic lam P i * (∑ j, P i j * (d j / traffic lam P j) + outflow P i) +
        ∑ i, d i * (lam i / traffic lam P i) := by sorry

end ProcessingNetworks.EntropyIneq
Source
Dai & Harrison, Processing Networks (pre-publication draft 2020-4-2, spnbook.org), Appendix B §B.4, Lemma B.10, eq. (B.21), p.270 (PDF 286)
Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 1, 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