Standing rate assumptions, scaled one-arrival density and full conditional vector law (5)
DefinitionNHPPArrivals_LinearRate_Supplement_ConditionalSampleFix . An admissible rate is nonnegative and integrable on and has only finitely many zeros there. Let and use the published one-arrival law with density on . Its pushforward under is denoted . Define
The order-statistic law of independent draws from a measure is the pushforward of by sorting the whole vector. The conditional vector law is the pushforward of by , with conditioning defined by restriction and division by the event probability. This definition supplies no order-statistic identification; Theorem 1 must prove it and positivity of every conditioning event, including . These objects connect the published deterministic cdf to the NHPP model. Values of the rate outside do not matter. No continuity or positive lower bound is required.
import Mathlib
import Definitions.Def_NHPPArrivals_LinearRate_ConditionalCdf
import Definitions.Def_NHPPArrivals_LinearRate_Supplement_PoissonProcess
namespace NHPPArrivals.LinearRate.Supplement
open MeasureTheory ProbabilityTheory
/-- The standing rate assumptions of §3.2, without continuity or boundedness. -/
def AdmissibleRate (lam : ℝ → ℝ) (T : ℝ) : Prop :=
0 < T ∧ IntervalIntegrable lam volume 0 T ∧
(∀ s ∈ Set.Icc (0 : ℝ) T, 0 ≤ lam s) ∧
{s ∈ Set.Icc (0 : ℝ) T | lam s = 0}.Finite
noncomputable def scaledArrivalLaw (lam : ℝ → ℝ) (T : ℝ) : Measure ℝ :=
(arrivalLaw lam T).map (fun s => s / T)
/-- Formula (5) on [0,1], extended by zero outside. -/
noncomputable def condDensity (lam : ℝ → ℝ) (T t : ℝ) : ℝ :=
if t ∈ Set.Icc (0 : ℝ) 1 then T * lam (t * T) / cumRate lam T else 0
noncomputable def orderedLaw (μ : Measure ℝ) (n : ℕ) : Measure (Fin n → ℝ) :=
(Measure.pi (fun _ : Fin n => μ)).map (fun x => x ∘ Tuple.sort x)
/-- The full vector law conditioned on the actual count, including n=0. -/
noncomputable def conditionalVectorLaw {Ω : Type*} [MeasurableSpace Ω]
(P : Measure Ω) (N : ℝ → Ω → ℕ) (X : ℕ → Ω → ℝ) (T : ℝ) (n : ℕ) :
Measure (Fin n → ℝ) :=
((P {ω | N T ω = n})⁻¹ • P.restrict {ω | N T ω = n}).map
(fun ω i => X (i : ℕ) ω / T)
end NHPPArrivals.LinearRate.Supplement