Mathlib Map

Theorems · Theorem · number theory

Nat.count_modEq_card_eq_ceil

∀ (b : ℕ) {r : ℕ}, 0 < r → ∀ (v : ℕ), ↑(Nat.count (fun x => x ≡ v [MOD r]) b) = ⌈(↑b - ↑(v % r)) / ↑r⌉

There are ⌈(b - v % r) / r⌉ numbers in [0, b) congruent to v mod r.

Defined in
Mathlib.Data.Int.CardIntervalMod
Cited by
1 results in Mathlib
Foundations
Depth 86 from the axioms · uses propext, Classical.choice, Quot.sound

Around this declaration

Dashed lines are statement dependencies; solid lines are citations in proofs.

Cites38

Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.

Cited by1

Results whose statement or proof uses this declaration.