mathlib3 documentation

data.int.lemmas

Miscellaneous lemmas about the integers #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

This file contains lemmas about integers, which require further imports than data.int.basic or data.int.order.

theorem int.le_coe_nat_sub (m n : ) :
m - n (m - n)

succ and pred #

@[simp]
theorem int.succ_coe_nat_pos (n : ) :
0 < n + 1

nat abs #

theorem int.nat_abs_eq_iff_sq_eq {a b : } :
a.nat_abs = b.nat_abs a ^ 2 = b ^ 2
theorem int.nat_abs_lt_iff_sq_lt {a b : } :
a.nat_abs < b.nat_abs a ^ 2 < b ^ 2
theorem int.nat_abs_le_iff_sq_le {a b : } :
a.nat_abs b.nat_abs a ^ 2 b ^ 2
theorem int.nat_abs_inj_of_nonneg_of_nonneg {a b : } (ha : 0 a) (hb : 0 b) :
theorem int.nat_abs_inj_of_nonpos_of_nonpos {a b : } (ha : a 0) (hb : b 0) :
theorem int.nat_abs_inj_of_nonneg_of_nonpos {a b : } (ha : 0 a) (hb : b 0) :
theorem int.nat_abs_inj_of_nonpos_of_nonneg {a b : } (ha : a 0) (hb : 0 b) :

to_nat #

theorem int.to_nat_of_nonpos {z : } :
z 0 z.to_nat = 0

bitwise ops #

This lemma is orphaned from data.int.bitwise as it also requires material from data.int.order.

@[simp]
theorem int.div2_bit (b : bool) (n : ) :
(int.bit b n).div2 = n