data.set.pointwise.big_operatorsMathlib.Data.Set.Pointwise.BigOperators

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(data/set/pointwise/big_operators): image distributes across pointwise big operators (#18840)

The main results here are:

  • set.image_finset_prod : f '' (∏ i in m, s i) = (∏ i in m, f '' s i), which says that the image under a monoid morphism commutes with the pointwise n-ary product of sets
  • set.image_finset_prod_pi : (λ f : ι → α, ∏ i in l, f i) '' (l : set ι).pi S = (∏ i in l, S i), which says that turning a family of sets into a set of families and taking the product over each family is the same as taking the pointwise product.

Both are n-ary versions of existing binary results.

Diff
@@ -15,11 +15,35 @@ import data.set.pointwise.basic
 
 namespace set
 
-section big_operators
 open_locale big_operators pointwise
 open function
 
-variables {α : Type*} {ι : Type*} [comm_monoid α]
+variables {ι α β F : Type*}
+
+section monoid
+variables [monoid α] [monoid β] [monoid_hom_class F α β]
+
+@[to_additive]
+lemma image_list_prod (f : F) : ∀ (l : list (set α)),
+  (f : α → β) '' l.prod = (l.map (λ s, f '' s)).prod
+| [] := image_one.trans $ congr_arg singleton (map_one f)
+| (a :: as) := by rw [list.map_cons, list.prod_cons, list.prod_cons, image_mul, image_list_prod]
+
+end monoid
+
+section comm_monoid
+variables [comm_monoid α] [comm_monoid β] [monoid_hom_class F α β]
+
+@[to_additive]
+lemma image_multiset_prod (f : F) : ∀ (m : multiset (set α)),
+  (f : α → β) '' m.prod = (m.map (λ s, f '' s)).prod :=
+quotient.ind $ by simpa only [multiset.quot_mk_to_coe, multiset.coe_prod, multiset.coe_map]
+                 using image_list_prod f
+
+@[to_additive]
+lemma image_finset_prod (f : F) (m : finset ι) (s : ι → set α) :
+  (f : α → β) '' (∏ i in m, s i) = (∏ i in m, f '' s i) :=
+(image_multiset_prod f _).trans $ congr_arg multiset.prod $ multiset.map_map _ _ _
 
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive /-" The n-ary version of `set.mem_add`. "-/]
@@ -127,8 +151,20 @@ lemma finset_prod_singleton {M ι : Type*} [comm_monoid M] (s : finset ι) (I :
   ∏ (i : ι) in s, ({I i} : set M) = {∏ (i : ι) in s, I i} :=
 (map_prod (singleton_monoid_hom : M →* set M) _ _).symm
 
-/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
+/-- The n-ary version of `set.image_mul_prod`. -/
+@[to_additive "The n-ary version of `set.add_image_prod`. "]
+lemma image_finset_prod_pi (l : finset ι) (S : ι → set α) :
+  (λ f : ι → α, ∏ i in l, f i) '' (l : set ι).pi S = (∏ i in l, S i) :=
+by { ext, simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, finset.mem_coe] }
 
-end big_operators
+/-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
+@[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
+lemma image_fintype_prod_pi [fintype ι] (S : ι → set α) :
+  (λ f : ι → α, ∏ i, f i) '' univ.pi S = (∏ i, S i) :=
+by simpa only [finset.coe_univ] using image_finset_prod_pi finset.univ S
+
+end comm_monoid
+
+/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
 
 end set

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -49,7 +49,7 @@ variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 theorem image_multiset_prod (f : F) :
     ∀ m : Multiset (Set α), (f : α → β) '' m.Prod = (m.map fun s => f '' s).Prod :=
   Quotient.ind <| by
-    simpa only [Multiset.quot_mk_to_coe, Multiset.coe_prod, Multiset.coe_map] using
+    simpa only [Multiset.quot_mk_to_coe, Multiset.prod_coe, Multiset.map_coe] using
       image_list_prod f
 #align set.image_multiset_prod Set.image_multiset_prod
 #align set.image_multiset_sum Set.image_multiset_sum
@@ -149,7 +149,7 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
     (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).Prod ∈ (t.map f).Prod :=
   by
   induction t using Quotient.inductionOn
-  simp_rw [Multiset.quot_mk_to_coe, Multiset.coe_map, Multiset.coe_prod]
+  simp_rw [Multiset.quot_mk_to_coe, Multiset.map_coe, Multiset.prod_coe]
   exact list_prod_mem_list_prod _ _ _ hg
 #align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prod
 #align set.multiset_sum_mem_multiset_sum Set.multiset_sum_mem_multiset_sum
@@ -162,7 +162,7 @@ theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι →
     (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (t.map f₁).Prod ⊆ (t.map f₂).Prod :=
   by
   induction t using Quotient.inductionOn
-  simp_rw [Multiset.quot_mk_to_coe, Multiset.coe_map, Multiset.coe_prod]
+  simp_rw [Multiset.quot_mk_to_coe, Multiset.map_coe, Multiset.prod_coe]
   exact list_prod_subset_list_prod _ _ _ hf
 #align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prod
 #align set.multiset_sum_subset_multiset_sum Set.multiset_sum_subset_multiset_sum
Diff
@@ -70,6 +70,23 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
     a ∈ ∏ i in t, f i ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i in t, g i = a := by
   classical
+  induction' t using Finset.induction_on with i is hi ih generalizing a
+  · simp_rw [Finset.prod_empty, Set.mem_one]
+    exact ⟨fun h => ⟨fun i => a, fun i => False.elim, h.symm⟩, fun ⟨f, _, hf⟩ => hf.symm⟩
+  rw [Finset.prod_insert hi, Set.mem_mul]
+  simp_rw [Finset.prod_insert hi]
+  simp_rw [ih]
+  constructor
+  · rintro ⟨x, y, hx, ⟨g, hg, rfl⟩, rfl⟩
+    refine' ⟨Function.update g i x, fun j hj => _, _⟩
+    obtain rfl | hj := finset.mem_insert.mp hj
+    · rw [Function.update_same]; exact hx
+    · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]; exact hg hj
+    rw [Finset.prod_update_of_not_mem hi, Function.update_same]
+  · rintro ⟨g, hg, rfl⟩
+    exact
+      ⟨g i, is.prod g, hg (is.mem_insert_self _),
+        ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
 -/
Diff
@@ -70,23 +70,6 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
     a ∈ ∏ i in t, f i ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i in t, g i = a := by
   classical
-  induction' t using Finset.induction_on with i is hi ih generalizing a
-  · simp_rw [Finset.prod_empty, Set.mem_one]
-    exact ⟨fun h => ⟨fun i => a, fun i => False.elim, h.symm⟩, fun ⟨f, _, hf⟩ => hf.symm⟩
-  rw [Finset.prod_insert hi, Set.mem_mul]
-  simp_rw [Finset.prod_insert hi]
-  simp_rw [ih]
-  constructor
-  · rintro ⟨x, y, hx, ⟨g, hg, rfl⟩, rfl⟩
-    refine' ⟨Function.update g i x, fun j hj => _, _⟩
-    obtain rfl | hj := finset.mem_insert.mp hj
-    · rw [Function.update_same]; exact hx
-    · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]; exact hg hj
-    rw [Finset.prod_update_of_not_mem hi, Function.update_same]
-  · rintro ⟨g, hg, rfl⟩
-    exact
-      ⟨g i, is.prod g, hg (is.mem_insert_self _),
-        ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
 -/
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.Algebra.BigOperators.Basic
-import Mathbin.Data.Set.Pointwise.Basic
+import Algebra.BigOperators.Basic
+import Data.Set.Pointwise.Basic
 
 #align_import data.set.pointwise.big_operators from "leanprover-community/mathlib"@"fa2cb8a9e2b987db233e4e6eb47645feafba8861"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module data.set.pointwise.big_operators
-! leanprover-community/mathlib commit fa2cb8a9e2b987db233e4e6eb47645feafba8861
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.BigOperators.Basic
 import Mathbin.Data.Set.Pointwise.Basic
 
+#align_import data.set.pointwise.big_operators from "leanprover-community/mathlib"@"fa2cb8a9e2b987db233e4e6eb47645feafba8861"
+
 /-!
 # Results about pointwise operations on sets and big operators.
 
Diff
@@ -31,6 +31,7 @@ section Monoid
 
 variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
 
+#print Set.image_list_prod /-
 @[to_additive]
 theorem image_list_prod (f : F) :
     ∀ l : List (Set α), (f : α → β) '' l.Prod = (l.map fun s => f '' s).Prod
@@ -38,6 +39,7 @@ theorem image_list_prod (f : F) :
   | a :: as => by rw [List.map_cons, List.prod_cons, List.prod_cons, image_mul, image_list_prod]
 #align set.image_list_prod Set.image_list_prod
 #align set.image_list_sum Set.image_list_sum
+-/
 
 end Monoid
 
@@ -45,6 +47,7 @@ section CommMonoid
 
 variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 
+#print Set.image_multiset_prod /-
 @[to_additive]
 theorem image_multiset_prod (f : F) :
     ∀ m : Multiset (Set α), (f : α → β) '' m.Prod = (m.map fun s => f '' s).Prod :=
@@ -53,14 +56,18 @@ theorem image_multiset_prod (f : F) :
       image_list_prod f
 #align set.image_multiset_prod Set.image_multiset_prod
 #align set.image_multiset_sum Set.image_multiset_sum
+-/
 
