leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

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: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll