Further lemmas about integer division, now that omega is available. #
dvd #
Equations
- x✝¹.decidableDvd x✝ = decidable_of_decidable_of_iff ⋯
*div zero #
preliminaries for div equivalences #
div equivalences #
mod zero #
mod definitions #
Variant of tmod_add_tdiv with the multiplication written the other way around.
Variant of tdiv_add_tmod with the multiplication written the other way around.
Variant of fmod_add_fdiv with the multiplication written the other way around.
Variant of fdiv_add_fmod with the multiplication written the other way around.
mod equivalences #
/ ediv #
@[reducible, inline, deprecated Int.ediv_neg_of_neg_of_pos (since := "2025-03-04")]
Equations
Instances For
@[reducible, inline, deprecated Int.ediv_nonpos_of_nonneg_of_nonpos (since := "2025-03-04")]
Equations
Instances For
emod #
properties of / and % #
@[reducible, inline, deprecated Int.natAbs_ediv_le_natAbs (since := "2025-03-05")]
Instances For
/ and ordering #
tdiv #
There are no lemmas
add_mul_tdiv_right : c ≠ 0 → (a + b * c).tdiv c = a.tdiv c + badd_mul_tdiv_left : b ≠ 0 → (a + b * c).tdiv b = a.tdiv b + c- (similarly
mul_add_tdiv_right,mul_add_tdiv_left) add_tdiv_of_dvd_right : c ∣ b → (a + b).tdiv c = a.tdiv c + b.tdiv cadd_tdiv_of_dvd_left : c ∣ a → (a + b).tdiv c = a.tdiv c + b.tdiv cbecause these statements are all incorrect, and require awkward conditional off-by-one corrections.
@[reducible, inline, deprecated Int.tdiv_nonpos_of_nonneg_of_nonpos (since := "2025-03-04")]
Equations
Instances For
tmod #
properties of tdiv and tmod
tdiv and ordering #
fdiv #
@[reducible, inline, deprecated Int.fdiv_nonpos_of_nonneg_of_nonpos (since := "2025-03-04")]
Equations
Instances For
One could prove the following, but as the statements are quite awkward, so far it doesn't seem worthwhile.
theorem natAbs_fdiv {a b : Int} (h : b ≠ 0) :
natAbs (a.fdiv b) = a.natAbs / b.natAbs + if a.sign = b.sign ∨ b ∣ a then 0 else 1 := ...
theorem sign_fdiv (a b : Int) :
sign (a.fdiv b) = if a.sign = b.sign ∧ natAbs a < natAbs b then 0 else sign a * sign b := ...
fmod #
@[reducible, inline, deprecated Int.fmod_nonneg_of_pos (since := "2025-03-04")]
Equations
Instances For
properties of fdiv and fmod #
fdiv and ordering #
bmod #
Helper theorems for dvd simproc