+#print Set.image_finset_prod /-
 @[to_additive]
 theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
     (f : α → β) '' ∏ i in m, s i = ∏ i in m, f '' s i :=
   (image_multiset_prod f _).trans <| congr_arg Multiset.prod <| Multiset.map_map _ _ _
 #align set.image_finset_prod Set.image_finset_prod
 #align set.image_finset_sum Set.image_finset_sum
+-/
 
+#print Set.mem_finset_prod /-
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
@@ -85,7 +92,9 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
         ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
+-/
 
+#print Set.mem_fintype_prod /-
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
@@ -93,7 +102,9 @@ theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
+-/
 
+#print Set.list_prod_mem_list_prod /-
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
@@ -107,7 +118,9 @@ theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α
         (ih fun i hi => hg i <| List.mem_cons_of_mem _ hi)
 #align set.list_prod_mem_list_prod Set.list_prod_mem_list_prod
 #align set.list_sum_mem_list_sum Set.list_sum_mem_list_sum
+-/
 
+#print Set.list_prod_subset_list_prod /-
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) :
@@ -121,14 +134,18 @@ theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf
         (ih fun i hi => hf i <| List.mem_cons_of_mem _ hi)
 #align set.list_prod_subset_list_prod Set.list_prod_subset_list_prod
 #align set.list_sum_subset_list_sum Set.list_sum_subset_list_sum
+-/
 
+#print Set.list_prod_singleton /-
 @[to_additive]
 theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
     (s.map fun i => ({i} : Set M)).Prod = {s.Prod} :=
   (map_list_prod (singletonMonoidHom : M →* Set M) _).symm
 #align set.list_prod_singleton Set.list_prod_singleton
 #align set.list_sum_singleton Set.list_sum_singleton
+-/
 
+#print Set.multiset_prod_mem_multiset_prod /-
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
@@ -139,7 +156,9 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
   exact list_prod_mem_list_prod _ _ _ hg
 #align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prod
 #align set.multiset_sum_mem_multiset_sum Set.multiset_sum_mem_multiset_sum
+-/
 
+#print Set.multiset_prod_subset_multiset_prod /-
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
@@ -150,6 +169,7 @@ theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι →
   exact list_prod_subset_list_prod _ _ _ hf
 #align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prod
 #align set.multiset_sum_subset_multiset_sum Set.multiset_sum_subset_multiset_sum
+-/
 
 #print Set.multiset_prod_singleton /-
 @[to_additive]
@@ -160,6 +180,7 @@ theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
 #align set.multiset_sum_singleton Set.multiset_sum_singleton
 -/
 
+#print Set.finset_prod_mem_finset_prod /-
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
@@ -167,7 +188,9 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
   multiset_prod_mem_multiset_prod _ _ _ hg
 #align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prod
 #align set.finset_sum_mem_finset_sum Set.finset_sum_mem_finset_sum
+-/
 
+#print Set.finset_prod_subset_finset_prod /-
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
@@ -175,14 +198,18 @@ theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set 
   multiset_prod_subset_multiset_prod _ _ _ hf
 #align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prod
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
+-/
 
+#print Set.finset_prod_singleton /-
 @[to_additive]
 theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I : ι → M) :
     ∏ i : ι in s, ({I i} : Set M) = {∏ i : ι in s, I i} :=
   (map_prod (singletonMonoidHom : M →* Set M) _ _).symm
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
+-/
 
+#print Set.image_finset_prod_pi /-
 /-- The n-ary version of `set.image_mul_prod`. -/
 @[to_additive "The n-ary version of `set.add_image_prod`. "]
 theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
@@ -190,7 +217,9 @@ theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
   simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, Finset.mem_coe]
 #align set.image_finset_prod_pi Set.image_finset_prod_pi
 #align set.image_finset_sum_pi Set.image_finset_sum_pi
+-/
 
+#print Set.image_fintype_prod_pi /-
 /-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
 @[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
 theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
@@ -198,6 +227,7 @@ theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
   simpa only [Finset.coe_univ] using image_finset_prod_pi Finset.univ S
 #align set.image_fintype_prod_pi Set.image_fintype_prod_pi
 #align set.image_fintype_sum_pi Set.image_fintype_sum_pi
+-/
 
 end CommMonoid
 
Diff
@@ -56,7 +56,7 @@ theorem image_multiset_prod (f : F) :
 
 @[to_additive]
 theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
-    ((f : α → β) '' ∏ i in m, s i) = ∏ i in m, f '' s i :=
+    (f : α → β) '' ∏ i in m, s i = ∏ i in m, f '' s i :=
   (image_multiset_prod f _).trans <| congr_arg Multiset.prod <| Multiset.map_map _ _ _
 #align set.image_finset_prod Set.image_finset_prod
 #align set.image_finset_sum Set.image_finset_sum
@@ -64,7 +64,7 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
+    a ∈ ∏ i in t, f i ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i in t, g i = a := by
   classical
   induction' t using Finset.induction_on with i is hi ih generalizing a
   · simp_rw [Finset.prod_empty, Set.mem_one]
@@ -89,7 +89,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (hg : ∀ i, g i ∈ f i), (∏ i, g i) = a := by rw [mem_finset_prod];
+    a ∈ ∏ i, f i ↔ ∃ (g : ι → α) (hg : ∀ i, g i ∈ f i), ∏ i, g i = a := by rw [mem_finset_prod];
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
@@ -163,7 +163,7 @@ theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
-    (hg : ∀ i ∈ t, g i ∈ f i) : (∏ i in t, g i) ∈ ∏ i in t, f i :=
+    (hg : ∀ i ∈ t, g i ∈ f i) : ∏ i in t, g i ∈ ∏ i in t, f i :=
   multiset_prod_mem_multiset_prod _ _ _ hg
 #align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prod
 #align set.finset_sum_mem_finset_sum Set.finset_sum_mem_finset_sum
@@ -171,14 +171,14 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
-    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (∏ i in t, f₁ i) ⊆ ∏ i in t, f₂ i :=
+    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i in t, f₁ i ⊆ ∏ i in t, f₂ i :=
   multiset_prod_subset_multiset_prod _ _ _ hf
 #align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prod
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
 
 @[to_additive]
 theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I : ι → M) :
-    (∏ i : ι in s, ({I i} : Set M)) = {∏ i : ι in s, I i} :=
+    ∏ i : ι in s, ({I i} : Set M) = {∏ i : ι in s, I i} :=
   (map_prod (singletonMonoidHom : M →* Set M) _ _).symm
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
Diff
@@ -66,23 +66,23 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
     (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
   classical
-    induction' t using Finset.induction_on with i is hi ih generalizing a
-    · simp_rw [Finset.prod_empty, Set.mem_one]
-      exact ⟨fun h => ⟨fun i => a, fun i => False.elim, h.symm⟩, fun ⟨f, _, hf⟩ => hf.symm⟩
-    rw [Finset.prod_insert hi, Set.mem_mul]
-    simp_rw [Finset.prod_insert hi]
-    simp_rw [ih]
-    constructor
-    · rintro ⟨x, y, hx, ⟨g, hg, rfl⟩, rfl⟩
-      refine' ⟨Function.update g i x, fun j hj => _, _⟩
-      obtain rfl | hj := finset.mem_insert.mp hj
-      · rw [Function.update_same]; exact hx
-      · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]; exact hg hj
-      rw [Finset.prod_update_of_not_mem hi, Function.update_same]
-    · rintro ⟨g, hg, rfl⟩
-      exact
-        ⟨g i, is.prod g, hg (is.mem_insert_self _),
-          ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
+  induction' t using Finset.induction_on with i is hi ih generalizing a
+  · simp_rw [Finset.prod_empty, Set.mem_one]
+    exact ⟨fun h => ⟨fun i => a, fun i => False.elim, h.symm⟩, fun ⟨f, _, hf⟩ => hf.symm⟩
+  rw [Finset.prod_insert hi, Set.mem_mul]
+  simp_rw [Finset.prod_insert hi]
+  simp_rw [ih]
+  constructor
+  · rintro ⟨x, y, hx, ⟨g, hg, rfl⟩, rfl⟩
+    refine' ⟨Function.update g i x, fun j hj => _, _⟩
+    obtain rfl | hj := finset.mem_insert.mp hj
+    · rw [Function.update_same]; exact hx
+    · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]; exact hg hj
+    rw [Finset.prod_update_of_not_mem hi, Function.update_same]
+  · rintro ⟨g, hg, rfl⟩
+    exact
+      ⟨g i, is.prod g, hg (is.mem_insert_self _),
+        ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
 
Diff
@@ -64,7 +64,7 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α)(hg : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
+    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (hg : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
   classical
     induction' t using Finset.induction_on with i is hi ih generalizing a
     · simp_rw [Finset.prod_empty, Set.mem_one]
@@ -89,7 +89,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α)(hg : ∀ i, g i ∈ f i), (∏ i, g i) = a := by rw [mem_finset_prod];
+    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (hg : ∀ i, g i ∈ f i), (∏ i, g i) = a := by rw [mem_finset_prod];
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
Diff
@@ -21,7 +21,7 @@ import Mathbin.Data.Set.Pointwise.Basic
 
 namespace Set
 
-open BigOperators Pointwise
+open scoped BigOperators Pointwise
 
 open Function
 
Diff
@@ -31,12 +31,6 @@ section Monoid
 
 variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
 
-/- warning: set.image_list_prod -> Set.image_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (List.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) s) l))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : Monoid.{u3} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) (List.prod.{u3} (Set.{u3} α) (Set.mul.{u3} α (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1))) (Set.one.{u3} α (Monoid.toOne.{u3} α _inst_1)) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (Monoid.toOne.{u2} β _inst_2)) (List.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) s) l))
-Case conversion may be inaccurate. Consider using '#align set.image_list_prod Set.image_list_prodₓ'. -/
 @[to_additive]
 theorem image_list_prod (f : F) :
     ∀ l : List (Set α), (f : α → β) '' l.Prod = (l.map fun s => f '' s).Prod
