data.multiset.interval
⟷
Mathlib.Data.Multiset.Interval
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -29,42 +29,52 @@ multisets are typically used computationally.
open finset dfinsupp function
open_locale big_operators pointwise
-variables {α : Type*} {β : α → Type*}
+variables {α : Type*}
namespace multiset
-
-variables [decidable_eq α] (f g : multiset α)
+variables [decidable_eq α] (s t : multiset α)
instance : locally_finite_order (multiset α) :=
locally_finite_order.of_Icc (multiset α)
- (λ f g, (finset.Icc f.to_dfinsupp g.to_dfinsupp).map
+ (λ s t, (finset.Icc s.to_dfinsupp t.to_dfinsupp).map
(multiset.equiv_dfinsupp.to_equiv.symm.to_embedding))
- (λ f g x, by simp)
+ (λ s t x, by simp)
lemma Icc_eq :
- finset.Icc f g =
- (finset.Icc f.to_dfinsupp g.to_dfinsupp).map
+ finset.Icc s t =
+ (finset.Icc s.to_dfinsupp t.to_dfinsupp).map
(multiset.equiv_dfinsupp.to_equiv.symm.to_embedding) := rfl
+lemma uIcc_eq :
+ uIcc s t =
+ (uIcc s.to_dfinsupp t.to_dfinsupp).map
+ (multiset.equiv_dfinsupp.to_equiv.symm.to_embedding) :=
+(Icc_eq _ _).trans $ by simp [uIcc]
+
lemma card_Icc :
- (finset.Icc f g).card = ∏ i in f.to_finset ∪ g.to_finset, (g.count i + 1 - f.count i) :=
+ (finset.Icc s t).card = ∏ i in s.to_finset ∪ t.to_finset, (t.count i + 1 - s.count i) :=
by simp_rw [Icc_eq, finset.card_map, dfinsupp.card_Icc, nat.card_Icc, multiset.to_dfinsupp_apply,
to_dfinsupp_support]
lemma card_Ico :
- (finset.Ico f g).card = ∏ i in f.to_finset ∪ g.to_finset, (g.count i + 1 - f.count i) - 1 :=
+ (finset.Ico s t).card = ∏ i in s.to_finset ∪ t.to_finset, (t.count i + 1 - s.count i) - 1 :=
by rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
lemma card_Ioc :
- (finset.Ioc f g).card = ∏ i in f.to_finset ∪ g.to_finset, (g.count i + 1 - f.count i) - 1 :=
+ (finset.Ioc s t).card = ∏ i in s.to_finset ∪ t.to_finset, (t.count i + 1 - s.count i) - 1 :=
by rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
lemma card_Ioo :
- (finset.Ioo f g).card = ∏ i in f.to_finset ∪ g.to_finset, (g.count i + 1 - f.count i) - 2 :=
+ (finset.Ioo s t).card = ∏ i in s.to_finset ∪ t.to_finset, (t.count i + 1 - s.count i) - 2 :=
by rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
+lemma card_uIcc :
+ (uIcc s t).card = ∏ i in s.to_finset ∪ t.to_finset, ((t.count i - s.count i : ℤ).nat_abs + 1) :=
+by simp_rw [uIcc_eq, finset.card_map, dfinsupp.card_uIcc, nat.card_uIcc, multiset.to_dfinsupp_apply,
+ to_dfinsupp_support]
+
lemma card_Iic :
- (finset.Iic f).card = ∏ i in f.to_finset, (f.count i + 1) :=
+ (finset.Iic s).card = ∏ i in s.to_finset, (s.count i + 1) :=
by simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, to_finset_zero, empty_union, count_zero, tsub_zero]
end multiset
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -3,7 +3,7 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
import Data.DFinsupp.Interval
import Data.DFinsupp.Multiset
import Data.Nat.Interval
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,9 +3,9 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Data.Finset.LocallyFinite
-import Data.Dfinsupp.Interval
-import Data.Dfinsupp.Multiset
+import Data.Finset.LocallyFinite.Basic
+import Data.DFinsupp.Interval
+import Data.DFinsupp.Multiset
import Data.Nat.Interval
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Mathbin.Data.Finset.LocallyFinite
-import Mathbin.Data.Dfinsupp.Interval
-import Mathbin.Data.Dfinsupp.Multiset
-import Mathbin.Data.Nat.Interval
+import Data.Finset.LocallyFinite
+import Data.Dfinsupp.Interval
+import Data.Dfinsupp.Multiset
+import Data.Nat.Interval
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module data.multiset.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.LocallyFinite
import Mathbin.Data.Dfinsupp.Interval
import Mathbin.Data.Dfinsupp.Multiset
import Mathbin.Data.Nat.Interval
+#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals of multisets
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -56,11 +56,13 @@ theorem Icc_eq :
#align multiset.Icc_eq Multiset.Icc_eq
-/
+#print Multiset.uIcc_eq /-
theorem uIcc_eq :
uIcc s t =
(uIcc s.toDFinsupp t.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
(Icc_eq _ _).trans <| by simp [uIcc]
#align multiset.uIcc_eq Multiset.uIcc_eq
+-/
#print Multiset.card_Icc /-
theorem card_Icc :
@@ -91,11 +93,13 @@ theorem card_Ioo :
#align multiset.card_Ioo Multiset.card_Ioo
-/
+#print Multiset.card_uIcc /-
theorem card_uIcc :
(uIcc s t).card = ∏ i in s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1) := by
simp_rw [uIcc_eq, Finset.card_map, DFinsupp.card_uIcc, Nat.card_uIcc, Multiset.toDFinsupp_apply,
toDFinsupp_support]
#align multiset.card_uIcc Multiset.card_uIcc
+-/
#print Multiset.card_Iic /-
theorem card_Iic : (Finset.Iic s).card = ∏ i in s.toFinset, (s.count i + 1) := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module data.multiset.interval
-! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -36,29 +36,35 @@ open Finset DFinsupp Function
open scoped BigOperators Pointwise
-variable {α : Type _} {β : α → Type _}
+variable {α : Type _}
namespace Multiset
-variable [DecidableEq α] (f g : Multiset α)
+variable [DecidableEq α] (s t : Multiset α)
instance : LocallyFiniteOrder (Multiset α) :=
LocallyFiniteOrder.ofIcc (Multiset α)
- (fun f g =>
- (Finset.Icc f.toDFinsupp g.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
- fun f g x => by simp
+ (fun s t =>
+ (Finset.Icc s.toDFinsupp t.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
+ fun s t x => by simp
#print Multiset.Icc_eq /-
theorem Icc_eq :
- Finset.Icc f g =
- (Finset.Icc f.toDFinsupp g.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
+ Finset.Icc s t =
+ (Finset.Icc s.toDFinsupp t.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
-/
+theorem uIcc_eq :
+ uIcc s t =
+ (uIcc s.toDFinsupp t.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
+ (Icc_eq _ _).trans <| by simp [uIcc]
+#align multiset.uIcc_eq Multiset.uIcc_eq
+
#print Multiset.card_Icc /-
theorem card_Icc :
- (Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
+ (Finset.Icc s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) := by
simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
toDFinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
@@ -66,27 +72,33 @@ theorem card_Icc :
#print Multiset.card_Ico /-
theorem card_Ico :
- (Finset.Ico f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ico s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
-/
#print Multiset.card_Ioc /-
theorem card_Ioc :
- (Finset.Ioc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ioc s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
-/
#print Multiset.card_Ioo /-
theorem card_Ioo :
- (Finset.Ioo f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 2 := by
+ (Finset.Ioo s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
-/
+theorem card_uIcc :
+ (uIcc s t).card = ∏ i in s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1) := by
+ simp_rw [uIcc_eq, Finset.card_map, DFinsupp.card_uIcc, Nat.card_uIcc, Multiset.toDFinsupp_apply,
+ toDFinsupp_support]
+#align multiset.card_uIcc Multiset.card_uIcc
+
#print Multiset.card_Iic /-
-theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, (f.count i + 1) := by
+theorem card_Iic : (Finset.Iic s).card = ∏ i in s.toFinset, (s.count i + 1) := by
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, to_finset_zero, empty_union, count_zero, tsub_zero]
#align multiset.card_Iic Multiset.card_Iic
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/4e24c4bfcff371c71f7ba22050308aa17815626c
@@ -32,7 +32,7 @@ multisets are typically used computationally.
-/
-open Finset Dfinsupp Function
+open Finset DFinsupp Function
open scoped BigOperators Pointwise
@@ -45,13 +45,13 @@ variable [DecidableEq α] (f g : Multiset α)
instance : LocallyFiniteOrder (Multiset α) :=
LocallyFiniteOrder.ofIcc (Multiset α)
(fun f g =>
- (Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding)
+ (Finset.Icc f.toDFinsupp g.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
fun f g x => by simp
#print Multiset.Icc_eq /-
theorem Icc_eq :
Finset.Icc f g =
- (Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding :=
+ (Finset.Icc f.toDFinsupp g.toDFinsupp).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
-/
@@ -59,8 +59,8 @@ theorem Icc_eq :
#print Multiset.card_Icc /-
theorem card_Icc :
(Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
- simp_rw [Icc_eq, Finset.card_map, Dfinsupp.card_Icc, Nat.card_Icc, Multiset.toDfinsupp_apply,
- toDfinsupp_support]
+ simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
+ toDFinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -48,36 +48,48 @@ instance : LocallyFiniteOrder (Multiset α) :=
(Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding)
fun f g x => by simp
+#print Multiset.Icc_eq /-
theorem Icc_eq :
Finset.Icc f g =
(Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
+-/
+#print Multiset.card_Icc /-
theorem card_Icc :
(Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
simp_rw [Icc_eq, Finset.card_map, Dfinsupp.card_Icc, Nat.card_Icc, Multiset.toDfinsupp_apply,
toDfinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
+-/
+#print Multiset.card_Ico /-
theorem card_Ico :
(Finset.Ico f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
+-/
+#print Multiset.card_Ioc /-
theorem card_Ioc :
(Finset.Ioc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
+-/
+#print Multiset.card_Ioo /-
theorem card_Ioo :
(Finset.Ioo f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
+-/
+#print Multiset.card_Iic /-
theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, (f.count i + 1) := by
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, to_finset_zero, empty_union, count_zero, tsub_zero]
#align multiset.card_Iic Multiset.card_Iic
+-/
end Multiset
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -55,27 +55,27 @@ theorem Icc_eq :
#align multiset.Icc_eq Multiset.Icc_eq
theorem card_Icc :
- (Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i := by
+ (Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
simp_rw [Icc_eq, Finset.card_map, Dfinsupp.card_Icc, Nat.card_Icc, Multiset.toDfinsupp_apply,
toDfinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
theorem card_Ico :
- (Finset.Ico f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ico f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
theorem card_Ioc :
- (Finset.Ioc f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ioc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
theorem card_Ioo :
- (Finset.Ioo f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 2 := by
+ (Finset.Ioo f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
-theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, f.count i + 1 := by
+theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, (f.count i + 1) := by
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, to_finset_zero, empty_union, count_zero, tsub_zero]
#align multiset.card_Iic Multiset.card_Iic
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -34,7 +34,7 @@ multisets are typically used computationally.
open Finset Dfinsupp Function
-open BigOperators Pointwise
+open scoped BigOperators Pointwise
variable {α : Type _} {β : α → Type _}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -48,66 +48,33 @@ instance : LocallyFiniteOrder (Multiset α) :=
(Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding)
fun f g x => by simp
-/- warning: multiset.Icc_eq -> Multiset.Icc_eq is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align multiset.Icc_eq Multiset.Icc_eqₓ'. -/
theorem Icc_eq :
Finset.Icc f g =
(Finset.Icc f.toDfinsupp g.toDfinsupp).map Multiset.equivDfinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
-/- warning: multiset.card_Icc -> Multiset.card_Icc is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f)))
-Case conversion may be inaccurate. Consider using '#align multiset.card_Icc Multiset.card_Iccₓ'. -/
theorem card_Icc :
(Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i := by
simp_rw [Icc_eq, Finset.card_map, Dfinsupp.card_Icc, Nat.card_Icc, Multiset.toDfinsupp_apply,
toDfinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
-/- warning: multiset.card_Ico -> Multiset.card_Ico is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ico.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ico.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align multiset.card_Ico Multiset.card_Icoₓ'. -/
theorem card_Ico :
(Finset.Ico f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
-/- warning: multiset.card_Ioc -> Multiset.card_Ioc is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ioc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ioc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align multiset.card_Ioc Multiset.card_Iocₓ'. -/
theorem card_Ioc :
(Finset.Ioc f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
-/- warning: multiset.card_Ioo -> Multiset.card_Ioo is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ioo.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Ioo.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) g)) (fun (i : α) => HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i g) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
-Case conversion may be inaccurate. Consider using '#align multiset.card_Ioo Multiset.card_Iooₓ'. -/
theorem card_Ioo :
(Finset.Ioo f g).card = (∏ i in f.toFinset ∪ g.toFinset, g.count i + 1 - f.count i) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
-/- warning: multiset.card_Iic -> Multiset.card_Iic is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Iic.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.orderBot.{u1} α) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) f)) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (fun (i : α) => HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α), Eq.{1} Nat (Finset.card.{u1} (Multiset.{u1} α) (Finset.Iic.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instOrderBotMultisetToLEToPreorderInstPartialOrderMultiset.{u1} α) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) f)) (Finset.prod.{0, u1} Nat α Nat.commMonoid (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) f) (fun (i : α) => HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) i f) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))
-Case conversion may be inaccurate. Consider using '#align multiset.card_Iic Multiset.card_Iicₓ'. -/
theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, f.count i + 1 := by
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, to_finset_zero, empty_union, count_zero, tsub_zero]
#align multiset.card_Iic Multiset.card_Iic
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -49,10 +49,7 @@ instance : LocallyFiniteOrder (Multiset α) :=
fun f g x => by simp
/- warning: multiset.Icc_eq -> Multiset.Icc_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} (Multiset.{u1} α)) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g) (Finset.map.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Equiv.toEmbedding.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Equiv.symm.{succ u1, succ u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddEquiv.toEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.hasAdd.{u1} α) (AddZeroClass.toHasAdd.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.equivDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b))))) (Finset.Icc.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.preorder.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero) (fun (i : α) => PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)))) (Dfinsupp.locallyFiniteOrder.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) (a : Nat) (b : Nat) => Nat.decidableEq a b) (fun (i : α) => OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)) (fun (i : α) => Nat.hasZero) (fun (i : α) => Nat.locallyFiniteOrder)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) g)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} (Multiset.{u1} α)) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g) (Finset.map.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.toEmbedding.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.symm.{succ u1, succ u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddEquiv.toEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.instAddMultiset.{u1} α) (Dfinsupp.instAddDfinsuppToZero.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.equivDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b))))) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) f) (Dfinsupp.instPreorderDfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) (a : Nat) (b : Nat) => instDecidableEqNat a b) (fun (i : α) => StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) g)))
+<too large>
Case conversion may be inaccurate. Consider using '#align multiset.Icc_eq Multiset.Icc_eqₓ'. -/
theorem Icc_eq :
Finset.Icc f g =
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -52,7 +52,7 @@ instance : LocallyFiniteOrder (Multiset α) :=
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} (Multiset.{u1} α)) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α)) (Multiset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g) (Finset.map.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Equiv.toEmbedding.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Equiv.symm.{succ u1, succ u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddEquiv.toEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.hasAdd.{u1} α) (AddZeroClass.toHasAdd.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.equivDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b))))) (Finset.Icc.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.preorder.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero) (fun (i : α) => PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)))) (Dfinsupp.locallyFiniteOrder.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) (a : Nat) (b : Nat) => Nat.decidableEq a b) (fun (i : α) => OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring)) (fun (i : α) => Nat.hasZero) (fun (i : α) => Nat.locallyFiniteOrder)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) g)))
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} (Multiset.{u1} α)) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g) (Finset.map.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.toEmbedding.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.symm.{succ u1, succ u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddEquiv.toEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.instAddMultiset.{u1} α) (Dfinsupp.instAddDfinsuppToZero.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.equivDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b))))) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) f) (Dfinsupp.instPreorderDfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) (a : Nat) (b : Nat) => instDecidableEqNat a b) (fun (i : α) => StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) g)))
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Multiset.{u1} α) (g : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} (Multiset.{u1} α)) (Finset.Icc.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α)) (Multiset.instLocallyFiniteOrderMultisetToPreorderInstPartialOrderMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f g) (Finset.map.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.toEmbedding.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Equiv.symm.{succ u1, succ u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddEquiv.toEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.instAddMultiset.{u1} α) (Dfinsupp.instAddDfinsuppToZero.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.equivDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b))))) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) f) (Dfinsupp.instPreorderDfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) (a : Nat) (b : Nat) => instDecidableEqNat a b) (fun (i : α) => StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) g)))
Case conversion may be inaccurate. Consider using '#align multiset.Icc_eq Multiset.Icc_eqₓ'. -/
theorem Icc_eq :
Finset.Icc f g =
mathlib commit https://github.com/leanprover-community/mathlib/commit/3ade05ac9447ae31a22d2ea5423435e054131240
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module data.multiset.interval
-! leanprover-community/mathlib commit f694c7dead66f5d4c80f446c796a5aad14707f0e
+! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.Data.Nat.Interval
/-!
# Finite intervals of multisets
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file provides the `locally_finite_order` instance for `multiset α` and calculates the
cardinality of its finite intervals.
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -3,10 +3,10 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Mathlib.Data.Finset.LocallyFinite.Basic
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Data.Nat.Interval
+import Mathlib.Order.Interval.Finset.Basic
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
@@ -62,17 +62,17 @@ theorem card_Icc :
theorem card_Ico :
(Finset.Ico s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
- rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
+ rw [Finset.card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
theorem card_Ioc :
(Finset.Ioc s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
- rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
+ rw [Finset.card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
theorem card_Ioo :
(Finset.Ioo s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2 := by
- rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
+ rw [Finset.card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
theorem card_uIcc :
@@ -36,7 +36,7 @@ namespace Multiset
variable [DecidableEq α] (s t : Multiset α)
-instance : LocallyFiniteOrder (Multiset α) :=
+instance instLocallyFiniteOrder : LocallyFiniteOrder (Multiset α) :=
LocallyFiniteOrder.ofIcc (Multiset α)
(fun s t => (Finset.Icc (toDFinsupp s) (toDFinsupp t)).map
Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n
.
@@ -3,7 +3,7 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Data.Nat.Interval
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -30,7 +30,7 @@ open Finset DFinsupp Function
open BigOperators Pointwise
-variable {α : Type _}
+variable {α : Type*}
namespace Multiset
@@ -2,17 +2,14 @@
Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module data.multiset.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.LocallyFinite
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Data.Nat.Interval
+#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals of multisets
finset.uIcc
on concrete structures (#5946)
Match https://github.com/leanprover-community/mathlib/pull/18838
Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module data.multiset.interval
-! leanprover-community/mathlib commit e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -33,48 +33,58 @@ open Finset DFinsupp Function
open BigOperators Pointwise
-variable {α : Type _} {β : α → Type _}
+variable {α : Type _}
namespace Multiset
-variable [DecidableEq α] (f g : Multiset α)
+variable [DecidableEq α] (s t : Multiset α)
instance : LocallyFiniteOrder (Multiset α) :=
LocallyFiniteOrder.ofIcc (Multiset α)
- (fun f g =>
- (Finset.Icc (Multiset.toDFinsupp f) (Multiset.toDFinsupp g)).map
+ (fun s t => (Finset.Icc (toDFinsupp s) (toDFinsupp t)).map
Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
- fun f g x => by simp
+ fun s t x => by simp
theorem Icc_eq :
- Finset.Icc f g =
- (Finset.Icc (Multiset.toDFinsupp f) (Multiset.toDFinsupp g)).map
+ Finset.Icc s t = (Finset.Icc (toDFinsupp s) (toDFinsupp t)).map
Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
+theorem uIcc_eq :
+ uIcc s t =
+ (uIcc (toDFinsupp s) (toDFinsupp t)).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
+ (Icc_eq _ _).trans <| by simp [uIcc]
+#align multiset.uIcc_eq Multiset.uIcc_eq
+
theorem card_Icc :
- (Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
+ (Finset.Icc s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) := by
simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
toDFinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
theorem card_Ico :
- (Finset.Ico f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ico s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ico Multiset.card_Ico
theorem card_Ioc :
- (Finset.Ioc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 1 := by
+ (Finset.Ioc s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
#align multiset.card_Ioc Multiset.card_Ioc
theorem card_Ioo :
- (Finset.Ioo f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) - 2 := by
+ (Finset.Ioo s t).card = ∏ i in s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align multiset.card_Ioo Multiset.card_Ioo
-theorem card_Iic : (Finset.Iic f).card = ∏ i in f.toFinset, (f.count i + 1) := by
+theorem card_uIcc :
+ (uIcc s t).card = ∏ i in s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1) := by
+ simp_rw [uIcc_eq, Finset.card_map, DFinsupp.card_uIcc, Nat.card_uIcc, Multiset.toDFinsupp_apply,
+ toDFinsupp_support]
+#align multiset.card_uIcc Multiset.card_uIcc
+
+theorem card_Iic : (Finset.Iic s).card = ∏ i in s.toFinset, (s.count i + 1) := by
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, toFinset_zero, empty_union, count_zero, tsub_zero]
#align multiset.card_Iic Multiset.card_Iic
@@ -9,8 +9,8 @@ Authors: Eric Wieser
! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.LocallyFinite
-import Mathlib.Data.Dfinsupp.Interval
-import Mathlib.Data.Dfinsupp.Multiset
+import Mathlib.Data.DFinsupp.Interval
+import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Data.Nat.Interval
/-!
@@ -21,7 +21,7 @@ cardinality of its finite intervals.
## Implementation notes
-We implement the intervals via the intervals on `Dfinsupp`, rather than via filtering
+We implement the intervals via the intervals on `DFinsupp`, rather than via filtering
`Multiset.Powerset`; this is because `(Multiset.replicate n x).Powerset` has `2^n` entries not `n+1`
entries as it contains duplicates. We do not go via `Finsupp` as this would be noncomputable, and
multisets are typically used computationally.
@@ -29,7 +29,7 @@ multisets are typically used computationally.
-/
-open Finset Dfinsupp Function
+open Finset DFinsupp Function
open BigOperators Pointwise
@@ -42,21 +42,21 @@ variable [DecidableEq α] (f g : Multiset α)
instance : LocallyFiniteOrder (Multiset α) :=
LocallyFiniteOrder.ofIcc (Multiset α)
(fun f g =>
- (Finset.Icc (Multiset.toDfinsupp f) (Multiset.toDfinsupp g)).map
- Multiset.equivDfinsupp.toEquiv.symm.toEmbedding)
+ (Finset.Icc (Multiset.toDFinsupp f) (Multiset.toDFinsupp g)).map
+ Multiset.equivDFinsupp.toEquiv.symm.toEmbedding)
fun f g x => by simp
theorem Icc_eq :
Finset.Icc f g =
- (Finset.Icc (Multiset.toDfinsupp f) (Multiset.toDfinsupp g)).map
- Multiset.equivDfinsupp.toEquiv.symm.toEmbedding :=
+ (Finset.Icc (Multiset.toDFinsupp f) (Multiset.toDFinsupp g)).map
+ Multiset.equivDFinsupp.toEquiv.symm.toEmbedding :=
rfl
#align multiset.Icc_eq Multiset.Icc_eq
theorem card_Icc :
(Finset.Icc f g).card = ∏ i in f.toFinset ∪ g.toFinset, (g.count i + 1 - f.count i) := by
- simp_rw [Icc_eq, Finset.card_map, Dfinsupp.card_Icc, Nat.card_Icc, Multiset.toDfinsupp_apply,
- toDfinsupp_support]
+ simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
+ toDFinsupp_support]
#align multiset.card_Icc Multiset.card_Icc
theorem card_Ico :
The unported dependencies are