Theorems · Theorem · number theory
Nat.count_modEq_card
∀ (b : ℕ) {r : ℕ}, 0 < r → ∀ (v : ℕ), Nat.count (fun x => x ≡ v [MOD r]) b = b / r + if v % r < b % r then 1 else 0There are b / r + [v % r < b % r] numbers in [0, b) congruent to v mod r,
where [·] is the Iverson bracket.
- Defined in
- Mathlib.Data.Int.CardIntervalMod
- Cited by
- 0 results in Mathlib
- Foundations
- Depth 87 from the axioms · uses propext, Classical.choice, Quot.sound
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites37
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- one_mulproof · cited by 2,841
- Nat.cast_oneproof · cited by 2,501
- LT.lt.leproof · cited by 2,189
- Nat.cast_zeroproof · cited by 1,870
- MulZeroClass.zero_mulproof · cited by 1,625
- add_commproof · cited by 1,535
- LT.lt.ne'proof · cited by 1,417
- sub_selfproof · cited by 996
- LT.lt.trans_leproof · cited by 678
- Nat.cast_addproof · cited by 586
- Int.cast_oneproof · cited by 371
- Nat.cast_mulproof · cited by 309
Cited by0
Results whose statement or proof uses this declaration.
Nothing cites this yet.