TorchLean API

FloatLib.Numerics.Enclosure.Trigonometric.SinCosProof

Global rational sine and cosine bounds #

The rational polynomials are identified with real Taylor polynomials at zero. Mathlib's Lagrange remainder theorem applies at every real argument: every iterated derivative of sine or cosine has absolute value at most one. Thus no domain restriction or unproved reduction condition enters the containment theorem.

Rational sine coefficients are the exact real derivatives at the origin.

Rational cosine coefficients are the exact real derivatives at the origin.

theorem FloatLib.Numerics.Enclosure.abs_sin_sub_sinTaylor_le (x : ) (degree : ) :
|Real.sin x - (sinTaylor x degree)| (trigRadius x degree)

The executable sine polynomial has a valid remainder bound for every rational input.

theorem FloatLib.Numerics.Enclosure.abs_cos_sub_cosTaylor_le (x : ) (degree : ) :
|Real.cos x - (cosTaylor x degree)| (trigRadius x degree)

The executable cosine polynomial has the same global remainder guarantee.

theorem FloatLib.Numerics.Enclosure.contains_restrictUnit {interval : RationalInterval} {x : } (hx : interval.Contains x) (hbound : |x| 1) :
(restrictUnit interval).Contains x

Intersecting with [-1, 1] retains containment of any value in that range.

theorem FloatLib.Numerics.Enclosure.contains_sin (x : ) (degree : ) :
(sin x degree).Contains (Real.sin x)

Every finite degree provides a sound enclosure of sine on all rational arguments.

theorem FloatLib.Numerics.Enclosure.contains_cos (x : ) (degree : ) :
(cos x degree).Contains (Real.cos x)

Every finite degree provides a sound enclosure of cosine on all rational arguments.