The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Multiset.Sections

7 declarations. Mathlib docs · Source

def Multiset.Sections E1 #

{α : Type u_1} → Multiset (Multiset α) → Multiset (Multiset α)

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 a member of the corresponding multiset.

theorem Multiset.sections_zero E0 #

∀ {α : Type u_1}, Multiset.Sections 0 = {0}

theorem Multiset.sections_cons E0 #

∀ {α : Type u_1} (s : Multiset (Multiset α)) (m : Multiset α),
  (m ::ₘ s).Sections = m.bind fun a ↦ Multiset.map (Multiset.cons a) s.Sections

theorem Multiset.coe_sections E0 #

∀ {α : Type u_1} (l : List (List α)), (↑(List.map (fun l ↦ ↑l) l)).Sections = ↑(List.map (fun l ↦ ↑l) l.sections)

theorem Multiset.sections_add E0 #

∀ {α : Type u_1} (s t : Multiset (Multiset α)),
  (s + t).Sections = s.Sections.bind fun m ↦ Multiset.map (fun x ↦ m + x) t.Sections

theorem Multiset.mem_sections E0 #

∀ {α : Type u_1} {s : Multiset (Multiset α)} {a : Multiset α}, a ∈ s.Sections ↔ Multiset.Rel (fun s a ↦ a ∈ s) s a

theorem Multiset.card_sections E1 #

∀ {α : Type u_1} {s : Multiset (Multiset α)}, s.Sections.card = (Multiset.map Multiset.card s).prod