The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Algebra.Order.Group.Unbundled.Int

26 declarations. Mathlib docs · Source

Facts about ℤ as an (unbundled) ordered group

See note [foundational algebra order theory].

Recursors

  • Int.rec: Sign disjunction. Something is true/defined on ℤ if it's true/defined for nonnegative and for negative values. (Defined in core Lean 3)
  • Int.inductionOn: Simple growing induction on positive numbers, plus simple decreasing induction on negative numbers. Note that this recursor is currently only Prop-valued.
  • Int.inductionOn': Simple growing induction for numbers greater than b, plus simple decreasing induction on numbers less than b.

Miscellaneous lemmas

/

mod

properties of / and %

theorem Int.natCast_strictMono E1 #

StrictMono fun x ↦ ↑x

theorem Int.abs_eq_natAbs E1 #

∀ (a : ℤ), |a| = ↑a.natAbs

theorem Int.natCast_natAbs E1 #

∀ (n : ℤ), ↑n.natAbs = |n|

theorem Int.natAbs_abs E1 #

∀ (a : ℤ), |a|.natAbs = a.natAbs

theorem Int.sign_mul_abs E1 #

∀ (a : ℤ), a.sign * |a| = a

theorem Int.sign_mul_self_eq_abs E1 #

∀ (a : ℤ), a.sign * a = |a|

theorem Int.natAbs_le_self_sq E1 #

∀ (a : ℤ), ↑a.natAbs ≤ a ^ 2

theorem Int.natAbs_le_self_pow_two E1 #

∀ (a : ℤ), ↑a.natAbs ≤ a ^ 2

Alias of Int.natAbs_le_self_sq.

theorem Int.le_self_sq E1 #

∀ (b : ℤ), b ≤ b ^ 2

theorem Int.le_self_pow_two E1 #

∀ (b : ℤ), b ≤ b ^ 2

Alias of Int.le_self_sq.

theorem Int.abs_natCast E1 #

∀ (n : ℕ), |↑n| = ↑n

theorem Int.natAbs_sub_pos_iff E0 #

∀ {i j : ℤ}, 0 < (i - j).natAbs ↔ i ≠ j

theorem Int.natAbs_sub_ne_zero_iff E0 #

∀ {i j : ℤ}, (i - j).natAbs ≠ 0 ↔ i ≠ j

theorem Int.abs_lt_one_iff E0 #

∀ {a : ℤ}, |a| < 1 ↔ a = 0

theorem Int.abs_le_one_iff E0 #

∀ {a : ℤ}, |a| ≤ 1 ↔ a = 0 ∨ a = 1 ∨ a = -1

theorem Int.one_le_abs E1 #

∀ {z : ℤ}, z ≠ 0 → 1 ≤ |z|

theorem Int.abs_sub_lt_of_lt_lt E1 #

∀ {m a b : ℕ}, a < m → b < m → |↑b - ↑a| < ↑m

theorem Int.ediv_eq_zero_of_lt_abs E1 #

∀ {a b : ℤ}, 0 ≤ a → a < |b| → a / b = 0

theorem Int.emod_abs E0 #

∀ (a b : ℤ), a % |b| = a % b

theorem Int.emod_lt_abs E1 #

∀ (a : ℤ) {b : ℤ}, b ≠ 0 → a % b < |b|

theorem Int.abs_ediv_le_abs E1 #

∀ (a b : ℤ), |a / b| ≤ |a|

theorem Int.abs_sign_of_ne_zero E1 #

∀ {z : ℤ}, z ≠ 0 → |z.sign| = 1

theorem Int.sign_eq_ediv_abs' E1 #

∀ (a : ℤ), a.sign = a / |a|

theorem Int.sign_eq_abs_ediv E1 #

∀ (a : ℤ), a.sign = |a| / a

theorem zpow_abs_eq_one E0 #

∀ {G : Type u_1} [inst : Group G] (a : G) (n : ℤ), a ^ |n| = 1 ↔ a ^ n = 1

theorem abs_zsmul_eq_zero E0 #

∀ {G : Type u_1} [inst : AddGroup G] (a : G) (n : ℤ), |n| • a = 0 ↔ n • a = 0