Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 13 — given N(t) = n, the number of units still in resupply at t is binomial(n, p)

Proved
ServiceParts.NonstatPalm.units_binomial_given_count

by mikedeng1 · Oct 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

nonstationaryp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1poisson-processthinning

In the single-location model with nonstationary Poisson demand of rate λ\lambdaλ and time-dependent resupply distributions GsG_sGs​, fix ttt with m(t)>0m(t) > 0m(t)>0 and let

p=∫0t(1−Gs(t−s))λ(s)m(t) ds,p = \int_0^t \bigl(1 - G_s(t-s)\bigr)\frac{\lambda(s)}{m(t)}\,ds,p=∫0t​(1−Gs​(t−s))m(t)λ(s)​ds,

the probability that an arbitrary unit demanded during [0,t)[0,t)[0,t) is still in resupply at time ttt. Then for all n,k≥0n, k \ge 0n,k≥0,

P{X(t)=k, N(t)=n}=P{N(t)=n}(nk)pk(1−p)n−k,P\{X(t) = k,\ N(t) = n\} = P\{N(t) = n\}\binom{n}{k} p^k (1-p)^{n-k},P{X(t)=k, N(t)=n}=P{N(t)=n}(kn​)pk(1−p)n−k,

that is, P{X(t)=k∣N(t)=n}=(nk)pk(1−p)n−kP\{X(t) = k \mid N(t) = n\} = \binom{n}{k} p^k (1-p)^{n-k}P{X(t)=k∣N(t)=n}=(kn​)pk(1−p)n−k whenever P{N(t)=n}>0P\{N(t) = n\} > 0P{N(t)=n}>0.

Combined with the Poisson law of N(t)N(t)N(t) this yields Theorem 13.

Formalization Note The conditional probability is written as a joint probability, so no division by P{N(t)=n}P\{N(t) = n\}P{N(t)=n} occurs. For k>nk > nk>n the binomial coefficient is 000, so the natural-number exponent n−kn - kn−k plays no role there.

Preamble
import Mathlib
import Definitions.Def_ServiceParts_NonstatPalm_ResupplySystem

open MeasureTheory ProbabilityTheory
Formal statement
namespace ServiceParts.NonstatPalm

theorem units_binomial_given_count {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω}
    [IsProbabilityMeasure P] {E : Type*} [MeasurableSpace E] (S : ResupplySystem Ω P E)
    {t : ℝ} (hm : 0 < S.meanFn t) (n k : ℕ) :
    (P ({ω | S.unitsInResupply t ω = k} ∩ {ω | S.demandCount t ω = n})).toReal =
      (P {ω | S.demandCount t ω = n}).toReal *
        ((Nat.choose n k : ℝ) *
          (∫ s in (0 : ℝ)..t, (1 - S.resupplyCdf s (t - s)) * (S.rate s / S.meanFn t)) ^ k *
          (1 - ∫ s in (0 : ℝ)..t, (1 - S.resupplyCdf s (t - s)) * (S.rate s / S.meanFn t)) ^
            (n - k)) := by sorry

end ServiceParts.NonstatPalm
Source
Muckstadt, Analysis and Algorithms for Service Parts Supply Chains, Springer 2005, DOI 10.1007/b138879, pp. 216-217, proof of Theorem 13
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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