data.multiset.lattice
⟷
Mathlib.Data.Multiset.Lattice
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(last sync)
attach
and filter
lemmas (#18087)
Left commutativity and cardinality of list.filter
/multiset.filter
/finset.filter
. Interaction of count
/countp
and attach
.
@@ -39,7 +39,7 @@ sup_bot_eq
@[simp] lemma sup_add (s₁ s₂ : multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup :=
eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
-lemma sup_le {s : multiset α} {a : α} : s.sup ≤ a ↔ (∀b ∈ s, b ≤ a) :=
+@[simp] lemma sup_le {s : multiset α} {a : α} : s.sup ≤ a ↔ (∀b ∈ s, b ≤ a) :=
multiset.induction_on s (by simp)
(by simp [or_imp_distrib, forall_and_distrib] {contextual := tt})
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -6,7 +6,7 @@ Authors: Mario Carneiro
import Data.Multiset.FinsetOps
import Data.Multiset.Fold
-#align_import data.multiset.lattice from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
+#align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
/-!
# Lattice operations on multisets
@@ -71,6 +71,7 @@ theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s
-/
#print Multiset.sup_le /-
+@[simp]
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
-import Mathbin.Data.Multiset.FinsetOps
-import Mathbin.Data.Multiset.Fold
+import Data.Multiset.FinsetOps
+import Data.Multiset.Fold
#align_import data.multiset.lattice from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module data.multiset.lattice
-! leanprover-community/mathlib commit f2f413b9d4be3a02840d0663dace76e8fe3da053
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Multiset.FinsetOps
import Mathbin.Data.Multiset.Fold
+#align_import data.multiset.lattice from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
+
/-!
# Lattice operations on multisets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -38,20 +38,26 @@ def sup (s : Multiset α) : α :=
#align multiset.sup Multiset.sup
-/
+#print Multiset.sup_coe /-
@[simp]
theorem sup_coe (l : List α) : sup (l : Multiset α) = l.foldr (· ⊔ ·) ⊥ :=
rfl
#align multiset.sup_coe Multiset.sup_coe
+-/
+#print Multiset.sup_zero /-
@[simp]
theorem sup_zero : (0 : Multiset α).sup = ⊥ :=
fold_zero _ _
#align multiset.sup_zero Multiset.sup_zero
+-/
+#print Multiset.sup_cons /-
@[simp]
theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
fold_cons_left _ _ _ _
#align multiset.sup_cons Multiset.sup_cons
+-/
#print Multiset.sup_singleton /-
@[simp]
@@ -60,10 +66,12 @@ theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
#align multiset.sup_singleton Multiset.sup_singleton
-/
+#print Multiset.sup_add /-
@[simp]
theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup :=
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
+-/
#print Multiset.sup_le /-
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
@@ -93,21 +101,28 @@ theorem sup_dedup (s : Multiset α) : (dedup s).sup = s.sup :=
#align multiset.sup_dedup Multiset.sup_dedup
-/
+#print Multiset.sup_ndunion /-
@[simp]
theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_ndunion Multiset.sup_ndunion
+-/
+#print Multiset.sup_union /-
@[simp]
theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_union Multiset.sup_union
+-/
+#print Multiset.sup_ndinsert /-
@[simp]
theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_cons] <;> simp
#align multiset.sup_ndinsert Multiset.sup_ndinsert
+-/
+#print Multiset.nodup_sup_iff /-
theorem nodup_sup_iff {α : Type _} [DecidableEq α] {m : Multiset (Multiset α)} :
m.sup.Nodup ↔ ∀ a : Multiset α, a ∈ m → a.Nodup :=
by
@@ -116,6 +131,7 @@ theorem nodup_sup_iff {α : Type _} [DecidableEq α] {m : Multiset (Multiset α)
· intro a s h
simp [h]
#align multiset.nodup_sup_iff Multiset.nodup_sup_iff
+-/
end Sup
@@ -134,20 +150,26 @@ def inf (s : Multiset α) : α :=
#align multiset.inf Multiset.inf
-/
+#print Multiset.inf_coe /-
@[simp]
theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤ :=
rfl
#align multiset.inf_coe Multiset.inf_coe
+-/
+#print Multiset.inf_zero /-
@[simp]
theorem inf_zero : (0 : Multiset α).inf = ⊤ :=
fold_zero _ _
#align multiset.inf_zero Multiset.inf_zero
+-/
+#print Multiset.inf_cons /-
@[simp]
theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
fold_cons_left _ _ _ _
#align multiset.inf_cons Multiset.inf_cons
+-/
#print Multiset.inf_singleton /-
@[simp]
@@ -156,10 +178,12 @@ theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
#align multiset.inf_singleton Multiset.inf_singleton
-/
+#print Multiset.inf_add /-
@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf :=
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
+-/
#print Multiset.le_inf /-
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
@@ -189,20 +213,26 @@ theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf :=
#align multiset.inf_dedup Multiset.inf_dedup
-/
+#print Multiset.inf_ndunion /-
@[simp]
theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_ndunion Multiset.inf_ndunion
+-/
+#print Multiset.inf_union /-
@[simp]
theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_union Multiset.inf_union
+-/
+#print Multiset.inf_ndinsert /-
@[simp]
theorem inf_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).inf = a ⊓ s.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_cons] <;> simp
#align multiset.inf_ndinsert Multiset.inf_ndinsert
+-/
end Inf
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -31,10 +31,12 @@ section Sup
-- can be defined with just `[has_bot α]` where some lemmas hold without requiring `[order_bot α]`
variable [SemilatticeSup α] [OrderBot α]
+#print Multiset.sup /-
/-- Supremum of a multiset: `sup {a, b, c} = a ⊔ b ⊔ c` -/
def sup (s : Multiset α) : α :=
s.fold (· ⊔ ·) ⊥
#align multiset.sup Multiset.sup
+-/
@[simp]
theorem sup_coe (l : List α) : sup (l : Multiset α) = l.foldr (· ⊔ ·) ⊥ :=
@@ -51,35 +53,45 @@ theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
fold_cons_left _ _ _ _
#align multiset.sup_cons Multiset.sup_cons
+#print Multiset.sup_singleton /-
@[simp]
theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
sup_bot_eq
#align multiset.sup_singleton Multiset.sup_singleton
+-/
@[simp]
theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup :=
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
+#print Multiset.sup_le /-
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.sup_le Multiset.sup_le
+-/
+#print Multiset.le_sup /-
theorem le_sup {s : Multiset α} {a : α} (h : a ∈ s) : a ≤ s.sup :=
sup_le.1 le_rfl _ h
#align multiset.le_sup Multiset.le_sup
+-/
+#print Multiset.sup_mono /-
theorem sup_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₁.sup ≤ s₂.sup :=
sup_le.2 fun b hb => le_sup (h hb)
#align multiset.sup_mono Multiset.sup_mono
+-/
variable [DecidableEq α]
+#print Multiset.sup_dedup /-
@[simp]
theorem sup_dedup (s : Multiset α) : (dedup s).sup = s.sup :=
fold_dedup_idem _ _ _
#align multiset.sup_dedup Multiset.sup_dedup
+-/
@[simp]
theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.sup ⊔ s₂.sup := by
@@ -115,10 +127,12 @@ section Inf
-- can be defined with just `[has_top α]` where some lemmas hold without requiring `[order_top α]`
variable [SemilatticeInf α] [OrderTop α]
+#print Multiset.inf /-
/-- Infimum of a multiset: `inf {a, b, c} = a ⊓ b ⊓ c` -/
def inf (s : Multiset α) : α :=
s.fold (· ⊓ ·) ⊤
#align multiset.inf Multiset.inf
+-/
@[simp]
theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤ :=
@@ -135,35 +149,45 @@ theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
fold_cons_left _ _ _ _
#align multiset.inf_cons Multiset.inf_cons
+#print Multiset.inf_singleton /-
@[simp]
theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
inf_top_eq
#align multiset.inf_singleton Multiset.inf_singleton
+-/
@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf :=
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
+#print Multiset.le_inf /-
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.le_inf Multiset.le_inf
+-/
+#print Multiset.inf_le /-
theorem inf_le {s : Multiset α} {a : α} (h : a ∈ s) : s.inf ≤ a :=
le_inf.1 le_rfl _ h
#align multiset.inf_le Multiset.inf_le
+-/
+#print Multiset.inf_mono /-
theorem inf_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₂.inf ≤ s₁.inf :=
le_inf.2 fun b hb => inf_le (h hb)
#align multiset.inf_mono Multiset.inf_mono
+-/
variable [DecidableEq α]
+#print Multiset.inf_dedup /-
@[simp]
theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf :=
fold_dedup_idem _ _ _
#align multiset.inf_dedup Multiset.inf_dedup
+-/
@[simp]
theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -31,155 +31,71 @@ section Sup
-- can be defined with just `[has_bot α]` where some lemmas hold without requiring `[order_bot α]`
variable [SemilatticeSup α] [OrderBot α]
-/- warning: multiset.sup -> Multiset.sup is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
-Case conversion may be inaccurate. Consider using '#align multiset.sup Multiset.supₓ'. -/
/-- Supremum of a multiset: `sup {a, b, c} = a ⊔ b ⊔ c` -/
def sup (s : Multiset α) : α :=
s.fold (· ⊔ ·) ⊥
#align multiset.sup Multiset.sup
-/- warning: multiset.sup_coe -> Multiset.sup_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1)) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.73 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.75 : α) => Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.73 x._@.Mathlib.Data.Multiset.Lattice._hyg.75) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
-Case conversion may be inaccurate. Consider using '#align multiset.sup_coe Multiset.sup_coeₓ'. -/
@[simp]
theorem sup_coe (l : List α) : sup (l : Multiset α) = l.foldr (· ⊔ ·) ⊥ :=
rfl
#align multiset.sup_coe Multiset.sup_coe
-/- warning: multiset.sup_zero -> Multiset.sup_zero is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (Zero.toOfNat0.{u1} (Multiset.{u1} α) (Multiset.instZeroMultiset.{u1} α)))) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_zero Multiset.sup_zeroₓ'. -/
@[simp]
theorem sup_zero : (0 : Multiset α).sup = ⊥ :=
fold_zero _ _
#align multiset.sup_zero Multiset.sup_zero
-/- warning: multiset.sup_cons -> Multiset.sup_cons is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_cons Multiset.sup_consₓ'. -/
@[simp]
theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
fold_cons_left _ _ _ _
#align multiset.sup_cons Multiset.sup_cons
-/- warning: multiset.sup_singleton -> Multiset.sup_singleton is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.hasSingleton.{u1} α) a)) a
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) a
-Case conversion may be inaccurate. Consider using '#align multiset.sup_singleton Multiset.sup_singletonₓ'. -/
@[simp]
theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
sup_bot_eq
#align multiset.sup_singleton Multiset.sup_singleton
-/- warning: multiset.sup_add -> Multiset.sup_add is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_add Multiset.sup_addₓ'. -/
@[simp]
theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup :=
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
-/- warning: multiset.sup_le -> Multiset.sup_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s) a) (forall (b : α), (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) b a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s) a) (forall (b : α), (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) b a))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_le Multiset.sup_leₓ'. -/
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.sup_le Multiset.sup_le
-/- warning: multiset.le_sup -> Multiset.le_sup is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-Case conversion may be inaccurate. Consider using '#align multiset.le_sup Multiset.le_supₓ'. -/
theorem le_sup {s : Multiset α} {a : α} (h : a ∈ s) : a ≤ s.sup :=
sup_le.1 le_rfl _ h
#align multiset.le_sup Multiset.le_sup
-/- warning: multiset.sup_mono -> Multiset.sup_mono is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.hasSubset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.instHasSubsetMultiset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_mono Multiset.sup_monoₓ'. -/
theorem sup_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₁.sup ≤ s₂.sup :=
sup_le.2 fun b hb => le_sup (h hb)
#align multiset.sup_mono Multiset.sup_mono
variable [DecidableEq α]
-/- warning: multiset.sup_dedup -> Multiset.sup_dedup is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.sup.{u1} α _inst_1 _inst_2 s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.sup.{u1} α _inst_1 _inst_2 s)
-Case conversion may be inaccurate. Consider using '#align multiset.sup_dedup Multiset.sup_dedupₓ'. -/
@[simp]
theorem sup_dedup (s : Multiset α) : (dedup s).sup = s.sup :=
fold_dedup_idem _ _ _
#align multiset.sup_dedup Multiset.sup_dedup
-/- warning: multiset.sup_ndunion -> Multiset.sup_ndunion is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_ndunion Multiset.sup_ndunionₓ'. -/
@[simp]
theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_ndunion Multiset.sup_ndunion
-/- warning: multiset.sup_union -> Multiset.sup_union is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_union Multiset.sup_unionₓ'. -/
@[simp]
theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_union Multiset.sup_union
-/- warning: multiset.sup_ndinsert -> Multiset.sup_ndinsert is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
-Case conversion may be inaccurate. Consider using '#align multiset.sup_ndinsert Multiset.sup_ndinsertₓ'. -/
@[simp]
theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_cons] <;> simp
#align multiset.sup_ndinsert Multiset.sup_ndinsert
-/- warning: multiset.nodup_sup_iff -> Multiset.nodup_sup_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_4 : DecidableEq.{succ u1} α] {m : Multiset.{u1} (Multiset.{u1} α)}, Iff (Multiset.Nodup.{u1} α (Multiset.sup.{u1} (Multiset.{u1} α) (Lattice.toSemilatticeSup.{u1} (Multiset.{u1} α) (Multiset.lattice.{u1} α (fun (a : α) (b : α) => _inst_4 a b))) (Multiset.orderBot.{u1} α) m)) (forall (a : Multiset.{u1} α), (Membership.Mem.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} (Multiset.{u1} α)) (Multiset.hasMem.{u1} (Multiset.{u1} α)) a m) -> (Multiset.Nodup.{u1} α a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_4 : DecidableEq.{succ u1} α] {m : Multiset.{u1} (Multiset.{u1} α)}, Iff (Multiset.Nodup.{u1} α (Multiset.sup.{u1} (Multiset.{u1} α) (Lattice.toSemilatticeSup.{u1} (Multiset.{u1} α) (Multiset.instLatticeMultiset.{u1} α (fun (a : α) (b : α) => _inst_4 a b))) (Multiset.instOrderBotMultisetToLEToPreorderInstPartialOrderMultiset.{u1} α) m)) (forall (a : Multiset.{u1} α), (Membership.mem.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} (Multiset.{u1} α)) (Multiset.instMembershipMultiset.{u1} (Multiset.{u1} α)) a m) -> (Multiset.Nodup.{u1} α a))
-Case conversion may be inaccurate. Consider using '#align multiset.nodup_sup_iff Multiset.nodup_sup_iffₓ'. -/
theorem nodup_sup_iff {α : Type _} [DecidableEq α] {m : Multiset (Multiset α)} :
m.sup.Nodup ↔ ∀ a : Multiset α, a ∈ m → a.Nodup :=
by
@@ -199,144 +115,66 @@ section Inf
-- can be defined with just `[has_top α]` where some lemmas hold without requiring `[order_top α]`
variable [SemilatticeInf α] [OrderTop α]
-/- warning: multiset.inf -> Multiset.inf is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
-Case conversion may be inaccurate. Consider using '#align multiset.inf Multiset.infₓ'. -/
/-- Infimum of a multiset: `inf {a, b, c} = a ⊓ b ⊓ c` -/
def inf (s : Multiset α) : α :=
s.fold (· ⊓ ·) ⊤
#align multiset.inf Multiset.inf
-/- warning: multiset.inf_coe -> Multiset.inf_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1)) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.698 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.700 : α) => Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.698 x._@.Mathlib.Data.Multiset.Lattice._hyg.700) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
-Case conversion may be inaccurate. Consider using '#align multiset.inf_coe Multiset.inf_coeₓ'. -/
@[simp]
theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤ :=
rfl
#align multiset.inf_coe Multiset.inf_coe
-/- warning: multiset.inf_zero -> Multiset.inf_zero is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (Zero.toOfNat0.{u1} (Multiset.{u1} α) (Multiset.instZeroMultiset.{u1} α)))) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_zero Multiset.inf_zeroₓ'. -/
@[simp]
theorem inf_zero : (0 : Multiset α).inf = ⊤ :=
fold_zero _ _
#align multiset.inf_zero Multiset.inf_zero
-/- warning: multiset.inf_cons -> Multiset.inf_cons is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_cons Multiset.inf_consₓ'. -/
@[simp]
theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
fold_cons_left _ _ _ _
#align multiset.inf_cons Multiset.inf_cons
-/- warning: multiset.inf_singleton -> Multiset.inf_singleton is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.hasSingleton.{u1} α) a)) a
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) a
-Case conversion may be inaccurate. Consider using '#align multiset.inf_singleton Multiset.inf_singletonₓ'. -/
@[simp]
theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
inf_top_eq
#align multiset.inf_singleton Multiset.inf_singleton
-/- warning: multiset.inf_add -> Multiset.inf_add is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_add Multiset.inf_addₓ'. -/
@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf :=
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
-/- warning: multiset.le_inf -> Multiset.le_inf is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a (Multiset.inf.{u1} α _inst_1 _inst_2 s)) (forall (b : α), (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a b))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a (Multiset.inf.{u1} α _inst_1 _inst_2 s)) (forall (b : α), (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a b))
-Case conversion may be inaccurate. Consider using '#align multiset.le_inf Multiset.le_infₓ'. -/
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.le_inf Multiset.le_inf
-/- warning: multiset.inf_le -> Multiset.inf_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s) a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s) a)
-Case conversion may be inaccurate. Consider using '#align multiset.inf_le Multiset.inf_leₓ'. -/
theorem inf_le {s : Multiset α} {a : α} (h : a ∈ s) : s.inf ≤ a :=
le_inf.1 le_rfl _ h
#align multiset.inf_le Multiset.inf_le
-/- warning: multiset.inf_mono -> Multiset.inf_mono is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.hasSubset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.instHasSubsetMultiset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_mono Multiset.inf_monoₓ'. -/
theorem inf_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₂.inf ≤ s₁.inf :=
le_inf.2 fun b hb => inf_le (h hb)
#align multiset.inf_mono Multiset.inf_mono
variable [DecidableEq α]
-/- warning: multiset.inf_dedup -> Multiset.inf_dedup is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.inf.{u1} α _inst_1 _inst_2 s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.inf.{u1} α _inst_1 _inst_2 s)
-Case conversion may be inaccurate. Consider using '#align multiset.inf_dedup Multiset.inf_dedupₓ'. -/
@[simp]
theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf :=
fold_dedup_idem _ _ _
#align multiset.inf_dedup Multiset.inf_dedup
-/- warning: multiset.inf_ndunion -> Multiset.inf_ndunion is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_ndunion Multiset.inf_ndunionₓ'. -/
@[simp]
theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_ndunion Multiset.inf_ndunion
-/- warning: multiset.inf_union -> Multiset.inf_union is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_union Multiset.inf_unionₓ'. -/
@[simp]
theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_union Multiset.inf_union
-/- warning: multiset.inf_ndinsert -> Multiset.inf_ndinsert is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
-Case conversion may be inaccurate. Consider using '#align multiset.inf_ndinsert Multiset.inf_ndinsertₓ'. -/
@[simp]
theorem inf_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).inf = a ⊓ s.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_cons] <;> simp
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -31,16 +31,20 @@ section Sup
-- can be defined with just `[has_bot α]` where some lemmas hold without requiring `[order_bot α]`
variable [SemilatticeSup α] [OrderBot α]
-#print Multiset.sup /-
+/- warning: multiset.sup -> Multiset.sup is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
+Case conversion may be inaccurate. Consider using '#align multiset.sup Multiset.supₓ'. -/
/-- Supremum of a multiset: `sup {a, b, c} = a ⊔ b ⊔ c` -/
def sup (s : Multiset α) : α :=
s.fold (· ⊔ ·) ⊥
#align multiset.sup Multiset.sup
--/
/- warning: multiset.sup_coe -> Multiset.sup_coe is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1)) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1)) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.73 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.75 : α) => Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.73 x._@.Mathlib.Data.Multiset.Lattice._hyg.75) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
Case conversion may be inaccurate. Consider using '#align multiset.sup_coe Multiset.sup_coeₓ'. -/
@@ -51,7 +55,7 @@ theorem sup_coe (l : List α) : sup (l : Multiset α) = l.foldr (· ⊔ ·) ⊥
/- warning: multiset.sup_zero -> Multiset.sup_zero is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (Zero.toOfNat0.{u1} (Multiset.{u1} α) (Multiset.instZeroMultiset.{u1} α)))) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2))
Case conversion may be inaccurate. Consider using '#align multiset.sup_zero Multiset.sup_zeroₓ'. -/
@@ -62,7 +66,7 @@ theorem sup_zero : (0 : Multiset α).sup = ⊥ :=
/- warning: multiset.sup_cons -> Multiset.sup_cons is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
Case conversion may be inaccurate. Consider using '#align multiset.sup_cons Multiset.sup_consₓ'. -/
@@ -71,16 +75,20 @@ theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
fold_cons_left _ _ _ _
#align multiset.sup_cons Multiset.sup_cons
-#print Multiset.sup_singleton /-
+/- warning: multiset.sup_singleton -> Multiset.sup_singleton is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.hasSingleton.{u1} α) a)) a
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) a
+Case conversion may be inaccurate. Consider using '#align multiset.sup_singleton Multiset.sup_singletonₓ'. -/
@[simp]
theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
sup_bot_eq
#align multiset.sup_singleton Multiset.sup_singleton
--/
/- warning: multiset.sup_add -> Multiset.sup_add is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.sup_add Multiset.sup_addₓ'. -/
@@ -89,37 +97,53 @@ theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
-#print Multiset.sup_le /-
+/- warning: multiset.sup_le -> Multiset.sup_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s) a) (forall (b : α), (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) b a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s) a) (forall (b : α), (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) b a))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_le Multiset.sup_leₓ'. -/
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.sup_le Multiset.sup_le
--/
-#print Multiset.le_sup /-
+/- warning: multiset.le_sup -> Multiset.le_sup is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+Case conversion may be inaccurate. Consider using '#align multiset.le_sup Multiset.le_supₓ'. -/
theorem le_sup {s : Multiset α} {a : α} (h : a ∈ s) : a ≤ s.sup :=
sup_le.1 le_rfl _ h
#align multiset.le_sup Multiset.le_sup
--/
-#print Multiset.sup_mono /-
+/- warning: multiset.sup_mono -> Multiset.sup_mono is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.hasSubset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.instHasSubsetMultiset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_mono Multiset.sup_monoₓ'. -/
theorem sup_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₁.sup ≤ s₂.sup :=
sup_le.2 fun b hb => le_sup (h hb)
#align multiset.sup_mono Multiset.sup_mono
--/
variable [DecidableEq α]
-#print Multiset.sup_dedup /-
+/- warning: multiset.sup_dedup -> Multiset.sup_dedup is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.sup.{u1} α _inst_1 _inst_2 s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.sup.{u1} α _inst_1 _inst_2 s)
+Case conversion may be inaccurate. Consider using '#align multiset.sup_dedup Multiset.sup_dedupₓ'. -/
@[simp]
theorem sup_dedup (s : Multiset α) : (dedup s).sup = s.sup :=
fold_dedup_idem _ _ _
#align multiset.sup_dedup Multiset.sup_dedup
--/
/- warning: multiset.sup_ndunion -> Multiset.sup_ndunion is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.sup_ndunion Multiset.sup_ndunionₓ'. -/
@@ -130,7 +154,7 @@ theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.s
/- warning: multiset.sup_union -> Multiset.sup_union is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.sup_union Multiset.sup_unionₓ'. -/
@@ -141,7 +165,7 @@ theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔
/- warning: multiset.sup_ndinsert -> Multiset.sup_ndinsert is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
Case conversion may be inaccurate. Consider using '#align multiset.sup_ndinsert Multiset.sup_ndinsertₓ'. -/
@@ -175,16 +199,20 @@ section Inf
-- can be defined with just `[has_top α]` where some lemmas hold without requiring `[order_top α]`
variable [SemilatticeInf α] [OrderTop α]
-#print Multiset.inf /-
+/- warning: multiset.inf -> Multiset.inf is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], (Multiset.{u1} α) -> α
+Case conversion may be inaccurate. Consider using '#align multiset.inf Multiset.infₓ'. -/
/-- Infimum of a multiset: `inf {a, b, c} = a ⊓ b ⊓ c` -/
def inf (s : Multiset α) : α :=
s.fold (· ⊓ ·) ⊤
#align multiset.inf Multiset.inf
--/
/- warning: multiset.inf_coe -> Multiset.inf_coe is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1)) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1)) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.698 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.700 : α) => Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.698 x._@.Mathlib.Data.Multiset.Lattice._hyg.700) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
Case conversion may be inaccurate. Consider using '#align multiset.inf_coe Multiset.inf_coeₓ'. -/
@@ -195,7 +223,7 @@ theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤
/- warning: multiset.inf_zero -> Multiset.inf_zero is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (OfNat.mk.{u1} (Multiset.{u1} α) 0 (Zero.zero.{u1} (Multiset.{u1} α) (Multiset.hasZero.{u1} α))))) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))], Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (OfNat.ofNat.{u1} (Multiset.{u1} α) 0 (Zero.toOfNat0.{u1} (Multiset.{u1} α) (Multiset.instZeroMultiset.{u1} α)))) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2))
Case conversion may be inaccurate. Consider using '#align multiset.inf_zero Multiset.inf_zeroₓ'. -/
@@ -206,7 +234,7 @@ theorem inf_zero : (0 : Multiset α).inf = ⊤ :=
/- warning: multiset.inf_cons -> Multiset.inf_cons is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
Case conversion may be inaccurate. Consider using '#align multiset.inf_cons Multiset.inf_consₓ'. -/
@@ -215,16 +243,20 @@ theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
fold_cons_left _ _ _ _
#align multiset.inf_cons Multiset.inf_cons
-#print Multiset.inf_singleton /-
+/- warning: multiset.inf_singleton -> Multiset.inf_singleton is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.hasSingleton.{u1} α) a)) a
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {a : α}, Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) a
+Case conversion may be inaccurate. Consider using '#align multiset.inf_singleton Multiset.inf_singletonₓ'. -/
@[simp]
theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
inf_top_eq
#align multiset.inf_singleton Multiset.inf_singleton
--/
/- warning: multiset.inf_add -> Multiset.inf_add is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.inf_add Multiset.inf_addₓ'. -/
@@ -233,37 +265,53 @@ theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
-#print Multiset.le_inf /-
+/- warning: multiset.le_inf -> Multiset.le_inf is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a (Multiset.inf.{u1} α _inst_1 _inst_2 s)) (forall (b : α), (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a b))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, Iff (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a (Multiset.inf.{u1} α _inst_1 _inst_2 s)) (forall (b : α), (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) b s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) a b))
+Case conversion may be inaccurate. Consider using '#align multiset.le_inf Multiset.le_infₓ'. -/
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
#align multiset.le_inf Multiset.le_inf
--/
-#print Multiset.inf_le /-
+/- warning: multiset.inf_le -> Multiset.inf_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.Mem.{u1, u1} α (Multiset.{u1} α) (Multiset.hasMem.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s) a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s : Multiset.{u1} α} {a : α}, (Membership.mem.{u1, u1} α (Multiset.{u1} α) (Multiset.instMembershipMultiset.{u1} α) a s) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s) a)
+Case conversion may be inaccurate. Consider using '#align multiset.inf_le Multiset.inf_leₓ'. -/
theorem inf_le {s : Multiset α} {a : α} (h : a ∈ s) : s.inf ≤ a :=
le_inf.1 le_rfl _ h
#align multiset.inf_le Multiset.inf_le
--/
-#print Multiset.inf_mono /-
+/- warning: multiset.inf_mono -> Multiset.inf_mono is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.hasSubset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] {s₁ : Multiset.{u1} α} {s₂ : Multiset.{u1} α}, (HasSubset.Subset.{u1} (Multiset.{u1} α) (Multiset.instHasSubsetMultiset.{u1} α) s₁ s₂) -> (LE.le.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_mono Multiset.inf_monoₓ'. -/
theorem inf_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₂.inf ≤ s₁.inf :=
le_inf.2 fun b hb => inf_le (h hb)
#align multiset.inf_mono Multiset.inf_mono
--/
variable [DecidableEq α]
-#print Multiset.inf_dedup /-
+/- warning: multiset.inf_dedup -> Multiset.inf_dedup is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.inf.{u1} α _inst_1 _inst_2 s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.dedup.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s)) (Multiset.inf.{u1} α _inst_1 _inst_2 s)
+Case conversion may be inaccurate. Consider using '#align multiset.inf_dedup Multiset.inf_dedupₓ'. -/
@[simp]
theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf :=
fold_dedup_idem _ _ _
#align multiset.inf_dedup Multiset.inf_dedup
--/
/- warning: multiset.inf_ndunion -> Multiset.inf_ndunion is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.inf_ndunion Multiset.inf_ndunionₓ'. -/
@@ -274,7 +322,7 @@ theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.i
/- warning: multiset.inf_union -> Multiset.inf_union is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
Case conversion may be inaccurate. Consider using '#align multiset.inf_union Multiset.inf_unionₓ'. -/
@@ -285,7 +333,7 @@ theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓
/- warning: multiset.inf_ndinsert -> Multiset.inf_ndinsert is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
Case conversion may be inaccurate. Consider using '#align multiset.inf_ndinsert Multiset.inf_ndinsertₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -40,9 +40,9 @@ def sup (s : Multiset α) : α :=
/- warning: multiset.sup_coe -> Multiset.sup_coe is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (HasSup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1)) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1)) (Bot.bot.{u1} α (OrderBot.toHasBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.73 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.75 : α) => HasSup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.73 x._@.Mathlib.Data.Multiset.Lattice._hyg.75) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.73 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.75 : α) => Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.73 x._@.Mathlib.Data.Multiset.Lattice._hyg.75) (Bot.bot.{u1} α (OrderBot.toBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
Case conversion may be inaccurate. Consider using '#align multiset.sup_coe Multiset.sup_coeₓ'. -/
@[simp]
theorem sup_coe (l : List α) : sup (l : Multiset α) = l.foldr (· ⊔ ·) ⊥ :=
@@ -60,12 +60,16 @@ theorem sup_zero : (0 : Multiset α).sup = ⊥ :=
fold_zero _ _
#align multiset.sup_zero Multiset.sup_zero
-#print Multiset.sup_cons /-
+/- warning: multiset.sup_cons -> Multiset.sup_cons is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_cons Multiset.sup_consₓ'. -/
@[simp]
theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
fold_cons_left _ _ _ _
#align multiset.sup_cons Multiset.sup_cons
--/
#print Multiset.sup_singleton /-
@[simp]
@@ -74,12 +78,16 @@ theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
#align multiset.sup_singleton Multiset.sup_singleton
-/
-#print Multiset.sup_add /-
+/- warning: multiset.sup_add -> Multiset.sup_add is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_add Multiset.sup_addₓ'. -/
@[simp]
theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup :=
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
--/
#print Multiset.sup_le /-
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
@@ -109,26 +117,38 @@ theorem sup_dedup (s : Multiset α) : (dedup s).sup = s.sup :=
#align multiset.sup_dedup Multiset.sup_dedup
-/
-#print Multiset.sup_ndunion /-
+/- warning: multiset.sup_ndunion -> Multiset.sup_ndunion is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_ndunion Multiset.sup_ndunionₓ'. -/
@[simp]
theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_ndunion Multiset.sup_ndunion
--/
-#print Multiset.sup_union /-
+/- warning: multiset.sup_union -> Multiset.sup_union is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) (Multiset.sup.{u1} α _inst_1 _inst_2 s₁) (Multiset.sup.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_union Multiset.sup_unionₓ'. -/
@[simp]
theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add] <;> simp
#align multiset.sup_union Multiset.sup_union
--/
-#print Multiset.sup_ndinsert /-
+/- warning: multiset.sup_ndinsert -> Multiset.sup_ndinsert is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toHasSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeSup.{u1} α] [_inst_2 : OrderBot.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeSup.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.sup.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Sup.sup.{u1} α (SemilatticeSup.toSup.{u1} α _inst_1) a (Multiset.sup.{u1} α _inst_1 _inst_2 s))
+Case conversion may be inaccurate. Consider using '#align multiset.sup_ndinsert Multiset.sup_ndinsertₓ'. -/
@[simp]
theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_cons] <;> simp
#align multiset.sup_ndinsert Multiset.sup_ndinsert
--/
/- warning: multiset.nodup_sup_iff -> Multiset.nodup_sup_iff is a dubious translation:
lean 3 declaration is
@@ -164,9 +184,9 @@ def inf (s : Multiset α) : α :=
/- warning: multiset.inf_coe -> Multiset.inf_coe is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (HasInf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1)) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (List.{u1} α) (Multiset.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (coeBase.{succ u1, succ u1} (List.{u1} α) (Multiset.{u1} α) (Multiset.hasCoe.{u1} α)))) l)) (List.foldr.{u1, u1} α α (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1)) (Top.top.{u1} α (OrderTop.toHasTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.698 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.700 : α) => HasInf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.698 x._@.Mathlib.Data.Multiset.Lattice._hyg.700) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (l : List.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ofList.{u1} α l)) (List.foldr.{u1, u1} α α (fun (x._@.Mathlib.Data.Multiset.Lattice._hyg.698 : α) (x._@.Mathlib.Data.Multiset.Lattice._hyg.700 : α) => Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) x._@.Mathlib.Data.Multiset.Lattice._hyg.698 x._@.Mathlib.Data.Multiset.Lattice._hyg.700) (Top.top.{u1} α (OrderTop.toTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1))) _inst_2)) l)
Case conversion may be inaccurate. Consider using '#align multiset.inf_coe Multiset.inf_coeₓ'. -/
@[simp]
theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤ :=
@@ -184,12 +204,16 @@ theorem inf_zero : (0 : Multiset α).inf = ⊤ :=
fold_zero _ _
#align multiset.inf_zero Multiset.inf_zero
-#print Multiset.inf_cons /-
+/- warning: multiset.inf_cons -> Multiset.inf_cons is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.cons.{u1} α a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_cons Multiset.inf_consₓ'. -/
@[simp]
theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
fold_cons_left _ _ _ _
#align multiset.inf_cons Multiset.inf_cons
--/
#print Multiset.inf_singleton /-
@[simp]
@@ -198,12 +222,16 @@ theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
#align multiset.inf_singleton Multiset.inf_singleton
-/
-#print Multiset.inf_add /-
+/- warning: multiset.inf_add -> Multiset.inf_add is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.hasAdd.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (HAdd.hAdd.{u1, u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) (Multiset.{u1} α) (instHAdd.{u1} (Multiset.{u1} α) (Multiset.instAddMultiset.{u1} α)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_add Multiset.inf_addₓ'. -/
@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf :=
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
--/
#print Multiset.le_inf /-
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
@@ -233,26 +261,38 @@ theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf :=
#align multiset.inf_dedup Multiset.inf_dedup
-/
-#print Multiset.inf_ndunion /-
+/- warning: multiset.inf_ndunion -> Multiset.inf_ndunion is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndunion.{u1} α (fun (a : α) (b : α) => _inst_3 a b) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_ndunion Multiset.inf_ndunionₓ'. -/
@[simp]
theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_ndunion Multiset.inf_ndunion
--/
-#print Multiset.inf_union /-
+/- warning: multiset.inf_union -> Multiset.inf_union is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (s₁ : Multiset.{u1} α) (s₂ : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Union.union.{u1} (Multiset.{u1} α) (Multiset.instUnionMultiset.{u1} α (fun (a : α) (b : α) => _inst_3 a b)) s₁ s₂)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) (Multiset.inf.{u1} α _inst_1 _inst_2 s₁) (Multiset.inf.{u1} α _inst_1 _inst_2 s₂))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_union Multiset.inf_unionₓ'. -/
@[simp]
theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add] <;> simp
#align multiset.inf_union Multiset.inf_union
--/
-#print Multiset.inf_ndinsert /-
+/- warning: multiset.inf_ndinsert -> Multiset.inf_ndinsert is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toHasInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : SemilatticeInf.{u1} α] [_inst_2 : OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α _inst_1)))] [_inst_3 : DecidableEq.{succ u1} α] (a : α) (s : Multiset.{u1} α), Eq.{succ u1} α (Multiset.inf.{u1} α _inst_1 _inst_2 (Multiset.ndinsert.{u1} α (fun (a : α) (b : α) => _inst_3 a b) a s)) (Inf.inf.{u1} α (SemilatticeInf.toInf.{u1} α _inst_1) a (Multiset.inf.{u1} α _inst_1 _inst_2 s))
+Case conversion may be inaccurate. Consider using '#align multiset.inf_ndinsert Multiset.inf_ndinsertₓ'. -/
@[simp]
theorem inf_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).inf = a ⊓ s.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_cons] <;> simp
#align multiset.inf_ndinsert Multiset.inf_ndinsert
--/
end Inf
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Those lemmas have historically been very annoying to use in rw
since all their arguments were implicit. One too many people complained about it on Zulip, so I'm changing them.
Downstream code broken by this change can fix it by adding appropriately many _
s.
Also marks CauSeq.ext
@[ext]
.
Order.BoundedOrder
top_sup_eq
sup_top_eq
bot_sup_eq
sup_bot_eq
top_inf_eq
inf_top_eq
bot_inf_eq
inf_bot_eq
Order.Lattice
sup_idem
sup_comm
sup_assoc
sup_left_idem
sup_right_idem
inf_idem
inf_comm
inf_assoc
inf_left_idem
inf_right_idem
sup_inf_left
sup_inf_right
inf_sup_left
inf_sup_right
Order.MinMax
max_min_distrib_left
max_min_distrib_right
min_max_distrib_left
min_max_distrib_right
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -46,8 +46,7 @@ theorem sup_cons (a : α) (s : Multiset α) : (a ::ₘ s).sup = a ⊔ s.sup :=
#align multiset.sup_cons Multiset.sup_cons
@[simp]
-theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a :=
- sup_bot_eq
+theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a := sup_bot_eq _
#align multiset.sup_singleton Multiset.sup_singleton
@[simp]
@@ -131,8 +130,7 @@ theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf :=
#align multiset.inf_cons Multiset.inf_cons
@[simp]
-theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a :=
- inf_top_eq
+theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a := inf_top_eq _
#align multiset.inf_singleton Multiset.inf_singleton
@[simp]
attach
and filter
lemmas (#1470)
Match https://github.com/leanprover-community/mathlib/pull/18087
@@ -6,7 +6,7 @@ Authors: Mario Carneiro
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
-#align_import data.multiset.lattice from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+#align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
/-!
# Lattice operations on multisets
@@ -55,6 +55,7 @@ theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s
Eq.trans (by simp [sup]) (fold_add _ _ _ _ _)
#align multiset.sup_add Multiset.sup_add
+@[simp]
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
@@ -139,6 +140,7 @@ theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s
Eq.trans (by simp [inf]) (fold_add _ _ _ _ _)
#align multiset.inf_add Multiset.inf_add
+@[simp]
theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b :=
Multiset.induction_on s (by simp)
(by simp (config := { contextual := true }) [or_imp, forall_and])
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -15,7 +15,7 @@ import Mathlib.Data.Multiset.Fold
namespace Multiset
-variable {α : Type _}
+variable {α : Type*}
/-! ### sup -/
@@ -90,7 +90,7 @@ theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.s
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_cons]; simp
#align multiset.sup_ndinsert Multiset.sup_ndinsert
-theorem nodup_sup_iff {α : Type _} [DecidableEq α] {m : Multiset (Multiset α)} :
+theorem nodup_sup_iff {α : Type*} [DecidableEq α] {m : Multiset (Multiset α)} :
m.sup.Nodup ↔ ∀ a : Multiset α, a ∈ m → a.Nodup := by
-- Porting note: this was originally `apply m.induction_on`, which failed due to
-- `failed to elaborate eliminator, expected type is not available`
@@ -2,15 +2,12 @@
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module data.multiset.lattice
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
+#align_import data.multiset.lattice from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+
/-!
# Lattice operations on multisets
-/
The unported dependencies are