@@ -51,12 +45,6 @@ section CommMonoid
 
 variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 
-/- warning: set.image_multiset_prod -> Set.image_multiset_prod is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : CommMonoid.{u1} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) s) m))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Multiset.prod.{u3} (Set.{u3} α) (Set.commMonoid.{u3} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) s) m))
-Case conversion may be inaccurate. Consider using '#align set.image_multiset_prod Set.image_multiset_prodₓ'. -/
 @[to_additive]
 theorem image_multiset_prod (f : F) :
     ∀ m : Multiset (Set α), (f : α → β) '' m.Prod = (m.map fun s => f '' s).Prod :=
@@ -66,12 +54,6 @@ theorem image_multiset_prod (f : F) :
 #align set.image_multiset_prod Set.image_multiset_prod
 #align set.image_multiset_sum Set.image_multiset_sum
 
-/- warning: set.image_finset_prod -> Set.image_finset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {F : Type.{u4}} [_inst_1 : CommMonoid.{u2} α] [_inst_2 : CommMonoid.{u3} β] [_inst_3 : MonoidHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))] (f : F) (m : Finset.{u1} ι) (s : ι -> (Set.{u2} α)), Eq.{succ u3} (Set.{u3} β) (Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u3, u1} (Set.{u3} β) ι (Set.commMonoid.{u3} β _inst_2) m (fun (i : ι) => Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (s i)))
-but is expected to have type
-  forall {ι : Type.{u4}} {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Finset.{u4} ι) (s : ι -> (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Finset.prod.{u3, u4} (Set.{u3} α) ι (Set.commMonoid.{u3} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u2, u4} (Set.{u2} β) ι (Set.commMonoid.{u2} β _inst_2) m (fun (i : ι) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (s i)))
-Case conversion may be inaccurate. Consider using '#align set.image_finset_prod Set.image_finset_prodₓ'. -/
 @[to_additive]
 theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
     ((f : α → β) '' ∏ i in m, s i) = ∏ i in m, f '' s i :=
@@ -79,12 +61,6 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 #align set.image_finset_prod Set.image_finset_prod
 #align set.image_finset_sum Set.image_finset_sum
 
-/- warning: set.mem_finset_prod -> Set.mem_finset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) (fun (hg : forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) a)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f : ι -> (Set.{u1} α)) (a : α), Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f i))) (Exists.{max (succ u2) (succ u1)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall {i : ι}, (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) (fun (hg : forall {i : ι}, (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) => Eq.{succ u1} α (Finset.prod.{u1, u2} α ι _inst_1 t (fun (i : ι) => g i)) a)))
-Case conversion may be inaccurate. Consider using '#align set.mem_finset_prod Set.mem_finset_prodₓ'. -/
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
@@ -110,12 +86,6 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
 
-/- warning: set.mem_fintype_prod -> Set.mem_fintype_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] [_inst_4 : Fintype.{u1} ι] (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) (fun (hg : forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => g i)) a)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] [_inst_4 : Fintype.{u2} ι] (f : ι -> (Set.{u1} α)) (a : α), Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => f i))) (Exists.{max (succ u2) (succ u1)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall (i : ι), Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i)) (fun (hg : forall (i : ι), Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i)) => Eq.{succ u1} α (Finset.prod.{u1, u2} α ι _inst_1 (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => g i)) a)))
-Case conversion may be inaccurate. Consider using '#align set.mem_fintype_prod Set.mem_fintype_prodₓ'. -/
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
@@ -124,12 +94,6 @@ theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
 
-/- warning: set.list_prod_mem_list_prod -> Set.list_prod_mem_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (List.prod.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (List.map.{u1, u2} ι α g t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f t)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (List.prod.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (List.map.{u2, u1} ι α g t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f t)))
-Case conversion may be inaccurate. Consider using '#align set.list_prod_mem_list_prod Set.list_prod_mem_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
@@ -144,12 +108,6 @@ theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α
 #align set.list_prod_mem_list_prod Set.list_prod_mem_list_prod
 #align set.list_sum_mem_list_sum Set.list_sum_mem_list_sum
 
-/- warning: set.list_prod_subset_list_prod -> Set.list_prod_subset_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
-Case conversion may be inaccurate. Consider using '#align set.list_prod_subset_list_prod Set.list_prod_subset_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) :
@@ -164,12 +122,6 @@ theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf
 #align set.list_prod_subset_list_prod Set.list_prod_subset_list_prod
 #align set.list_sum_subset_list_sum Set.list_sum_subset_list_sum
 
-/- warning: set.list_prod_singleton -> Set.list_prod_singleton is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_4 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (Set.one.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) s))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_4 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (Set.one.{u1} M (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)) s))
-Case conversion may be inaccurate. Consider using '#align set.list_prod_singleton Set.list_prod_singletonₓ'. -/
 @[to_additive]
 theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
     (s.map fun i => ({i} : Set M)).Prod = {s.Prod} :=
@@ -177,12 +129,6 @@ theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
 #align set.list_prod_singleton Set.list_prod_singleton
 #align set.list_sum_singleton Set.list_sum_singleton
 
-/- warning: set.multiset_prod_mem_multiset_prod -> Set.multiset_prod_mem_multiset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Multiset.prod.{u2} α _inst_1 (Multiset.map.{u1, u2} ι α g t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f t)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Multiset.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (Multiset.{u2} ι) (Multiset.instMembershipMultiset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (Multiset.prod.{u1} α _inst_1 (Multiset.map.{u2, u1} ι α g t)) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f t)))
-Case conversion may be inaccurate. Consider using '#align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
@@ -194,12 +140,6 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
 #align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prod
 #align set.multiset_sum_mem_multiset_sum Set.multiset_sum_mem_multiset_sum
 
-/- warning: set.multiset_prod_subset_multiset_prod -> Set.multiset_prod_subset_multiset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Multiset.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (Multiset.{u2} ι) (Multiset.instMembershipMultiset.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
-Case conversion may be inaccurate. Consider using '#align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
@@ -220,12 +160,6 @@ theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
 #align set.multiset_sum_singleton Set.multiset_sum_singleton
 -/
 
-/- warning: set.finset_prod_mem_finset_prod -> Set.finset_prod_mem_finset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (Finset.prod.{u1, u2} α ι _inst_1 t (fun (i : ι) => g i)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f i)))
-Case conversion may be inaccurate. Consider using '#align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
@@ -234,12 +168,6 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
 #align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prod
 #align set.finset_sum_mem_finset_sum Set.finset_sum_mem_finset_sum
 
-/- warning: set.finset_prod_subset_finset_prod -> Set.finset_prod_subset_finset_prod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₁ i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₂ i)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f₁ i)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f₂ i)))
-Case conversion may be inaccurate. Consider using '#align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
@@ -248,12 +176,6 @@ theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set 
 #align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prod
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
 
-/- warning: set.finset_prod_singleton -> Set.finset_prod_singleton is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {ι : Type.{u2}} [_inst_4 : CommMonoid.{u1} M] (s : Finset.{u2} ι) (I : ι -> M), Eq.{succ u1} (Set.{u1} M) (Finset.prod.{u1, u2} (Set.{u1} M) ι (Set.commMonoid.{u1} M _inst_4) s (fun (i : ι) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (I i))) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (Finset.prod.{u1, u2} M ι _inst_4 s (fun (i : ι) => I i)))
-but is expected to have type
-  forall {M : Type.{u2}} {ι : Type.{u1}} [_inst_4 : CommMonoid.{u2} M] (s : Finset.{u1} ι) (I : ι -> M), Eq.{succ u2} (Set.{u2} M) (Finset.prod.{u2, u1} (Set.{u2} M) ι (Set.commMonoid.{u2} M _inst_4) s (fun (i : ι) => Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (I i))) (Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (Finset.prod.{u2, u1} M ι _inst_4 s (fun (i : ι) => I i)))
-Case conversion may be inaccurate. Consider using '#align set.finset_prod_singleton Set.finset_prod_singletonₓ'. -/
 @[to_additive]
 theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I : ι → M) :
     (∏ i : ι in s, ({I i} : Set M)) = {∏ i : ι in s, I i} :=
@@ -261,12 +183,6 @@ theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
 
-/- warning: set.image_finset_prod_pi -> Set.image_finset_prod_pi is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (l : Finset.{u1} ι) (S : ι -> (Set.{u2} α)), Eq.{succ u2} (Set.{u2} α) (Set.image.{max u1 u2, u2} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u2, u1} α ι _inst_1 l (fun (i : ι) => f i)) (Set.pi.{u1, u2} ι (fun (ᾰ : ι) => α) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) l) S)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) l (fun (i : ι) => S i))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (l : Finset.{u2} ι) (S : ι -> (Set.{u1} α)), Eq.{succ u1} (Set.{u1} α) (Set.image.{max u2 u1, u1} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u1, u2} α ι _inst_1 l (fun (i : ι) => f i)) (Set.pi.{u2, u1} ι (fun (ᾰ : ι) => α) (Finset.toSet.{u2} ι l) S)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) l (fun (i : ι) => S i))
-Case conversion may be inaccurate. Consider using '#align set.image_finset_prod_pi Set.image_finset_prod_piₓ'. -/
 /-- The n-ary version of `set.image_mul_prod`. -/
 @[to_additive "The n-ary version of `set.add_image_prod`. "]
 theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
