Dividing repeatedly by a power and quotient-remainder arithmetic #
Facts about n / b ^ j for the stages of an argument that divides a quantity by b at each step,
and exact quotient identities for division by m with remainder strictly below m.
Main results #
Nat.le_div_pow_of_mul_pow_le: lower bound onn / b ^ jwhena * b ^ d ≤ nandj ≤ d.Nat.mul_div_pow_succ_le:b * (n / b ^ (j + 1)) ≤ n / b ^ j.Nat.mul_add_div_of_lt,Nat.add_mul_div_of_lt: dividingk * m + iori + k * mbymwheni < myieldsk.Nat.mul_add_div_fin: the same fori : Fin m.Nat.add_sub_mod_mod_eq_ite: difference of remainders modulod, in the form(a + d - b % d) % d.Nat.add_sub_mod_mod_eq_of_modEq: a modular difference is determined by its congruence.Nat.sum_range_mul_ite_mod: sums over< n * ℓfiltered byq % ℓ = i(fori < ℓ) equal sums ofk * ℓ + ioverk < n.
theorem Nat.sum_range_mul_ite_mod {M : Type u_1} [AddCommMonoid M] (n : ℕ) {i ℓ : ℕ} (hi : i < ℓ) (F : ℕ → M) :
Sums over the positions of n blocks of length ℓ whose position within the block is i, as
sums over the blocks.