data.dfinsupp.interval
⟷
Mathlib.Data.DFinsupp.Interval
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -140,7 +140,7 @@ end
end pi
-section locally_finite
+section partial_order
variables [decidable_eq ι] [Π i, decidable_eq (α i)]
variables [Π i, partial_order (α i)] [Π i, has_zero (α i)] [Π i, locally_finite_order (α i)]
@@ -169,7 +169,16 @@ by rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
lemma 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]
-end locally_finite
+end partial_order
+
+section lattice
+variables [decidable_eq ι] [Π i, decidable_eq (α i)] [Π i, lattice (α i)] [Π i, has_zero (α i)]
+ [Π i, locally_finite_order (α i)] (f g : Π₀ i, α i)
+
+lemma 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 _ _ }
+
+end lattice
section canonically_ordered
variables [decidable_eq ι] [Π i, decidable_eq (α i)]
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
import Data.Finset.Pointwise
import Data.Fintype.BigOperators
import Data.DFinsupp.Order
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -195,7 +195,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
by
rw [pi, card_dfinsupp]
- exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
+ exact Finset.prod_congr rfl fun i _ => by simp only [Pi.natCast_apply, Nat.cast_id]
#align dfinsupp.card_pi DFinsupp.card_pi
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,10 +3,10 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite.Basic
import Data.Finset.Pointwise
import Data.Fintype.BigOperators
-import Data.Dfinsupp.Order
+import Data.DFinsupp.Order
#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -85,7 +85,7 @@ theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 (not_mem_mono ht hi)]
exact zero_mem_zero
- · rwa [H, mem_zero] at h
+ · rwa [H, mem_zero] at h
#align finset.mem_dfinsupp_iff_of_support_subset Finset.mem_dfinsupp_iff_of_support_subset
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -130,7 +130,7 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i)
f.support'.bind fun fs =>
g.support'.map fun gs =>
⟨fs + gs, fun i =>
- or_iff_not_imp_left.2 fun h =>
+ Classical.or_iff_not_imp_left.2 fun h =>
by
have hf : f i = 0 :=
(fs.prop i).resolve_left
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -266,7 +266,7 @@ section CanonicallyOrdered
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
-variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder (α i)]
+variable [∀ i, CanonicallyOrderedAddCommMonoid (α i)] [∀ i, LocallyFiniteOrder (α i)]
variable (f : Π₀ i, α i)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2021 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.LocallyFinite
-import Mathbin.Data.Finset.Pointwise
-import Mathbin.Data.Fintype.BigOperators
-import Mathbin.Data.Dfinsupp.Order
+import Data.Finset.LocallyFinite
+import Data.Finset.Pointwise
+import Data.Fintype.BigOperators
+import Data.Dfinsupp.Order
#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2021 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.dfinsupp.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.LocallyFinite
import Mathbin.Data.Finset.Pointwise
import Mathbin.Data.Fintype.BigOperators
import Mathbin.Data.Dfinsupp.Order
+#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals of finitely supported functions
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -257,9 +257,11 @@ section Lattice
variable [DecidableEq ι] [∀ i, DecidableEq (α i)] [∀ i, Lattice (α i)] [∀ i, Zero (α i)]
[∀ i, LocallyFiniteOrder (α i)] (f g : Π₀ i, α i)
+#print DFinsupp.card_uIcc /-
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 dfinsupp.card_uIcc DFinsupp.card_uIcc
+-/
end Lattice
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module data.dfinsupp.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.
-/
@@ -204,7 +204,7 @@ theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i)
end Pi
-section LocallyFinite
+section PartialOrder
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
@@ -250,7 +250,18 @@ theorem card_Ioo : (Ioo f g).card = ∏ i in f.support ∪ g.support, (Icc (f i)
#align dfinsupp.card_Ioo DFinsupp.card_Ioo
-/
-end LocallyFinite
+end PartialOrder
+
+section Lattice
+
+variable [DecidableEq ι] [∀ i, DecidableEq (α i)] [∀ i, Lattice (α i)] [∀ i, Zero (α i)]
+ [∀ i, LocallyFiniteOrder (α i)] (f g : Π₀ i, α i)
+
+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 dfinsupp.card_uIcc DFinsupp.card_uIcc
+
+end Lattice
section CanonicallyOrdered
mathlib commit https://github.com/leanprover-community/mathlib/commit/4e24c4bfcff371c71f7ba22050308aa17815626c
@@ -24,7 +24,7 @@ finite and calculates the cardinality of its finite intervals.
-/
-open Dfinsupp Finset
+open DFinsupp Finset
open scoped BigOperators Pointwise
@@ -38,7 +38,7 @@ variable [DecidableEq ι] [∀ i, Zero (α i)] {s : Finset ι} {f : Π₀ i, α
/-- Finitely supported product of finsets. -/
def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i) :=
(s.pi t).map
- ⟨fun f => Dfinsupp.mk s fun i => f i i.2,
+ ⟨fun f => DFinsupp.mk s fun i => f i i.2,
by
refine' (mk_injective _).comp fun f g h => _
ext i hi
@@ -49,7 +49,7 @@ def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i)
#print Finset.card_dfinsupp /-
@[simp]
theorem card_dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) :
- (s.Dfinsupp t).card = ∏ i in s, (t i).card :=
+ (s.DFinsupp t).card = ∏ i in s, (t i).card :=
(card_map _).trans <| card_pi _ _
#align finset.card_dfinsupp Finset.card_dfinsupp
-/
@@ -57,7 +57,7 @@ theorem card_dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) :
variable [∀ i, DecidableEq (α i)]
#print Finset.mem_dfinsupp_iff /-
-theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i :=
+theorem mem_dfinsupp_iff : f ∈ s.DFinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i :=
by
refine' mem_map.trans ⟨_, _⟩
· rintro ⟨f, hf, rfl⟩
@@ -76,7 +76,7 @@ theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈
-/
@[simp]
theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.support ⊆ s) :
- f ∈ s.Dfinsupp t ↔ ∀ i, f i ∈ t i :=
+ f ∈ s.DFinsupp t ↔ ∀ i, f i ∈ t i :=
by
refine'
mem_dfinsupp_iff.trans
@@ -96,25 +96,25 @@ end Finset
open Finset
-namespace Dfinsupp
+namespace DFinsupp
section BundledSingleton
variable [∀ i, Zero (α i)] {f : Π₀ i, α i} {i : ι} {a : α i}
-#print Dfinsupp.singleton /-
+#print DFinsupp.singleton /-
/-- Pointwise `finset.singleton` bundled as a `dfinsupp`. -/
def singleton (f : Π₀ i, α i) : Π₀ i, Finset (α i)
where
toFun i := {f i}
support' := f.support'.map fun s => ⟨s, fun i => (s.Prop i).imp id (congr_arg _)⟩
-#align dfinsupp.singleton Dfinsupp.singleton
+#align dfinsupp.singleton DFinsupp.singleton
-/
-#print Dfinsupp.mem_singleton_apply_iff /-
+#print DFinsupp.mem_singleton_apply_iff /-
theorem mem_singleton_apply_iff : a ∈ f.singleton i ↔ a = f i :=
mem_singleton
-#align dfinsupp.mem_singleton_apply_iff Dfinsupp.mem_singleton_apply_iff
+#align dfinsupp.mem_singleton_apply_iff DFinsupp.mem_singleton_apply_iff
-/
end BundledSingleton
@@ -124,7 +124,7 @@ section BundledIcc
variable [∀ i, Zero (α i)] [∀ i, PartialOrder (α i)] [∀ i, LocallyFiniteOrder (α i)]
{f g : Π₀ i, α i} {i : ι} {a : α i}
-#print Dfinsupp.rangeIcc /-
+#print DFinsupp.rangeIcc /-
/-- Pointwise `finset.Icc` bundled as a `dfinsupp`. -/
def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i)
where
@@ -143,23 +143,23 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i)
(Multiset.not_mem_mono (Multiset.Le.subset <| Multiset.le_add_left _ _) h)
rw [hf, hg]
exact Icc_self _⟩
-#align dfinsupp.range_Icc Dfinsupp.rangeIcc
+#align dfinsupp.range_Icc DFinsupp.rangeIcc
-/
-#print Dfinsupp.rangeIcc_apply /-
+#print DFinsupp.rangeIcc_apply /-
@[simp]
theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f i) (g i) :=
rfl
-#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
+#align dfinsupp.range_Icc_apply DFinsupp.rangeIcc_apply
-/
-#print Dfinsupp.mem_rangeIcc_apply_iff /-
+#print DFinsupp.mem_rangeIcc_apply_iff /-
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
mem_Icc
-#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
+#align dfinsupp.mem_range_Icc_apply_iff DFinsupp.mem_rangeIcc_apply_iff
-/
-#print Dfinsupp.support_rangeIcc_subset /-
+#print DFinsupp.support_rangeIcc_subset /-
theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
(f.rangeIcc g).support ⊆ f.support ∪ g.support :=
by
@@ -169,7 +169,7 @@ theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
rw [range_Icc_apply, not_mem_support_iff.1 (not_mem_mono (subset_union_left _ _) h),
not_mem_support_iff.1 (not_mem_mono (subset_union_right _ _) h)]
exact Icc_self _
-#align dfinsupp.support_range_Icc_subset Dfinsupp.support_rangeIcc_subset
+#align dfinsupp.support_range_Icc_subset DFinsupp.support_rangeIcc_subset
-/
end BundledIcc
@@ -178,28 +178,28 @@ section Pi
variable [∀ i, Zero (α i)] [DecidableEq ι] [∀ i, DecidableEq (α i)]
-#print Dfinsupp.pi /-
+#print DFinsupp.pi /-
/-- Given a finitely supported function `f : Π₀ i, finset (α i)`, one can define the finset
`f.pi` of all finitely supported functions whose value at `i` is in `f i` for all `i`. -/
def pi (f : Π₀ i, Finset (α i)) : Finset (Π₀ i, α i) :=
- f.support.Dfinsupp f
-#align dfinsupp.pi Dfinsupp.pi
+ f.support.DFinsupp f
+#align dfinsupp.pi DFinsupp.pi
-/
-#print Dfinsupp.mem_pi /-
+#print DFinsupp.mem_pi /-
@[simp]
theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_dfinsupp_iff_of_support_subset <| Subset.refl _
-#align dfinsupp.mem_pi Dfinsupp.mem_pi
+#align dfinsupp.mem_pi DFinsupp.mem_pi
-/
-#print Dfinsupp.card_pi /-
+#print DFinsupp.card_pi /-
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
by
rw [pi, card_dfinsupp]
exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
-#align dfinsupp.card_pi Dfinsupp.card_pi
+#align dfinsupp.card_pi DFinsupp.card_pi
-/
end Pi
@@ -211,7 +211,7 @@ variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
variable [∀ i, PartialOrder (α i)] [∀ i, Zero (α i)] [∀ i, LocallyFiniteOrder (α i)]
instance : LocallyFiniteOrder (Π₀ i, α i) :=
- LocallyFiniteOrder.ofIcc (Π₀ i, α i) (fun f g => (f.support ∪ g.support).Dfinsupp <| f.rangeIcc g)
+ LocallyFiniteOrder.ofIcc (Π₀ i, α i) (fun f g => (f.support ∪ g.support).DFinsupp <| f.rangeIcc g)
fun f g x =>
by
refine' (mem_dfinsupp_iff_of_support_subset <| support_range_Icc_subset).trans _
@@ -220,34 +220,34 @@ instance : LocallyFiniteOrder (Π₀ i, α i) :=
variable (f g : Π₀ i, α i)
-#print Dfinsupp.Icc_eq /-
-theorem Icc_eq : Icc f g = (f.support ∪ g.support).Dfinsupp (f.rangeIcc g) :=
+#print DFinsupp.Icc_eq /-
+theorem Icc_eq : Icc f g = (f.support ∪ g.support).DFinsupp (f.rangeIcc g) :=
rfl
-#align dfinsupp.Icc_eq Dfinsupp.Icc_eq
+#align dfinsupp.Icc_eq DFinsupp.Icc_eq
-/
-#print Dfinsupp.card_Icc /-
+#print DFinsupp.card_Icc /-
theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card :=
card_dfinsupp _ _
-#align dfinsupp.card_Icc Dfinsupp.card_Icc
+#align dfinsupp.card_Icc DFinsupp.card_Icc
-/
-#print Dfinsupp.card_Ico /-
+#print DFinsupp.card_Ico /-
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 dfinsupp.card_Ico Dfinsupp.card_Ico
+#align dfinsupp.card_Ico DFinsupp.card_Ico
-/
-#print Dfinsupp.card_Ioc /-
+#print DFinsupp.card_Ioc /-
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 dfinsupp.card_Ioc Dfinsupp.card_Ioc
+#align dfinsupp.card_Ioc DFinsupp.card_Ioc
-/
-#print Dfinsupp.card_Ioo /-
+#print DFinsupp.card_Ioo /-
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 dfinsupp.card_Ioo Dfinsupp.card_Ioo
+#align dfinsupp.card_Ioo DFinsupp.card_Ioo
-/
end LocallyFinite
@@ -260,20 +260,20 @@ variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder
variable (f : Π₀ i, α i)
-#print Dfinsupp.card_Iic /-
+#print DFinsupp.card_Iic /-
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
- simp_rw [Iic_eq_Icc, card_Icc, Dfinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
+ simp_rw [Iic_eq_Icc, card_Icc, DFinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
bot_eq_zero]
-#align dfinsupp.card_Iic Dfinsupp.card_Iic
+#align dfinsupp.card_Iic DFinsupp.card_Iic
-/
-#print Dfinsupp.card_Iio /-
+#print DFinsupp.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 dfinsupp.card_Iio Dfinsupp.card_Iio
+#align dfinsupp.card_Iio DFinsupp.card_Iio
-/
end CanonicallyOrdered
-end Dfinsupp
+end DFinsupp
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -41,7 +41,7 @@ def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i)
⟨fun f => Dfinsupp.mk s fun i => f i i.2,
by
refine' (mk_injective _).comp fun f g h => _
- ext (i hi)
+ ext i hi
convert congr_fun h ⟨i, hi⟩⟩
#align finset.dfinsupp Finset.dfinsupp
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -46,14 +46,17 @@ def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i)
#align finset.dfinsupp Finset.dfinsupp
-/
+#print Finset.card_dfinsupp /-
@[simp]
theorem card_dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) :
(s.Dfinsupp t).card = ∏ i in s, (t i).card :=
(card_map _).trans <| card_pi _ _
#align finset.card_dfinsupp Finset.card_dfinsupp
+-/
variable [∀ i, DecidableEq (α i)]
+#print Finset.mem_dfinsupp_iff /-
theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i :=
by
refine' mem_map.trans ⟨_, _⟩
@@ -66,7 +69,9 @@ theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈
dsimp
exact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1 H).symm
#align finset.mem_dfinsupp_iff Finset.mem_dfinsupp_iff
+-/
+#print Finset.mem_dfinsupp_iff_of_support_subset /-
/-- When `t` is supported on `s`, `f ∈ s.dfinsupp t` precisely means that `f` is pointwise in `t`.
-/
@[simp]
@@ -85,6 +90,7 @@ theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.
exact zero_mem_zero
· rwa [H, mem_zero] at h
#align finset.mem_dfinsupp_iff_of_support_subset Finset.mem_dfinsupp_iff_of_support_subset
+-/
end Finset
@@ -140,10 +146,12 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i)
#align dfinsupp.range_Icc Dfinsupp.rangeIcc
-/
+#print Dfinsupp.rangeIcc_apply /-
@[simp]
theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f i) (g i) :=
rfl
#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
+-/
#print Dfinsupp.mem_rangeIcc_apply_iff /-
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
@@ -151,6 +159,7 @@ theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g
#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
-/
+#print Dfinsupp.support_rangeIcc_subset /-
theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
(f.rangeIcc g).support ⊆ f.support ∪ g.support :=
by
@@ -161,6 +170,7 @@ theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
not_mem_support_iff.1 (not_mem_mono (subset_union_right _ _) h)]
exact Icc_self _
#align dfinsupp.support_range_Icc_subset Dfinsupp.support_rangeIcc_subset
+-/
end BundledIcc
@@ -176,17 +186,21 @@ def pi (f : Π₀ i, Finset (α i)) : Finset (Π₀ i, α i) :=
#align dfinsupp.pi Dfinsupp.pi
-/
+#print Dfinsupp.mem_pi /-
@[simp]
theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_dfinsupp_iff_of_support_subset <| Subset.refl _
#align dfinsupp.mem_pi Dfinsupp.mem_pi
+-/
+#print Dfinsupp.card_pi /-
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
by
rw [pi, card_dfinsupp]
exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
#align dfinsupp.card_pi Dfinsupp.card_pi
+-/
end Pi
@@ -206,25 +220,35 @@ instance : LocallyFiniteOrder (Π₀ i, α i) :=
variable (f g : Π₀ i, α i)
+#print Dfinsupp.Icc_eq /-
theorem Icc_eq : Icc f g = (f.support ∪ g.support).Dfinsupp (f.rangeIcc g) :=
rfl
#align dfinsupp.Icc_eq Dfinsupp.Icc_eq
+-/
+#print Dfinsupp.card_Icc /-
theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card :=
card_dfinsupp _ _
#align dfinsupp.card_Icc Dfinsupp.card_Icc
+-/
+#print Dfinsupp.card_Ico /-
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 dfinsupp.card_Ico Dfinsupp.card_Ico
+-/
+#print Dfinsupp.card_Ioc /-
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 dfinsupp.card_Ioc Dfinsupp.card_Ioc
+-/
+#print Dfinsupp.card_Ioo /-
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 dfinsupp.card_Ioo Dfinsupp.card_Ioo
+-/
end LocallyFinite
@@ -236,14 +260,18 @@ variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder
variable (f : Π₀ i, α i)
+#print Dfinsupp.card_Iic /-
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
simp_rw [Iic_eq_Icc, card_Icc, Dfinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
bot_eq_zero]
#align dfinsupp.card_Iic Dfinsupp.card_Iic
+-/
+#print Dfinsupp.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 dfinsupp.card_Iio Dfinsupp.card_Iio
+-/
end CanonicallyOrdered
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -214,15 +214,15 @@ theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i)
card_dfinsupp _ _
#align dfinsupp.card_Icc Dfinsupp.card_Icc
-theorem card_Ico : (Ico f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
+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 dfinsupp.card_Ico Dfinsupp.card_Ico
-theorem card_Ioc : (Ioc f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 1 := by
+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 dfinsupp.card_Ioc Dfinsupp.card_Ioc
-theorem card_Ioo : (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card) - 2 := by
+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 dfinsupp.card_Ioo Dfinsupp.card_Ioo
@@ -241,7 +241,7 @@ theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
bot_eq_zero]
#align dfinsupp.card_Iic Dfinsupp.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 dfinsupp.card_Iio Dfinsupp.card_Iio
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -83,7 +83,7 @@ theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 (not_mem_mono ht hi)]
exact zero_mem_zero
- · rwa [H, mem_zero] at h
+ · rwa [H, mem_zero] at h
#align finset.mem_dfinsupp_iff_of_support_subset Finset.mem_dfinsupp_iff_of_support_subset
end Finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -26,7 +26,7 @@ finite and calculates the cardinality of its finite intervals.
open Dfinsupp Finset
-open BigOperators Pointwise
+open scoped BigOperators Pointwise
variable {ι : Type _} {α : ι → Type _}
@@ -145,9 +145,11 @@ theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f
rfl
#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
+#print Dfinsupp.mem_rangeIcc_apply_iff /-
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
mem_Icc
#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
+-/
theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
(f.rangeIcc g).support ⊆ f.support ∪ g.support :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -46,12 +46,6 @@ def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i)
#align finset.dfinsupp Finset.dfinsupp
-/
-/- warning: finset.card_dfinsupp -> Finset.card_dfinsupp is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Zero.{u2} (α i)] (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s t)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid s (fun (i : ι) => Finset.card.{u2} (α i) (t i)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Zero.{u1} (α i)] (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s t)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid s (fun (i : ι) => Finset.card.{u1} (α i) (t i)))
-Case conversion may be inaccurate. Consider using '#align finset.card_dfinsupp Finset.card_dfinsuppₓ'. -/
@[simp]
theorem card_dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) :
(s.Dfinsupp t).card = ∏ i in s, (t i).card :=
@@ -60,12 +54,6 @@ theorem card_dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) :
variable [∀ i, DecidableEq (α i)]
-/- warning: finset.mem_dfinsupp_iff -> Finset.mem_dfinsupp_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Zero.{u2} (α i)] {s : Finset.{u1} ι} {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)} {t : forall (i : ι), Finset.{u2} (α i)} [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)], Iff (Membership.Mem.{max u1 u2, max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) (Finset.hasMem.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) f (Finset.dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s t)) (And (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_2 i))))) f) s) (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Membership.Mem.{u2, u2} (α i) (Finset.{u2} (α i)) (Finset.hasMem.{u2} (α i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) f i) (t i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Zero.{u1} (α i)] {s : Finset.{u2} ι} {f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)} {t : forall (i : ι), Finset.{u1} (α i)} [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)], Iff (Membership.mem.{max u2 u1, max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.{max u1 u2} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) (Finset.instMembershipFinset.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) f (Finset.dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s t)) (And (HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_2 i)))) (_inst_3 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_2 i))))) f) s) (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (Membership.mem.{u1, u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.{u1} (α i)) (Finset.instMembershipFinset.{u1} (α i)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_2 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_2 i) i)) f i) (t i))))
-Case conversion may be inaccurate. Consider using '#align finset.mem_dfinsupp_iff Finset.mem_dfinsupp_iffₓ'. -/
theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i :=
by
refine' mem_map.trans ⟨_, _⟩
@@ -79,12 +67,6 @@ theorem mem_dfinsupp_iff : f ∈ s.Dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈
exact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1 H).symm
#align finset.mem_dfinsupp_iff Finset.mem_dfinsupp_iff
-/- warning: finset.mem_dfinsupp_iff_of_support_subset -> Finset.mem_dfinsupp_iff_of_support_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), Zero.{u2} (α i)] {s : Finset.{u1} ι} {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)} [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] {t : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))}, (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_2 i)))))) t) s) -> (Iff (Membership.Mem.{max u1 u2, max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) (Finset.hasMem.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) f (Finset.dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) t))) (forall (i : ι), Membership.Mem.{u2, u2} (α i) (Finset.{u2} (α i)) (Finset.hasMem.{u2} (α i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_2 i))) t i)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), Zero.{u1} (α i)] {s : Finset.{u2} ι} {f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)} [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] {t : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i))}, (HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_2 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_2 i)))))) t) s) -> (Iff (Membership.mem.{max u2 u1, max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i)) (Finset.{max u1 u2} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) (Finset.instMembershipFinset.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_2 i))) f (Finset.dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_2 i) s (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i)) i)) t))) (forall (i : ι), Membership.mem.{u1, u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) ((fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) i) (Finset.instMembershipFinset.{u1} (α i)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_2 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_2 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_2 i)) i)) t i)))
-Case conversion may be inaccurate. Consider using '#align finset.mem_dfinsupp_iff_of_support_subset Finset.mem_dfinsupp_iff_of_support_subsetₓ'. -/
/-- When `t` is supported on `s`, `f ∈ s.dfinsupp t` precisely means that `f` is pointwise in `t`.
-/
@[simp]
@@ -158,33 +140,15 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i)
#align dfinsupp.range_Icc Dfinsupp.rangeIcc
-/
-/- warning: dfinsupp.range_Icc_apply -> Dfinsupp.rangeIcc_apply is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (i : ι), Eq.{succ u2} (Finset.{u2} ((fun (i : ι) => α i) i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) => forall (i : ι), Finset.{u2} ((fun (i : ι) => α i) i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i) (Finset.Icc.{u2} ((fun (i : ι) => α i) i) (PartialOrder.toPreorder.{u2} ((fun (i : ι) => α i) i) (_inst_2 i)) (_inst_3 i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) g i))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_2 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (i : ι), Eq.{succ u1} ((fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) (Dfinsupp.rangeIcc.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i) (Finset.Icc.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_2 i)) (_inst_3 i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) g i))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_applyₓ'. -/
@[simp]
theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f i) (g i) :=
rfl
#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
-/- warning: dfinsupp.mem_range_Icc_apply_iff -> Dfinsupp.mem_rangeIcc_apply_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {i : ι} {a : α i}, Iff (Membership.Mem.{u2, u2} (α i) (Finset.{u2} ((fun (i : ι) => α i) i)) (Finset.hasMem.{u2} ((fun (i : ι) => α i) i)) a (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) => forall (i : ι), Finset.{u2} ((fun (i : ι) => α i) i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i)) (And (LE.le.{u2} (α i) (Preorder.toHasLe.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) f i) a) (LE.le.{u2} (α i) (Preorder.toHasLe.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) a (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) g i)))
-but is expected to have type
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {i : ι} {a : α i}, Iff (Membership.mem.{u2, u2} (α i) ((fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) i) (Finset.instMembershipFinset.{u2} (α i)) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) i)) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i)) (And (LE.le.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Preorder.toLE.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_2 i))) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) f i) a) (LE.le.{u2} (α i) (Preorder.toLE.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) g i)))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iffₓ'. -/
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
mem_Icc
#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
-/- warning: dfinsupp.support_range_Icc_subset -> Dfinsupp.support_rangeIcc_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} [_inst_4 : DecidableEq.{succ u1} ι] [_inst_5 : forall (i : ι), DecidableEq.{succ u2} (α i)], HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_5 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g)) (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => _inst_1 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_5 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_1 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => _inst_1 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_5 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_1 i))))) g))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_2 i))] {f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} [_inst_4 : DecidableEq.{succ u2} ι] [_inst_5 : forall (i : ι), DecidableEq.{succ u1} (α i)], HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_5 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) (Dfinsupp.rangeIcc.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g)) (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => _inst_4 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => _inst_1 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_1 i)))) (_inst_5 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_1 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_4 a b) (fun (i : ι) => _inst_1 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_1 i)))) (_inst_5 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_1 i))))) g))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.support_range_Icc_subset Dfinsupp.support_rangeIcc_subsetₓ'. -/
theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
(f.rangeIcc g).support ⊆ f.support ∪ g.support :=
by
@@ -210,23 +174,11 @@ def pi (f : Π₀ i, Finset (α i)) : Finset (Π₀ i, α i) :=
#align dfinsupp.pi Dfinsupp.pi
-/
-/- warning: dfinsupp.mem_pi -> Dfinsupp.mem_pi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Finset.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) (Finset.hasMem.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) g (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (forall (i : ι), Membership.Mem.{u2, u2} (α i) (Finset.{u2} (α i)) (Finset.hasMem.{u2} (α i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) g i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] {f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))} {g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)}, Iff (Membership.mem.{max u2 u1, max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Finset.{max u1 u2} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) (Finset.instMembershipFinset.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i))) g (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (forall (i : ι), Membership.mem.{u1, u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) ((fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) i) (Finset.instMembershipFinset.{u1} (α i)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) g i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.mem_pi Dfinsupp.mem_piₓ'. -/
@[simp]
theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_dfinsupp_iff_of_support_subset <| Subset.refl _
#align dfinsupp.mem_pi Dfinsupp.mem_pi
-/- warning: dfinsupp.card_pi -> Dfinsupp.card_pi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25482 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
by
@@ -252,52 +204,22 @@ instance : LocallyFiniteOrder (Π₀ i, α i) :=
variable (f g : Π₀ i, α i)
-/- warning: dfinsupp.Icc_eq -> Dfinsupp.Icc_eq is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_4 : forall (i : ι), Zero.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i))) (Finset.Icc.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g) (Finset.dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) g)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_4 i) i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_4 i) i))) => forall (i : ι), Finset.{u2} ((fun (i : ι) => α i) i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_4 i) i))) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_5 i) f g)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_4 : forall (i : ι), Zero.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i))) (Finset.Icc.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g) (Finset.dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) g)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_4 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_4 i)) i)) (Dfinsupp.rangeIcc.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_5 i) f g)))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.Icc_eq Dfinsupp.Icc_eqₓ'. -/
theorem Icc_eq : Icc f g = (f.support ∪ g.support).Dfinsupp (f.rangeIcc g) :=
rfl
#align dfinsupp.Icc_eq Dfinsupp.Icc_eq
-/- warning: dfinsupp.card_Icc -> Dfinsupp.card_Icc is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_4 : forall (i : ι), Zero.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Icc.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i)) (_inst_5 i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) g i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_4 : forall (i : ι), Zero.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Icc.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Union.union.{u2} (Finset.{u2} ι) (Finset.instUnionFinset.{u2} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Icc.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_5 i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) g i))))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Icc Dfinsupp.card_Iccₓ'. -/
theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card :=
card_dfinsupp _ _
#align dfinsupp.card_Icc Dfinsupp.card_Icc
-/- warning: dfinsupp.card_Ico -> Dfinsupp.card_Ico is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_4 : forall (i : ι), Zero.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ico.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i)) (_inst_5 i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) 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 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_4 : forall (i : ι), Zero.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ico.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) 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 : ι) => _inst_1 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Icc.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_5 i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Ico Dfinsupp.card_Icoₓ'. -/
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 dfinsupp.card_Ico Dfinsupp.card_Ico
-/- warning: dfinsupp.card_Ioc -> Dfinsupp.card_Ioc is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_4 : forall (i : ι), Zero.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ioc.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i)) (_inst_5 i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) 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 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_4 : forall (i : ι), Zero.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ioc.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) 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 : ι) => _inst_1 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Icc.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_5 i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) g i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Ioc Dfinsupp.card_Iocₓ'. -/
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 dfinsupp.card_Ioc Dfinsupp.card_Ioc
-/- warning: dfinsupp.card_Ioo -> Dfinsupp.card_Ioo is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_4 : forall (i : ι), Zero.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ioo.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_3 i))) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) f g)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Union.union.{u1} (Finset.{u1} ι) (Finset.hasUnion.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_3 i)) (_inst_5 i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) f i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) 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 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_4 : forall (i : ι), Zero.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (g : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Finset.Ioo.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i)) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_3 i))) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => _inst_3 i) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) 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 : ι) => _inst_1 a b)) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) f) (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i)))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (_inst_4 i))))) g)) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Icc.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_5 i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_4 i) i)) g i)))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Ioo Dfinsupp.card_Iooₓ'. -/
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 dfinsupp.card_Ioo Dfinsupp.card_Ioo
@@ -312,17 +234,11 @@ variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder
variable (f : Π₀ i, α i)
-/- warning: dfinsupp.card_Iic -> Dfinsupp.card_Iic is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Iic Dfinsupp.card_Iicₓ'. -/
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
simp_rw [Iic_eq_Icc, card_Icc, Dfinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
bot_eq_zero]
#align dfinsupp.card_Iic Dfinsupp.card_Iic
-/- warning: dfinsupp.card_Iio -> Dfinsupp.card_Iio is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Iio Dfinsupp.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 dfinsupp.card_Iio Dfinsupp.card_Iio
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -313,10 +313,7 @@ variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder
variable (f : Π₀ i, α i)
/- warning: dfinsupp.card_Iic -> Dfinsupp.card_Iic is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), CanonicallyOrderedAddMonoid.{u2} (α i)] [_inst_4 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Finset.Iic.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))) (Dfinsupp.orderBot.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => _inst_4 i))) f)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))))))) f) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Iic.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} (α i) (_inst_3 i)) (_inst_4 i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) f i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), CanonicallyOrderedAddMonoid.{u1} (α i)] [_inst_4 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Finset.Iic.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))) (Dfinsupp.instOrderBotDfinsuppToZeroToAddMonoidToAddCommMonoidToOrderedAddCommMonoidInstLEDfinsuppToLEToPreorderToPartialOrder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => _inst_4 i))) f)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))))))) f) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Iic.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_4 i)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) i)) f i))))
+<too large>
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Iic Dfinsupp.card_Iicₓ'. -/
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
simp_rw [Iic_eq_Icc, card_Icc, Dfinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
@@ -324,10 +321,7 @@ theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
#align dfinsupp.card_Iic Dfinsupp.card_Iic
/- warning: dfinsupp.card_Iio -> Dfinsupp.card_Iio is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_3 : forall (i : ι), CanonicallyOrderedAddMonoid.{u2} (α i)] [_inst_4 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Finset.Iio.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (Dfinsupp.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))) (Dfinsupp.orderBot.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Dfinsupp.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) => _inst_4 i))) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Dfinsupp.support.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))) (fun (i : ι) (x : α i) => Ne.decidable.{succ u2} (α i) (fun (a : α i) (b : α i) => _inst_2 i a b) x (OfNat.ofNat.{u2} (α i) 0 (OfNat.mk.{u2} (α i) 0 (Zero.zero.{u2} (α i) (AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))))))))) f) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Iic.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (OrderedAddCommMonoid.toPartialOrder.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i)))) (CanonicallyOrderedAddMonoid.toOrderBot.{u2} (α i) (_inst_3 i)) (_inst_4 i)) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => AddZeroClass.toHasZero.{u2} (α i) (AddMonoid.toAddZeroClass.{u2} (α i) (AddCommMonoid.toAddMonoid.{u2} (α i) (OrderedAddCommMonoid.toAddCommMonoid.{u2} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u2} (α i) (_inst_3 i))))))) 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 : DecidableEq.{succ u2} ι] [_inst_2 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_3 : forall (i : ι), CanonicallyOrderedAddMonoid.{u1} (α i)] [_inst_4 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Finset.Iio.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))) (Dfinsupp.instPreorderDfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))))) (Dfinsupp.instOrderBotDfinsuppToZeroToAddMonoidToAddCommMonoidToOrderedAddCommMonoidInstLEDfinsuppToLEToPreorderToPartialOrder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_3 i)) (Dfinsupp.instLocallyFiniteOrderDfinsuppInstPreorderDfinsuppToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_2 i a b) (fun (i : ι) => OrderedAddCommMonoid.toPartialOrder.{u1} (α i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} (α i) (_inst_3 i))) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) => _inst_4 i))) f)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Dfinsupp.support.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) (fun (i : ι) (x : α i) => instDecidableNot (Eq.{succ u1} (α i) x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i)))))))) (_inst_2 i x (OfNat.ofNat.{u1} (α i) 0 (Zero.toOfNat0.{u1} (α i) (AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))))))) f) (fun (i : ι) => Finset.card.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Finset.Iic.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (OrderedAddCommMonoid.toPartialOrder.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)))) (CanonicallyOrderedAddMonoid.toOrderBot.{u1} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_3 i)) (_inst_4 i)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => AddMonoid.toZero.{u1} ((fun (i : ι) => α i) i) (AddCommMonoid.toAddMonoid.{u1} ((fun (i : ι) => α i) i) (OrderedAddCommMonoid.toAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} ((fun (i : ι) => α i) i) (_inst_3 i))))) i)) f i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
+<too large>
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_Iio Dfinsupp.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]
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -169,11 +169,15 @@ theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f
rfl
#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
-#print Dfinsupp.mem_rangeIcc_apply_iff /-
+/- warning: dfinsupp.mem_range_Icc_apply_iff -> Dfinsupp.mem_rangeIcc_apply_iff is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {i : ι} {a : α i}, Iff (Membership.Mem.{u2, u2} (α i) (Finset.{u2} ((fun (i : ι) => α i) i)) (Finset.hasMem.{u2} ((fun (i : ι) => α i) i)) a (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) => forall (i : ι), Finset.{u2} ((fun (i : ι) => α i) i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} ((fun (i : ι) => α i) i)) (fun (i : ι) => Finset.zero.{u2} ((fun (i : ι) => α i) i) ((fun (i : ι) => _inst_1 i) i))) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i)) (And (LE.le.{u2} (α i) (Preorder.toHasLe.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) f i) a) (LE.le.{u2} (α i) (Preorder.toHasLe.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) a (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) => forall (i : ι), α i) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) g i)))
+but is expected to have type
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_3 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))] {f : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {g : Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)} {i : ι} {a : α i}, Iff (Membership.mem.{u2, u2} (α i) ((fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) i) (Finset.instMembershipFinset.{u2} (α i)) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => Finset.{u2} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) i)) (Dfinsupp.rangeIcc.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (i : ι) => _inst_2 i) (fun (i : ι) => _inst_3 i) f g) i)) (And (LE.le.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (Preorder.toLE.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (PartialOrder.toPreorder.{u2} ((fun (i : ι) => (fun (i : ι) => α i) i) i) (_inst_2 i))) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) f i) a) (LE.le.{u2} (α i) (Preorder.toLE.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_2 i))) a (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => α i) i) _x) (Dfinsupp.funLike.{u1, u2} ι (fun (i : ι) => (fun (i : ι) => α i) i) (fun (i : ι) => (fun (i : ι) => _inst_1 i) i)) g i)))
+Case conversion may be inaccurate. Consider using '#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iffₓ'. -/
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i :=
mem_Icc
#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
--/
/- warning: dfinsupp.support_range_Icc_subset -> Dfinsupp.support_rangeIcc_subset is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25484 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25482 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25430 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25484 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25258 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25430 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => instNatCastNat)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25266 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25258 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25292 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25266 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -221,7 +221,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Zero.{u2} (α i)] [_inst_2 : DecidableEq.{succ u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] (f : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u1 u2} (Dfinsupp.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u1, u2, 0} ι Nat (fun (i : ι) => Finset.{u2} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u2} (α i)) => Ne.decidable.{succ u2} (Finset.{u2} (α i)) (fun (a : Finset.{u2} (α i)) (b : Finset.{u2} (α i)) => Finset.decidableEq.{u2} (α i) (fun (a : α i) (b : α i) => _inst_3 i a b) a b) x (OfNat.ofNat.{u2} (Finset.{u2} (α i)) 0 (OfNat.mk.{u2} (Finset.{u2} (α i)) 0 (Zero.zero.{u2} (Finset.{u2} (α i)) (Finset.zero.{u2} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} (α i)) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} (α i)) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} (α i)) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} (α i)) (fun (ᾰ : Finset.{u2} (α i)) => Nat) (fun (a : Finset.{u2} (α i)) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} (α i) (coeFn.{succ (max u1 u2), max (succ u1) (succ u2)} (Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) (fun (_x : Dfinsupp.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) => forall (i : ι), Finset.{u2} (α i)) (Dfinsupp.hasCoeToFun.{u1, u2} ι (fun (i : ι) => Finset.{u2} (α i)) (fun (i : ι) => Finset.zero.{u2} (α i) (_inst_1 i))) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25291 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Zero.{u1} (α i)] [_inst_2 : DecidableEq.{succ u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] (f : Dfinsupp.{u2, u1} ι (fun (i : ι) => Finset.{u1} (α i)) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i))), Eq.{1} Nat (Finset.card.{max u2 u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i)) (Dfinsupp.pi.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => _inst_1 i) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) f)) (Dfinsupp.prod.{u2, u1, 0} ι Nat (fun (i : ι) => Finset.{u1} (α i)) (fun (a : ι) (b : ι) => _inst_2 a b) (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) (fun (i : ι) (x : Finset.{u1} (α i)) => instDecidableNot (Eq.{succ u1} (Finset.{u1} (α i)) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i))))) (Finset.decidableEq.{u1} (α i) ((fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) i) x (OfNat.ofNat.{u1} (Finset.{u1} (α i)) 0 (Zero.toOfNat0.{u1} (Finset.{u1} (α i)) (Finset.zero.{u1} (α i) (_inst_1 i)))))) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} (α i)) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} (α i)) (fun (a._@.Mathlib.Data.Dfinsupp.Basic._hyg.25292 : Finset.{u1} (α i)) => Nat) (fun (a : Finset.{u1} (α i)) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} (α i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Dfinsupp.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) ι (fun (_x : ι) => (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) _x) (Dfinsupp.funLike.{u2, u1} ι (fun (i : ι) => (fun (i : ι) => Finset.{u1} (α i)) i) (fun (i : ι) => (fun (i : ι) => Finset.zero.{u1} (α i) (_inst_1 i)) i)) f i))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.card_pi Dfinsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -3,10 +3,10 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathlib.Data.Finset.LocallyFinite.Basic
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.DFinsupp.Order
+import Mathlib.Order.Interval.Finset.Basic
#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
@@ -151,7 +151,7 @@ theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.prod fun i => (f i).card := by
rw [pi, card_dfinsupp]
- exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
+ exact Finset.prod_congr rfl fun i _ => by simp only [Pi.natCast_apply, Nat.cast_id]
#align dfinsupp.card_pi DFinsupp.card_pi
end Pi
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)
@@ -159,7 +159,6 @@ end Pi
section PartialOrder
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
-
variable [∀ i, PartialOrder (α i)] [∀ i, Zero (α i)] [∀ i, LocallyFiniteOrder (α i)]
instance instLocallyFiniteOrder : LocallyFiniteOrder (Π₀ i, α i) :=
@@ -206,9 +205,7 @@ end Lattice
section CanonicallyOrdered
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
-
variable [∀ i, CanonicallyOrderedAddCommMonoid (α i)] [∀ i, LocallyFiniteOrder (α i)]
-
variable (f : Π₀ i, α i)
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -48,7 +48,7 @@ variable [∀ i, DecidableEq (α i)]
theorem mem_dfinsupp_iff : f ∈ s.dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i := by
refine' mem_map.trans ⟨_, _⟩
· rintro ⟨f, hf, rfl⟩
- rw [Function.Embedding.coeFn_mk] -- porting note: added to avoid heartbeat timeout
+ rw [Function.Embedding.coeFn_mk] -- Porting note: added to avoid heartbeat timeout
refine' ⟨support_mk_subset, fun i hi => _⟩
convert mem_pi.1 hf i hi
exact mk_of_mem hi
@@ -110,7 +110,7 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i) where
(Multiset.not_mem_mono (Multiset.Le.subset <| Multiset.le_add_right _ _) h)
have hg : g i = 0 := (gs.prop i).resolve_left
(Multiset.not_mem_mono (Multiset.Le.subset <| Multiset.le_add_left _ _) h)
- -- porting note: was rw, but was rewriting under lambda, so changed to simp_rw
+ -- Porting note: was rw, but was rewriting under lambda, so changed to simp_rw
simp_rw [hf, hg]
exact Icc_self _⟩
#align dfinsupp.range_Icc DFinsupp.rangeIcc
@@ -162,7 +162,7 @@ variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
variable [∀ i, PartialOrder (α i)] [∀ i, Zero (α i)] [∀ i, LocallyFiniteOrder (α i)]
-instance : LocallyFiniteOrder (Π₀ i, α i) :=
+instance instLocallyFiniteOrder : LocallyFiniteOrder (Π₀ i, α i) :=
LocallyFiniteOrder.ofIcc (Π₀ i, α i)
(fun f g => (f.support ∪ g.support).dfinsupp <| f.rangeIcc g)
(fun f g x => by
Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n
.
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.DFinsupp.Order
@@ -198,7 +198,7 @@ variable [DecidableEq ι] [∀ i, DecidableEq (α i)] [∀ i, Lattice (α i)] [
[∀ i, LocallyFiniteOrder (α i)] (f g : Π₀ i, α i)
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 _ _
+ rw [← support_inf_union_support_sup]; exact card_Icc _ _
#align dfinsupp.card_uIcc DFinsupp.card_uIcc
end Lattice
Renames:
CanonicallyOrderedMonoid
->
CanonicallyOrderedCommMonoid
CanonicallyOrderedAddMonoid
->
CanonicallyOrderedAddCommMonoid
CanonicallyLinearOrderedMonoid
->
CanonicallyLinearOrderedCommMonoid
CanonicallyLinearOrderedAddMonoid
->
CanonicallyLinearOrderedAddCommMonoid
@@ -207,7 +207,7 @@ section CanonicallyOrdered
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
-variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder (α i)]
+variable [∀ i, CanonicallyOrderedAddCommMonoid (α i)] [∀ i, LocallyFiniteOrder (α i)]
variable (f : Π₀ i, α i)
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -22,7 +22,7 @@ open DFinsupp Finset
open BigOperators Pointwise
-variable {ι : Type _} {α : ι → Type _}
+variable {ι : Type*} {α : ι → Type*}
namespace Finset
@@ -2,17 +2,14 @@
Copyright (c) 2021 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.dfinsupp.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.LocallyFinite
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.DFinsupp.Order
+#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals of finitely supported functions
finset.uIcc
on concrete structures (#5946)
Match https://github.com/leanprover-community/mathlib/pull/18838
Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module data.dfinsupp.interval
-! leanprover-community/mathlib commit 98e83c3d541c77cdb7da20d79611a780ff8e7d90
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -159,7 +159,7 @@ theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.prod fun i => (f i)
end Pi
-section LocallyFinite
+section PartialOrder
variable [DecidableEq ι] [∀ i, DecidableEq (α i)]
@@ -194,7 +194,17 @@ theorem card_Ioo : (Ioo f g).card = (∏ i in f.support ∪ g.support, (Icc (f i
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
#align dfinsupp.card_Ioo DFinsupp.card_Ioo
-end LocallyFinite
+end PartialOrder
+
+section Lattice
+variable [DecidableEq ι] [∀ i, DecidableEq (α i)] [∀ i, Lattice (α i)] [∀ i, Zero (α i)]
+ [∀ i, LocallyFiniteOrder (α i)] (f g : Π₀ i, α i)
+
+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 dfinsupp.card_uIcc DFinsupp.card_uIcc
+
+end Lattice
section CanonicallyOrdered
@@ -11,7 +11,7 @@ Authors: Yaël Dillies
import Mathlib.Data.Finset.LocallyFinite
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
-import Mathlib.Data.Dfinsupp.Order
+import Mathlib.Data.DFinsupp.Order
/-!
# Finite intervals of finitely supported functions
@@ -21,7 +21,7 @@ finite and calculates the cardinality of its finite intervals.
-/
-open Dfinsupp Finset
+open DFinsupp Finset
open BigOperators Pointwise
@@ -34,7 +34,7 @@ variable [DecidableEq ι] [∀ i, Zero (α i)] {s : Finset ι} {f : Π₀ i, α
/-- Finitely supported product of finsets. -/
def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i) :=
(s.pi t).map
- ⟨fun f => Dfinsupp.mk s fun i => f i i.2, by
+ ⟨fun f => DFinsupp.mk s fun i => f i i.2, by
refine' (mk_injective _).comp fun f g h => _
ext i hi
convert congr_fun h ⟨i, hi⟩⟩
@@ -80,21 +80,21 @@ end Finset
open Finset
-namespace Dfinsupp
+namespace DFinsupp
section BundledSingleton
variable [∀ i, Zero (α i)] {f : Π₀ i, α i} {i : ι} {a : α i}
-/-- Pointwise `Finset.singleton` bundled as a `Dfinsupp`. -/
+/-- Pointwise `Finset.singleton` bundled as a `DFinsupp`. -/
def singleton (f : Π₀ i, α i) : Π₀ i, Finset (α i) where
toFun i := {f i}
support' := f.support'.map fun s => ⟨s.1, fun i => (s.prop i).imp id (congr_arg _)⟩
-#align dfinsupp.singleton Dfinsupp.singleton
+#align dfinsupp.singleton DFinsupp.singleton
theorem mem_singleton_apply_iff : a ∈ f.singleton i ↔ a = f i :=
mem_singleton
-#align dfinsupp.mem_singleton_apply_iff Dfinsupp.mem_singleton_apply_iff
+#align dfinsupp.mem_singleton_apply_iff DFinsupp.mem_singleton_apply_iff
end BundledSingleton
@@ -103,7 +103,7 @@ section BundledIcc
variable [∀ i, Zero (α i)] [∀ i, PartialOrder (α i)] [∀ i, LocallyFiniteOrder (α i)]
{f g : Π₀ i, α i} {i : ι} {a : α i}
-/-- Pointwise `Finset.Icc` bundled as a `Dfinsupp`. -/
+/-- Pointwise `Finset.Icc` bundled as a `DFinsupp`. -/
def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i) where
toFun i := Icc (f i) (g i)
support' := f.support'.bind fun fs => g.support'.map fun gs =>
@@ -116,14 +116,14 @@ def rangeIcc (f g : Π₀ i, α i) : Π₀ i, Finset (α i) where
-- porting note: was rw, but was rewriting under lambda, so changed to simp_rw
simp_rw [hf, hg]
exact Icc_self _⟩
-#align dfinsupp.range_Icc Dfinsupp.rangeIcc
+#align dfinsupp.range_Icc DFinsupp.rangeIcc
@[simp]
theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f i) (g i) := rfl
-#align dfinsupp.range_Icc_apply Dfinsupp.rangeIcc_apply
+#align dfinsupp.range_Icc_apply DFinsupp.rangeIcc_apply
theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i := mem_Icc
-#align dfinsupp.mem_range_Icc_apply_iff Dfinsupp.mem_rangeIcc_apply_iff
+#align dfinsupp.mem_range_Icc_apply_iff DFinsupp.mem_rangeIcc_apply_iff
theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
(f.rangeIcc g).support ⊆ f.support ∪ g.support := by
@@ -133,7 +133,7 @@ theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
rw [rangeIcc_apply, not_mem_support_iff.1 (not_mem_mono (subset_union_left _ _) h),
not_mem_support_iff.1 (not_mem_mono (subset_union_right _ _) h)]
exact Icc_self _
-#align dfinsupp.support_range_Icc_subset Dfinsupp.support_rangeIcc_subset
+#align dfinsupp.support_range_Icc_subset DFinsupp.support_rangeIcc_subset
end BundledIcc
@@ -144,18 +144,18 @@ variable [∀ i, Zero (α i)] [DecidableEq ι] [∀ i, DecidableEq (α i)]
/-- Given a finitely supported function `f : Π₀ i, Finset (α i)`, one can define the finset
`f.pi` of all finitely supported functions whose value at `i` is in `f i` for all `i`. -/
def pi (f : Π₀ i, Finset (α i)) : Finset (Π₀ i, α i) := f.support.dfinsupp f
-#align dfinsupp.pi Dfinsupp.pi
+#align dfinsupp.pi DFinsupp.pi
@[simp]
theorem mem_pi {f : Π₀ i, Finset (α i)} {g : Π₀ i, α i} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_dfinsupp_iff_of_support_subset <| Subset.refl _
-#align dfinsupp.mem_pi Dfinsupp.mem_pi
+#align dfinsupp.mem_pi DFinsupp.mem_pi
@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.prod fun i => (f i).card := by
rw [pi, card_dfinsupp]
exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
-#align dfinsupp.card_pi Dfinsupp.card_pi
+#align dfinsupp.card_pi DFinsupp.card_pi
end Pi
@@ -176,23 +176,23 @@ instance : LocallyFiniteOrder (Π₀ i, α i) :=
variable (f g : Π₀ i, α i)
theorem Icc_eq : Icc f g = (f.support ∪ g.support).dfinsupp (f.rangeIcc g) := rfl
-#align dfinsupp.Icc_eq Dfinsupp.Icc_eq
+#align dfinsupp.Icc_eq DFinsupp.Icc_eq
theorem card_Icc : (Icc f g).card = ∏ i in f.support ∪ g.support, (Icc (f i) (g i)).card :=
card_dfinsupp _ _
-#align dfinsupp.card_Icc Dfinsupp.card_Icc
+#align dfinsupp.card_Icc DFinsupp.card_Icc
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 dfinsupp.card_Ico Dfinsupp.card_Ico
+#align dfinsupp.card_Ico DFinsupp.card_Ico
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 dfinsupp.card_Ioc Dfinsupp.card_Ioc
+#align dfinsupp.card_Ioc DFinsupp.card_Ioc
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 dfinsupp.card_Ioo Dfinsupp.card_Ioo
+#align dfinsupp.card_Ioo DFinsupp.card_Ioo
end LocallyFinite
@@ -205,14 +205,14 @@ variable [∀ i, CanonicallyOrderedAddMonoid (α i)] [∀ i, LocallyFiniteOrder
variable (f : Π₀ i, α i)
theorem card_Iic : (Iic f).card = ∏ i in f.support, (Iic (f i)).card := by
- simp_rw [Iic_eq_Icc, card_Icc, Dfinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
+ simp_rw [Iic_eq_Icc, card_Icc, DFinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
bot_eq_zero]
-#align dfinsupp.card_Iic Dfinsupp.card_Iic
+#align dfinsupp.card_Iic DFinsupp.card_Iic
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 dfinsupp.card_Iio Dfinsupp.card_Iio
+#align dfinsupp.card_Iio DFinsupp.card_Iio
end CanonicallyOrdered
-end Dfinsupp
+end DFinsupp
ext
(#5258)
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com> Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Pol'tta / Miyahara Kō <pol_tta@outlook.jp> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Jireh Loreaux <loreaujy@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com> Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@@ -36,7 +36,7 @@ def dfinsupp (s : Finset ι) (t : ∀ i, Finset (α i)) : Finset (Π₀ i, α i)
(s.pi t).map
⟨fun f => Dfinsupp.mk s fun i => f i i.2, by
refine' (mk_injective _).comp fun f g h => _
- ext (i hi)
+ ext i hi
convert congr_fun h ⟨i, hi⟩⟩
#align finset.dfinsupp Finset.dfinsupp
I ran codespell Mathlib
and got tired halfway through the suggestions.
@@ -51,7 +51,7 @@ variable [∀ i, DecidableEq (α i)]
theorem mem_dfinsupp_iff : f ∈ s.dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i := by
refine' mem_map.trans ⟨_, _⟩
· rintro ⟨f, hf, rfl⟩
- rw [Function.Embedding.coeFn_mk] -- porting note: added to avoid hearbeat timeout
+ rw [Function.Embedding.coeFn_mk] -- porting note: added to avoid heartbeat timeout
refine' ⟨support_mk_subset, fun i hi => _⟩
convert mem_pi.1 hf i hi
exact mk_of_mem hi
The unported dependencies are