Zulip Chat Archive
Stream: Is there code for X?
Topic: Counting divisible by p
Stuart Presnell (Jul 10 2022 at 16:19):
Does mathlib already know that Ioc 0 n
contains exactly n/p
elements divisible by p
?
example (n : ℕ) {p : ℕ} (hp : p ≠ 0) :
((Ioc 0 n).filter (λ x, p ∣ x)).card = n / p := sorry
Patrick Johnson (Jul 10 2022 at 16:59):
(hp : p ≠ 0)
is redundant.
Ruben Van de Velde (Jul 10 2022 at 17:00):
docs#card_multiples is close
Last updated: Dec 20 2023 at 11:08 UTC