Lattice operations on multisets #
sup #
Supremum of a multiset: sup {a, b, c} = a ⊔ b ⊔ c
Equations
- s.sup = Multiset.fold (fun (x x_1 : α) => x ⊔ x_1) ⊥ s
Instances For
@[simp]
theorem
Multiset.sup_coe
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
(l : List α)
:
(↑l).sup = List.foldr (fun (x x_1 : α) => x ⊔ x_1) ⊥ l
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Multiset.sup_add
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.le_sup
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
{s : Multiset α}
{a : α}
(h : a ∈ s)
:
a ≤ s.sup
theorem
Multiset.sup_mono
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
{s₁ : Multiset α}
{s₂ : Multiset α}
(h : s₁ ⊆ s₂)
:
s₁.sup ≤ s₂.sup
@[simp]
theorem
Multiset.sup_dedup
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(s : Multiset α)
:
s.dedup.sup = s.sup
@[simp]
theorem
Multiset.sup_ndunion
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.sup_union
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.sup_ndinsert
{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(a : α)
(s : Multiset α)
:
(Multiset.ndinsert a s).sup = a ⊔ s.sup
theorem
Multiset.nodup_sup_iff
{α : Type u_2}
[DecidableEq α]
{m : Multiset (Multiset α)}
:
m.sup.Nodup ↔ ∀ a ∈ m, a.Nodup
inf #
Infimum of a multiset: inf {a, b, c} = a ⊓ b ⊓ c
Equations
- s.inf = Multiset.fold (fun (x x_1 : α) => x ⊓ x_1) ⊤ s
Instances For
@[simp]
theorem
Multiset.inf_coe
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
(l : List α)
:
(↑l).inf = List.foldr (fun (x x_1 : α) => x ⊓ x_1) ⊤ l
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Multiset.inf_add
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.inf_le
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
{s : Multiset α}
{a : α}
(h : a ∈ s)
:
s.inf ≤ a
theorem
Multiset.inf_mono
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
{s₁ : Multiset α}
{s₂ : Multiset α}
(h : s₁ ⊆ s₂)
:
s₂.inf ≤ s₁.inf
@[simp]
theorem
Multiset.inf_dedup
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
[DecidableEq α]
(s : Multiset α)
:
s.dedup.inf = s.inf
@[simp]
theorem
Multiset.inf_ndunion
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
[DecidableEq α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.inf_union
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
[DecidableEq α]
(s₁ : Multiset α)
(s₂ : Multiset α)
:
@[simp]
theorem
Multiset.inf_ndinsert
{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
[DecidableEq α]
(a : α)
(s : Multiset α)
:
(Multiset.ndinsert a s).inf = a ⊓ s.inf