Phases of Muoncompanion
Section SI · Deterministic model: Volterra analysis and the phase map
Proved in Lean
Lemma SI.5 (Sum and integral)
Let \(p,q,a>0\) and \(f_a(x)\defeq x^{-p}e^{-ax^{-q}}\) for \(x>0\), \(f_a(0)\defeq0\). The function \(f_a\) has a unique maximum, at \(x=(qa/p)^{1/q}\), with value \(M_{p,q}a^{-p/q}\). For every integer \(N\ge1\),
\begin{equation}\tag{SI.20} \begin{gathered} \Big|\sum_{i=1}^Nf_a(i)-\int_0^Nf_a(x)\,\dif x\Big|\le2M_{p,q}a^{-p/q},\\ \int_0^Nf_a(x)\,\dif x=\frac{a^{(1-p)/q}}q\int_{a/N^q}^\infty y^{(p-1)/q-1}e^{-y}\,\dif y . \end{gathered} \end{equation}
Proof.
The derivative is
\[ f_a'(x)=x^{-p-1}e^{-ax^{-q}}\big(-p+qa\,x^{-q}\big), \]
which changes sign once, from positive to negative, at \(x=(qa/p)^{1/q}\). Evaluating there gives the maximum. Since \(f_a\) tends to \(0\) at both ends of \((0,\infty)\), its total variation is twice the maximum. On each interval \([i-1,i]\),
\[ \Big|f_a(i)-\int_{i-1}^if_a(x)\,\dif x\Big|\le\int_{i-1}^i\abs{f_a(i)-f_a(x)}\,\dif x\le\int_{i-1}^i\abs{f_a'(y)}\,\dif y , \]
and summing over \(i\le N\) bounds the difference by the total variation. The substitution \(y=ax^{-q}\) gives the formula for the integral.

Used by

Lean

Proved in Lean
Muon.Phase.lem_app_phase_variation_i source
theorem lem_app_phase_variation_i {p q a : ℝ} (hp : 0 < p) (hq : 0 < q) (ha : 0 < a) :
    fa p q a ((q * a / p) ^ (1 / q)) = Mpq p q * a ^ (-(p / q)) ∧
      ∀ x : ℝ, 0 < x → x ≠ (q * a / p) ^ (1 / q) →
        fa p q a x < fa p q a ((q * a / p) ^ (1 / q)) := by
Muon.Phase.lem_app_phase_variation_ii source
theorem lem_app_phase_variation_ii {p q a : ℝ} (hp : 0 < p) (hq : 0 < q) (ha : 0 < a)
    (N : ℕ) (hN : 1 ≤ N) :
    |(∑ i ∈ Finset.Icc 1 N, fa p q a (i : ℝ)) - ∫ x in (0 : ℝ)..(N : ℝ), fa p q a x|
      ≤ 2 * Mpq p q * a ^ (-(p / q)) := by
Muon.Phase.lem_app_phase_variation_iii source
theorem lem_app_phase_variation_iii {p q a : ℝ} (hp : 0 < p) (hq : 0 < q) (ha : 0 < a)
    (N : ℕ) (hN : 1 ≤ N) :
    ∫ x in (0 : ℝ)..(N : ℝ), fa p q a x =
      a ^ ((1 - p) / q) / q *
        ∫ y in Ioi (a / (N : ℝ) ^ q), y ^ ((p - 1) / q - 1) * Real.exp (-y) := by