Siegel Theorem 2.2: sign of for the waiting-time log-density
Provedsiegel_logdensity_phi_deriv_posSiegel 2001, "Median Bounds and their Application" (J. Algorithms 38:184–236), Theorem 2.2 / §2.1.1 — the -sign step.
For the waiting-time log-density (this is up to the additive constant , where is the Siegel exponential-clock waiting-time density), define the symmetrized log-ratio .
Under the small-mean condition (equivalently , which the mean satisfies), the derivative is strictly positive for every , where .
The statement asserts both HasDerivAt (the chain-rule derivative formula for at each interior ) and the strict positivity of that derivative value.
Proof. The chain rule on , gives HasDerivAt. For the sign, write , ; then . Clearing the positive denominator and using (AM–GM, since ) together with , the inequality reduces to the factorisation , which holds because and . (The quadratic in governing the sign has negative discriminant under this condition, so is in fact monotone increasing on — the degenerate single-turning-point case of Siegel's moustache argument.)
import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Add open Set
theorem siegel_logdensity_phi_deriv_pos
(lam m Nn mu : ℝ)
(hlam : 0 < lam) (hm : 0 < m) (hmN : m < Nn) (hmu : 0 < mu)
(hcond : (Nn - m) * Real.exp (lam * mu) < Nn) :
∀ t ∈ Set.Ioo (0:ℝ) mu,
HasDerivAt (fun y => (m * Real.log (1 - Real.exp (-lam * y)) - (Nn - m) * (lam * y))
- (m * Real.log (1 - Real.exp (-lam * (2*mu - y))) - (Nn - m) * (lam * (2*mu - y))))
( (m * (lam * Real.exp (-lam * t) / (1 - Real.exp (-lam * t))) - (Nn - m) * lam)
+ (m * (lam * Real.exp (-lam * (2*mu - t)) / (1 - Real.exp (-lam * (2*mu - t)))) - (Nn - m) * lam) ) t
∧ 0 < ( (m * (lam * Real.exp (-lam * t) / (1 - Real.exp (-lam * t))) - (Nn - m) * lam)
+ (m * (lam * Real.exp (-lam * (2*mu - t)) / (1 - Real.exp (-lam * (2*mu - t)))) - (Nn - m) * lam) ) := by sorry