data.finsupp.big_operators
⟷
Mathlib.Data.Finsupp.BigOperators
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
@@ -105,7 +105,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
by
induction' l with hd tl IH
· simp
- · simp only [List.pairwise_cons] at hl
+ · simp only [List.pairwise_cons] at hl
simp only [List.sum_cons, List.foldr_cons, Function.comp_apply]
rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union]
suffices Disjoint hd.support (tl.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅) by
@@ -113,7 +113,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
· rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset]
rw [Finset.disjoint_sup_right]
intro f hf
- simp only [List.mem_toFinset, List.mem_map] at hf
+ simp only [List.mem_toFinset, List.mem_map] at hf
obtain ⟨f, hf, rfl⟩ := hf
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
@@ -128,7 +128,7 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
convert List.support_sum_eq _ _
· simp
· simp
- · simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
+ · simp only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.coe_eq_coe] at hl
exact hl.symm.pairwise hd fun _ _ h => Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -61,7 +61,8 @@ theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M
#print Finset.support_sum_subset /-
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
- (s.Sum id).support ⊆ Finset.sup s Finsupp.support := by classical
+ (s.Sum id).support ⊆ Finset.sup s Finsupp.support := by
+ classical convert Multiset.support_sum_subset s.1 <;> simp
#align finset.support_sum_subset Finset.support_sum_subset
-/
@@ -135,7 +136,19 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
#print Finset.support_sum_eq /-
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
- (s.Sum id).support = Finset.sup s Finsupp.support := by classical
+ (s.Sum id).support = Finset.sup s Finsupp.support := by
+ classical
+ convert Multiset.support_sum_eq s.1 _
+ · exact (Finset.sum_val _).symm
+ · obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=
+ by
+ refine' ⟨s.to_list, _, Finset.nodup_toList _⟩
+ simp
+ subst hl
+ rwa [List.toFinset_val, list.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
+ List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
+ intro x y hxy
+ exact symmetric_disjoint hxy
#align finset.support_sum_eq Finset.support_sum_eq
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -61,8 +61,7 @@ theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M
#print Finset.support_sum_subset /-
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
- (s.Sum id).support ⊆ Finset.sup s Finsupp.support := by
- classical convert Multiset.support_sum_subset s.1 <;> simp
+ (s.Sum id).support ⊆ Finset.sup s Finsupp.support := by classical
#align finset.support_sum_subset Finset.support_sum_subset
-/
@@ -136,19 +135,7 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
#print Finset.support_sum_eq /-
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
- (s.Sum id).support = Finset.sup s Finsupp.support := by
- classical
- convert Multiset.support_sum_eq s.1 _
- · exact (Finset.sum_val _).symm
- · obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=
- by
- refine' ⟨s.to_list, _, Finset.nodup_toList _⟩
- simp
- subst hl
- rwa [List.toFinset_val, list.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
- List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
- intro x y hxy
- exact symmetric_disjoint hxy
+ (s.Sum id).support = Finset.sup s Finsupp.support := by classical
#align finset.support_sum_eq Finset.support_sum_eq
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
-import Mathbin.Data.Finsupp.Defs
-import Mathbin.Data.Finset.Pairwise
+import Data.Finsupp.Defs
+import Data.Finset.Pairwise
#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"f16e7a22e11fc09c71f25446ac1db23a24e8a0bd"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module data.finsupp.big_operators
-! 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.Data.Finsupp.Defs
import Mathbin.Data.Finset.Pairwise
+#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"f16e7a22e11fc09c71f25446ac1db23a24e8a0bd"
+
/-!
# Sums of collections of finsupp, and their support
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -41,6 +41,7 @@ it is a member of the support of a member of the collection:
variable {ι M : Type _} [DecidableEq ι]
+#print List.support_sum_subset /-
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
l.Sum.support ⊆ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ :=
by
@@ -50,19 +51,25 @@ theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
refine' finsupp.support_add.trans (Finset.union_subset_union _ IH)
rfl
#align list.support_sum_subset List.support_sum_subset
+-/
+#print Multiset.support_sum_subset /-
theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) :
s.Sum.support ⊆ (s.map Finsupp.support).sup :=
by
induction s using Quot.inductionOn
simpa using List.support_sum_subset _
#align multiset.support_sum_subset Multiset.support_sum_subset
+-/
+#print Finset.support_sum_subset /-
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
(s.Sum id).support ⊆ Finset.sup s Finsupp.support := by
classical convert Multiset.support_sum_subset s.1 <;> simp
#align finset.support_sum_subset Finset.support_sum_subset
+-/
+#print List.mem_foldr_sup_support_iff /-
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M) (hf : f ∈ l), x ∈ f.support :=
by
@@ -78,17 +85,23 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
· exact Or.inl h
· exact Or.inr ⟨f, hf, h⟩
#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff
+-/
+#print Multiset.mem_sup_map_support_iff /-
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M) (hf : f ∈ s), x ∈ f.support :=
Quot.inductionOn s fun _ => by simpa using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
+-/
+#print Finset.mem_sup_support_iff /-
theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M) (hf : f ∈ s), x ∈ f.support :=
Multiset.mem_sup_map_support_iff
#align finset.mem_sup_support_iff Finset.mem_sup_support_iff
+-/
+#print List.support_sum_eq /-
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (Disjoint on Finsupp.support)) :
l.Sum.support = l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ :=
@@ -107,7 +120,9 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
obtain ⟨f, hf, rfl⟩ := hf
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
+-/
+#print Multiset.support_sum_eq /-
theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
(hs : s.Pairwise (Disjoint on Finsupp.support)) : s.Sum.support = (s.map Finsupp.support).sup :=
by
@@ -119,7 +134,9 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
· simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
exact hl.symm.pairwise hd fun _ _ h => Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
+-/
+#print Finset.support_sum_eq /-
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
(s.Sum id).support = Finset.sup s Finsupp.support := by
@@ -136,4 +153,5 @@ theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
intro x y hxy
exact symmetric_disjoint hxy
#align finset.support_sum_eq Finset.support_sum_eq
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -124,16 +124,16 @@ theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
(s.Sum id).support = Finset.sup s Finsupp.support := by
classical
- convert Multiset.support_sum_eq s.1 _
- · exact (Finset.sum_val _).symm
- · obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=
- by
- refine' ⟨s.to_list, _, Finset.nodup_toList _⟩
- simp
- subst hl
- rwa [List.toFinset_val, list.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
- List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
- intro x y hxy
- exact symmetric_disjoint hxy
+ convert Multiset.support_sum_eq s.1 _
+ · exact (Finset.sum_val _).symm
+ · obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=
+ by
+ refine' ⟨s.to_list, _, Finset.nodup_toList _⟩
+ simp
+ subst hl
+ rwa [List.toFinset_val, list.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
+ List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
+ intro x y hxy
+ exact symmetric_disjoint hxy
#align finset.support_sum_eq Finset.support_sum_eq
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -64,7 +64,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
#align finset.support_sum_subset Finset.support_sum_subset
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
- x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(hf : f ∈ l), x ∈ f.support :=
+ x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M) (hf : f ∈ l), x ∈ f.support :=
by
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
induction' l with hd tl IH
@@ -80,12 +80,12 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
- x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M)(hf : f ∈ s), x ∈ f.support :=
+ x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M) (hf : f ∈ s), x ∈ f.support :=
Quot.inductionOn s fun _ => by simpa using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
- x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M)(hf : f ∈ s), x ∈ f.support :=
+ x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M) (hf : f ∈ s), x ∈ f.support :=
Multiset.mem_sup_map_support_iff
#align finset.mem_sup_support_iff Finset.mem_sup_support_iff
@@ -95,7 +95,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
by
induction' l with hd tl IH
· simp
- · simp only [List.pairwise_cons] at hl
+ · simp only [List.pairwise_cons] at hl
simp only [List.sum_cons, List.foldr_cons, Function.comp_apply]
rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union]
suffices Disjoint hd.support (tl.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅) by
@@ -103,7 +103,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
· rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset]
rw [Finset.disjoint_sup_right]
intro f hf
- simp only [List.mem_toFinset, List.mem_map] at hf
+ simp only [List.mem_toFinset, List.mem_map] at hf
obtain ⟨f, hf, rfl⟩ := hf
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
@@ -116,7 +116,7 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
convert List.support_sum_eq _ _
· simp
· simp
- · simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
+ · simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
exact hl.symm.pairwise hd fun _ _ h => Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -41,12 +41,6 @@ it is a member of the support of a member of the collection:
variable {ι M : Type _} [DecidableEq ι]
-/- warning: list.support_sum_subset -> List.support_sum_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)
-Case conversion may be inaccurate. Consider using '#align list.support_sum_subset List.support_sum_subsetₓ'. -/
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
l.Sum.support ⊆ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ :=
by
@@ -57,12 +51,6 @@ theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
rfl
#align list.support_sum_subset List.support_sum_subset
-/- warning: multiset.support_sum_subset -> Multiset.support_sum_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Multiset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Multiset.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s)) (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) (Multiset.map.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) s))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Multiset.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)) (Multiset.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s)) (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) (Multiset.map.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) s))
-Case conversion may be inaccurate. Consider using '#align multiset.support_sum_subset Multiset.support_sum_subsetₓ'. -/
theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) :
s.Sum.support ⊆ (s.map Finsupp.support).sup :=
by
@@ -70,23 +58,11 @@ theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M
simpa using List.support_sum_subset _
#align multiset.support_sum_subset Multiset.support_sum_subset
-/- warning: finset.support_sum_subset -> Finset.support_sum_subset is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Finset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.sum.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s (id.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))))) (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) s (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Finset.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)) (Finset.sum.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s (id.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))))) (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) s (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))
-Case conversion may be inaccurate. Consider using '#align finset.support_sum_subset Finset.support_sum_subsetₓ'. -/
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
(s.Sum id).support ⊆ Finset.sup s Finsupp.support := by
classical convert Multiset.support_sum_subset s.1 <;> simp
#align finset.support_sum_subset Finset.support_sum_subset
-/- warning: list.mem_foldr_sup_support_iff -> List.mem_foldr_sup_support_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.336 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.338 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.336 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.338) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-Case conversion may be inaccurate. Consider using '#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iffₓ'. -/
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(hf : f ∈ l), x ∈ f.support :=
by
@@ -103,34 +79,16 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
· exact Or.inr ⟨f, hf, h⟩
#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff
-/- warning: multiset.mem_sup_map_support_iff -> Multiset.mem_sup_map_support_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {s : Multiset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) (Multiset.map.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M _inst_2) s))) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Multiset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (Multiset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Multiset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (Multiset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {s : Multiset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) (Multiset.map.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M _inst_2) s))) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Multiset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (Multiset.instMembershipMultiset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Multiset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (Multiset.instMembershipMultiset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-Case conversion may be inaccurate. Consider using '#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iffₓ'. -/
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M)(hf : f ∈ s), x ∈ f.support :=
Quot.inductionOn s fun _ => by simpa using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
-/- warning: finset.mem_sup_support_iff -> Finset.mem_sup_support_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {s : Finset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M _inst_2) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) s (Finsupp.support.{u1, u2} ι M _inst_2))) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (Finset.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {s : Finset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M _inst_2) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) s (Finsupp.support.{u1, u2} ι M _inst_2))) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (Finset.instMembershipFinset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (Finset.instMembershipFinset.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f s) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
-Case conversion may be inaccurate. Consider using '#align finset.mem_sup_support_iff Finset.mem_sup_support_iffₓ'. -/
theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M)(hf : f ∈ s), x ∈ f.support :=
Multiset.mem_sup_map_support_iff
#align finset.mem_sup_support_iff Finset.mem_sup_support_iff
-/- warning: list.support_sum_eq -> List.support_sum_eq is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.585 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.587 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.585 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.587) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
-Case conversion may be inaccurate. Consider using '#align list.support_sum_eq List.support_sum_eqₓ'. -/
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (Disjoint on Finsupp.support)) :
l.Sum.support = l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ :=
@@ -150,12 +108,6 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
-/- warning: multiset.support_sum_eq -> Multiset.support_sum_eq is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Multiset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))), (Multiset.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) s) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Multiset.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s)) (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) (Multiset.map.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) s)))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Multiset.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))), (Multiset.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) s) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)) (Multiset.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s)) (Multiset.sup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) (Multiset.map.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) s)))
-Case conversion may be inaccurate. Consider using '#align multiset.support_sum_eq Multiset.support_sum_eqₓ'. -/
theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
(hs : s.Pairwise (Disjoint on Finsupp.support)) : s.Sum.support = (s.map Finsupp.support).sup :=
by
@@ -168,12 +120,6 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
exact hl.symm.pairwise hd fun _ _ h => Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
-/- warning: finset.support_sum_eq -> Finset.support_sum_eq is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Finset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))), (Set.PairwiseDisjoint.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Finset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (Set.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Finset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (Set.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Finset.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (Set.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) (Finset.Set.hasCoeT.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))))) s) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.sum.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s (id.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))))) (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.orderBot.{u1} ι) s (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))))))
-but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddCommMonoid.{u2} M] (s : Finset.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))), (Set.PairwiseDisjoint.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) (Finset.toSet.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) s) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)) (Finset.sum.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Finsupp.addCommMonoid.{u1, u2} ι M _inst_2) s (id.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))))) (Finset.sup.{u1, max u1 u2} (Finset.{u1} ι) (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2))) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι) s (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_2)))))
-Case conversion may be inaccurate. Consider using '#align finset.support_sum_eq Finset.support_sum_eqₓ'. -/
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
(s.Sum id).support = Finset.sup s Finsupp.support := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -145,7 +145,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
· rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset]
rw [Finset.disjoint_sup_right]
intro f hf
- simp only [List.mem_toFinset, List.mem_map'] at hf
+ simp only [List.mem_toFinset, List.mem_map] at hf
obtain ⟨f, hf, rfl⟩ := hf
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -85,7 +85,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
lean 3 declaration is
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.216 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.218 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.216 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.218) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.336 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.338 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.336 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.338) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
Case conversion may be inaccurate. Consider using '#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iffₓ'. -/
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(hf : f ∈ l), x ∈ f.support :=
@@ -129,7 +129,7 @@ theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι}
lean 3 declaration is
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.585 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.587 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.585 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.587) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
Case conversion may be inaccurate. Consider using '#align list.support_sum_eq List.support_sum_eqₓ'. -/
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (Disjoint on Finsupp.support)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/62e8311c791f02c47451bf14aa2501048e7c2f33
@@ -43,7 +43,7 @@ variable {ι M : Type _} [DecidableEq ι]
/- warning: list.support_sum_subset -> List.support_sum_subset is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)
but is expected to have type
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)
Case conversion may be inaccurate. Consider using '#align list.support_sum_subset List.support_sum_subsetₓ'. -/
@@ -127,7 +127,7 @@ theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι}
/- warning: list.support_sum_eq -> List.support_sum_eq is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
but is expected to have type
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
Case conversion may be inaccurate. Consider using '#align list.support_sum_eq List.support_sum_eqₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -85,7 +85,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
lean 3 declaration is
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.216 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.218 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.216 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.218) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
Case conversion may be inaccurate. Consider using '#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iffₓ'. -/
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(hf : f ∈ l), x ∈ f.support :=
@@ -129,7 +129,7 @@ theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι}
lean 3 declaration is
forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.465 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.467) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
Case conversion may be inaccurate. Consider using '#align list.support_sum_eq List.support_sum_eqₓ'. -/
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (Disjoint on Finsupp.support)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -43,9 +43,9 @@ variable {ι M : Type _} [DecidableEq ι]
/- warning: list.support_sum_subset -> List.support_sum_subset is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47 : Finset.{u1} ι) => HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.instHasSubsetFinset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.45 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.47) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)
Case conversion may be inaccurate. Consider using '#align list.support_sum_subset List.support_sum_subsetₓ'. -/
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
l.Sum.support ⊆ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ :=
@@ -83,9 +83,9 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
/- warning: list.mem_foldr_sup_support_iff -> List.mem_foldr_sup_support_iff is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.Mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) (List.hasMem.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217 : Finset.{u1} ι) => HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Zero.{u2} M] {l : List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)} {x : ι}, Iff (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M _inst_2) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.215 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.217) (Finsupp.support.{u1, u2} ι M _inst_2)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l)) (Exists.{max (succ u1) (succ u2)} (Finsupp.{u1, u2} ι M _inst_2) (fun (f : Finsupp.{u1, u2} ι M _inst_2) => Exists.{0} (Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) (fun (hf : Membership.mem.{max u1 u2, max u1 u2} (Finsupp.{u1, u2} ι M _inst_2) (List.{max u2 u1} (Finsupp.{u1, u2} ι M _inst_2)) (List.instMembershipList.{max u1 u2} (Finsupp.{u1, u2} ι M _inst_2)) f l) => Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) x (Finsupp.support.{u1, u2} ι M _inst_2 f))))
Case conversion may be inaccurate. Consider using '#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iffₓ'. -/
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(hf : f ∈ l), x ∈ f.support :=
@@ -127,9 +127,9 @@ theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι}
/- warning: list.support_sum_eq -> List.support_sum_eq is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))), (List.Pairwise.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Function.onFun.{succ (max u1 u2), succ u1, 1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.orderBot.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finsupp.hasAdd.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.hasZero.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) l)) (List.foldr.{max u1 u2, u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) (Function.comp.{max (succ u1) (succ u2), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2))) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.lattice.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b))))) (Finsupp.support.{u1, u2} ι M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_2)))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.hasEmptyc.{u1} ι)) l))
but is expected to have type
- forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466 : Finset.{u1} ι) => HasSup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toHasSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
+ forall {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : AddMonoid.{u2} M] (l : List.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))), (List.Pairwise.{max u2 u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Function.onFun.{succ (max u2 u1), succ u1, 1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) Prop (Disjoint.{u1} (Finset.{u1} ι) (Finset.partialOrder.{u1} ι) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} ι)) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) l) -> (Eq.{succ u1} (Finset.{u1} ι) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2) (List.sum.{max u1 u2} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finsupp.add.{u1, u2} ι M (AddMonoid.toAddZeroClass.{u2} M _inst_2)) (Finsupp.zero.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) l)) (List.foldr.{max u2 u1, u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) (Function.comp.{succ (max u2 u1), succ u1, succ u1} (Finsupp.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2)) (Finset.{u1} ι) ((Finset.{u1} ι) -> (Finset.{u1} ι)) (fun (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 : Finset.{u1} ι) (x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466 : Finset.{u1} ι) => Sup.sup.{u1} (Finset.{u1} ι) (SemilatticeSup.toSup.{u1} (Finset.{u1} ι) (Lattice.toSemilatticeSup.{u1} (Finset.{u1} ι) (Finset.instLatticeFinset.{u1} ι (fun (a : ι) (b : ι) => _inst_1 a b)))) x._@.Mathlib.Data.Finsupp.BigOperators._hyg.464 x._@.Mathlib.Data.Finsupp.BigOperators._hyg.466) (Finsupp.support.{u1, u2} ι M (AddMonoid.toZero.{u2} M _inst_2))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} ι) (Finset.instEmptyCollectionFinset.{u1} ι)) l))
Case conversion may be inaccurate. Consider using '#align list.support_sum_eq List.support_sum_eqₓ'. -/
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (Disjoint on Finsupp.support)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -88,12 +88,12 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union]
suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x ⊔ y)) ∅) by
exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this
- · rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset,
- Finset.disjoint_sup_right]
- intro f hf
- simp only [List.mem_toFinset, List.mem_map] at hf
- obtain ⟨f, hf, rfl⟩ := hf
- exact hl.left _ hf
+ rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset,
+ Finset.disjoint_sup_right]
+ intro f hf
+ simp only [List.mem_toFinset, List.mem_map] at hf
+ obtain ⟨f, hf, rfl⟩ := hf
+ exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
List → Multiset
(#11099)
These did not respect the naming convention by having the coe
as a prefix instead of a suffix, or vice-versa. Also add a bunch of norm_cast
@@ -48,7 +48,7 @@ theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) :
s.sum.support ⊆ (s.map Finsupp.support).sup := by
induction s using Quot.inductionOn
- simpa only [Multiset.quot_mk_to_coe'', Multiset.coe_sum, Multiset.coe_map, Multiset.sup_coe,
+ simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe,
List.foldr_map] using List.support_sum_subset _
#align multiset.support_sum_subset Multiset.support_sum_subset
@@ -69,7 +69,7 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
x ∈ (s.map Finsupp.support).sup ↔ ∃ f ∈ s, x ∈ f.support :=
Quot.inductionOn s fun _ ↦ by
- simpa only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.sup_coe, List.foldr_map]
+ simpa only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.sup_coe, List.foldr_map]
using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
@@ -103,11 +103,11 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
obtain ⟨l, hl, hd⟩ := hs
suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by
convert List.support_sum_eq a this
- · simp only [Multiset.quot_mk_to_coe'', Multiset.coe_sum]
+ · simp only [Multiset.quot_mk_to_coe'', Multiset.sum_coe]
· dsimp only [Function.comp_def]
- simp only [quot_mk_to_coe'', coe_map, sup_coe, ge_iff_le, Finset.le_eq_subset,
+ simp only [quot_mk_to_coe'', map_coe, sup_coe, ge_iff_le, Finset.le_eq_subset,
Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map]
- simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
+ simp only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.coe_eq_coe] at hl
exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -101,29 +101,29 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
s.sum.support = (s.map Finsupp.support).sup := by
induction' s using Quot.inductionOn with a
obtain ⟨l, hl, hd⟩ := hs
- suffices : a.Pairwise (_root_.Disjoint on Finsupp.support)
- · convert List.support_sum_eq a this
+ suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by
+ convert List.support_sum_eq a this
· simp only [Multiset.quot_mk_to_coe'', Multiset.coe_sum]
· dsimp only [Function.comp_def]
simp only [quot_mk_to_coe'', coe_map, sup_coe, ge_iff_le, Finset.le_eq_subset,
Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map]
- · simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
- exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h
+ simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
+ exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :
(s.sum id).support = Finset.sup s Finsupp.support := by
classical
- suffices : s.1.Pairwise (_root_.Disjoint on Finsupp.support)
- · convert Multiset.support_sum_eq s.1 this
- · exact (Finset.sum_val _).symm
- · obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup := by
- refine' ⟨s.toList, _, Finset.nodup_toList _⟩
- simp
- subst hl
- rwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
- List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
- intro x y hxy
- exact symmetric_disjoint hxy
+ suffices s.1.Pairwise (_root_.Disjoint on Finsupp.support) by
+ convert Multiset.support_sum_eq s.1 this
+ exact (Finset.sum_val _).symm
+ obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup := by
+ refine' ⟨s.toList, _, Finset.nodup_toList _⟩
+ simp
+ subst hl
+ rwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←
+ List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
+ intro x y hxy
+ exact symmetric_disjoint hxy
#align finset.support_sum_eq Finset.support_sum_eq
@@ -3,6 +3,7 @@ Copyright (c) 2022 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
+import Mathlib.Algebra.BigOperators.Basic
import Mathlib.Data.Finsupp.Defs
import Mathlib.Data.Finset.Pairwise
@@ -57,7 +57,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
#align finset.support_sum_subset Finset.support_sum_subset
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
- x ∈ l.foldr (Finsupp.support · ⊔ ·) ∅ ↔ ∃ (f : ι →₀ M) (_ : f ∈ l), x ∈ f.support := by
+ x ∈ l.foldr (Finsupp.support · ⊔ ·) ∅ ↔ ∃ f ∈ l, x ∈ f.support := by
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
induction' l with hd tl IH
· simp
@@ -66,14 +66,14 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
- x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M) (_ : f ∈ s), x ∈ f.support :=
+ x ∈ (s.map Finsupp.support).sup ↔ ∃ f ∈ s, x ∈ f.support :=
Quot.inductionOn s fun _ ↦ by
simpa only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.sup_coe, List.foldr_map]
using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
- x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M) (_ : f ∈ s), x ∈ f.support :=
+ x ∈ s.sup Finsupp.support ↔ ∃ f ∈ s, x ∈ f.support :=
Multiset.mem_sup_map_support_iff
#align finset.mem_sup_support_iff Finset.mem_sup_support_iff
@@ -107,7 +107,7 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
simp only [quot_mk_to_coe'', coe_map, sup_coe, ge_iff_le, Finset.le_eq_subset,
Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map]
· simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
- exact hl.symm.pairwise hd fun _ _ h ↦ _root_.Disjoint.symm h
+ exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h
#align multiset.support_sum_eq Multiset.support_sum_eq
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
(· op ·) a
by (a op ·)
(#8843)
I used the regex \(\(· (.) ·\) (.)\)
, replacing with ($2 $1 ·)
.
@@ -36,7 +36,7 @@ it is a member of the support of a member of the collection:
variable {ι M : Type*} [DecidableEq ι]
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
- l.sum.support ⊆ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ := by
+ l.sum.support ⊆ l.foldr (Finsupp.support · ⊔ ·) ∅ := by
induction' l with hd tl IH
· simp
· simp only [List.sum_cons, Finset.union_comm]
@@ -57,7 +57,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
#align finset.support_sum_subset Finset.support_sum_subset
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
- x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M) (_ : f ∈ l), x ∈ f.support := by
+ x ∈ l.foldr (Finsupp.support · ⊔ ·) ∅ ↔ ∃ (f : ι →₀ M) (_ : f ∈ l), x ∈ f.support := by
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
induction' l with hd tl IH
· simp
@@ -79,7 +79,7 @@ theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι}
theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) :
- l.sum.support = l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ := by
+ l.sum.support = l.foldr (Finsupp.support · ⊔ ·) ∅ := by
induction' l with hd tl IH
· simp
· simp only [List.pairwise_cons] at hl
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -103,7 +103,7 @@ theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
suffices : a.Pairwise (_root_.Disjoint on Finsupp.support)
· convert List.support_sum_eq a this
· simp only [Multiset.quot_mk_to_coe'', Multiset.coe_sum]
- · dsimp only [Function.comp]
+ · dsimp only [Function.comp_def]
simp only [quot_mk_to_coe'', coe_map, sup_coe, ge_iff_le, Finset.le_eq_subset,
Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map]
· simp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -33,7 +33,7 @@ it is a member of the support of a member of the collection:
-/
-variable {ι M : Type _} [DecidableEq ι]
+variable {ι M : Type*} [DecidableEq ι]
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
l.sum.support ⊆ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ := by
@@ -2,15 +2,12 @@
Copyright (c) 2022 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module data.finsupp.big_operators
-! 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.Data.Finsupp.Defs
import Mathlib.Data.Finset.Pairwise
+#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
+
/-!
# Sums of collections of Finsupp, and their support
This is the second half of the changes originally in #5699, removing all occurrences of ;
after a space and implementing a linter rule to enforce it.
In most cases this 2-character substring has a space after it, so the following command was run first:
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
The remaining cases were few enough in number that they were done manually.
@@ -56,7 +56,7 @@ theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
(s.sum id).support ⊆ Finset.sup s Finsupp.support := by
- classical convert Multiset.support_sum_subset s.1 ; simp
+ classical convert Multiset.support_sum_subset s.1; simp
#align finset.support_sum_subset Finset.support_sum_subset
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
@@ -60,7 +60,7 @@ theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :
#align finset.support_sum_subset Finset.support_sum_subset
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
- x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M)(_ : f ∈ l), x ∈ f.support := by
+ x ∈ l.foldr ((· ⊔ ·) ∘ Finsupp.support) ∅ ↔ ∃ (f : ι →₀ M) (_ : f ∈ l), x ∈ f.support := by
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
induction' l with hd tl IH
· simp
@@ -69,14 +69,14 @@ theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι
#align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff
theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :
- x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M)(_ : f ∈ s), x ∈ f.support :=
+ x ∈ (s.map Finsupp.support).sup ↔ ∃ (f : ι →₀ M) (_ : f ∈ s), x ∈ f.support :=
Quot.inductionOn s fun _ ↦ by
simpa only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.sup_coe, List.foldr_map]
using List.mem_foldr_sup_support_iff
#align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff
theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
- x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M)(_ : f ∈ s), x ∈ f.support :=
+ x ∈ s.sup Finsupp.support ↔ ∃ (f : ι →₀ M) (_ : f ∈ s), x ∈ f.support :=
Multiset.mem_sup_map_support_iff
#align finset.mem_sup_support_iff Finset.mem_sup_support_iff
This PR fixes two things:
align
statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align
). This is often seen in the mathport output after ending calc
blocks.#align
statements. (This was needed for a script I wrote for #3630.)@@ -128,5 +128,4 @@ theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))
List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]
intro x y hxy
exact symmetric_disjoint hxy
-
#align finset.support_sum_eq Finset.support_sum_eq
Notably incorporates https://github.com/leanprover/std4/pull/98 and https://github.com/leanprover/std4/pull/109.
https://github.com/leanprover/std4/pull/98 moves a number of lemmas from Mathlib to Std, so the bump requires deleting them in Mathlib. I did check on each lemma whether its attributes were kept in the move (and gave attribute markings in Mathlib if they were not present in Std), but a reviewer may wish to re-check.
List.mem_map
changed statement from b ∈ l.map f ↔ ∃ a, a ∈ l ∧ b = f a
to b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b
. Similarly for List.exists_of_mem_map
. This was a deliberate change, so I have simply adjusted proofs (many become simpler, which supports the change). I also deleted List.mem_map'
, List.exists_of_mem_map'
, which were temporary versions in Mathlib while waiting for this change (replacing their uses with the unprimed versions).
Also, the lemma sublist_nil_iff_eq_nil
seems to have been renamed to sublist_nil
during the move, so I added an alias for the old name.
(another issue fixed during review by @digama0) List.Sublist.filter
had an argument change from explicit to implicit. This appears to have been an oversight (cc @JamesGallicchio). I have temporarily introduced List.Sublist.filter'
with the argument explicit, and replaced Mathlib uses of Sublist.filter
with Sublist.filter'
. Later we can fix the argument in Std, and then delete List.Sublist.filter'
.
@@ -93,7 +93,7 @@ theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
· rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset,
Finset.disjoint_sup_right]
intro f hf
- simp only [List.mem_toFinset, List.mem_map'] at hf
+ simp only [List.mem_toFinset, List.mem_map] at hf
obtain ⟨f, hf, rfl⟩ := hf
exact hl.left _ hf
#align list.support_sum_eq List.support_sum_eq
The unported dependencies are