@@ -275,12 +191,6 @@ theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
 #align set.image_finset_prod_pi Set.image_finset_prod_pi
 #align set.image_finset_sum_pi Set.image_finset_sum_pi
 
-/- warning: set.image_fintype_prod_pi -> Set.image_fintype_prod_pi is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] [_inst_4 : Fintype.{u1} ι] (S : ι -> (Set.{u2} α)), Eq.{succ u2} (Set.{u2} α) (Set.image.{max u1 u2, u2} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u2, u1} α ι _inst_1 (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => f i)) (Set.pi.{u1, u2} ι (fun (ᾰ : ι) => α) (Set.univ.{u1} ι) S)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => S i))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] [_inst_4 : Fintype.{u2} ι] (S : ι -> (Set.{u1} α)), Eq.{succ u1} (Set.{u1} α) (Set.image.{max u2 u1, u1} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u1, u2} α ι _inst_1 (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => f i)) (Set.pi.{u2, u1} ι (fun (ᾰ : ι) => α) (Set.univ.{u2} ι) S)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => S i))
-Case conversion may be inaccurate. Consider using '#align set.image_fintype_prod_pi Set.image_fintype_prod_piₓ'. -/
 /-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
 @[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
 theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
Diff
@@ -100,10 +100,8 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
     · rintro ⟨x, y, hx, ⟨g, hg, rfl⟩, rfl⟩
       refine' ⟨Function.update g i x, fun j hj => _, _⟩
       obtain rfl | hj := finset.mem_insert.mp hj
-      · rw [Function.update_same]
-        exact hx
-      · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]
-        exact hg hj
+      · rw [Function.update_same]; exact hx
+      · rw [update_noteq (ne_of_mem_of_not_mem hj hi)]; exact hg hj
       rw [Finset.prod_update_of_not_mem hi, Function.update_same]
     · rintro ⟨g, hg, rfl⟩
       exact
@@ -121,9 +119,7 @@ Case conversion may be inaccurate. Consider using '#align set.mem_fintype_prod S
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α)(hg : ∀ i, g i ∈ f i), (∏ i, g i) = a :=
-  by
-  rw [mem_finset_prod]
+    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α)(hg : ∀ i, g i ∈ f i), (∏ i, g i) = a := by rw [mem_finset_prod];
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
@@ -274,9 +270,7 @@ Case conversion may be inaccurate. Consider using '#align set.image_finset_prod_
 /-- The n-ary version of `set.image_mul_prod`. -/
 @[to_additive "The n-ary version of `set.add_image_prod`. "]
 theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
-    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i :=
-  by
-  ext
+    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i := by ext;
   simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, Finset.mem_coe]
 #align set.image_finset_prod_pi Set.image_finset_prod_pi
 #align set.image_finset_sum_pi Set.image_finset_sum_pi
Diff
@@ -35,7 +35,7 @@ variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (List.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) s) l))
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : Monoid.{u3} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) (List.prod.{u3} (Set.{u3} α) (Set.mul.{u3} α (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1))) (Set.one.{u3} α (Monoid.toOne.{u3} α _inst_1)) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (Monoid.toOne.{u2} β _inst_2)) (List.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) s) l))
+  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : Monoid.{u3} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) (List.prod.{u3} (Set.{u3} α) (Set.mul.{u3} α (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1))) (Set.one.{u3} α (Monoid.toOne.{u3} α _inst_1)) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (Monoid.toOne.{u2} β _inst_2)) (List.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) s) l))
 Case conversion may be inaccurate. Consider using '#align set.image_list_prod Set.image_list_prodₓ'. -/
 @[to_additive]
 theorem image_list_prod (f : F) :
@@ -55,7 +55,7 @@ variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : CommMonoid.{u1} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) s) m))
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Multiset.prod.{u3} (Set.{u3} α) (Set.commMonoid.{u3} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) s) m))
+  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Multiset.prod.{u3} (Set.{u3} α) (Set.commMonoid.{u3} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) s) m))
 Case conversion may be inaccurate. Consider using '#align set.image_multiset_prod Set.image_multiset_prodₓ'. -/
 @[to_additive]
 theorem image_multiset_prod (f : F) :
@@ -70,7 +70,7 @@ theorem image_multiset_prod (f : F) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {F : Type.{u4}} [_inst_1 : CommMonoid.{u2} α] [_inst_2 : CommMonoid.{u3} β] [_inst_3 : MonoidHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))] (f : F) (m : Finset.{u1} ι) (s : ι -> (Set.{u2} α)), Eq.{succ u3} (Set.{u3} β) (Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u3, u1} (Set.{u3} β) ι (Set.commMonoid.{u3} β _inst_2) m (fun (i : ι) => Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (s i)))
 but is expected to have type
-  forall {ι : Type.{u4}} {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Finset.{u4} ι) (s : ι -> (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Finset.prod.{u3, u4} (Set.{u3} α) ι (Set.commMonoid.{u3} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u2, u4} (Set.{u2} β) ι (Set.commMonoid.{u2} β _inst_2) m (fun (i : ι) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (s i)))
+  forall {ι : Type.{u4}} {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Finset.{u4} ι) (s : ι -> (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Finset.prod.{u3, u4} (Set.{u3} α) ι (Set.commMonoid.{u3} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u2, u4} (Set.{u2} β) ι (Set.commMonoid.{u2} β _inst_2) m (fun (i : ι) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (s i)))
 Case conversion may be inaccurate. Consider using '#align set.image_finset_prod Set.image_finset_prodₓ'. -/
 @[to_additive]
 theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
Diff
@@ -31,6 +31,12 @@ section Monoid
 
 variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
 
+/- warning: set.image_list_prod -> Set.image_list_prod is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (List.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3))) f) s) l))
+but is expected to have type
+  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : Monoid.{u3} α] [_inst_2 : Monoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2)] (f : F) (l : List.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) (List.prod.{u3} (Set.{u3} α) (Set.mul.{u3} α (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1))) (Set.one.{u3} α (Monoid.toOne.{u3} α _inst_1)) l)) (List.prod.{u2} (Set.{u2} β) (Set.mul.{u2} β (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))) (Set.one.{u2} β (Monoid.toOne.{u2} β _inst_2)) (List.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α _inst_1)) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α _inst_1) (Monoid.toMulOneClass.{u2} β _inst_2) _inst_3)) f) s) l))
+Case conversion may be inaccurate. Consider using '#align set.image_list_prod Set.image_list_prodₓ'. -/
 @[to_additive]
 theorem image_list_prod (f : F) :
     ∀ l : List (Set α), (f : α → β) '' l.Prod = (l.map fun s => f '' s).Prod
@@ -45,6 +51,12 @@ section CommMonoid
 
 variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 
+/- warning: set.image_multiset_prod -> Set.image_multiset_prod is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} {F : Type.{u3}} [_inst_1 : CommMonoid.{u1} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u1} (Set.{u1} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u1, u2} (Set.{u1} α) (Set.{u2} β) (fun (s : Set.{u1} α) => Set.image.{u1, u2} α β (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u3, u1, u2} F α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F α β (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3))) f) s) m))
+but is expected to have type
+  forall {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Multiset.{u3} (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Multiset.prod.{u3} (Set.{u3} α) (Set.commMonoid.{u3} α _inst_1) m)) (Multiset.prod.{u2} (Set.{u2} β) (Set.commMonoid.{u2} β _inst_2) (Multiset.map.{u3, u2} (Set.{u3} α) (Set.{u2} β) (fun (s : Set.{u3} α) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) s) m))
+Case conversion may be inaccurate. Consider using '#align set.image_multiset_prod Set.image_multiset_prodₓ'. -/
 @[to_additive]
 theorem image_multiset_prod (f : F) :
     ∀ m : Multiset (Set α), (f : α → β) '' m.Prod = (m.map fun s => f '' s).Prod :=
@@ -54,6 +66,12 @@ theorem image_multiset_prod (f : F) :
 #align set.image_multiset_prod Set.image_multiset_prod
 #align set.image_multiset_sum Set.image_multiset_sum
 
+/- warning: set.image_finset_prod -> Set.image_finset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {F : Type.{u4}} [_inst_1 : CommMonoid.{u2} α] [_inst_2 : CommMonoid.{u3} β] [_inst_3 : MonoidHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))] (f : F) (m : Finset.{u1} ι) (s : ι -> (Set.{u2} α)), Eq.{succ u3} (Set.{u3} β) (Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u3, u1} (Set.{u3} β) ι (Set.commMonoid.{u3} β _inst_2) m (fun (i : ι) => Set.image.{u2, u3} α β (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u4, u2, u3} F α β (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasMul.{u3} β (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2))) (MonoidHomClass.toMulHomClass.{u4, u2, u3} F α β (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)) (Monoid.toMulOneClass.{u3} β (CommMonoid.toMonoid.{u3} β _inst_2)) _inst_3))) f) (s i)))
+but is expected to have type
+  forall {ι : Type.{u4}} {α : Type.{u3}} {β : Type.{u2}} {F : Type.{u1}} [_inst_1 : CommMonoid.{u3} α] [_inst_2 : CommMonoid.{u2} β] [_inst_3 : MonoidHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))] (f : F) (m : Finset.{u4} ι) (s : ι -> (Set.{u3} α)), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (Finset.prod.{u3, u4} (Set.{u3} α) ι (Set.commMonoid.{u3} α _inst_1) m (fun (i : ι) => s i))) (Finset.prod.{u2, u4} (Set.{u2} β) ι (Set.commMonoid.{u2} β _inst_2) m (fun (i : ι) => Set.image.{u3, u2} α β (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (MulOneClass.toMul.{u3} α (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1))) (MulOneClass.toMul.{u2} β (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2))) (MonoidHomClass.toMulHomClass.{u1, u3, u2} F α β (Monoid.toMulOneClass.{u3} α (CommMonoid.toMonoid.{u3} α _inst_1)) (Monoid.toMulOneClass.{u2} β (CommMonoid.toMonoid.{u2} β _inst_2)) _inst_3)) f) (s i)))
+Case conversion may be inaccurate. Consider using '#align set.image_finset_prod Set.image_finset_prodₓ'. -/
 @[to_additive]
 theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
     ((f : α → β) '' ∏ i in m, s i) = ∏ i in m, f '' s i :=
