Module docstring
{"# Basic lemmas for ℤˣ.
This file contains lemmas on the units of ℤ.
Main results
Int.units_eq_one_or: the invertible integers are 1 and -1.
See note [foundational algebra order theory]. ","#### Units "}
{"# Basic lemmas for ℤˣ.
This file contains lemmas on the units of ℤ.
Int.units_eq_one_or: the invertible integers are 1 and -1.See note [foundational algebra order theory]. ","#### Units "}
Int.units_eq_one_or
theorem
(u : ℤˣ) : u = 1 ∨ u = -1
lemma units_eq_one_or (u : ℤℤˣ) : u = 1 ∨ u = -1 := by
simpa only [Units.ext_iff] using isUnit_eq_one_or u.isUnit
Int.units_ne_iff_eq_neg
theorem
{u v : ℤˣ} : u ≠ v ↔ u = -v
lemma units_ne_iff_eq_neg {u v : ℤℤˣ} : u ≠ vu ≠ v ↔ u = -v := by
simpa only [Ne, Units.ext_iff] using isUnit_ne_iff_eq_neg u.isUnit v.isUnit