TorchLean API

FloatLib.Numerics.Enclosure.Trigonometric.Reduction.Proof

Correctness of rational trigonometric period reduction #

The approximate remainder is bounded independently of the input. Its distance from a true period translate is bounded by the explicit rational reduction error. Periodicity and the Lipschitz estimates then transfer the Taylor enclosure to the original argument.

The rational quarter period is at least one half.

The rational quarter period is at most one.

The rational quarter period lies below the true quarter period.

The upper quarter-period endpoint lies above the clamped lower approximation.

theorem FloatLib.Numerics.Enclosure.abs_trig_turns_residual_le (x : ) (degree : ) :
|x / (8 * trigQuarter degree) - (trigTurns x degree)| 1 / 2

Rounding to the nearest integer leaves at most half a period.

Every reduced rational argument lies in [-4, 4], regardless of input magnitude.

theorem FloatLib.Numerics.Enclosure.abs_trigTurns_le (x : ) (degree : ) :
|(trigTurns x degree)| |x| + 1

The number of removed periods has a uniform bound as the degree varies.

The accumulated rational period error is nonnegative.

theorem FloatLib.Numerics.Enclosure.trigReductionError_le (x : ) (degree : ) :
trigReductionError x degree 8 * (|x| + 1) * ((piQuarter degree).hi - trigQuarter degree)

An input-dependent constant times the quarter-period width bounds the reduction error.

theorem FloatLib.Numerics.Enclosure.abs_trigReducedArgument_sub_period_le (x : ) (degree : ) :
|(trigReducedArgument x degree) - (x - (trigTurns x degree) * (2 * Real.pi))| (trigReductionError x degree)

The approximate remainder is close to an exact integer translate by .

The sine error introduced by rational period reduction is explicitly bounded.

The cosine error introduced by rational period reduction is explicitly bounded.

Combined period and Taylor errors bound the sine polynomial at the reduced argument.

Combined period and Taylor errors bound the cosine polynomial at the reduced argument.

The reduced sine enclosure contains the exact sine at every rational input and degree.

The reduced cosine enclosure contains the exact cosine at every rational input and degree.