@@ -65,7 +83,7 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) (fun (hg : forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) a)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f : α -> (Set.{u1} ι)) (a : ι), Iff (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) a (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f i))) (Exists.{max (succ u1) (succ u2)} (α -> ι) (fun (g : α -> ι) => Exists.{0} (forall {i : α}, (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) (fun (hg : forall {i : α}, (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) => Eq.{succ u1} ι (Finset.prod.{u1, u2} ι α _inst_1 t (fun (i : α) => g i)) a)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f : ι -> (Set.{u1} α)) (a : α), Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f i))) (Exists.{max (succ u2) (succ u1)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall {i : ι}, (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) (fun (hg : forall {i : ι}, (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) => Eq.{succ u1} α (Finset.prod.{u1, u2} α ι _inst_1 t (fun (i : ι) => g i)) a)))
 Case conversion may be inaccurate. Consider using '#align set.mem_finset_prod Set.mem_finset_prodₓ'. -/
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
@@ -98,7 +116,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] [_inst_4 : Fintype.{u1} ι] (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) (fun (hg : forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => g i)) a)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] [_inst_4 : Fintype.{u2} α] (f : α -> (Set.{u1} ι)) (a : ι), Iff (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) a (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) (Finset.univ.{u2} α _inst_4) (fun (i : α) => f i))) (Exists.{max (succ u1) (succ u2)} (α -> ι) (fun (g : α -> ι) => Exists.{0} (forall (i : α), Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i)) (fun (hg : forall (i : α), Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i)) => Eq.{succ u1} ι (Finset.prod.{u1, u2} ι α _inst_1 (Finset.univ.{u2} α _inst_4) (fun (i : α) => g i)) a)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] [_inst_4 : Fintype.{u2} ι] (f : ι -> (Set.{u1} α)) (a : α), Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => f i))) (Exists.{max (succ u2) (succ u1)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall (i : ι), Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i)) (fun (hg : forall (i : ι), Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i)) => Eq.{succ u1} α (Finset.prod.{u1, u2} α ι _inst_1 (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => g i)) a)))
 Case conversion may be inaccurate. Consider using '#align set.mem_fintype_prod Set.mem_fintype_prodₓ'. -/
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
@@ -114,7 +132,7 @@ theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (List.prod.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (List.map.{u1, u2} ι α g t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f t)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : List.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (List.prod.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)) (List.map.{u2, u1} α ι g t)) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f t)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (List.prod.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (List.map.{u2, u1} ι α g t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f t)))
 Case conversion may be inaccurate. Consider using '#align set.list_prod_mem_list_prod Set.list_prod_mem_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
@@ -134,7 +152,7 @@ theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : List.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f₁ t)) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f₂ t)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
 Case conversion may be inaccurate. Consider using '#align set.list_prod_subset_list_prod Set.list_prod_subset_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
@@ -167,7 +185,7 @@ theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Multiset.prod.{u2} α _inst_1 (Multiset.map.{u1, u2} ι α g t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f t)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Multiset.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (Multiset.{u2} α) (Multiset.instMembershipMultiset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (Multiset.prod.{u1} ι _inst_1 (Multiset.map.{u2, u1} α ι g t)) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f t)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Multiset.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (Multiset.{u2} ι) (Multiset.instMembershipMultiset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (Multiset.prod.{u1} α _inst_1 (Multiset.map.{u2, u1} ι α g t)) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f t)))
 Case conversion may be inaccurate. Consider using '#align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
@@ -184,7 +202,7 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Multiset.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (Multiset.{u2} α) (Multiset.instMembershipMultiset.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f₁ t)) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f₂ t)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Multiset.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (Multiset.{u2} ι) (Multiset.instMembershipMultiset.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (Multiset.prod.{u1} (Set.{u1} α) (Set.commMonoid.{u1} α _inst_1) (Multiset.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
 Case conversion may be inaccurate. Consider using '#align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
@@ -210,7 +228,7 @@ theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (Finset.prod.{u1, u2} ι α _inst_1 t (fun (i : α) => g i)) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f i)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (Finset.prod.{u1, u2} α ι _inst_1 t (fun (i : ι) => g i)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f i)))
 Case conversion may be inaccurate. Consider using '#align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
@@ -224,7 +242,7 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
 lean 3 declaration is
   forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₁ i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₂ i)))
 but is expected to have type
-  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f₁ i)) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f₂ i)))
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (t : Finset.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f₁ i)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) t (fun (i : ι) => f₂ i)))
 Case conversion may be inaccurate. Consider using '#align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
@@ -247,6 +265,12 @@ theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
 
+/- warning: set.image_finset_prod_pi -> Set.image_finset_prod_pi is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (l : Finset.{u1} ι) (S : ι -> (Set.{u2} α)), Eq.{succ u2} (Set.{u2} α) (Set.image.{max u1 u2, u2} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u2, u1} α ι _inst_1 l (fun (i : ι) => f i)) (Set.pi.{u1, u2} ι (fun (ᾰ : ι) => α) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) l) S)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) l (fun (i : ι) => S i))
+but is expected to have type
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] (l : Finset.{u2} ι) (S : ι -> (Set.{u1} α)), Eq.{succ u1} (Set.{u1} α) (Set.image.{max u2 u1, u1} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u1, u2} α ι _inst_1 l (fun (i : ι) => f i)) (Set.pi.{u2, u1} ι (fun (ᾰ : ι) => α) (Finset.toSet.{u2} ι l) S)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) l (fun (i : ι) => S i))
+Case conversion may be inaccurate. Consider using '#align set.image_finset_prod_pi Set.image_finset_prod_piₓ'. -/
 /-- The n-ary version of `set.image_mul_prod`. -/
 @[to_additive "The n-ary version of `set.add_image_prod`. "]
 theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
@@ -257,6 +281,12 @@ theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
 #align set.image_finset_prod_pi Set.image_finset_prod_pi
 #align set.image_finset_sum_pi Set.image_finset_sum_pi
 
