data.finset.finsupp
⟷
Mathlib.Data.Finset.Finsupp
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -117,7 +117,7 @@ theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀
theorem card_pi (f : ι →₀ Finset α) : f.pi.card = f.Prod fun i => (f i).card :=
by
rw [pi, card_finsupp]
- 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 finsupp.card_pi Finsupp.card_pi
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -79,7 +79,7 @@ theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.supp
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 fun H => hi <| ht H]
exact zero_mem_zero
- · rwa [H, mem_zero] at h
+ · rwa [H, mem_zero] at h
#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subset
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathbin.Algebra.BigOperators.Finsupp
-import Mathbin.Data.Finset.Pointwise
-import Mathbin.Data.Finsupp.Indicator
-import Mathbin.Data.Fintype.BigOperators
+import Algebra.BigOperators.Finsupp
+import Data.Finset.Pointwise
+import Data.Finsupp.Indicator
+import Data.Fintype.BigOperators
#align_import data.finset.finsupp from "leanprover-community/mathlib"@"f16e7a22e11fc09c71f25446ac1db23a24e8a0bd"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.finsupp
-! leanprover-community/mathlib commit f16e7a22e11fc09c71f25446ac1db23a24e8a0bd
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.BigOperators.Finsupp
import Mathbin.Data.Finset.Pointwise
import Mathbin.Data.Finsupp.Indicator
import Mathbin.Data.Fintype.BigOperators
+#align_import data.finset.finsupp from "leanprover-community/mathlib"@"f16e7a22e11fc09c71f25446ac1db23a24e8a0bd"
+
/-!
# Finitely supported product of finsets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -66,6 +66,7 @@ theorem mem_finsupp_iff {t : ι → Finset α} : f ∈ s.Finsupp t ↔ f.support
#align finset.mem_finsupp_iff Finset.mem_finsupp_iff
-/
+#print Finset.mem_finsupp_iff_of_support_subset /-
/-- When `t` is supported on `s`, `f ∈ s.finsupp t` precisely means that `f` is pointwise in `t`. -/
@[simp]
theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.support ⊆ s) :
@@ -83,12 +84,15 @@ theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.supp
exact zero_mem_zero
· rwa [H, mem_zero] at h
#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subset
+-/
+#print Finset.card_finsupp /-
@[simp]
theorem card_finsupp (s : Finset ι) (t : ι → Finset α) :
(s.Finsupp t).card = ∏ i in s, (t i).card :=
(card_map _).trans <| card_pi _ _
#align finset.card_finsupp Finset.card_finsupp
+-/
end Finset
@@ -104,17 +108,21 @@ def pi (f : ι →₀ Finset α) : Finset (ι →₀ α) :=
#align finsupp.pi Finsupp.pi
-/
+#print Finsupp.mem_pi /-
@[simp]
theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_finsupp_iff_of_support_subset <| Subset.refl _
#align finsupp.mem_pi Finsupp.mem_pi
+-/
+#print Finsupp.card_pi /-
@[simp]
theorem card_pi (f : ι →₀ Finset α) : f.pi.card = f.Prod fun i => (f i).card :=
by
rw [pi, card_finsupp]
exact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]
#align finsupp.card_pi Finsupp.card_pi
+-/
end Finsupp
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -81,7 +81,7 @@ theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.supp
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 fun H => hi <| ht H]
exact zero_mem_zero
- · rwa [H, mem_zero] at h
+ · rwa [H, mem_zero] at h
#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subset
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -39,7 +39,7 @@ noncomputable section
open Finsupp
-open BigOperators Classical Pointwise
+open scoped BigOperators Classical Pointwise
variable {ι α : Type _} [Zero α] {s : Finset ι} {f : ι →₀ α}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -66,12 +66,6 @@ theorem mem_finsupp_iff {t : ι → Finset α} : f ∈ s.Finsupp t ↔ f.support
#align finset.mem_finsupp_iff Finset.mem_finsupp_iff
-/
-/- warning: finset.mem_finsupp_iff_of_support_subset -> Finset.mem_finsupp_iff_of_support_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {s : Finset.{u1} ι} {f : Finsupp.{u1, u2} ι α _inst_1} {t : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)}, (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1) t) s) -> (Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) f (Finset.finsupp.{u1, u2} ι α _inst_1 s (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t))) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t i)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] {s : Finset.{u2} ι} {f : Finsupp.{u2, u1} ι α _inst_1} {t : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)}, (HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) (Finsupp.support.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1) t) s) -> (Iff (Membership.mem.{max u2 u1, max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u2, u1} ι α _inst_1)) (Finset.instMembershipFinset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1)) f (Finset.finsupp.{u2, u1} ι α _inst_1 s (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) t))) (forall (i : ι), Membership.mem.{u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) i) (Finset.instMembershipFinset.{u1} α) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α _inst_1) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) t i)))
-Case conversion may be inaccurate. Consider using '#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subsetₓ'. -/
/-- When `t` is supported on `s`, `f ∈ s.finsupp t` precisely means that `f` is pointwise in `t`. -/
@[simp]
theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.support ⊆ s) :
@@ -90,12 +84,6 @@ theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.supp
· rwa [H, mem_zero] at h
#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subset
-/- warning: finset.card_finsupp -> Finset.card_finsupp is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] (s : Finset.{u1} ι) (t : ι -> (Finset.{u2} α)), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.finsupp.{u1, u2} ι α _inst_1 s t)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid s (fun (i : ι) => Finset.card.{u2} α (t i)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] (s : Finset.{u2} ι) (t : ι -> (Finset.{u1} α)), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finset.finsupp.{u2, u1} ι α _inst_1 s t)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid s (fun (i : ι) => Finset.card.{u1} α (t i)))
-Case conversion may be inaccurate. Consider using '#align finset.card_finsupp Finset.card_finsuppₓ'. -/
@[simp]
theorem card_finsupp (s : Finset ι) (t : ι → Finset α) :
(s.Finsupp t).card = ∏ i in s, (t i).card :=
@@ -116,23 +104,11 @@ def pi (f : ι →₀ Finset α) : Finset (ι →₀ α) :=
#align finsupp.pi Finsupp.pi
-/
-/- warning: finsupp.mem_pi -> Finsupp.mem_pi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)} {g : Finsupp.{u1, u2} ι α _inst_1}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) g (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) g i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] {f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)} {g : Finsupp.{u2, u1} ι α _inst_1}, Iff (Membership.mem.{max u2 u1, max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u2, u1} ι α _inst_1)) (Finset.instMembershipFinset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1)) g (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (forall (i : ι), Membership.mem.{u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) i) (Finset.instMembershipFinset.{u1} α) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α _inst_1) g i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))
-Case conversion may be inaccurate. Consider using '#align finsupp.mem_pi Finsupp.mem_piₓ'. -/
@[simp]
theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀ i, g i ∈ f i :=
mem_finsupp_iff_of_support_subset <| Subset.refl _
#align finsupp.mem_pi Finsupp.mem_pi
-/- warning: finsupp.card_pi -> Finsupp.card_pi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] (f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (Finsupp.prod.{u1, u2, 0} ι (Finset.{u2} α) Nat (Finset.zero.{u2} α _inst_1) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} α) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} α) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} α) (fun (ᾰ : Finset.{u2} α) => Nat) (fun (a : Finset.{u2} α) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} α (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] (f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (Finsupp.prod.{u2, u1, 0} ι (Finset.{u1} α) Nat (Finset.zero.{u1} α _inst_1) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} α) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} α) (fun (a._@.Mathlib.Algebra.BigOperators.Finsupp._hyg.437 : Finset.{u1} α) => Nat) (fun (a : Finset.{u1} α) => instNatCastNat)) (Finset.card.{u1} α (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))))
-Case conversion may be inaccurate. Consider using '#align finsupp.card_pi Finsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : ι →₀ Finset α) : f.pi.card = f.Prod fun i => (f i).card :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -131,7 +131,7 @@ theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀
lean 3 declaration is
forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] (f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (Finsupp.prod.{u1, u2, 0} ι (Finset.{u2} α) Nat (Finset.zero.{u2} α _inst_1) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} α) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} α) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} α) (fun (ᾰ : Finset.{u2} α) => Nat) (fun (a : Finset.{u2} α) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} α (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))))
but is expected to have type
- forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] (f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (Finsupp.prod.{u2, u1, 0} ι (Finset.{u1} α) Nat (Finset.zero.{u1} α _inst_1) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} α) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} α) (fun (a._@.Mathlib.Algebra.BigOperators.Finsupp._hyg.437 : Finset.{u1} α) => Nat) (fun (a : Finset.{u1} α) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} α (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))))
+ forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] (f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (Finsupp.prod.{u2, u1, 0} ι (Finset.{u1} α) Nat (Finset.zero.{u1} α _inst_1) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} α) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} α) (fun (a._@.Mathlib.Algebra.BigOperators.Finsupp._hyg.437 : Finset.{u1} α) => Nat) (fun (a : Finset.{u1} α) => instNatCastNat)) (Finset.card.{u1} α (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))))
Case conversion may be inaccurate. Consider using '#align finsupp.card_pi Finsupp.card_piₓ'. -/
@[simp]
theorem card_pi (f : ι →₀ Finset α) : f.pi.card = f.Prod fun i => (f i).card :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/62e8311c791f02c47451bf14aa2501048e7c2f33
@@ -68,7 +68,7 @@ theorem mem_finsupp_iff {t : ι → Finset α} : f ∈ s.Finsupp t ↔ f.support
/- warning: finset.mem_finsupp_iff_of_support_subset -> Finset.mem_finsupp_iff_of_support_subset is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {s : Finset.{u1} ι} {f : Finsupp.{u1, u2} ι α _inst_1} {t : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)}, (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1) t) s) -> (Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) f (Finset.finsupp.{u1, u2} ι α _inst_1 s (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.hasCoeToFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t))) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_1) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.hasCoeToFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t i)))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {s : Finset.{u1} ι} {f : Finsupp.{u1, u2} ι α _inst_1} {t : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)}, (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1) t) s) -> (Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) f (Finset.finsupp.{u1, u2} ι α _inst_1 s (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t))) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) f i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) t i)))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] {s : Finset.{u2} ι} {f : Finsupp.{u2, u1} ι α _inst_1} {t : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)}, (HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) (Finsupp.support.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1) t) s) -> (Iff (Membership.mem.{max u2 u1, max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u2, u1} ι α _inst_1)) (Finset.instMembershipFinset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1)) f (Finset.finsupp.{u2, u1} ι α _inst_1 s (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) t))) (forall (i : ι), Membership.mem.{u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) i) (Finset.instMembershipFinset.{u1} α) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α _inst_1) f i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) t i)))
Case conversion may be inaccurate. Consider using '#align finset.mem_finsupp_iff_of_support_subset Finset.mem_finsupp_iff_of_support_subsetₓ'. -/
@@ -118,7 +118,7 @@ def pi (f : ι →₀ Finset α) : Finset (ι →₀ α) :=
/- warning: finsupp.mem_pi -> Finsupp.mem_pi is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)} {g : Finsupp.{u1, u2} ι α _inst_1}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) g (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.hasCoeToFun.{u1, u2} ι α _inst_1) g i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.hasCoeToFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] {f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)} {g : Finsupp.{u1, u2} ι α _inst_1}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1)) g (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (forall (i : ι), Membership.Mem.{u2, u2} α (Finset.{u2} α) (Finset.hasMem.{u2} α) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι α _inst_1) (fun (_x : Finsupp.{u1, u2} ι α _inst_1) => ι -> α) (Finsupp.coeFun.{u1, u2} ι α _inst_1) g i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] {f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)} {g : Finsupp.{u2, u1} ι α _inst_1}, Iff (Membership.mem.{max u2 u1, max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finset.{max u1 u2} (Finsupp.{u2, u1} ι α _inst_1)) (Finset.instMembershipFinset.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1)) g (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (forall (i : ι), Membership.mem.{u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) i) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) i) (Finset.instMembershipFinset.{u1} α) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι α _inst_1) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => α) _x) (Finsupp.funLike.{u2, u1} ι α _inst_1) g i) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))
Case conversion may be inaccurate. Consider using '#align finsupp.mem_pi Finsupp.mem_piₓ'. -/
@@ -129,7 +129,7 @@ theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀
/- warning: finsupp.card_pi -> Finsupp.card_pi is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] (f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (Finsupp.prod.{u1, u2, 0} ι (Finset.{u2} α) Nat (Finset.zero.{u2} α _inst_1) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} α) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} α) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} α) (fun (ᾰ : Finset.{u2} α) => Nat) (fun (a : Finset.{u2} α) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} α (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.hasCoeToFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))))
+ forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : Zero.{u2} α] (f : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)), Eq.{1} Nat (Finset.card.{max u1 u2} (Finsupp.{u1, u2} ι α _inst_1) (Finsupp.pi.{u1, u2} ι α _inst_1 f)) (Finsupp.prod.{u1, u2, 0} ι (Finset.{u2} α) Nat (Finset.zero.{u2} α _inst_1) Nat.commMonoid f (fun (i : ι) => (fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat ((Finset.{u2} α) -> Nat) (HasLiftT.mk.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (CoeTCₓ.coe.{1, succ u2} Nat ((Finset.{u2} α) -> Nat) (Nat.castCoe.{u2} ((Finset.{u2} α) -> Nat) (Pi.hasNatCast.{u2, 0} (Finset.{u2} α) (fun (ᾰ : Finset.{u2} α) => Nat) (fun (a : Finset.{u2} α) => AddMonoidWithOne.toNatCast.{0} Nat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} Nat (NonAssocSemiring.toAddCommMonoidWithOne.{0} Nat (Semiring.toNonAssocSemiring.{0} Nat Nat.semiring)))))))) (Finset.card.{u2} α (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) (fun (_x : Finsupp.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) => ι -> (Finset.{u2} α)) (Finsupp.coeFun.{u1, u2} ι (Finset.{u2} α) (Finset.zero.{u2} α _inst_1)) f i))))
but is expected to have type
forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : Zero.{u1} α] (f : Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)), Eq.{1} Nat (Finset.card.{max u2 u1} (Finsupp.{u2, u1} ι α _inst_1) (Finsupp.pi.{u2, u1} ι α _inst_1 f)) (Finsupp.prod.{u2, u1, 0} ι (Finset.{u1} α) Nat (Finset.zero.{u1} α _inst_1) Nat.commMonoid f (fun (i : ι) => Nat.cast.{u1} ((Finset.{u1} α) -> Nat) (Pi.natCast.{u1, 0} (Finset.{u1} α) (fun (a._@.Mathlib.Algebra.BigOperators.Finsupp._hyg.437 : Finset.{u1} α) => Nat) (fun (a : Finset.{u1} α) => CanonicallyOrderedCommSemiring.toNatCast.{0} Nat Nat.canonicallyOrderedCommSemiring)) (Finset.card.{u1} α (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Finset.{u1} α) _x) (Finsupp.funLike.{u2, u1} ι (Finset.{u1} α) (Finset.zero.{u1} α _inst_1)) f i))))
Case conversion may be inaccurate. Consider using '#align finsupp.card_pi Finsupp.card_piₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -100,7 +100,7 @@ theorem mem_pi {f : ι →₀ Finset α} {g : ι →₀ α} : g ∈ f.pi ↔ ∀
@[simp]
theorem card_pi (f : ι →₀ Finset α) : f.pi.card = f.prod fun i => (f i).card := by
rw [pi, card_finsupp]
- 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 finsupp.card_pi Finsupp.card_pi
end Finsupp
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -33,7 +33,8 @@ noncomputable section
open Finsupp
-open BigOperators Classical Pointwise
+open scoped Classical
+open BigOperators Pointwise
variable {ι α : Type*} [Zero α] {s : Finset ι} {f : ι →₀ α}
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -35,7 +35,7 @@ open Finsupp
open BigOperators Classical Pointwise
-variable {ι α : Type _} [Zero α] {s : Finset ι} {f : ι →₀ α}
+variable {ι α : Type*} [Zero α] {s : Finset ι} {f : ι →₀ α}
namespace Finset
@@ -2,17 +2,14 @@
Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.finsupp
-! leanprover-community/mathlib commit 59694bd07f0a39c5beccba34bd9f413a160782bf
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Finsupp.Indicator
import Mathlib.Data.Fintype.BigOperators
+#align_import data.finset.finsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
+
/-!
# Finitely supported product of finsets
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -47,8 +47,8 @@ protected def finsupp (s : Finset ι) (t : ι → Finset α) : Finset (ι →₀
(s.pi t).map ⟨indicator s, indicator_injective s⟩
#align finset.finsupp Finset.finsupp
-theorem mem_finsupp_iff {t : ι → Finset α} : f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i :=
- by
+theorem mem_finsupp_iff {t : ι → Finset α} :
+ f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i := by
refine' mem_map.trans ⟨_, _⟩
· rintro ⟨f, hf, rfl⟩
refine' ⟨support_indicator_subset _ _, fun i hi => _⟩
The unported dependencies are