Taylor Models - Hyperbolic Functions #
This file contains Taylor polynomial definitions and remainder bounds for hyperbolic functions (sinh, cosh, tanh, atan, atanh, asinh), along with function-level Taylor models and their correctness proofs.
Main definitions #
sinhTaylorPoly,coshTaylorPoly, etc. - Taylor polynomialssinhRemainderBound,coshRemainderBound, etc. - Remainder boundstmSinh,tmCosh,tmTanh,tmAtan,tmAtanh,tmAsinh- Taylor modelstmSinh_correct,tmCosh_correct,tmAtanh_correct- Correctness theorems
sinh Taylor polynomial #
Taylor polynomial coefficients for sinh at center c = 0: sinh(x) = x + x³/3! + x⁵/5! + ...
Equations
Instances For
Taylor polynomial for sinh of degree n
Equations
Instances For
Remainder bound for sinh: |sinh(x) - T_n(x)| ≤ cosh(r) * |x|^{n+1} / (n+1)! where r = max(|lo|, |hi|). We use cosh(r) ≤ exp(r) ≤ 3^(⌈r⌉+1).
Equations
Instances For
Remainder bound for sinh is nonnegative
cosh Taylor polynomial #
Taylor polynomial coefficients for cosh at center c = 0: cosh(x) = 1 + x²/2! + x⁴/4! + ...
Equations
Instances For
Taylor polynomial for cosh of degree n
Equations
Instances For
Remainder bound for cosh: |cosh(x) - T_n(x)| ≤ cosh(r) * |x|^{n+1} / (n+1)! where r = max(|lo|, |hi|). We use cosh(r) ≤ exp(r) ≤ 3^(⌈r⌉+1).
Equations
Instances For
Remainder bound for cosh is nonnegative
atan Taylor polynomial #
atan(x) = x - x³/3 + x⁵/5 - x⁷/7 + ... = ∑_{k=0}^∞ (-1)^k x^{2k+1} / (2k+1)
Converges for |x| ≤ 1 (inclusive at endpoints by Abel's theorem).
Taylor polynomial for atan of degree n
Equations
Instances For
Remainder bound for atan
Equations
Instances For
Remainder bound for atan is nonnegative
atanh Taylor polynomial #
atanh(x) = x + x³/3 + x⁵/5 + ... = ∑_{k=0}^∞ x^{2k+1} / (2k+1)
Converges for |x| < 1.
Taylor polynomial for atanh of degree n
Equations
Instances For
Remainder bound for atanh
Equations
Instances For
Remainder bound for atanh is nonnegative
asinh Taylor polynomial #
Taylor polynomial coefficients for asinh at center 0
Equations
Instances For
Taylor polynomial for asinh of degree n
Equations
Instances For
Supremum of the n-th derivative of arsinh over the interval hull of domain and 0.
Equations
- LeanCert.Engine.TaylorModel.asinhDerivSup domain n = sSup ((fun (x : ℝ) => ‖iteratedDeriv n Real.arsinh x‖) '' Set.Icc (min (↑domain.lo) 0) (max (↑domain.hi) 0))
Instances For
Remainder bound for asinh
Equations
Instances For
Remainder bound for asinh is nonnegative
Function-level Taylor models #
Taylor model for sinh z on domain J, centered at 0, degree n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Taylor model for cosh z on domain J, centered at 0, degree n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Function-level Taylor model for tanh at center 0. Uses tanh = sinh / cosh with the fact that cosh(x) ≥ 1 > 0 for all x.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Taylor model for atan z on domain J, centered at 0, degree n. Valid for |z| ≤ 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Taylor model for atanh z on domain J, centered at 0, degree n. Valid for |z| < 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Taylor model for asinh z on domain J, centered at 0, degree n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Helper lemmas #
Helper lemmas for iterated derivatives #
iteratedDeriv for sinh and cosh at 0, proved together. sinh: even n → 0, odd n → 1 cosh: even n → 1, odd n → 0
arsinh series helpers #
The sinhTaylorCoeffs match the Mathlib Taylor coefficients for sinh at 0
The coshTaylorCoeffs match the Mathlib Taylor coefficients for cosh at 0
Polynomial evaluation lemmas #
sinhTaylorPoly evaluates to the standard Taylor sum for sinh at 0.
coshTaylorPoly evaluates to the standard Taylor sum for cosh at 0.
atanh correctness helper #
atanhTaylorPoly evaluates to the standard sum.
Remainder bound for the atanh series: for |z| < 1, the tail after degree n is bounded. Uses the geometric series bound on the tail.
Proof sketch:
- atanh(z) = Σ_{k=0}^∞ z^(2k+1)/(2k+1) by Real.atanh_hasSum
- The polynomial computes partial sum of odd terms up to degree n
- Remainder = tail = Σ_{k: 2k+1 > n} z^(2k+1)/(2k+1)
- |tail| ≤ Σ_{k: 2k+1 > n} |z|^(2k+1) ≤ |z|^(n+1)/(1-z²) by geometric series
Correctness theorems #
sinh z ∈ (tmSinh J n).evalSet z for all z in J. Uses taylor_remainder_bound with f = Real.sinh.
cosh z ∈ (tmCosh J n).evalSet z for all z in J.
asinh correctness infrastructure #
The n-th derivative of arsinh at 0 follows the pattern:
- For even n: 0
- For odd n = 2k+1: (2k)! * Ring.choose (-1/2) k
This matches the coefficients in asinhTaylorCoeffs times n!.
Note: This is proved using the known series expansion of arsinh, which satisfies arsinh(x) = Σ_{k=0}^∞ a_k x^(2k+1) where a_k = Ring.choose (-1/2) k / (2k+1).
The asinhTaylorCoeffs match the Mathlib Taylor coefficients for arsinh at 0
asinhTaylorPoly evaluates to the standard Taylor sum for arsinh at 0.
Bound on the n-th derivative of arsinh on the interval hull of domain and 0.
arsinh z ∈ (tmAsinh J n).evalSet z for all z in J. Uses taylor_remainder_bound with f = Real.arsinh, M = asinhDerivSup J (n+1).