+/- warning: set.image_fintype_prod_pi -> Set.image_fintype_prod_pi is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] [_inst_4 : Fintype.{u1} ι] (S : ι -> (Set.{u2} α)), Eq.{succ u2} (Set.{u2} α) (Set.image.{max u1 u2, u2} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u2, u1} α ι _inst_1 (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => f i)) (Set.pi.{u1, u2} ι (fun (ᾰ : ι) => α) (Set.univ.{u1} ι) S)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => S i))
+but is expected to have type
+  forall {ι : Type.{u2}} {α : Type.{u1}} [_inst_1 : CommMonoid.{u1} α] [_inst_4 : Fintype.{u2} ι] (S : ι -> (Set.{u1} α)), Eq.{succ u1} (Set.{u1} α) (Set.image.{max u2 u1, u1} (ι -> α) α (fun (f : ι -> α) => Finset.prod.{u1, u2} α ι _inst_1 (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => f i)) (Set.pi.{u2, u1} ι (fun (ᾰ : ι) => α) (Set.univ.{u2} ι) S)) (Finset.prod.{u1, u2} (Set.{u1} α) ι (Set.commMonoid.{u1} α _inst_1) (Finset.univ.{u2} ι _inst_4) (fun (i : ι) => S i))
+Case conversion may be inaccurate. Consider using '#align set.image_fintype_prod_pi Set.image_fintype_prod_piₓ'. -/
 /-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
 @[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
 theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module data.set.pointwise.big_operators
-! leanprover-community/mathlib commit 327c3c0d9232d80e250dc8f65e7835b82b266ea5
+! leanprover-community/mathlib commit fa2cb8a9e2b987db233e4e6eb47645feafba8861
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -21,15 +21,52 @@ import Mathbin.Data.Set.Pointwise.Basic
 
 namespace Set
 
-section BigOperators
-
 open BigOperators Pointwise
 
 open Function
 
-variable {α : Type _} {ι : Type _} [CommMonoid α]
+variable {ι α β F : Type _}
+
+section Monoid
+
+variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
+
+@[to_additive]
+theorem image_list_prod (f : F) :
+    ∀ l : List (Set α), (f : α → β) '' l.Prod = (l.map fun s => f '' s).Prod
+  | [] => image_one.trans <| congr_arg singleton (map_one f)
+  | a :: as => by rw [List.map_cons, List.prod_cons, List.prod_cons, image_mul, image_list_prod]
+#align set.image_list_prod Set.image_list_prod
+#align set.image_list_sum Set.image_list_sum
+
+end Monoid
+
+section CommMonoid
+
+variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
+
+@[to_additive]
+theorem image_multiset_prod (f : F) :
+    ∀ m : Multiset (Set α), (f : α → β) '' m.Prod = (m.map fun s => f '' s).Prod :=
+  Quotient.ind <| by
+    simpa only [Multiset.quot_mk_to_coe, Multiset.coe_prod, Multiset.coe_map] using
+      image_list_prod f
+#align set.image_multiset_prod Set.image_multiset_prod
+#align set.image_multiset_sum Set.image_multiset_sum
+
+@[to_additive]
+theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
+    ((f : α → β) '' ∏ i in m, s i) = ∏ i in m, f '' s i :=
+  (image_multiset_prod f _).trans <| congr_arg Multiset.prod <| Multiset.map_map _ _ _
+#align set.image_finset_prod Set.image_finset_prod
+#align set.image_finset_sum Set.image_finset_sum
 
-#print Set.mem_finset_prod /-
+/- warning: set.mem_finset_prod -> Set.mem_finset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) (fun (hg : forall {i : ι}, (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) a)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f : α -> (Set.{u1} ι)) (a : ι), Iff (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) a (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f i))) (Exists.{max (succ u1) (succ u2)} (α -> ι) (fun (g : α -> ι) => Exists.{0} (forall {i : α}, (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) (fun (hg : forall {i : α}, (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) => Eq.{succ u1} ι (Finset.prod.{u1, u2} ι α _inst_1 t (fun (i : α) => g i)) a)))
+Case conversion may be inaccurate. Consider using '#align set.mem_finset_prod Set.mem_finset_prodₓ'. -/
 /-- The n-ary version of `set.mem_mul`. -/
 @[to_additive " The n-ary version of `set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
@@ -56,9 +93,13 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
           ⟨g, fun i hi => hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
--/
 
-#print Set.mem_fintype_prod /-
+/- warning: set.mem_fintype_prod -> Set.mem_fintype_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] [_inst_4 : Fintype.{u1} ι] (f : ι -> (Set.{u2} α)) (a : α), Iff (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) a (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => f i))) (Exists.{max (succ u1) (succ u2)} (ι -> α) (fun (g : ι -> α) => Exists.{0} (forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) (fun (hg : forall (i : ι), Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i)) => Eq.{succ u2} α (Finset.prod.{u2, u1} α ι _inst_1 (Finset.univ.{u1} ι _inst_4) (fun (i : ι) => g i)) a)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] [_inst_4 : Fintype.{u2} α] (f : α -> (Set.{u1} ι)) (a : ι), Iff (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) a (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) (Finset.univ.{u2} α _inst_4) (fun (i : α) => f i))) (Exists.{max (succ u1) (succ u2)} (α -> ι) (fun (g : α -> ι) => Exists.{0} (forall (i : α), Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i)) (fun (hg : forall (i : α), Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i)) => Eq.{succ u1} ι (Finset.prod.{u1, u2} ι α _inst_1 (Finset.univ.{u2} α _inst_4) (fun (i : α) => g i)) a)))
+Case conversion may be inaccurate. Consider using '#align set.mem_fintype_prod Set.mem_fintype_prodₓ'. -/
 /-- A version of `set.mem_finset_prod` with a simpler RHS for products over a fintype. -/
 @[to_additive " A version of `set.mem_finset_sum` with a simpler RHS for sums over a fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
@@ -68,13 +109,12 @@ theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
 #align set.mem_fintype_sum Set.mem_fintype_sum
--/
 
 /- warning: set.list_prod_mem_list_prod -> Set.list_prod_mem_list_prod is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u2, u2} ι (List.{u2} ι) (List.hasMem.{u2} ι) i t) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (g i) (f i))) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (List.prod.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι α g t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (List.map.{u2, u1} ι (Set.{u1} α) f t)))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (List.prod.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1))) (List.map.{u1, u2} ι α g t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f t)))
 but is expected to have type
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f : ι -> (Set.{u1} α)) (g : ι -> α), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (g i) (f i))) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) (List.prod.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)) (List.map.{u2, u1} ι α g t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f t)))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : List.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (List.prod.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)) (List.map.{u2, u1} α ι g t)) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f t)))
 Case conversion may be inaccurate. Consider using '#align set.list_prod_mem_list_prod Set.list_prod_mem_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
@@ -92,9 +132,9 @@ theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α
 
 /- warning: set.list_prod_subset_list_prod -> Set.list_prod_subset_list_prod is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.Mem.{u2, u2} ι (List.{u2} ι) (List.hasMem.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (List.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (List.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : List.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (List.{u1} ι) (List.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (List.prod.{u2} (Set.{u2} α) (Set.mul.{u2} α (MulOneClass.toHasMul.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (Set.one.{u2} α (MulOneClass.toHasOne.{u2} α (Monoid.toMulOneClass.{u2} α (CommMonoid.toMonoid.{u2} α _inst_1)))) (List.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
 but is expected to have type
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : CommMonoid.{u1} α] (t : List.{u2} ι) (f₁ : ι -> (Set.{u1} α)) (f₂ : ι -> (Set.{u1} α)), (forall (i : ι), (Membership.mem.{u2, u2} ι (List.{u2} ι) (List.instMembershipList.{u2} ι) i t) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₁ t)) (List.prod.{u1} (Set.{u1} α) (Set.mul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1)))) (Set.one.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α _inst_1))) (List.map.{u2, u1} ι (Set.{u1} α) f₂ t)))
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : List.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f₁ t)) (List.prod.{u1} (Set.{u1} ι) (Set.mul.{u1} ι (MulOneClass.toMul.{u1} ι (Monoid.toMulOneClass.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1)))) (Set.one.{u1} ι (Monoid.toOne.{u1} ι (CommMonoid.toMonoid.{u1} ι _inst_1))) (List.map.{u2, u1} α (Set.{u1} ι) f₂ t)))
 Case conversion may be inaccurate. Consider using '#align set.list_prod_subset_list_prod Set.list_prod_subset_list_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
@@ -112,9 +152,9 @@ theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf
 
 /- warning: set.list_prod_singleton -> Set.list_prod_singleton is a dubious translation:
 lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_2 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2)))) (Set.one.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2)))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2))) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2))) s))
+  forall {M : Type.{u1}} [_inst_4 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (Set.one.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) s))
 but is expected to have type
-  forall {M : Type.{u1}} [_inst_2 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2)))) (Set.one.{u1} M (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2))) (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_2)) s))
+  forall {M : Type.{u1}} [_inst_4 : CommMonoid.{u1} M] (s : List.{u1} M), Eq.{succ u1} (Set.{u1} M) (List.prod.{u1} (Set.{u1} M) (Set.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)))) (Set.one.{u1} M (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (List.map.{u1, u1} M (Set.{u1} M) (fun (i : M) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) i) s)) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.instSingletonSet.{u1} M) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4))) (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_4)) s))
 Case conversion may be inaccurate. Consider using '#align set.list_prod_singleton Set.list_prod_singletonₓ'. -/
 @[to_additive]
 theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
@@ -123,7 +163,12 @@ theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
 #align set.list_prod_singleton Set.list_prod_singleton
 #align set.list_sum_singleton Set.list_sum_singleton
 
-#print Set.multiset_prod_mem_multiset_prod /-
+/- warning: set.multiset_prod_mem_multiset_prod -> Set.multiset_prod_mem_multiset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Multiset.prod.{u2} α _inst_1 (Multiset.map.{u1, u2} ι α g t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f t)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Multiset.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (Multiset.{u2} α) (Multiset.instMembershipMultiset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (Multiset.prod.{u1} ι _inst_1 (Multiset.map.{u2, u1} α ι g t)) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f t)))
+Case conversion may be inaccurate. Consider using '#align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
@@ -134,9 +179,13 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
   exact list_prod_mem_list_prod _ _ _ hg
 #align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prod
 #align set.multiset_sum_mem_multiset_sum Set.multiset_sum_mem_multiset_sum
--/
 
-#print Set.multiset_prod_subset_multiset_prod /-
+/- warning: set.multiset_prod_subset_multiset_prod -> Set.multiset_prod_subset_multiset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Multiset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Multiset.{u1} ι) (Multiset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₁ t)) (Multiset.prod.{u2} (Set.{u2} α) (Set.commMonoid.{u2} α _inst_1) (Multiset.map.{u1, u2} ι (Set.{u2} α) f₂ t)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Multiset.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (Multiset.{u2} α) (Multiset.instMembershipMultiset.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f₁ t)) (Multiset.prod.{u1} (Set.{u1} ι) (Set.commMonoid.{u1} ι _inst_1) (Multiset.map.{u2, u1} α (Set.{u1} ι) f₂ t)))
+Case conversion may be inaccurate. Consider using '#align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
@@ -147,7 +196,6 @@ theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι →
   exact list_prod_subset_list_prod _ _ _ hf
 #align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prod
 #align set.multiset_sum_subset_multiset_sum Set.multiset_sum_subset_multiset_sum
--/
 
 #print Set.multiset_prod_singleton /-
 @[to_additive]
@@ -158,7 +206,12 @@ theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
 #align set.multiset_sum_singleton Set.multiset_sum_singleton
 -/
 
-#print Set.finset_prod_mem_finset_prod /-
+/- warning: set.finset_prod_mem_finset_prod -> Set.finset_prod_mem_finset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f : ι -> (Set.{u2} α)) (g : ι -> α), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (g i) (f i))) -> (Membership.Mem.{u2, u2} α (Set.{u2} α) (Set.hasMem.{u2} α) (Finset.prod.{u2, u1} α ι _inst_1 t (fun (i : ι) => g i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f i)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f : α -> (Set.{u1} ι)) (g : α -> ι), (forall (i : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (g i) (f i))) -> (Membership.mem.{u1, u1} ι (Set.{u1} ι) (Set.instMembershipSet.{u1} ι) (Finset.prod.{u1, u2} ι α _inst_1 t (fun (i : α) => g i)) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f i)))
+Case conversion may be inaccurate. Consider using '#align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_mem_mul`. -/
 @[to_additive " An n-ary version of `set.add_mem_add`. "]
 theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
