fin_card_filter_dvd
theoremverified
For m > 0, exactly (k + m - 1)/m of the positions 0, ..., k-1 are multiples of m.
Statement
theorem fin_card_filter_dvd (m k : ℕ) (hm : 0 < m) : (Finset.univ.filter fun j : Fin k => m ∣ (j : ℕ)).card = (k + m - 1) / m
- Source
- step towards weakly_consecutive_one_at_end_of_isPrimePow (Weakly Consecutive Sequences (2024), arXiv:2401.09497, Conjecture 5.2, prime-power case)
- Verified
- 06 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- range_card_filter_dvdFor m > 0, the numbers 0, ..., k-1 include exactly ceil(k/m) = (k + m - 1)/m multiples of m.
- Used by 3
- is_m_number_of_strongly_matchableIf a positive integer n is strongly matchable, then n is an M-number.
- weakly_consecutive_first_dvdIn a weakly consecutive sequence of length k, the first term divides k.
- weakly_consecutive_ends_coprimeIn a weakly consecutive sequence, the first and last terms are coprime.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem fin_card_filter_dvd (m k : ℕ) (hm : 0 < m) : (Finset.univ.filter fun j : Fin k => m ∣ (j : ℕ)).card = (k + m - 1) / m := by rw [← range_card_filter_dvd m k hm, Finset.card_filter, Finset.card_filter, Fin.sum_univ_eq_sum_range (fun j => if m ∣ j then 1 else 0)]