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