Documentation

LeanCert.Engine.TaylorModel.Special

Taylor Models - Special Functions #

This file contains Taylor polynomial definitions and remainder bounds for special functions (erf, and future sqrt), along with function-level Taylor models.

Main definitions #

erf Taylor polynomial #

erf(x) = (2/√π) ∫₀ˣ e^{-t²} dt = (2/√π) Σ_{n=0}^∞ (-1)^n x^{2n+1} / (n! (2n+1)) = (2/√π) (x - x³/3 + x⁵/10 - x⁷/42 + ...)

We use rational approximations for 2/√π ≈ 1.128379...

Rational approximation of 2/√π (lower bound)

Equations
Instances For

    Rational approximation of 2/√π (upper bound)

    Equations
    Instances For

      Taylor polynomial coefficients for erf at center 0 (using middle approximation): erf(x) ≈ (2/√π) Σ (-1)^k x^{2k+1} / (k! (2k+1))

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Remainder bound for erf: |erf(x)| ≤ 1 for all x, so we use Taylor remainder plus coefficient approximation error.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Remainder bound for erf is nonnegative

          Taylor model for erf z on domain J, centered at 0, degree n. erf(z) = (2/√π) ∫₀ᶻ e^{-t²} dt.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Future: sqrt Taylor model #

            sqrt(x) requires special treatment since it's not analytic at 0. It needs to be expanded around a positive center c > 0.

            For now, we leave a placeholder comment.