Theorems · Theorem · combinatorics
Multiset.filter_cons
∀ {α : Type u_1} {p : α → Prop} [inst : DecidablePred p] {a : α} (s : Multiset α),
Multiset.filter p (a ::ₘ s) = (if p a then {a} else 0) + Multiset.filter p s- Defined in
- Mathlib.Data.Multiset.Filter
- Cited by
- 5 results in Mathlib
- Foundations
- Depth 16 from the axioms · uses propext, Quot.sound
- Assumes
- DecidablePred
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites7
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- Multisetstatement and proof · cited by 2,627
- Multiset.consstatement and proof · cited by 313
- Multiset.filterstatement and proof · cited by 102
- Multiset.zero_addproof · cited by 15
- Multiset.singleton_addproof · cited by 13
- Multiset.filter_cons_of_negproof · cited by 5
- Multiset.filter_cons_of_posproof · cited by 5
Cited by5
Results whose statement or proof uses this declaration.
- Multiset.countP_mapproof · cited by 2
- Multiset.filter_eq_bindproof · cited by 1
- Multiset.map_filter_eq_filterMapproof · cited by 0
- Multiset.filter_nsmulproof · cited by 0
- Multiset.filter_singletonproof · cited by 0