Sections of a multiset #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
The sections of a multiset of multisets s
consists of all those multisets
which can be put in bijection with s
, so each element is an member of the corresponding multiset.
Equations
- s.sections = s.rec_on {0} (λ (s : multiset α) (_x c : multiset (multiset α)), s.bind (λ (a : α), multiset.map (multiset.cons a) c)) multiset.sections._proof_1
@[simp]
theorem
multiset.sections_cons
{α : Type u_1}
(s : multiset (multiset α))
(m : multiset α) :
(m ::ₘ s).sections = m.bind (λ (a : α), multiset.map (multiset.cons a) s.sections)
@[simp]
theorem
multiset.sections_add
{α : Type u_1}
(s t : multiset (multiset α)) :
(s + t).sections = s.sections.bind (λ (m : multiset α), multiset.map (has_add.add m) t.sections)