@@ -166,9 +219,13 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
   multiset_prod_mem_multiset_prod _ _ _ hg
 #align set.finset_prod_mem_finset_prod Set.finset_prod_mem_finset_prod
 #align set.finset_sum_mem_finset_sum Set.finset_sum_mem_finset_sum
--/
 
-#print Set.finset_prod_subset_finset_prod /-
+/- warning: set.finset_prod_subset_finset_prod -> Set.finset_prod_subset_finset_prod is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u2} α] (t : Finset.{u1} ι) (f₁ : ι -> (Set.{u2} α)) (f₂ : ι -> (Set.{u2} α)), (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i t) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.hasSubset.{u2} α) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₁ i)) (Finset.prod.{u2, u1} (Set.{u2} α) ι (Set.commMonoid.{u2} α _inst_1) t (fun (i : ι) => f₂ i)))
+but is expected to have type
+  forall {ι : Type.{u1}} {α : Type.{u2}} [_inst_1 : CommMonoid.{u1} ι] (t : Finset.{u2} α) (f₁ : α -> (Set.{u1} ι)) (f₂ : α -> (Set.{u1} ι)), (forall (i : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) i t) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (f₁ i) (f₂ i))) -> (HasSubset.Subset.{u1} (Set.{u1} ι) (Set.instHasSubsetSet.{u1} ι) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f₁ i)) (Finset.prod.{u1, u2} (Set.{u1} ι) α (Set.commMonoid.{u1} ι _inst_1) t (fun (i : α) => f₂ i)))
+Case conversion may be inaccurate. Consider using '#align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prodₓ'. -/
 /-- An n-ary version of `set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `set.add_subset_add`. "]
 theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
@@ -176,13 +233,12 @@ theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set 
   multiset_prod_subset_multiset_prod _ _ _ hf
 #align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prod
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
--/
 
 /- warning: set.finset_prod_singleton -> Set.finset_prod_singleton is a dubious translation:
 lean 3 declaration is
-  forall {M : Type.{u1}} {ι : Type.{u2}} [_inst_2 : CommMonoid.{u1} M] (s : Finset.{u2} ι) (I : ι -> M), Eq.{succ u1} (Set.{u1} M) (Finset.prod.{u1, u2} (Set.{u1} M) ι (Set.commMonoid.{u1} M _inst_2) s (fun (i : ι) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (I i))) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (Finset.prod.{u1, u2} M ι _inst_2 s (fun (i : ι) => I i)))
+  forall {M : Type.{u1}} {ι : Type.{u2}} [_inst_4 : CommMonoid.{u1} M] (s : Finset.{u2} ι) (I : ι -> M), Eq.{succ u1} (Set.{u1} M) (Finset.prod.{u1, u2} (Set.{u1} M) ι (Set.commMonoid.{u1} M _inst_4) s (fun (i : ι) => Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (I i))) (Singleton.singleton.{u1, u1} M (Set.{u1} M) (Set.hasSingleton.{u1} M) (Finset.prod.{u1, u2} M ι _inst_4 s (fun (i : ι) => I i)))
 but is expected to have type
-  forall {M : Type.{u2}} {ι : Type.{u1}} [_inst_2 : CommMonoid.{u2} M] (s : Finset.{u1} ι) (I : ι -> M), Eq.{succ u2} (Set.{u2} M) (Finset.prod.{u2, u1} (Set.{u2} M) ι (Set.commMonoid.{u2} M _inst_2) s (fun (i : ι) => Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (I i))) (Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (Finset.prod.{u2, u1} M ι _inst_2 s (fun (i : ι) => I i)))
+  forall {M : Type.{u2}} {ι : Type.{u1}} [_inst_4 : CommMonoid.{u2} M] (s : Finset.{u1} ι) (I : ι -> M), Eq.{succ u2} (Set.{u2} M) (Finset.prod.{u2, u1} (Set.{u2} M) ι (Set.commMonoid.{u2} M _inst_4) s (fun (i : ι) => Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (I i))) (Singleton.singleton.{u2, u2} M (Set.{u2} M) (Set.instSingletonSet.{u2} M) (Finset.prod.{u2, u1} M ι _inst_4 s (fun (i : ι) => I i)))
 Case conversion may be inaccurate. Consider using '#align set.finset_prod_singleton Set.finset_prod_singletonₓ'. -/
 @[to_additive]
 theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I : ι → M) :
@@ -191,10 +247,28 @@ theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
 
-/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
+/-- The n-ary version of `set.image_mul_prod`. -/
+@[to_additive "The n-ary version of `set.add_image_prod`. "]
+theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
+    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i :=
+  by
+  ext
+  simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, Finset.mem_coe]
+#align set.image_finset_prod_pi Set.image_finset_prod_pi
+#align set.image_finset_sum_pi Set.image_finset_sum_pi
+
+/-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
+@[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
+theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
+    (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i := by
+  simpa only [Finset.coe_univ] using image_finset_prod_pi Finset.univ S
+#align set.image_fintype_prod_pi Set.image_fintype_prod_pi
+#align set.image_fintype_sum_pi Set.image_fintype_sum_pi
 
+end CommMonoid
+
+/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
 
-end BigOperators
 
 end Set
 

Changes in mathlib4

mathlib3
mathlib4
chore: Rename lemmas about the coercion 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

Diff
@@ -43,7 +43,7 @@ variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
 theorem image_multiset_prod (f : F) :
     ∀ m : Multiset (Set α), (f : α → β) '' m.prod = (m.map fun s => f '' s).prod :=
   Quotient.ind <| by
-    simpa only [Multiset.quot_mk_to_coe, Multiset.coe_prod, Multiset.coe_map] using
+    simpa only [Multiset.quot_mk_to_coe, Multiset.prod_coe, Multiset.map_coe] using
       image_list_prod f
 #align set.image_multiset_prod Set.image_multiset_prod
 #align set.image_multiset_sum Set.image_multiset_sum
@@ -127,7 +127,7 @@ theorem list_prod_singleton {M : Type*} [CommMonoid M] (s : List M) :
 theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
     (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).prod ∈ (t.map f).prod := by
   induction t using Quotient.inductionOn
-  simp_rw [Multiset.quot_mk_to_coe, Multiset.coe_map, Multiset.coe_prod]
+  simp_rw [Multiset.quot_mk_to_coe, Multiset.map_coe, Multiset.prod_coe]
   exact list_prod_mem_list_prod _ _ _ hg
 #align set.multiset_prod_mem_multiset_prod Set.multiset_prod_mem_multiset_prod
 #align set.multiset_sum_mem_multiset_sum Set.multiset_sum_mem_multiset_sum
@@ -137,7 +137,7 @@ theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g
 theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
     (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (t.map f₁).prod ⊆ (t.map f₂).prod := by
   induction t using Quotient.inductionOn
-  simp_rw [Multiset.quot_mk_to_coe, Multiset.coe_map, Multiset.coe_prod]
+  simp_rw [Multiset.quot_mk_to_coe, Multiset.map_coe, Multiset.prod_coe]
   exact list_prod_subset_list_prod _ _ _ hf
 #align set.multiset_prod_subset_multiset_prod Set.multiset_prod_subset_multiset_prod
 #align set.multiset_sum_subset_multiset_sum Set.multiset_sum_subset_multiset_sum
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulₛₗ and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulₛₗ successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A →* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulₛₗ not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ a simp lemma instead of the generic map_smulₛₗ. Writing simp [map_smulₛₗ _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -19,7 +19,7 @@ open BigOperators
 
 open Pointwise Function
 
-variable {ι α β F : Type*}
+variable {ι α β F : Type*} [FunLike F α β]
 
 section Monoid
 
refactor(*): change definition of Set.image2 etc (#9275)
  • Redefine Set.image2 to use ∃ a ∈ s, ∃ b ∈ t, f a b = c instead of ∃ a b, a ∈ s ∧ b ∈ t ∧ f a b = c.
  • Redefine Set.seq as Set.image2. The new definition is equal to the old one but rw [Set.seq] gives a different result.
  • Redefine Filter.map₂ to use ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s instead of ∃ u v, u ∈ f ∧ v ∈ g ∧ ...
  • Update lemmas like Set.mem_image2, Finset.mem_image₂, Set.mem_mul, Finset.mem_div etc

The two reasons to make the change are:

  • ∃ a ∈ s, ∃ b ∈ t, _ is a simp-normal form, and
  • it looks a bit nicer.
Diff
@@ -77,7 +77,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
           exact hg hj
       · rw [Finset.prod_update_of_not_mem hi, Function.update_same]
     · rintro ⟨g, hg, rfl⟩
-      exact ⟨g i, is.prod g, hg (is.mem_insert_self _),
+      exact ⟨g i, hg (is.mem_insert_self _), is.prod g,
         ⟨⟨g, fun hi ↦ hg (Finset.mem_insert_of_mem hi), rfl⟩, rfl⟩⟩
 #align set.mem_finset_prod Set.mem_finset_prod
 #align set.mem_finset_sum Set.mem_finset_sum
chore: banish Type _ and Sort _ (#6499)

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

This has nice performance benefits.

Diff
@@ -19,7 +19,7 @@ open BigOperators
 
 open Pointwise Function
 
-variable {ι α β F : Type _}
+variable {ι α β F : Type*}
 
 section Monoid
 
@@ -116,7 +116,7 @@ theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf
 #align set.list_sum_subset_list_sum Set.list_sum_subset_list_sum
 
 @[to_additive]
-theorem list_prod_singleton {M : Type _} [CommMonoid M] (s : List M) :
+theorem list_prod_singleton {M : Type*} [CommMonoid M] (s : List M) :
     (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} :=
   (map_list_prod (singletonMonoidHom : M →* Set M) _).symm
 #align set.list_prod_singleton Set.list_prod_singleton
@@ -143,7 +143,7 @@ theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι →
 #align set.multiset_sum_subset_multiset_sum Set.multiset_sum_subset_multiset_sum
 
 @[to_additive]
-theorem multiset_prod_singleton {M : Type _} [CommMonoid M] (s : Multiset M) :
+theorem multiset_prod_singleton {M : Type*} [CommMonoid M] (s : Multiset M) :
     (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} :=
   (map_multiset_prod (singletonMonoidHom : M →* Set M) _).symm
 #align set.multiset_prod_singleton Set.multiset_prod_singleton
@@ -166,7 +166,7 @@ theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set 
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
 
 @[to_additive]
-theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I : ι → M) :
+theorem finset_prod_singleton {M ι : Type*} [CommMonoid M] (s : Finset ι) (I : ι → M) :
     (∏ i : ι in s, ({I i} : Set M)) = {∏ i : ι in s, I i} :=
   (map_prod (singletonMonoidHom : M →* Set M) _ _).symm
 #align set.finset_prod_singleton Set.finset_prod_singleton
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module data.set.pointwise.big_operators
-! leanprover-community/mathlib commit fa2cb8a9e2b987db233e4e6eb47645feafba8861
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.BigOperators.Basic
 import Mathlib.Data.Set.Pointwise.Basic
 
+#align_import data.set.pointwise.big_operators from "leanprover-community/mathlib"@"fa2cb8a9e2b987db233e4e6eb47645feafba8861"
+
 /-!
 # Results about pointwise operations on sets and big operators.
 -/
fix: ∑' precedence (#5615)
  • Also remove most superfluous parentheses around big operators (, and variants).
  • roughly the used regex: ([^a-zA-Zα-ωΑ-Ω'𝓝ℳ₀𝕂ₛ)]) \(([∑∏][^()∑∏]*,[^()∑∏:]*)\) ([⊂⊆=<≤]) replaced by $1 $2 $3
Diff
@@ -61,7 +61,7 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 /-- The n-ary version of `Set.mem_mul`. -/
 @[to_additive " The n-ary version of `Set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (_ : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
+    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (_ : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i in t, g i = a := by
   classical
     induction' t using Finset.induction_on with i is hi ih generalizing a
     · simp_rw [Finset.prod_empty, Set.mem_one]
@@ -88,7 +88,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 /-- A version of `Set.mem_finset_prod` with a simpler RHS for products over a Fintype. -/
 @[to_additive " A version of `Set.mem_finset_sum` with a simpler RHS for sums over a Fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), (∏ i, g i) = a := by
+    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), ∏ i, g i = a := by
   rw [mem_finset_prod]
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
@@ -163,7 +163,7 @@ theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι
 /-- An n-ary version of `Set.mul_subset_mul`. -/
 @[to_additive " An n-ary version of `Set.add_subset_add`. "]
 theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
-    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (∏ i in t, f₁ i) ⊆ ∏ i in t, f₂ i :=
+    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i in t, f₁ i ⊆ ∏ i in t, f₂ i :=
   multiset_prod_subset_multiset_prod _ _ _ hf
 #align set.finset_prod_subset_finset_prod Set.finset_prod_subset_finset_prod
 #align set.finset_sum_subset_finset_sum Set.finset_sum_subset_finset_sum
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -61,7 +61,7 @@ theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
 /-- The n-ary version of `Set.mem_mul`. -/
 @[to_additive " The n-ary version of `Set.mem_add`. "]
 theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α)(_ : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
+    (a ∈ ∏ i in t, f i) ↔ ∃ (g : ι → α) (_ : ∀ {i}, i ∈ t → g i ∈ f i), (∏ i in t, g i) = a := by
   classical
     induction' t using Finset.induction_on with i is hi ih generalizing a
     · simp_rw [Finset.prod_empty, Set.mem_one]
@@ -88,7 +88,7 @@ theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
 /-- A version of `Set.mem_finset_prod` with a simpler RHS for products over a Fintype. -/
 @[to_additive " A version of `Set.mem_finset_sum` with a simpler RHS for sums over a Fintype. "]
 theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
-    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α)(_ : ∀ i, g i ∈ f i), (∏ i, g i) = a := by
+    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), (∏ i, g i) = a := by
   rw [mem_finset_prod]
   simp
 #align set.mem_fintype_prod Set.mem_fintype_prod
