Ceiling division lemmas #
This file provides arithmetic lemmas relating ceiling division on natural numbers to inequalities in the extended natural numbers.
Main results #
ENat.natCast_le_nsmul_add_iff_ceilDiv_lerewrites an affine inequality inℕ∞using natural-number ceiling division.Nat.ceilDiv_mul_sub_of_ltevaluates a ceiling division after subtracting a residue smaller than the divisor.Nat.sum_range_sub_ceilDivis Hermite's identity in ceiling-division form:∑ i ∈ Finset.range n, (r - i) ⌈/⌉ n = r.
Hermite's identity in truncated ceiling-division form: for 0 < n, the ceilings of
(r - i) / n over a complete block 0 ≤ i < n of shifts add up to r. The subtraction is
truncated, so the terms with r ≤ i vanish. Compare the floor form Int.sum_range_add_ediv.