Documentation

Mathlib.Data.Real.Sign

Real sign function #

This file introduces and contains some results about Real.sign which maps negative real numbers to -1, positive real numbers to 1, and 0 to 0.

Main definitions #

Tags #

sign function

noncomputable def Real.sign (r : โ„) :

The sign function that maps negative real numbers to -1, positive numbers to 1, and 0 otherwise.

Equations
    Instances For
      theorem Real.sign_of_neg {r : โ„} (hr : r < 0) :
      r.sign = -1
      theorem Real.sign_of_pos {r : โ„} (hr : 0 < r) :
      r.sign = 1
      theorem Real.sign_apply_eq_of_ne_zero (r : โ„) (h : r โ‰  0) :
      r.sign = -1 โˆจ r.sign = 1

      This lemma is useful for working with โ„หฃ

      theorem Real.sign_intCast (z : โ„ค) :
      (โ†‘z).sign = โ†‘z.sign