TorchLean API

FloatLib.Numerics.Exact.Trigonometric.Atan2.Argument

Principal-branch identities for the complex argument #

The tangent inverse is applied only after locating the argument in its open principal branch. These identities include the real and imaginary axes and Mathlib's totalization at the origin.

theorem FloatLib.Numerics.TrigonometricComparison.arg_of_pos (x y : ) (hx : 0 < x) :
{ re := x, im := y }.arg = Real.arctan (y / x)

A positive real component places the argument in the open arctangent branch.

theorem FloatLib.Numerics.TrigonometricComparison.arg_of_neg_nonneg (x y : ) (hx : x < 0) (hy : 0 y) :
{ re := x, im := y }.arg = Real.arctan (y / x) + Real.pi

The upper left quadrant, including the negative real axis, adds π to the arctangent.

theorem FloatLib.Numerics.TrigonometricComparison.arg_of_neg_neg (x y : ) (hx : x < 0) (hy : y < 0) :
{ re := x, im := y }.arg = Real.arctan (y / x) - Real.pi

The lower left quadrant subtracts π from the arctangent.

The arctangent formula for the principal argument, including both axes and the origin.

Rational quadrant reduction equals the exact principal complex argument.