data.finsupp.intervalMathlib.Data.Finsupp.Interval

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(data/*/interval): finset.uIcc on concrete structures (#18838)

Calculate the size of finset.uIcc in , , fin, prod, pi, multiset, finset...

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -106,6 +106,15 @@ by rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 
 end partial_order
 
+section lattice
+variables [lattice α] [has_zero α] [locally_finite_order α] (f g : ι →₀ α)
+
+lemma card_uIcc [decidable_eq ι] :
+  (uIcc f g).card = ∏ i in f.support ∪ g.support, (uIcc (f i) (g i)).card :=
+by { rw ←support_inf_union_support_sup, exact card_Icc _ _ }
+
+end lattice
+
 section canonically_ordered
 variables [canonically_ordered_add_monoid α] [locally_finite_order α]
 

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Data.Finset.Finsupp
-import Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
 import Data.Finsupp.Order
 
 #align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Data.Finset.Finsupp
-import Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite.Basic
 import Data.Finsupp.Order
 
 #align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
Diff
@@ -171,7 +171,9 @@ variable [CanonicallyOrderedAddCommMonoid α] [LocallyFiniteOrder α]
 variable (f : ι →₀ α)
 
 #print Finsupp.card_Iic /-
-theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by classical
+theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
+  classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
+    zero_apply, bot_eq_zero]
 #align finsupp.card_Iic Finsupp.card_Iic
 -/
 
Diff
@@ -171,9 +171,7 @@ variable [CanonicallyOrderedAddCommMonoid α] [LocallyFiniteOrder α]
 variable (f : ι →₀ α)
 
 #print Finsupp.card_Iic /-
-theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
-  classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
-    zero_apply, bot_eq_zero]
+theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by classical
 #align finsupp.card_Iic Finsupp.card_Iic
 -/
 
Diff
@@ -166,7 +166,7 @@ end Lattice
 
 section CanonicallyOrdered
 
-variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
+variable [CanonicallyOrderedAddCommMonoid α] [LocallyFiniteOrder α]
 
 variable (f : ι →₀ α)
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathbin.Data.Finset.Finsupp
-import Mathbin.Data.Finset.LocallyFinite
-import Mathbin.Data.Finsupp.Order
+import Data.Finset.Finsupp
+import Data.Finset.LocallyFinite
+import Data.Finsupp.Order
 
 #align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finsupp.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.Finsupp
 import Mathbin.Data.Finset.LocallyFinite
 import Mathbin.Data.Finsupp.Order
 
+#align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
 /-!
 # Finite intervals of finitely supported functions
 
Diff
@@ -118,10 +118,10 @@ instance : LocallyFiniteOrder (ι →₀ α) := by
         simp_rw [mem_range_Icc_apply_iff]
         exact forall_and
 
-#print Finsupp.icc_eq /-
-theorem icc_eq [DecidableEq ι] : Icc f g = (f.support ∪ g.support).Finsupp (f.rangeIcc g) := by
+#print Finsupp.Icc_eq /-
+theorem Icc_eq [DecidableEq ι] : Icc f g = (f.support ∪ g.support).Finsupp (f.rangeIcc g) := by
   convert rfl
-#align finsupp.Icc_eq Finsupp.icc_eq
+#align finsupp.Icc_eq Finsupp.Icc_eq
 -/
 
 #print Finsupp.card_Icc /-
@@ -158,10 +158,12 @@ section Lattice
 
 variable [Lattice α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
 
+#print Finsupp.card_uIcc /-
 theorem card_uIcc [DecidableEq ι] :
     (uIcc f g).card = ∏ i in f.support ∪ g.support, (uIcc (f i) (g i)).card := by
   rw [← support_inf_union_support_sup]; exact card_Icc _ _
 #align finsupp.card_uIcc Finsupp.card_uIcc
+-/
 
 end Lattice
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 
 ! This file was ported from Lean 3 source module data.finsupp.interval
-! leanprover-community/mathlib commit b6da1a0b3e7cd83b1f744c49ce48ef8c6307d2f6
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -154,6 +154,17 @@ theorem card_Ioo [DecidableEq ι] :
 
 end PartialOrder
 
+section Lattice
+
+variable [Lattice α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
+
+theorem card_uIcc [DecidableEq ι] :
+    (uIcc f g).card = ∏ i in f.support ∪ g.support, (uIcc (f i) (g i)).card := by
+  rw [← support_inf_union_support_sup]; exact card_Icc _ _
+#align finsupp.card_uIcc Finsupp.card_uIcc
+
+end Lattice
+
 section CanonicallyOrdered
 
 variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
Diff
@@ -87,10 +87,12 @@ def rangeIcc (f g : ι →₀ α) : ι →₀ Finset α
 #align finsupp.range_Icc Finsupp.rangeIcc
 -/
 
+#print Finsupp.rangeIcc_support /-
 @[simp]
 theorem rangeIcc_support [DecidableEq ι] (f g : ι →₀ α) :
     (rangeIcc f g).support = f.support ∪ g.support := by convert rfl
 #align finsupp.range_Icc_support Finsupp.rangeIcc_support
+-/
 
 #print Finsupp.mem_rangeIcc_apply_iff /-
 theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
@@ -116,29 +118,39 @@ instance : LocallyFiniteOrder (ι →₀ α) := by
         simp_rw [mem_range_Icc_apply_iff]
         exact forall_and
 
+#print Finsupp.icc_eq /-
 theorem icc_eq [DecidableEq ι] : Icc f g = (f.support ∪ g.support).Finsupp (f.rangeIcc g) := by
   convert rfl
 #align finsupp.Icc_eq Finsupp.icc_eq
+-/
 
+#print Finsupp.card_Icc /-
 theorem card_Icc [DecidableEq ι] :
     (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card := by
   simp_rw [Icc_eq, card_finsupp, range_Icc_to_fun]
 #align finsupp.card_Icc Finsupp.card_Icc
+-/
 
+#print Finsupp.card_Ico /-
 theorem card_Ico [DecidableEq ι] :
     (Ico f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ico Finsupp.card_Ico
+-/
 
+#print Finsupp.card_Ioc /-
 theorem card_Ioc [DecidableEq ι] :
     (Ioc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ioc Finsupp.card_Ioc
+-/
 
+#print Finsupp.card_Ioo /-
 theorem card_Ioo [DecidableEq ι] :
     (Ioo f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align finsupp.card_Ioo Finsupp.card_Ioo
+-/
 
 end PartialOrder
 
@@ -148,14 +160,18 @@ variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
 
 variable (f : ι →₀ α)
 
+#print Finsupp.card_Iic /-
 theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
   classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
     zero_apply, bot_eq_zero]
 #align finsupp.card_Iic Finsupp.card_Iic
+-/
 
+#print Finsupp.card_Iio /-
 theorem card_Iio : (Iio f).card = ∏ i in f.support, (Iic (f i)).card - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align finsupp.card_Iio Finsupp.card_Iio
+-/
 
 end CanonicallyOrdered
 
Diff
@@ -126,17 +126,17 @@ theorem card_Icc [DecidableEq ι] :
 #align finsupp.card_Icc Finsupp.card_Icc
 
 theorem card_Ico [DecidableEq ι] :
-    (Ico f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
+    (Ico f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ico Finsupp.card_Ico
 
 theorem card_Ioc [DecidableEq ι] :
-    (Ioc f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
+    (Ioc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ioc Finsupp.card_Ioc
 
 theorem card_Ioo [DecidableEq ι] :
-    (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 2 := by
+    (Ioo f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align finsupp.card_Ioo Finsupp.card_Ioo
 
@@ -153,7 +153,7 @@ theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
     zero_apply, bot_eq_zero]
 #align finsupp.card_Iic Finsupp.card_Iic
 
-theorem card_Iio : (Iio f).card = (∏ i in f.support, (Iic (f i)).card) - 1 := by
+theorem card_Iio : (Iio f).card = ∏ i in f.support, (Iic (f i)).card - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align finsupp.card_Iio Finsupp.card_Iio
 
Diff
@@ -150,7 +150,7 @@ variable (f : ι →₀ α)
 
 theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
   classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
-      zero_apply, bot_eq_zero]
+    zero_apply, bot_eq_zero]
 #align finsupp.card_Iic Finsupp.card_Iic
 
 theorem card_Iio : (Iio f).card = (∏ i in f.support, (Iic (f i)).card) - 1 := by
Diff
@@ -36,7 +36,7 @@ noncomputable section
 
 open Finset Finsupp Function
 
-open BigOperators Classical Pointwise
+open scoped BigOperators Classical Pointwise
 
 variable {ι α : Type _}
 
@@ -92,9 +92,11 @@ theorem rangeIcc_support [DecidableEq ι] (f g : ι →₀ α) :
     (rangeIcc f g).support = f.support ∪ g.support := by convert rfl
 #align finsupp.range_Icc_support Finsupp.rangeIcc_support
 
+#print Finsupp.mem_rangeIcc_apply_iff /-
 theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
   mem_Icc
 #align finsupp.mem_range_Icc_apply_iff Finsupp.mem_rangeIcc_apply_iff
+-/
 
 end RangeIcc
 
Diff
@@ -87,23 +87,11 @@ def rangeIcc (f g : ι →₀ α) : ι →₀ Finset α
 #align finsupp.range_Icc Finsupp.rangeIcc
 -/
 
-/- warning: finsupp.range_Icc_support -> Finsupp.rangeIcc_support is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] [_inst_2 : PartialOrder.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)] [_inst_4 : DecidableEq.{succ u1} ι] (f : Finsupp.{u1, u2} ι α _inst_1) (g : Finsupp.{u1, u2} ι α _inst_1), Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1) (Finsupp.rangeIcc.{u1, u2} ι α _inst_1 _inst_2 _inst_3 f g)) (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_1 f) (Finsupp.support.{u1, u2} ι α _inst_1 g))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] [_inst_2 : PartialOrder.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_2)] (_inst_4 : Finsupp.{u2, u1} ι α _inst_1) (f : Finsupp.{u2, u1} ι α _inst_1), Eq.{succ u2} (Finset.{u2} ι) (Finsupp.support.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1) (Finsupp.rangeIcc.{u2, u1} ι α _inst_1 _inst_2 _inst_3 _inst_4 f)) (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_1 _inst_4) (Finsupp.support.{u2, u1} ι α _inst_1 f))
-Case conversion may be inaccurate. Consider using '#align finsupp.range_Icc_support Finsupp.rangeIcc_supportₓ'. -/
 @[simp]
 theorem rangeIcc_support [DecidableEq ι] (f g : ι →₀ α) :
     (rangeIcc f g).support = f.support ∪ g.support := by convert rfl
 #align finsupp.range_Icc_support Finsupp.rangeIcc_support
 
-/- warning: finsupp.mem_range_Icc_apply_iff -> Finsupp.mem_rangeIcc_apply_iff is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] [_inst_2 : PartialOrder.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)] {f : Finsupp.{u1, u2} ι α _inst_1} {g : Finsupp.{u1, u2} ι α _inst_1} {i : ι} {a : α}, Iff (Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) a (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_1 _inst_2 _inst_3 f g) i)) (And (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) f i) a) (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) a (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) g i)))
-but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] [_inst_2 : PartialOrder.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)] {f : Finsupp.{u1, u2} ι α _inst_1} {g : Finsupp.{u1, u2} ι α _inst_1} {i : ι} {a : α}, Iff (Membership.mem.{u2, u2} α ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u2} α) i) (Finset.instMembershipFinset.{u2} α) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u2} α) _x) (Finsupp.funLike.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_1 _inst_2 _inst_3 f g) i)) (And (LE.le.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Preorder.toLE.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_2)) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u1, u2} ι α _inst_1) f i) a) (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u1, u2} ι α _inst_1) g i)))
-Case conversion may be inaccurate. Consider using '#align finsupp.mem_range_Icc_apply_iff Finsupp.mem_rangeIcc_apply_iffₓ'. -/
 theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
   mem_Icc
 #align finsupp.mem_range_Icc_apply_iff Finsupp.mem_rangeIcc_apply_iff
@@ -126,55 +114,25 @@ instance : LocallyFiniteOrder (ι →₀ α) := by
         simp_rw [mem_range_Icc_apply_iff]
         exact forall_and
 
-/- warning: finsupp.Icc_eq -> Finsupp.icc_eq is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2)) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g) (Finset.finsupp.{u1, u2} ι α _inst_2 (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_2 _inst_1 _inst_3 f g)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2)) (Finset.Icc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g) (Finset.finsupp.{u2, u1} ι α _inst_2 (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_2)) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) a) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_2)) (Finsupp.rangeIcc.{u2, u1} ι α _inst_2 _inst_1 _inst_3 f g)))
-Case conversion may be inaccurate. Consider using '#align finsupp.Icc_eq Finsupp.icc_eqₓ'. -/
 theorem icc_eq [DecidableEq ι] : Icc f g = (f.support ∪ g.support).Finsupp (f.rangeIcc g) := by
   convert rfl
 #align finsupp.Icc_eq Finsupp.icc_eq
 
-/- warning: finsupp.card_Icc -> Finsupp.card_Icc is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Icc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i))))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Icc Finsupp.card_Iccₓ'. -/
 theorem card_Icc [DecidableEq ι] :
     (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card := by
   simp_rw [Icc_eq, card_finsupp, range_Icc_to_fun]
 #align finsupp.card_Icc Finsupp.card_Icc
 
-/- warning: finsupp.card_Ico -> Finsupp.card_Ico is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ico.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ico.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Ico Finsupp.card_Icoₓ'. -/
 theorem card_Ico [DecidableEq ι] :
     (Ico f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ico Finsupp.card_Ico
 
-/- warning: finsupp.card_Ioc -> Finsupp.card_Ioc is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ioc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Ioc Finsupp.card_Iocₓ'. -/
 theorem card_Ioc [DecidableEq ι] :
     (Ioc f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ioc Finsupp.card_Ioc
 
-/- warning: finsupp.card_Ioo -> Finsupp.card_Ioo is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioo.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (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.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ioo.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Ioo Finsupp.card_Iooₓ'. -/
 theorem card_Ioo [DecidableEq ι] :
     (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
@@ -188,23 +146,11 @@ variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
 
 variable (f : ι →₀ α)
 
-/- warning: finsupp.card_Iic -> Finsupp.card_Iic is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iic.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))] (f : Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finset.Iic.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finsupp.orderBot.{u2, u1} ι α _inst_1) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)) (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2)) f)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finsupp.support.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) f) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Iic.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_2) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) f i))))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Iic Finsupp.card_Iicₓ'. -/
 theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
   classical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union,
       zero_apply, bot_eq_zero]
 #align finsupp.card_Iic Finsupp.card_Iic
 
-/- warning: finsupp.card_Iio -> Finsupp.card_Iio is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iio.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))] (f : Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finset.Iio.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finsupp.orderBot.{u2, u1} ι α _inst_1) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)) (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2)) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finsupp.support.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) f) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Iic.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_2) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) f i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_Iio Finsupp.card_Iioₓ'. -/
 theorem card_Iio : (Iio f).card = (∏ i in f.support, (Iic (f i)).card) - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align finsupp.card_Iio Finsupp.card_Iio
Diff
@@ -98,11 +98,15 @@ theorem rangeIcc_support [DecidableEq ι] (f g : ι →₀ α) :
     (rangeIcc f g).support = f.support ∪ g.support := by convert rfl
 #align finsupp.range_Icc_support Finsupp.rangeIcc_support
 
-#print Finsupp.mem_rangeIcc_apply_iff /-
+/- warning: finsupp.mem_range_Icc_apply_iff -> Finsupp.mem_rangeIcc_apply_iff is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] [_inst_2 : PartialOrder.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)] {f : Finsupp.{u1, u2} ι α _inst_1} {g : Finsupp.{u1, u2} ι α _inst_1} {i : ι} {a : α}, Iff (Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) a (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_1 _inst_2 _inst_3 f g) i)) (And (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) f i) a) (LE.le.{u2} α (Preorder.toHasLe.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) a (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) g i)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] [_inst_2 : PartialOrder.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)] {f : Finsupp.{u1, u2} ι α _inst_1} {g : Finsupp.{u1, u2} ι α _inst_1} {i : ι} {a : α}, Iff (Membership.mem.{u2, u2} α ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u2} α) i) (Finset.instMembershipFinset.{u2} α) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u2} α) _x) (Finsupp.funLike.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_1 _inst_2 _inst_3 f g) i)) (And (LE.le.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Preorder.toLE.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_2)) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u1, u2} ι α _inst_1) f i) a) (LE.le.{u2} α (Preorder.toLE.{u2} α (PartialOrder.toPreorder.{u2} α _inst_2)) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Finsupp.{u1, u2} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u1, u2} ι α _inst_1) g i)))
+Case conversion may be inaccurate. Consider using '#align finsupp.mem_range_Icc_apply_iff Finsupp.mem_rangeIcc_apply_iffₓ'. -/
 theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
   mem_Icc
 #align finsupp.mem_range_Icc_apply_iff Finsupp.mem_rangeIcc_apply_iff
--/
 
 end RangeIcc
 
Diff
@@ -124,7 +124,7 @@ instance : LocallyFiniteOrder (ι →₀ α) := by
 
 /- warning: finsupp.Icc_eq -> Finsupp.icc_eq is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2)) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g) (Finset.finsupp.{u1, u2} ι α _inst_2 (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) => ι -> (Finset.{u2} α)) (Finsupp.hasCoeToFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_2 _inst_1 _inst_3 f g)))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2)) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g) (Finset.finsupp.{u1, u2} ι α _inst_2 (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_2)) (Finsupp.rangeIcc.{u1, u2} ι α _inst_2 _inst_1 _inst_3 f g)))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2)) (Finset.Icc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g) (Finset.finsupp.{u2, u1} ι α _inst_2 (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_2)) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) a) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_2)) (Finsupp.rangeIcc.{u2, u1} ι α _inst_2 _inst_1 _inst_3 f g)))
 Case conversion may be inaccurate. Consider using '#align finsupp.Icc_eq Finsupp.icc_eqₓ'. -/
@@ -134,7 +134,7 @@ theorem icc_eq [DecidableEq ι] : Icc f g = (f.support ∪ g.support).Finsupp (f
 
 /- warning: finsupp.card_Icc -> Finsupp.card_Icc is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) g i))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Icc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) f g)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i))))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Icc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i))))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Icc Finsupp.card_Iccₓ'. -/
@@ -145,7 +145,7 @@ theorem card_Icc [DecidableEq ι] :
 
 /- warning: finsupp.card_Ico -> Finsupp.card_Ico is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ico.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ico.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ico.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Ico Finsupp.card_Icoₓ'. -/
@@ -156,7 +156,7 @@ theorem card_Ico [DecidableEq ι] :
 
 /- warning: finsupp.card_Ioc -> Finsupp.card_Ioc is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioc.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ioc.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Ioc Finsupp.card_Iocₓ'. -/
@@ -167,7 +167,7 @@ theorem card_Ioc [DecidableEq ι] :
 
 /- warning: finsupp.card_Ioo -> Finsupp.card_Ioo is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioo.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : PartialOrder.{u2} α] [_inst_2 : Zero.{u2} α] [_inst_3 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1)] (f : Finsupp.{u1, u2} ι α _inst_2) (g : Finsupp.{u1, u2} ι α _inst_2) [_inst_4 : DecidableEq.{succ u1} ι], Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finset.Ioo.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_2) (Finsupp.preorder.{u1, u2} ι α _inst_2 (PartialOrder.toPreorder.{u2} α _inst_1)) (Finsupp.locallyFiniteOrder.{u1, u2} ι α _inst_1 _inst_2 _inst_3) 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_4 a b)) (Finsupp.support.{u1, u2} ι α _inst_2 f) (Finsupp.support.{u1, u2} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u2} α (Finset.Icc.{u2} α (PartialOrder.toPreorder.{u2} α _inst_1) _inst_3 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_2) (fun (_x : Finsupp.{u1, u2} ι α _inst_2) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_2) g i)))) (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.{u2}} {α : Type.{u1}} [_inst_1 : PartialOrder.{u1} α] [_inst_2 : Zero.{u1} α] [_inst_3 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α _inst_1)] (f : Finsupp.{u2, u1} ι α _inst_2) (g : Finsupp.{u2, u1} ι α _inst_2), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finset.Ioo.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_2) (Finsupp.preorder.{u2, u1} ι α _inst_2 (PartialOrder.toPreorder.{u1} α _inst_1)) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α _inst_1 _inst_2 _inst_3) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => Classical.propDecidable (Eq.{succ u2} ι a b))) (Finsupp.support.{u2, u1} ι α _inst_2 f) (Finsupp.support.{u2, u1} ι α _inst_2 g)) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Icc.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_3 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_2) ι (fun (a : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) a) (Finsupp.funLike.{u2, u1} ι α _inst_2) g i)))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Ioo Finsupp.card_Iooₓ'. -/
@@ -186,7 +186,7 @@ variable (f : ι →₀ α)
 
 /- warning: finsupp.card_Iic -> Finsupp.card_Iic is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iic.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iic.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i))))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))] (f : Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finset.Iic.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finsupp.orderBot.{u2, u1} ι α _inst_1) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)) (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2)) f)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finsupp.support.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) f) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Iic.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_2) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) f i))))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Iic Finsupp.card_Iicₓ'. -/
@@ -197,7 +197,7 @@ theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
 
 /- warning: finsupp.card_Iio -> Finsupp.card_Iio is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iio.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CanonicallyOrderedAddMonoid.{u2} α] [_inst_2 : LocallyFiniteOrder.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))] (f : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finset.Iio.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (Finsupp.preorder.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))) (Finsupp.orderBot.{u1, u2} ι α _inst_1) (Finsupp.locallyFiniteOrder.{u1, u2} ι α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)) (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) _inst_2)) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finsupp.support.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))))) f) (fun (i : ι) => Finset.card.{u2} α (Finset.Iic.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} α (PartialOrder.toPreorder.{u2} α (OrderedAddCommMonoid.toPartialOrder.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} α _inst_1) _inst_2) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) (fun (_x : Finsupp.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α (AddZeroClass.toHasZero.{u2} α (AddMonoid.toAddZeroClass.{u2} α (AddCommMonoid.toAddMonoid.{u2} α (OrderedAddCommMonoid.toAddCommMonoid.{u2} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} α _inst_1)))))) f i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
 but is expected to have type
   forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : LocallyFiniteOrder.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))] (f : Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finset.Iio.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) (Finsupp.preorder.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) (Finsupp.orderBot.{u2, u1} ι α _inst_1) (Finsupp.instLocallyFiniteOrderFinsuppPreorderToPreorder.{u2, u1} ι α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)) (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2)) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finsupp.support.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) f) (fun (i : ι) => Finset.card.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (Finset.Iic.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) _inst_1) _inst_2) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) f i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
 Case conversion may be inaccurate. Consider using '#align finsupp.card_Iio Finsupp.card_Iioₓ'. -/

Changes in mathlib4

mathlib3
mathlib4
chore: Move intervals (#11765)

Move Set.Ixx, Finset.Ixx, Multiset.Ixx together under two different folders:

  • Order.Interval for their definition and basic properties
  • Algebra.Order.Interval for their algebraic properties

Move 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.

Diff
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Mathlib.Data.Finset.Finsupp
-import Mathlib.Data.Finset.LocallyFinite.Basic
 import Mathlib.Data.Finsupp.Order
+import Mathlib.Order.Interval.Finset.Basic
 
 #align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
 
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -140,7 +140,6 @@ end Lattice
 section CanonicallyOrdered
 
 variable [CanonicallyOrderedAddCommMonoid α] [LocallyFiniteOrder α]
-
 variable (f : ι →₀ α)
 
 theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -29,7 +29,8 @@ noncomputable section
 
 open Finset Finsupp Function
 
-open BigOperators Classical Pointwise
+open scoped Classical
+open BigOperators Pointwise
 
 variable {ι α : Type*}
 
@@ -64,7 +65,7 @@ variable [Zero α] [PartialOrder α] [LocallyFiniteOrder α] {f g : ι →₀ α
 def rangeIcc (f g : ι →₀ α) : ι →₀ Finset α where
   toFun i := Icc (f i) (g i)
   support :=
-    -- Porting note: Not needed (due to open Classical), in mathlib3 too
+    -- Porting note: Not needed (due to open scoped Classical), in mathlib3 too
     -- haveI := Classical.decEq ι
     f.support ∪ g.support
   mem_support_toFun i := by
@@ -90,7 +91,7 @@ section PartialOrder
 variable [PartialOrder α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
 
 instance instLocallyFiniteOrder : LocallyFiniteOrder (ι →₀ α) :=
-  -- Porting note: Not needed (due to open Classical), in mathlib3 too
+  -- Porting note: Not needed (due to open scoped Classical), in mathlib3 too
   -- haveI := Classical.decEq ι
   -- haveI := Classical.decEq α
   LocallyFiniteOrder.ofIcc (ι →₀ α) (fun f g => (f.support ∪ g.support).finsupp <| f.rangeIcc g)
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -64,7 +64,7 @@ variable [Zero α] [PartialOrder α] [LocallyFiniteOrder α] {f g : ι →₀ α
 def rangeIcc (f g : ι →₀ α) : ι →₀ Finset α where
   toFun i := Icc (f i) (g i)
   support :=
-    -- porting note: Not needed (due to open Classical), in mathlib3 too
+    -- Porting note: Not needed (due to open Classical), in mathlib3 too
     -- haveI := Classical.decEq ι
     f.support ∪ g.support
   mem_support_toFun i := by
@@ -72,7 +72,7 @@ def rangeIcc (f g : ι →₀ α) : ι →₀ Finset α where
     exact Icc_eq_singleton_iff.symm
 #align finsupp.range_Icc Finsupp.rangeIcc
 
--- porting note: Added as alternative to rangeIcc_toFun to be used in proof of card_Icc
+-- Porting note: Added as alternative to rangeIcc_toFun to be used in proof of card_Icc
 lemma coe_rangeIcc (f g : ι →₀ α) : rangeIcc f g i = Icc (f i) (g i) := rfl
 
 @[simp]
@@ -90,7 +90,7 @@ section PartialOrder
 variable [PartialOrder α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
 
 instance instLocallyFiniteOrder : LocallyFiniteOrder (ι →₀ α) :=
-  -- porting note: Not needed (due to open Classical), in mathlib3 too
+  -- Porting note: Not needed (due to open Classical), in mathlib3 too
   -- haveI := Classical.decEq ι
   -- haveI := Classical.decEq α
   LocallyFiniteOrder.ofIcc (ι →₀ α) (fun f g => (f.support ∪ g.support).finsupp <| f.rangeIcc g)
@@ -103,22 +103,22 @@ instance instLocallyFiniteOrder : LocallyFiniteOrder (ι →₀ α) :=
 theorem Icc_eq : Icc f g = (f.support ∪ g.support).finsupp (f.rangeIcc g) := rfl
 #align finsupp.Icc_eq Finsupp.Icc_eq
 
--- porting note: removed [DecidableEq ι]
+-- Porting note: removed [DecidableEq ι]
 theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card := by
   simp_rw [Icc_eq, card_finsupp, coe_rangeIcc]
 #align finsupp.card_Icc Finsupp.card_Icc
 
--- porting note: removed [DecidableEq ι]
+-- Porting note: removed [DecidableEq ι]
 theorem card_Ico : (Ico f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ico Finsupp.card_Ico
 
--- porting note: removed [DecidableEq ι]
+-- Porting note: removed [DecidableEq ι]
 theorem card_Ioc : (Ioc f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align finsupp.card_Ioc Finsupp.card_Ioc
 
--- porting note: removed [DecidableEq ι]
+-- Porting note: removed [DecidableEq ι]
 theorem card_Ioo : (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align finsupp.card_Ioo Finsupp.card_Ioo
@@ -128,7 +128,7 @@ end PartialOrder
 section Lattice
 variable [Lattice α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
 
--- porting note: removed [DecidableEq ι]
+-- Porting note: removed [DecidableEq ι]
 theorem card_uIcc :
     (uIcc f g).card = ∏ i in f.support ∪ g.support, (uIcc (f i) (g i)).card := by
   rw [← support_inf_union_support_sup]; exact card_Icc (_ : ι →₀ α) _
chore: Rename LocallyFiniteOrder instances (#11076)

The generated names were too long

Diff
@@ -89,7 +89,7 @@ section PartialOrder
 
 variable [PartialOrder α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
 
-instance : LocallyFiniteOrder (ι →₀ α) :=
+instance instLocallyFiniteOrder : LocallyFiniteOrder (ι →₀ α) :=
   -- porting note: Not needed (due to open Classical), in mathlib3 too
   -- haveI := Classical.decEq ι
   -- haveI := Classical.decEq α
feat: Boxes in locally finite ordered rings (#10506)

Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Mathlib.Data.Finset.Finsupp
-import Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
 import Mathlib.Data.Finsupp.Order
 
 #align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
chore: rename CanonicallyOrderedAddMonoid to ..AddCommMonoid (#7503)

Renames:

CanonicallyOrderedMonoid -> CanonicallyOrderedCommMonoid

CanonicallyOrderedAddMonoid -> CanonicallyOrderedAddCommMonoid

CanonicallyLinearOrderedMonoid -> CanonicallyLinearOrderedCommMonoid

CanonicallyLinearOrderedAddMonoid -> CanonicallyLinearOrderedAddCommMonoid

Diff
@@ -138,7 +138,7 @@ end Lattice
 
 section CanonicallyOrdered
 
-variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
+variable [CanonicallyOrderedAddCommMonoid α] [LocallyFiniteOrder α]
 
 variable (f : ι →₀ α)
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -31,7 +31,7 @@ open Finset Finsupp Function
 
 open BigOperators Classical Pointwise
 
-variable {ι α : Type _}
+variable {ι α : Type*}
 
 namespace Finsupp
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finsupp.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.Finsupp
 import Mathlib.Data.Finset.LocallyFinite
 import Mathlib.Data.Finsupp.Order
 
+#align_import data.finsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
 /-!
 # Finite intervals of finitely supported functions
 
feat: 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>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 
 ! This file was ported from Lean 3 source module data.finsupp.interval
-! leanprover-community/mathlib commit 0a0ec35061ed9960bf0e7ffb0335f44447b58977
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -103,12 +103,12 @@ instance : LocallyFiniteOrder (ι →₀ α) :=
       simp_rw [mem_rangeIcc_apply_iff]
       exact forall_and
 
-theorem icc_eq : Icc f g = (f.support ∪ g.support).finsupp (f.rangeIcc g) := rfl
-#align finsupp.Icc_eq Finsupp.icc_eq
+theorem Icc_eq : Icc f g = (f.support ∪ g.support).finsupp (f.rangeIcc g) := rfl
+#align finsupp.Icc_eq Finsupp.Icc_eq
 
 -- porting note: removed [DecidableEq ι]
 theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card := by
-  simp_rw [icc_eq, card_finsupp, coe_rangeIcc]
+  simp_rw [Icc_eq, card_finsupp, coe_rangeIcc]
 #align finsupp.card_Icc Finsupp.card_Icc
 
 -- porting note: removed [DecidableEq ι]
@@ -128,6 +128,17 @@ theorem card_Ioo : (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i
 
 end PartialOrder
 
+section Lattice
+variable [Lattice α] [Zero α] [LocallyFiniteOrder α] (f g : ι →₀ α)
+
+-- porting note: removed [DecidableEq ι]
+theorem card_uIcc :
+    (uIcc f g).card = ∏ i in f.support ∪ g.support, (uIcc (f i) (g i)).card := by
+  rw [← support_inf_union_support_sup]; exact card_Icc (_ : ι →₀ α) _
+#align finsupp.card_uIcc Finsupp.card_uIcc
+
+end Lattice
+
 section CanonicallyOrdered
 
 variable [CanonicallyOrderedAddMonoid α] [LocallyFiniteOrder α]
chore: fix #align lines (#3640)

This PR fixes two things:

  • Most align statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align). This is often seen in the mathport output after ending calc blocks.
  • All remaining more-than-one-line #align statements. (This was needed for a script I wrote for #3630.)
Diff
@@ -109,7 +109,6 @@ theorem icc_eq : Icc f g = (f.support ∪ g.support).finsupp (f.rangeIcc g) := r
 -- porting note: removed [DecidableEq ι]
 theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card := by
   simp_rw [icc_eq, card_finsupp, coe_rangeIcc]
-
 #align finsupp.card_Icc Finsupp.card_Icc
 
 -- porting note: removed [DecidableEq ι]
feat: port Data.Finsupp.Interval (#2151)

Dependencies 8 + 277

278 files ported (97.2%)
118951 lines ported (97.5%)
Show graph

The unported dependencies are