chore: tidy various files (#3718)
Diff
@@ -175,18 +175,17 @@ theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
 
-/-- The n-ary version of `set.image_mul_prod`. -/
-@[to_additive "The n-ary version of `set.add_image_prod`. "]
+/-- The n-ary version of `Set.image_mul_prod`. -/
+@[to_additive "The n-ary version of `Set.add_image_prod`. "]
 theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
-    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i :=
-  by
+    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i := by
   ext
   simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, Finset.mem_coe]
 #align set.image_finset_prod_pi Set.image_finset_prod_pi
 #align set.image_finset_sum_pi Set.image_finset_sum_pi
 
-/-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
-@[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
+/-- A special case of `Set.image_finset_prod_pi` for `Finset.univ`. -/
+@[to_additive "A special case of `Set.image_finset_sum_pi` for `Finset.univ`. "]
 theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
     (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i := by
   simpa only [Finset.coe_univ] using image_finset_prod_pi Finset.univ S
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module data.set.pointwise.big_operators
-! leanprover-community/mathlib commit 008205aa645b3f194c1da47025c5f110c8406eab
+! leanprover-community/mathlib commit fa2cb8a9e2b987db233e4e6eb47645feafba8861
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -18,13 +18,45 @@ import Mathlib.Data.Set.Pointwise.Basic
 
 namespace Set
 
-section BigOperators
-
 open BigOperators
 
 open Pointwise Function
 
-variable {α : Type _} {ι : Type _} [CommMonoid α]
+variable {ι α β F : Type _}
+
+section Monoid
+
+variable [Monoid α] [Monoid β] [MonoidHomClass F α β]
+
+@[to_additive]
+theorem image_list_prod (f : F) :
+    ∀ l : List (Set α), (f : α → β) '' l.prod = (l.map fun s => f '' s).prod
+  | [] => image_one.trans <| congr_arg singleton (map_one f)
+  | a :: as => by rw [List.map_cons, List.prod_cons, List.prod_cons, image_mul, image_list_prod _ _]
+#align set.image_list_prod Set.image_list_prod
+#align set.image_list_sum Set.image_list_sum
+
+end Monoid
+
+section CommMonoid
+
+variable [CommMonoid α] [CommMonoid β] [MonoidHomClass F α β]
+
+@[to_additive]
+theorem image_multiset_prod (f : F) :
+    ∀ m : Multiset (Set α), (f : α → β) '' m.prod = (m.map fun s => f '' s).prod :=
+  Quotient.ind <| by
+    simpa only [Multiset.quot_mk_to_coe, Multiset.coe_prod, Multiset.coe_map] using
+      image_list_prod f
+#align set.image_multiset_prod Set.image_multiset_prod
+#align set.image_multiset_sum Set.image_multiset_sum
+
+@[to_additive]
+theorem image_finset_prod (f : F) (m : Finset ι) (s : ι → Set α) :
+    ((f : α → β) '' ∏ i in m, s i) = ∏ i in m, f '' s i :=
+  (image_multiset_prod f _).trans <| congr_arg Multiset.prod <| Multiset.map_map _ _ _
+#align set.image_finset_prod Set.image_finset_prod
+#align set.image_finset_sum Set.image_finset_sum
 
 /-- The n-ary version of `Set.mem_mul`. -/
 @[to_additive " The n-ary version of `Set.mem_add`. "]
@@ -143,9 +175,27 @@ theorem finset_prod_singleton {M ι : Type _} [CommMonoid M] (s : Finset ι) (I
 #align set.finset_prod_singleton Set.finset_prod_singleton
 #align set.finset_sum_singleton Set.finset_sum_singleton
 
-/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
+/-- The n-ary version of `set.image_mul_prod`. -/
+@[to_additive "The n-ary version of `set.add_image_prod`. "]
+theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
+    (fun f : ι → α => ∏ i in l, f i) '' (l : Set ι).pi S = ∏ i in l, S i :=
+  by
+  ext
+  simp_rw [mem_finset_prod, mem_image, mem_pi, exists_prop, Finset.mem_coe]
+#align set.image_finset_prod_pi Set.image_finset_prod_pi
+#align set.image_finset_sum_pi Set.image_finset_sum_pi
+
+/-- A special case of `set.image_finset_prod_pi` for `finset.univ`. -/
+@[to_additive "A special case of `set.image_finset_sum_pi` for `finset.univ`. "]
+theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
+    (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i := by
+  simpa only [Finset.coe_univ] using image_finset_prod_pi Finset.univ S
+#align set.image_fintype_prod_pi Set.image_fintype_prod_pi
+#align set.image_fintype_sum_pi Set.image_fintype_sum_pi
+
+end CommMonoid
 
+/-! TODO: define `decidable_mem_finset_prod` and `decidable_mem_finset_sum`. -/
 
-end BigOperators
 
 end Set
chore: scoped BigOperators notation (#1952)
Diff
@@ -20,8 +20,7 @@ namespace Set
 
 section BigOperators
 
--- Porting note: commented out the next line
--- open BigOperators
+open BigOperators
 
 open Pointwise Function
 
feat port: Data.Set.Pointwise.BigOperators (#1651)

Dependencies 3 + 200

201 files ported (98.5%)
91452 lines ported (98.9%)
Show graph

The unported dependencies are