Documentation

SHSLib.Foundations.BetaRecurrence

The recurrence of the incomplete Beta function in its first parameter #

Batch 176 proved the Beta–Binomial identity, which is the integer form of the statement that I_x(a+1,b) differs from I_x(a,b) by a single explicit term. This module proves the general real-parameter recurrence

I_x(a+1, b) = I_x(a, b) − x^a (1−x)^b / (a · B(a,b)) for a, b > 0, x ∈ [0,1],

equivalently, at the level of the unnormalised function,

a · B(x; a, b) − (a+b) · B(x; a+1, b) = x^a (1−x)^b.

The proof is the fundamental theorem of calculus applied to F(t) = t^a (1−t)^b. Its derivative on (0,x) is a · t^{a−1}(1−t)^{b−1} − (a+b) · t^a(1−t)^{b−1}, and F is continuous up to the endpoint 0 because a > 0 — even though the derivative itself blows up there when a < 1. The version of the fundamental theorem that only requires a one-sided derivative on the open interval handles this.

noncomputable def SHSLib.Trigamma.betaAntideriv (a b t : ℝ) :

The antiderivative F(t) = t^a (1−t)^b used in the recurrence.

Equations
Instances For
    theorem SHSLib.Trigamma.continuous_betaAntideriv {a b : ℝ} (ha : 0 < a) (hb : 0 < b) :

    For positive parameters F is continuous on all of ℝ; in particular at the endpoint 0, where the integrand of the recurrence may blow up.

    @[simp]
    theorem SHSLib.Trigamma.betaAntideriv_zero {a b : ℝ} (ha : 0 < a) :
    theorem SHSLib.Trigamma.hasDerivAt_betaAntideriv {a b t : ℝ} (ht0 : 0 < t) (ht1 : t < 1) :
    HasDerivAt (betaAntideriv a b) (a * betaIntegrand a b t - (a + b) * betaIntegrand (a + 1) b t) t

    The derivative of F(t) = t^a(1−t)^b on the open interval, expressed through the Euler integrands with parameters (a,b) and (a+1,b).

    theorem SHSLib.Trigamma.incompleteBetaFn_recurrence_aux {a b x : ℝ} (ha : 0 < a) (hb : 0 < b) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) :
    a * incompleteBetaFn a b x - (a + b) * incompleteBetaFn (a + 1) b x = x ^ a * (1 - x) ^ b

    The unnormalised recurrence: a·B(x;a,b) − (a+b)·B(x;a+1,b) = x^a (1−x)^b.

    theorem SHSLib.Trigamma.incompleteBetaFn_recurrence {a b x : ℝ} (ha : 0 < a) (hb : 0 < b) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) :
    incompleteBetaFn (a + 1) b x = (a * incompleteBetaFn a b x - x ^ a * (1 - x) ^ b) / (a + b)

    The recurrence for the incomplete Beta function itself.

    theorem SHSLib.Trigamma.regBetaFn_recurrence {a b x : ℝ} (ha : 0 < a) (hb : 0 < b) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) :
    regBetaFn (a + 1) b x = regBetaFn a b x - x ^ a * (1 - x) ^ b / (a * betaFn a b)

    The recurrence of the regularised incomplete Beta function in its first parameter: I_x(a+1,b) = I_x(a,b) − x^a(1−x)^b/(a·B(a,b)).