data.list.big_operators.lemmasMathlib.Data.List.BigOperators.Lemmas

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

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

refactor(*): define list.replicate and migrate to it (#18127)

This definition differs from list.repeat by the order of arguments. The new order is in sync with the Lean 4 version.

Diff
@@ -55,7 +55,7 @@ lemma pow_card_le_prod [monoid M] [preorder M]
 @[to_additive] lemma prod_eq_one_iff [canonically_ordered_monoid M] (l : list M) :
   l.prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
 ⟨all_one_of_le_one_le_of_prod_eq_one (λ _ _, one_le _),
-  λ h, by rw [eq_repeat.2 ⟨rfl, h⟩, prod_repeat, one_pow]⟩
+  λ h, by rw [eq_replicate.2 ⟨rfl, h⟩, prod_replicate, one_pow]⟩
 
 /-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
 lemma neg_one_mem_of_prod_eq_neg_one {l : list ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l :=

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -3,14 +3,14 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 -/
-import Data.List.BigOperators.Basic
+import Algebra.BigOperators.List.Basic
 import Algebra.Group.Opposite
 import Algebra.GroupPower.Basic
 import Algebra.GroupWithZero.Commute
 import Algebra.GroupWithZero.Divisibility
 import Algebra.Order.WithZero
 import Algebra.Ring.Basic
-import Algebra.Ring.Divisibility
+import Algebra.Ring.Divisibility.Basic
 import Algebra.Ring.Commute
 import Data.Int.Units
 import Data.Set.Basic
@@ -99,7 +99,7 @@ theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.le
 #print List.dvd_prod /-
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.Prod :=
   by
-  let ⟨s, t, h⟩ := mem_split ha
+  let ⟨s, t, h⟩ := append_of_mem ha
   rw [h, prod_append, prod_cons, mul_left_comm]; exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 -/
@@ -125,7 +125,7 @@ theorem alternatingProd_append :
       alternatingProd (l₁ ++ l₂) = alternatingProd l₁ * alternatingProd l₂ ^ (-1 : ℤ) ^ length l₁
   | [], l₂ => by simp
   | a :: l₁, l₂ => by
-    simp_rw [cons_append, alternating_prod_cons, alternating_prod_append, length_cons, pow_succ,
+    simp_rw [cons_append, alternating_prod_cons, alternating_prod_append, length_cons, pow_succ',
       neg_mul, one_mul, zpow_neg, ← div_eq_mul_inv, div_div]
 #align list.alternating_prod_append List.alternatingProd_append
 #align list.alternating_sum_append List.alternatingSum_append
@@ -139,7 +139,7 @@ theorem alternatingProd_reverse :
   | a :: l =>
     by
     simp_rw [reverse_cons, alternating_prod_append, alternating_prod_reverse,
-      alternating_prod_singleton, alternating_prod_cons, length_reverse, length, pow_succ, neg_mul,
+      alternating_prod_singleton, alternating_prod_cons, length_reverse, length, pow_succ', neg_mul,
       one_mul, zpow_neg, inv_inv]
     rw [mul_comm, ← div_eq_mul_inv, div_zpow]
 #align list.alternating_prod_reverse List.alternatingProd_reverse
Diff
@@ -63,7 +63,7 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
 
 #print List.prod_eq_one_iff /-
 @[to_additive]
-theorem prod_eq_one_iff [CanonicallyOrderedCommMonoid M] (l : List M) :
+theorem prod_eq_one_iff [CanonicallyOrderedAddCommMonoid M] (l : List M) :
     l.Prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
   ⟨all_one_of_le_one_le_of_prod_eq_one fun _ _ => one_le _, fun h => by
     rw [eq_replicate.2 ⟨rfl, h⟩, prod_replicate, one_pow]⟩
Diff
@@ -63,7 +63,7 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
 
 #print List.prod_eq_one_iff /-
 @[to_additive]
-theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
+theorem prod_eq_one_iff [CanonicallyOrderedCommMonoid M] (l : List M) :
     l.Prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
   ⟨all_one_of_le_one_le_of_prod_eq_one fun _ _ => one_le _, fun h => by
     rw [eq_replicate.2 ⟨rfl, h⟩, prod_replicate, one_pow]⟩
Diff
@@ -3,17 +3,17 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 -/
-import Mathbin.Data.List.BigOperators.Basic
-import Mathbin.Algebra.Group.Opposite
-import Mathbin.Algebra.GroupPower.Basic
-import Mathbin.Algebra.GroupWithZero.Commute
-import Mathbin.Algebra.GroupWithZero.Divisibility
-import Mathbin.Algebra.Order.WithZero
-import Mathbin.Algebra.Ring.Basic
-import Mathbin.Algebra.Ring.Divisibility
-import Mathbin.Algebra.Ring.Commute
-import Mathbin.Data.Int.Units
-import Mathbin.Data.Set.Basic
+import Data.List.BigOperators.Basic
+import Algebra.Group.Opposite
+import Algebra.GroupPower.Basic
+import Algebra.GroupWithZero.Commute
+import Algebra.GroupWithZero.Divisibility
+import Algebra.Order.WithZero
+import Algebra.Ring.Basic
+import Algebra.Ring.Divisibility
+import Algebra.Ring.Commute
+import Data.Int.Units
+import Data.Set.Basic
 
 #align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
-
-! This file was ported from Lean 3 source module data.list.big_operators.lemmas
-! leanprover-community/mathlib commit f694c7dead66f5d4c80f446c796a5aad14707f0e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.List.BigOperators.Basic
 import Mathbin.Algebra.Group.Opposite
@@ -20,6 +15,8 @@ import Mathbin.Algebra.Ring.Commute
 import Mathbin.Data.Int.Units
 import Mathbin.Data.Set.Basic
 
+#align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
+
 /-! # Lemmas about `list.sum` and `list.prod` requiring extra algebra imports 
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
Diff
@@ -32,6 +32,7 @@ variable {ι α M N P M₀ G R : Type _}
 
 namespace Commute
 
+#print Commute.list_sum_right /-
 theorem list_sum_right [NonUnitalNonAssocSemiring R] (a : R) (l : List R)
     (h : ∀ b ∈ l, Commute a b) : Commute a l.Sum :=
   by
@@ -40,16 +41,20 @@ theorem list_sum_right [NonUnitalNonAssocSemiring R] (a : R) (l : List R)
   · rw [List.sum_cons]
     exact (h _ <| mem_cons_self _ _).addRight (ih fun j hj => h _ <| mem_cons_of_mem _ hj)
 #align commute.list_sum_right Commute.list_sum_right
+-/
 
+#print Commute.list_sum_left /-
 theorem list_sum_left [NonUnitalNonAssocSemiring R] (b : R) (l : List R)
     (h : ∀ a ∈ l, Commute a b) : Commute l.Sum b :=
   (Commute.list_sum_right _ _ fun x hx => (h _ hx).symm).symm
 #align commute.list_sum_left Commute.list_sum_left
+-/
 
 end Commute
 
 namespace List
 
+#print List.pow_card_le_prod /-
 @[to_additive card_nsmul_le_sum]
 theorem pow_card_le_prod [Monoid M] [Preorder M]
     [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] [CovariantClass M M (· * ·) (· ≤ ·)]
@@ -57,7 +62,9 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
   @prod_le_pow_card Mᵒᵈ _ _ _ _ l n h
 #align list.pow_card_le_prod List.pow_card_le_prod
 #align list.card_nsmul_le_sum List.card_nsmul_le_sum
+-/
 
+#print List.prod_eq_one_iff /-
 @[to_additive]
 theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
     l.Prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
@@ -65,6 +72,7 @@ theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
     rw [eq_replicate.2 ⟨rfl, h⟩, prod_replicate, one_pow]⟩
 #align list.prod_eq_one_iff List.prod_eq_one_iff
 #align list.sum_eq_zero_iff List.sum_eq_zero_iff
+-/
 
 #print List.neg_one_mem_of_prod_eq_neg_one /-
 /-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
@@ -91,12 +99,15 @@ theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.le
 #align list.length_le_sum_of_one_le List.length_le_sum_of_one_le
 -/
 
+#print List.dvd_prod /-
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.Prod :=
   by
   let ⟨s, t, h⟩ := mem_split ha
   rw [h, prod_append, prod_cons, mul_left_comm]; exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
+-/
 
+#print List.dvd_sum /-
 theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.Sum :=
   by
   induction' l with x l ih
@@ -104,11 +115,13 @@ theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣
   · rw [List.sum_cons]
     exact dvd_add (h _ (mem_cons_self _ _)) (ih fun x hx => h x (mem_cons_of_mem _ hx))
 #align list.dvd_sum List.dvd_sum
+-/
 
 section Alternating
 
 variable [CommGroup α]
 
+#print List.alternatingProd_append /-
 @[to_additive]
 theorem alternatingProd_append :
     ∀ l₁ l₂ : List α,
@@ -119,7 +132,9 @@ theorem alternatingProd_append :
       neg_mul, one_mul, zpow_neg, ← div_eq_mul_inv, div_div]
 #align list.alternating_prod_append List.alternatingProd_append
 #align list.alternating_sum_append List.alternatingSum_append
+-/
 
+#print List.alternatingProd_reverse /-
 @[to_additive]
 theorem alternatingProd_reverse :
     ∀ l : List α, alternatingProd (reverse l) = alternatingProd l ^ (-1 : ℤ) ^ (length l + 1)
@@ -132,18 +147,23 @@ theorem alternatingProd_reverse :
     rw [mul_comm, ← div_eq_mul_inv, div_zpow]
 #align list.alternating_prod_reverse List.alternatingProd_reverse
 #align list.alternating_sum_reverse List.alternatingSum_reverse
+-/
 
 end Alternating
 
+#print List.sum_map_mul_left /-
 theorem sum_map_mul_left [NonUnitalNonAssocSemiring R] (L : List ι) (f : ι → R) (r : R) :
     (L.map fun b => r * f b).Sum = r * (L.map f).Sum :=
   sum_map_hom L f <| AddMonoidHom.mulLeft r
 #align list.sum_map_mul_left List.sum_map_mul_left
+-/
 
+#print List.sum_map_mul_right /-
 theorem sum_map_mul_right [NonUnitalNonAssocSemiring R] (L : List ι) (f : ι → R) (r : R) :
     (L.map fun b => f b * r).Sum = (L.map f).Sum * r :=
   sum_map_hom L f <| AddMonoidHom.mulRight r
 #align list.sum_map_mul_right List.sum_map_mul_right
+-/
 
 end List
 
@@ -153,16 +173,20 @@ open List
 
 variable [Monoid M]
 
+#print MulOpposite.op_list_prod /-
 theorem op_list_prod : ∀ l : List M, op l.Prod = (l.map op).reverse.Prod
   | [] => rfl
   | x :: xs => by
     rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, op_list_prod]
 #align mul_opposite.op_list_prod MulOpposite.op_list_prod
+-/
 
+#print MulOpposite.unop_list_prod /-
 theorem MulOpposite.unop_list_prod (l : List Mᵐᵒᵖ) : l.Prod.unop = (l.map unop).reverse.Prod := by
   rw [← op_inj, op_unop, MulOpposite.op_list_prod, map_reverse, map_map, reverse_reverse,
     op_comp_unop, map_id]
 #align mul_opposite.unop_list_prod MulOpposite.unop_list_prod
+-/
 
 end MulOpposite
 
@@ -170,14 +194,17 @@ section MonoidHom
 
 variable [Monoid M] [Monoid N]
 
+#print unop_map_list_prod /-
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
     (f l.Prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.Prod := by
   rw [map_list_prod f l, MulOpposite.unop_list_prod, List.map_map]
 #align unop_map_list_prod unop_map_list_prod
+-/
 
 namespace MonoidHom
 
+#print MonoidHom.unop_map_list_prod /-
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 
 Deprecated, use `_root_.unop_map_list_prod` instead. -/
@@ -185,6 +212,7 @@ protected theorem unop_map_list_prod (f : M →* Nᵐᵒᵖ) (l : List M) :
     (f l.Prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.Prod :=
   unop_map_list_prod f l
 #align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prod
+-/
 
 end MonoidHom
 
Diff
@@ -32,12 +32,6 @@ variable {ι α M N P M₀ G R : Type _}
 
 namespace Commute
 
-/- warning: commute.list_sum_right -> Commute.list_sum_right is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : NonUnitalNonAssocSemiring.{u1} R] (a : R) (l : List.{u1} R), (forall (b : R), (Membership.Mem.{u1, u1} R (List.{u1} R) (List.hasMem.{u1} R) b l) -> (Commute.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) a b)) -> (Commute.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) a (List.sum.{u1} R (Distrib.toHasAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R _inst_1)) l))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : NonUnitalNonAssocSemiring.{u1} R] (a : R) (l : List.{u1} R), (forall (b : R), (Membership.mem.{u1, u1} R (List.{u1} R) (List.instMembershipList.{u1} R) b l) -> (Commute.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R _inst_1) a b)) -> (Commute.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R _inst_1) a (List.sum.{u1} R (Distrib.toAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) (MulZeroClass.toZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R _inst_1)) l))
-Case conversion may be inaccurate. Consider using '#align commute.list_sum_right Commute.list_sum_rightₓ'. -/
 theorem list_sum_right [NonUnitalNonAssocSemiring R] (a : R) (l : List R)
     (h : ∀ b ∈ l, Commute a b) : Commute a l.Sum :=
   by
@@ -47,12 +41,6 @@ theorem list_sum_right [NonUnitalNonAssocSemiring R] (a : R) (l : List R)
     exact (h _ <| mem_cons_self _ _).addRight (ih fun j hj => h _ <| mem_cons_of_mem _ hj)
 #align commute.list_sum_right Commute.list_sum_right
 
-/- warning: commute.list_sum_left -> Commute.list_sum_left is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : NonUnitalNonAssocSemiring.{u1} R] (b : R) (l : List.{u1} R), (forall (a : R), (Membership.Mem.{u1, u1} R (List.{u1} R) (List.hasMem.{u1} R) a l) -> (Commute.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) a b)) -> (Commute.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) (List.sum.{u1} R (Distrib.toHasAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R _inst_1)) l) b)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : NonUnitalNonAssocSemiring.{u1} R] (b : R) (l : List.{u1} R), (forall (a : R), (Membership.mem.{u1, u1} R (List.{u1} R) (List.instMembershipList.{u1} R) a l) -> (Commute.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R _inst_1) a b)) -> (Commute.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R _inst_1) (List.sum.{u1} R (Distrib.toAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R _inst_1)) (MulZeroClass.toZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R _inst_1)) l) b)
-Case conversion may be inaccurate. Consider using '#align commute.list_sum_left Commute.list_sum_leftₓ'. -/
 theorem list_sum_left [NonUnitalNonAssocSemiring R] (b : R) (l : List R)
     (h : ∀ a ∈ l, Commute a b) : Commute l.Sum b :=
   (Commute.list_sum_right _ _ fun x hx => (h _ hx).symm).symm
@@ -62,12 +50,6 @@ end Commute
 
 namespace List
 
-/- warning: list.pow_card_le_prod -> List.pow_card_le_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Preorder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2))] [_inst_4 : CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2))] (l : List.{u1} M) (n : M), (forall (x : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) x l) -> (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2) n x)) -> (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2) (HPow.hPow.{u1, 0, u1} M Nat M (instHPow.{u1, 0} M Nat (Monoid.Pow.{u1} M _inst_1)) n (List.length.{u1} M l)) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Preorder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.204 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.206 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.204 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.206)) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.219 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.221 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.219 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.221)] [_inst_4 : CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.238 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.240 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.238 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.240) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.253 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.255 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.253 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.255)] (l : List.{u1} M) (n : M), (forall (x : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) x l) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) n x)) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) (HPow.hPow.{u1, 0, u1} M Nat M (instHPow.{u1, 0} M Nat (Monoid.Pow.{u1} M _inst_1)) n (List.length.{u1} M l)) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) l))
-Case conversion may be inaccurate. Consider using '#align list.pow_card_le_prod List.pow_card_le_prodₓ'. -/
 @[to_additive card_nsmul_le_sum]
 theorem pow_card_le_prod [Monoid M] [Preorder M]
     [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] [CovariantClass M M (· * ·) (· ≤ ·)]
@@ -76,12 +58,6 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
 #align list.pow_card_le_prod List.pow_card_le_prod
 #align list.card_nsmul_le_sum List.card_nsmul_le_sum
 
-/- warning: list.prod_eq_one_iff -> List.prod_eq_one_iff is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CanonicallyOrderedMonoid.{u1} M] (l : List.{u1} M), Iff (Eq.{succ u1} M (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))) l) (OfNat.ofNat.{u1} M 1 (OfNat.mk.{u1} M 1 (One.one.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))))))) (forall (x : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) x l) -> (Eq.{succ u1} M x (OfNat.ofNat.{u1} M 1 (OfNat.mk.{u1} M 1 (One.one.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))))))))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CanonicallyOrderedMonoid.{u1} M] (l : List.{u1} M), Iff (Eq.{succ u1} M (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))) (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1)))) l) (OfNat.ofNat.{u1} M 1 (One.toOfNat1.{u1} M (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))))) (forall (x : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) x l) -> (Eq.{succ u1} M x (OfNat.ofNat.{u1} M 1 (One.toOfNat1.{u1} M (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M (CanonicallyOrderedMonoid.toOrderedCommMonoid.{u1} M _inst_1))))))))
-Case conversion may be inaccurate. Consider using '#align list.prod_eq_one_iff List.prod_eq_one_iffₓ'. -/
 @[to_additive]
 theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
     l.Prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
@@ -115,24 +91,12 @@ theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.le
 #align list.length_le_sum_of_one_le List.length_le_sum_of_one_le
 -/
 
-/- warning: list.dvd_prod -> List.dvd_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CommMonoid.{u1} M] {a : M} {l : List.{u1} M}, (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) a l) -> (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1))) a (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1))) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1))) l))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CommMonoid.{u1} M] {a : M} {l : List.{u1} M}, (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) a l) -> (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (Monoid.toSemigroup.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1))) a (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1))) (Monoid.toOne.{u1} M (CommMonoid.toMonoid.{u1} M _inst_1)) l))
-Case conversion may be inaccurate. Consider using '#align list.dvd_prod List.dvd_prodₓ'. -/
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.Prod :=
   by
   let ⟨s, t, h⟩ := mem_split ha
   rw [h, prod_append, prod_cons, mul_left_comm]; exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
-/- warning: list.dvd_sum -> List.dvd_sum is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R] {a : R} {l : List.{u1} R}, (forall (x : R), (Membership.Mem.{u1, u1} R (List.{u1} R) (List.hasMem.{u1} R) x l) -> (Dvd.Dvd.{u1} R (semigroupDvd.{u1} R (SemigroupWithZero.toSemigroup.{u1} R (NonUnitalSemiring.toSemigroupWithZero.{u1} R (Semiring.toNonUnitalSemiring.{u1} R _inst_1)))) a x)) -> (Dvd.Dvd.{u1} R (semigroupDvd.{u1} R (SemigroupWithZero.toSemigroup.{u1} R (NonUnitalSemiring.toSemigroupWithZero.{u1} R (Semiring.toNonUnitalSemiring.{u1} R _inst_1)))) a (List.sum.{u1} R (Distrib.toHasAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) l))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R] {a : R} {l : List.{u1} R}, (forall (x : R), (Membership.mem.{u1, u1} R (List.{u1} R) (List.instMembershipList.{u1} R) x l) -> (Dvd.dvd.{u1} R (semigroupDvd.{u1} R (SemigroupWithZero.toSemigroup.{u1} R (NonUnitalSemiring.toSemigroupWithZero.{u1} R (Semiring.toNonUnitalSemiring.{u1} R _inst_1)))) a x)) -> (Dvd.dvd.{u1} R (semigroupDvd.{u1} R (SemigroupWithZero.toSemigroup.{u1} R (NonUnitalSemiring.toSemigroupWithZero.{u1} R (Semiring.toNonUnitalSemiring.{u1} R _inst_1)))) a (List.sum.{u1} R (Distrib.toAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) l))
-Case conversion may be inaccurate. Consider using '#align list.dvd_sum List.dvd_sumₓ'. -/
 theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.Sum :=
   by
   induction' l with x l ih
@@ -145,12 +109,6 @@ section Alternating
 
 variable [CommGroup α]
 
-/- warning: list.alternating_prod_append -> List.alternatingProd_append is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : CommGroup.{u1} α] (l₁ : List.{u1} α) (l₂ : List.{u1} α), Eq.{succ u1} α (List.alternatingProd.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (DivInvMonoid.toHasInv.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))) (Append.append.{u1} (List.{u1} α) (List.hasAppend.{u1} α) l₁ l₂)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))))) (List.alternatingProd.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (DivInvMonoid.toHasInv.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))) l₁) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))) (List.alternatingProd.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (DivInvMonoid.toHasInv.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))) l₂) (HPow.hPow.{0, 0, 0} Int Nat Int (instHPow.{0, 0} Int Nat (Monoid.Pow.{0} Int Int.monoid)) (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne)))) (List.length.{u1} α l₁))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : CommGroup.{u1} α] (l₁ : List.{u1} α) (l₂ : List.{u1} α), Eq.{succ u1} α (List.alternatingProd.{u1} α (InvOneClass.toOne.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (InvOneClass.toInv.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (HAppend.hAppend.{u1, u1, u1} (List.{u1} α) (List.{u1} α) (List.{u1} α) (instHAppend.{u1} (List.{u1} α) (List.instAppendList.{u1} α)) l₁ l₂)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))))) (List.alternatingProd.{u1} α (InvOneClass.toOne.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (InvOneClass.toInv.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) l₁) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))) (List.alternatingProd.{u1} α (InvOneClass.toOne.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (InvOneClass.toInv.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) l₂) (HPow.hPow.{0, 0, 0} Int Nat Int Int.instHPowIntNat (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1))) (List.length.{u1} α l₁))))
-Case conversion may be inaccurate. Consider using '#align list.alternating_prod_append List.alternatingProd_appendₓ'. -/
 @[to_additive]
 theorem alternatingProd_append :
     ∀ l₁ l₂ : List α,
@@ -162,12 +120,6 @@ theorem alternatingProd_append :
 #align list.alternating_prod_append List.alternatingProd_append
 #align list.alternating_sum_append List.alternatingSum_append
 
-/- warning: list.alternating_prod_reverse -> List.alternatingProd_reverse is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : CommGroup.{u1} α] (l : List.{u1} α), Eq.{succ u1} α (List.alternatingProd.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (DivInvMonoid.toHasInv.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))) (List.reverse.{u1} α l)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))) (List.alternatingProd.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (DivInvMonoid.toHasInv.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))) l) (HPow.hPow.{0, 0, 0} Int Nat Int (instHPow.{0, 0} Int Nat (Monoid.Pow.{0} Int Int.monoid)) (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne)))) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : CommGroup.{u1} α] (l : List.{u1} α), Eq.{succ u1} α (List.alternatingProd.{u1} α (InvOneClass.toOne.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (InvOneClass.toInv.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (List.reverse.{u1} α l)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1)))) (List.alternatingProd.{u1} α (InvOneClass.toOne.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α (CommGroup.toGroup.{u1} α _inst_1))))) (InvOneClass.toInv.{u1} α (DivInvOneMonoid.toInvOneClass.{u1} α (DivisionMonoid.toDivInvOneMonoid.{u1} α (DivisionCommMonoid.toDivisionMonoid.{u1} α (CommGroup.toDivisionCommMonoid.{u1} α _inst_1))))) l) (HPow.hPow.{0, 0, 0} Int Nat Int Int.instHPowIntNat (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1))) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))
-Case conversion may be inaccurate. Consider using '#align list.alternating_prod_reverse List.alternatingProd_reverseₓ'. -/
 @[to_additive]
 theorem alternatingProd_reverse :
     ∀ l : List α, alternatingProd (reverse l) = alternatingProd l ^ (-1 : ℤ) ^ (length l + 1)
@@ -183,23 +135,11 @@ theorem alternatingProd_reverse :
 
 end Alternating
 
-/- warning: list.sum_map_mul_left -> List.sum_map_mul_left is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_1 : NonUnitalNonAssocSemiring.{u2} R] (L : List.{u1} ι) (f : ι -> R) (r : R), Eq.{succ u2} R (List.sum.{u2} R (Distrib.toHasAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R (fun (b : ι) => HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (Distrib.toHasMul.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1))) r (f b)) L)) (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (Distrib.toHasMul.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1))) r (List.sum.{u2} R (Distrib.toHasAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R f L)))
-but is expected to have type
-  forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_1 : NonUnitalNonAssocSemiring.{u2} R] (L : List.{u1} ι) (f : ι -> R) (r : R), Eq.{succ u2} R (List.sum.{u2} R (Distrib.toAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R (fun (b : ι) => HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R _inst_1)) r (f b)) L)) (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R _inst_1)) r (List.sum.{u2} R (Distrib.toAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R f L)))
-Case conversion may be inaccurate. Consider using '#align list.sum_map_mul_left List.sum_map_mul_leftₓ'. -/
 theorem sum_map_mul_left [NonUnitalNonAssocSemiring R] (L : List ι) (f : ι → R) (r : R) :
     (L.map fun b => r * f b).Sum = r * (L.map f).Sum :=
   sum_map_hom L f <| AddMonoidHom.mulLeft r
 #align list.sum_map_mul_left List.sum_map_mul_left
 
-/- warning: list.sum_map_mul_right -> List.sum_map_mul_right is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_1 : NonUnitalNonAssocSemiring.{u2} R] (L : List.{u1} ι) (f : ι -> R) (r : R), Eq.{succ u2} R (List.sum.{u2} R (Distrib.toHasAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R (fun (b : ι) => HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (Distrib.toHasMul.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1))) (f b) r) L)) (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (Distrib.toHasMul.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1))) (List.sum.{u2} R (Distrib.toHasAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R f L)) r)
-but is expected to have type
-  forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_1 : NonUnitalNonAssocSemiring.{u2} R] (L : List.{u1} ι) (f : ι -> R) (r : R), Eq.{succ u2} R (List.sum.{u2} R (Distrib.toAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R (fun (b : ι) => HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R _inst_1)) (f b) r) L)) (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R _inst_1)) (List.sum.{u2} R (Distrib.toAdd.{u2} R (NonUnitalNonAssocSemiring.toDistrib.{u2} R _inst_1)) (MulZeroClass.toZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R _inst_1)) (List.map.{u1, u2} ι R f L)) r)
-Case conversion may be inaccurate. Consider using '#align list.sum_map_mul_right List.sum_map_mul_rightₓ'. -/
 theorem sum_map_mul_right [NonUnitalNonAssocSemiring R] (L : List ι) (f : ι → R) (r : R) :
     (L.map fun b => f b * r).Sum = (L.map f).Sum * r :=
   sum_map_hom L f <| AddMonoidHom.mulRight r
@@ -213,24 +153,12 @@ open List
 
 variable [Monoid M]
 
-/- warning: mul_opposite.op_list_prod -> MulOpposite.op_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} M), Eq.{succ u1} (MulOpposite.{u1} M) (MulOpposite.op.{u1} M (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l)) (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.hasMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.hasOne.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (List.reverse.{u1} (MulOpposite.{u1} M) (List.map.{u1, u1} M (MulOpposite.{u1} M) (MulOpposite.op.{u1} M) l)))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} M), Eq.{succ u1} (MulOpposite.{u1} M) (MulOpposite.op.{u1} M (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) l)) (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.one.{u1} M (Monoid.toOne.{u1} M _inst_1)) (List.reverse.{u1} (MulOpposite.{u1} M) (List.map.{u1, u1} M (MulOpposite.{u1} M) (MulOpposite.op.{u1} M) l)))
-Case conversion may be inaccurate. Consider using '#align mul_opposite.op_list_prod MulOpposite.op_list_prodₓ'. -/
 theorem op_list_prod : ∀ l : List M, op l.Prod = (l.map op).reverse.Prod
   | [] => rfl
   | x :: xs => by
     rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, op_list_prod]
 #align mul_opposite.op_list_prod MulOpposite.op_list_prod
 
-/- warning: mul_opposite.unop_list_prod -> MulOpposite.unop_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} (MulOpposite.{u1} M)), Eq.{succ u1} M (MulOpposite.unop.{u1} M (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.hasMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.hasOne.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) l)) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (List.reverse.{u1} M (List.map.{u1, u1} (MulOpposite.{u1} M) M (MulOpposite.unop.{u1} M) l)))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} (MulOpposite.{u1} M)), Eq.{succ u1} M (MulOpposite.unop.{u1} M (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.one.{u1} M (Monoid.toOne.{u1} M _inst_1)) l)) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) (List.reverse.{u1} M (List.map.{u1, u1} (MulOpposite.{u1} M) M (MulOpposite.unop.{u1} M) l)))
-Case conversion may be inaccurate. Consider using '#align mul_opposite.unop_list_prod MulOpposite.unop_list_prodₓ'. -/
 theorem MulOpposite.unop_list_prod (l : List Mᵐᵒᵖ) : l.Prod.unop = (l.map unop).reverse.Prod := by
   rw [← op_inj, op_unop, MulOpposite.op_list_prod, map_reverse, map_map, reverse_reverse,
     op_comp_unop, map_id]
@@ -242,12 +170,6 @@ section MonoidHom
 
 variable [Monoid M] [Monoid N]
 
-/- warning: unop_map_list_prod -> unop_map_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))] (f : F) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f)) l)))
-but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
-Case conversion may be inaccurate. Consider using '#align unop_map_list_prod unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
     (f l.Prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.Prod := by
@@ -256,12 +178,6 @@ theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F)
 
 namespace MonoidHom
 
-/- warning: monoid_hom.unop_map_list_prod -> MonoidHom.unop_map_list_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f)) l)))
-but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
-Case conversion may be inaccurate. Consider using '#align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 
 Deprecated, use `_root_.unop_map_list_prod` instead. -/
Diff
@@ -124,8 +124,7 @@ Case conversion may be inaccurate. Consider using '#align list.dvd_prod List.dvd
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.Prod :=
   by
   let ⟨s, t, h⟩ := mem_split ha
-  rw [h, prod_append, prod_cons, mul_left_comm]
-  exact dvd_mul_right _ _
+  rw [h, prod_append, prod_cons, mul_left_comm]; exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
 /- warning: list.dvd_sum -> List.dvd_sum is a dubious translation:
Diff
@@ -247,7 +247,7 @@ variable [Monoid M] [Monoid N]
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))] (f : F) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
 Case conversion may be inaccurate. Consider using '#align unop_map_list_prod unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
@@ -261,7 +261,7 @@ namespace MonoidHom
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
 Case conversion may be inaccurate. Consider using '#align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 
Diff
@@ -64,7 +64,7 @@ namespace List
 
 /- warning: list.pow_card_le_prod -> List.pow_card_le_prod is a dubious translation:
 lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Preorder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))))) (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2))] [_inst_4 : CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)))) (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2))] (l : List.{u1} M) (n : M), (forall (x : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) x l) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) n x)) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) (HPow.hPow.{u1, 0, u1} M Nat M (instHPow.{u1, 0} M Nat (Monoid.Pow.{u1} M _inst_1)) n (List.length.{u1} M l)) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))
+  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Preorder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2))] [_inst_4 : CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2))] (l : List.{u1} M) (n : M), (forall (x : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) x l) -> (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2) n x)) -> (LE.le.{u1} M (Preorder.toHasLe.{u1} M _inst_2) (HPow.hPow.{u1, 0, u1} M Nat M (instHPow.{u1, 0} M Nat (Monoid.Pow.{u1} M _inst_1)) n (List.length.{u1} M l)) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))
 but is expected to have type
   forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Preorder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.204 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.206 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.204 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.206)) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.219 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.221 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.219 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.221)] [_inst_4 : CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.238 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.240 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.238 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.240) (fun (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.253 : M) (x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.255 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.253 x._@.Mathlib.Data.List.BigOperators.Lemmas._hyg.255)] (l : List.{u1} M) (n : M), (forall (x : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) x l) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) n x)) -> (LE.le.{u1} M (Preorder.toLE.{u1} M _inst_2) (HPow.hPow.{u1, 0, u1} M Nat M (instHPow.{u1, 0} M Nat (Monoid.Pow.{u1} M _inst_1)) n (List.length.{u1} M l)) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) l))
 Case conversion may be inaccurate. Consider using '#align list.pow_card_le_prod List.pow_card_le_prodₓ'. -/
Diff
@@ -218,7 +218,7 @@ variable [Monoid M]
 lean 3 declaration is
   forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} M), Eq.{succ u1} (MulOpposite.{u1} M) (MulOpposite.op.{u1} M (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l)) (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.hasMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.hasOne.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (List.reverse.{u1} (MulOpposite.{u1} M) (List.map.{u1, u1} M (MulOpposite.{u1} M) (MulOpposite.op.{u1} M) l)))
 but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} M), Eq.{succ u1} (MulOpposite.{u1} M) (MulOpposite.op.{u1} M (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) l)) (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.instMulMulOpposite.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.instOneMulOpposite.{u1} M (Monoid.toOne.{u1} M _inst_1)) (List.reverse.{u1} (MulOpposite.{u1} M) (List.map.{u1, u1} M (MulOpposite.{u1} M) (MulOpposite.op.{u1} M) l)))
+  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} M), Eq.{succ u1} (MulOpposite.{u1} M) (MulOpposite.op.{u1} M (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) l)) (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.one.{u1} M (Monoid.toOne.{u1} M _inst_1)) (List.reverse.{u1} (MulOpposite.{u1} M) (List.map.{u1, u1} M (MulOpposite.{u1} M) (MulOpposite.op.{u1} M) l)))
 Case conversion may be inaccurate. Consider using '#align mul_opposite.op_list_prod MulOpposite.op_list_prodₓ'. -/
 theorem op_list_prod : ∀ l : List M, op l.Prod = (l.map op).reverse.Prod
   | [] => rfl
@@ -230,7 +230,7 @@ theorem op_list_prod : ∀ l : List M, op l.Prod = (l.map op).reverse.Prod
 lean 3 declaration is
   forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} (MulOpposite.{u1} M)), Eq.{succ u1} M (MulOpposite.unop.{u1} M (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.hasMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.hasOne.{u1} M (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) l)) (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (List.reverse.{u1} M (List.map.{u1, u1} (MulOpposite.{u1} M) M (MulOpposite.unop.{u1} M) l)))
 but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} (MulOpposite.{u1} M)), Eq.{succ u1} M (MulOpposite.unop.{u1} M (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.instMulMulOpposite.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.instOneMulOpposite.{u1} M (Monoid.toOne.{u1} M _inst_1)) l)) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) (List.reverse.{u1} M (List.map.{u1, u1} (MulOpposite.{u1} M) M (MulOpposite.unop.{u1} M) l)))
+  forall {M : Type.{u1}} [_inst_1 : Monoid.{u1} M] (l : List.{u1} (MulOpposite.{u1} M)), Eq.{succ u1} M (MulOpposite.unop.{u1} M (List.prod.{u1} (MulOpposite.{u1} M) (MulOpposite.mul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1))) (MulOpposite.one.{u1} M (Monoid.toOne.{u1} M _inst_1)) l)) (List.prod.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (Monoid.toOne.{u1} M _inst_1) (List.reverse.{u1} M (List.map.{u1, u1} (MulOpposite.{u1} M) M (MulOpposite.unop.{u1} M) l)))
 Case conversion may be inaccurate. Consider using '#align mul_opposite.unop_list_prod MulOpposite.unop_list_prodₓ'. -/
 theorem MulOpposite.unop_list_prod (l : List Mᵐᵒᵖ) : l.Prod.unop = (l.map unop).reverse.Prod := by
   rw [← op_inj, op_unop, MulOpposite.op_list_prod, map_reverse, map_map, reverse_reverse,
@@ -247,7 +247,7 @@ variable [Monoid M] [Monoid N]
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))] (f : F) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
 Case conversion may be inaccurate. Consider using '#align unop_map_list_prod unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
@@ -261,7 +261,7 @@ namespace MonoidHom
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.mulOneClass.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
 Case conversion may be inaccurate. Consider using '#align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 
Diff
@@ -247,7 +247,7 @@ variable [Monoid M] [Monoid N]
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))] (f : F) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
 Case conversion may be inaccurate. Consider using '#align unop_map_list_prod unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
@@ -261,7 +261,7 @@ namespace MonoidHom
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
 Case conversion may be inaccurate. Consider using '#align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 
Diff
@@ -247,7 +247,7 @@ variable [Monoid M] [Monoid N]
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))] (f : F) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{succ u3, max (succ u1) (succ u2)} F (fun (_x : F) => M -> (MulOpposite.{u2} N)) (FunLike.hasCoeToFun.{succ u3, succ u1, succ u2} F M (fun (_x : M) => MulOpposite.{u2} N) (MulHomClass.toFunLike.{u3, u1, u2} F M (MulOpposite.{u2} N) (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasMul.{u2} (MulOpposite.{u2} N) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u1, u2} F M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) _inst_3))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] {F : Type.{u3}} [_inst_3 : MonoidHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))] (f : F) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{u3, u2, u1} F M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{u3, u2, u1} F M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) _inst_3)) f)) l)))
 Case conversion may be inaccurate. Consider using '#align unop_map_list_prod unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
 theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
@@ -261,7 +261,7 @@ namespace MonoidHom
 lean 3 declaration is
   forall {M : Type.{u1}} {N : Type.{u2}} [_inst_1 : Monoid.{u1} M] [_inst_2 : Monoid.{u2} N] (f : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (l : List.{u1} M), Eq.{succ u2} N (MulOpposite.unop.{u2} N (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f (List.prod.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) (MulOneClass.toHasOne.{u1} M (Monoid.toMulOneClass.{u1} M _inst_1)) l))) (List.prod.{u2} N (MulOneClass.toHasMul.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (MulOneClass.toHasOne.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2)) (List.reverse.{u2} N (List.map.{u1, u2} M N (Function.comp.{succ u1, succ u2, succ u2} M (MulOpposite.{u2} N) N (MulOpposite.unop.{u2} N) (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) (fun (_x : MonoidHom.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) => M -> (MulOpposite.{u2} N)) (MonoidHom.hasCoeToFun.{u1, u2} M (MulOpposite.{u2} N) (Monoid.toMulOneClass.{u1} M _inst_1) (MulOpposite.mulOneClass.{u2} N (Monoid.toMulOneClass.{u2} N _inst_2))) f)) l)))
 but is expected to have type
-  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
+  forall {M : Type.{u2}} {N : Type.{u1}} [_inst_1 : Monoid.{u2} M] [_inst_2 : Monoid.{u1} N] (f : MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (l : List.{u2} M), Eq.{succ u1} N (MulOpposite.unop.{u1} N (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f (List.prod.{u2} M (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (Monoid.toOne.{u2} M _inst_1) l))) (List.prod.{u1} N (MulOneClass.toMul.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (Monoid.toOne.{u1} N _inst_2) (List.reverse.{u1} N (List.map.{u2, u1} M N (Function.comp.{succ u2, succ u1, succ u1} M (MulOpposite.{u1} N) N (MulOpposite.unop.{u1} N) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : M) => MulOpposite.{u1} N) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (MulOneClass.toMul.{u2} M (Monoid.toMulOneClass.{u2} M _inst_1)) (MulOneClass.toMul.{u1} (MulOpposite.{u1} N) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))) M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2)) (MonoidHom.monoidHomClass.{u2, u1} M (MulOpposite.{u1} N) (Monoid.toMulOneClass.{u2} M _inst_1) (MulOpposite.instMulOneClassMulOpposite.{u1} N (Monoid.toMulOneClass.{u1} N _inst_2))))) f)) l)))
 Case conversion may be inaccurate. Consider using '#align monoid_hom.unop_map_list_prod MonoidHom.unop_map_list_prodₓ'. -/
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements.
 

Changes in mathlib4

mathlib3
mathlib4
chore: reduce proof dependencies for Nat.factors_count_eq (#12105)

This is a bit longer, partially duplicating the argument from UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors, but it means we no longer need to depend on RingTheory.Int.Basic at this point.

The other added lemmas seem useful regardless.

Diff
@@ -66,6 +66,12 @@ theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod :
   exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
+theorem Sublist.prod_dvd_prod [CommMonoid M] {l₁ l₂ : List M} (h : l₁ <+ l₂) :
+    l₁.prod ∣ l₂.prod := by
+  obtain ⟨l, hl⟩ := h.exists_perm_append
+  rw [hl.prod_eq, prod_append]
+  exact dvd_mul_right _ _
+
 section MonoidWithZero
 variable [MonoidWithZero M₀]
 
chore(Algebra/BigOperators/List): Use Std lemmas (#11725)
  • Make Algebra.BigOperators.List.Basic, Data.List.Chain not depend on Data.Nat.Order.Basic by using Nat-specific Std lemmas rather than general mathlib ones. I leave the Data.Nat.Basic import since Algebra.BigOperators.List.Basic is algebra territory.
  • Make Algebra.BigOperators.List.Basic not depend on Algebra.Divisibility.Basic. I'm not too sure about that one since they already are algebra. My motivation is that they involve ring-like objects while big operators are about group-like objects, but this is in some sense a second order refactor.
  • As a consequence, move the divisibility and MonoidWithZero lemmas from Algebra.BigOperators.List.Basic to Algebra.BigOperators.List.Lemmas.
  • Move the content of Algebra.BigOperators.List.Defs to Algebra.BigOperators.List.Basic since no file imported the former without the latter and their imports are becoming very close after this PR.
  • Make Data.List.Count, Data.List.Dedup, Data.List.ProdSigma, Data.List.Zip not depend on Algebra.BigOperators.List.Basic.
  • As a consequence, move the big operators lemmas that were in there to Algebra.BigOperators.List.Basic. For the lemmas that were Nat -specific, keep a version of them stated using Nat.sum.
  • To help with this, add Nat.sum_eq_listSum (l : List Nat) : Nat.sum l = l.sum.
Diff
@@ -8,7 +8,6 @@ import Mathlib.Algebra.Group.Opposite
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.Algebra.GroupWithZero.Commute
 import Mathlib.Algebra.GroupWithZero.Divisibility
-import Mathlib.Algebra.Order.Monoid.OrderDual
 import Mathlib.Algebra.Ring.Basic
 import Mathlib.Algebra.Ring.Commute
 import Mathlib.Algebra.Ring.Divisibility.Basic
@@ -58,7 +57,7 @@ by the sum of the elements. -/
 theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.length ≤ L.sum := by
   induction' L with j L IH h; · simp
   rw [sum_cons, length, add_comm]
-  exact add_le_add (h _ (mem_cons_self _ _)) (IH fun i hi => h i (mem_cons.2 (Or.inr hi)))
+  exact Nat.add_le_add (h _ (mem_cons_self _ _)) (IH fun i hi => h i (mem_cons.2 (Or.inr hi)))
 #align list.length_le_sum_of_one_le List.length_le_sum_of_one_le
 
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod := by
@@ -67,6 +66,37 @@ theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod :
   exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
+section MonoidWithZero
+variable [MonoidWithZero M₀]
+
+/-- If zero is an element of a list `L`, then `List.prod L = 0`. If the domain is a nontrivial
+monoid with zero with no divisors, then this implication becomes an `iff`, see
+`List.prod_eq_zero_iff`. -/
+lemma prod_eq_zero {L : List M₀} (h : (0 : M₀) ∈ L) : L.prod = 0 := by
+  induction' L with a L ihL
+  · exact absurd h (not_mem_nil _)
+  · rw [prod_cons]
+    cases' mem_cons.1 h with ha hL
+    exacts [mul_eq_zero_of_left ha.symm _, mul_eq_zero_of_right _ (ihL hL)]
+#align list.prod_eq_zero List.prod_eq_zero
+
+/-- Product of elements of a list `L` equals zero if and only if `0 ∈ L`. See also
+`List.prod_eq_zero` for an implication that needs weaker typeclass assumptions. -/
+@[simp]
+lemma prod_eq_zero_iff [Nontrivial M₀] [NoZeroDivisors M₀] {L : List M₀} :
+    L.prod = 0 ↔ (0 : M₀) ∈ L := by
+  induction' L with a L ihL
+  · simp
+  · rw [prod_cons, mul_eq_zero, ihL, mem_cons, eq_comm]
+#align list.prod_eq_zero_iff List.prod_eq_zero_iff
+
+lemma prod_ne_zero [Nontrivial M₀] [NoZeroDivisors M₀] {L : List M₀} (hL : (0 : M₀) ∉ L) :
+    L.prod ≠ 0 :=
+  mt prod_eq_zero_iff.1 hL
+#align list.prod_ne_zero List.prod_ne_zero
+
+end MonoidWithZero
+
 theorem dvd_sum [NonUnitalSemiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum := by
   induction' l with x l ih
   · exact dvd_zero _
chore: Sort big operator order lemmas (#11750)

Take the content of

  • some of Algebra.BigOperators.List.Basic
  • some of Algebra.BigOperators.List.Lemmas
  • some of Algebra.BigOperators.Multiset.Basic
  • some of Algebra.BigOperators.Multiset.Lemmas
  • Algebra.BigOperators.Multiset.Order
  • Algebra.BigOperators.Order

and sort it into six files:

Here are the design decisions at play:

  • Pure algebra and big operators algebra shouldn't import (algebraic) order theory. This PR makes that better, but not perfect because we still import Data.Nat.Order.Basic in a few List files.
  • It's Algebra.Order.BigOperators instead of Algebra.BigOperators.Order because algebraic order theory is more of a theory than big operators algebra. Another reason is that algebraic order theory is the only way to mix pure order and pure algebra, while there are more ways to mix pure finiteness and pure algebra than just big operators.
  • There are separate files for group/monoid lemmas vs ring lemmas. Groups/monoids are the natural setup for big operators, so their lemmas shouldn't be mixed with ring lemmas that involves both addition and multiplication. As a result, everything under Algebra.Order.BigOperators.Group should be additivisable (except a few Nat- or Int-specific lemmas). In contrast, things under Algebra.Order.BigOperators.Ring are more prone to having heavy imports.
  • Lemmas are separated according to List vs Multiset vs Finset. This is not strictly necessary, and can be relaxed in cases where there aren't that many lemmas to be had. As an example, I could split out the AbsoluteValue lemmas from Algebra.Order.BigOperators.Ring.Finset to a file Algebra.Order.BigOperators.Ring.AbsoluteValue and it could stay this way until too many lemmas are in this file (or a split is needed for import reasons), in which case we would need files Algebra.Order.BigOperators.Ring.AbsoluteValue.Finset, Algebra.Order.BigOperators.Ring.AbsoluteValue.Multiset, etc...
  • Finsupp big operator and finprod/finsum order lemmas also belong in Algebra.Order.BigOperators. I haven't done so in this PR because the diff is big enough like that.
Diff
@@ -42,22 +42,6 @@ end Commute
 
 namespace List
 
-@[to_additive card_nsmul_le_sum]
-theorem pow_card_le_prod [Monoid M] [Preorder M]
-    [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] [CovariantClass M M (· * ·) (· ≤ ·)]
-    (l : List M) (n : M) (h : ∀ x ∈ l, n ≤ x) : n ^ l.length ≤ l.prod :=
-  @prod_le_pow_card Mᵒᵈ _ _ _ _ l n h
-#align list.pow_card_le_prod List.pow_card_le_prod
-#align list.card_nsmul_le_sum List.card_nsmul_le_sum
-
-@[to_additive]
-theorem prod_eq_one_iff [CanonicallyOrderedCommMonoid M] (l : List M) :
-    l.prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
-  ⟨all_one_of_le_one_le_of_prod_eq_one fun _ _ => one_le _, fun h => by
-    rw [List.eq_replicate.2 ⟨_, h⟩, prod_replicate, one_pow]; exact (length l); rfl⟩
-#align list.prod_eq_one_iff List.prod_eq_one_iff
-#align list.sum_eq_zero_iff List.sum_eq_zero_iff
-
 /-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
 theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l := by
   obtain ⟨x, h₁, h₂⟩ := exists_mem_ne_one_of_prod_ne_one (ne_of_eq_of_ne h (by decide))
move(Data/List/BigOperators): Move to Algebra.BigOperators.List (#11729)

This is algebra and should be foldered as such.

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 -/
+import Mathlib.Algebra.BigOperators.List.Basic
 import Mathlib.Algebra.Group.Opposite
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.Algebra.GroupWithZero.Commute
@@ -12,7 +13,6 @@ import Mathlib.Algebra.Ring.Basic
 import Mathlib.Algebra.Ring.Commute
 import Mathlib.Algebra.Ring.Divisibility.Basic
 import Mathlib.Data.Int.Units
-import Mathlib.Data.List.BigOperators.Basic
 
 #align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
 
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : ∀ (n : ℕ) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -100,7 +100,7 @@ theorem alternatingProd_append :
       alternatingProd (l₁ ++ l₂) = alternatingProd l₁ * alternatingProd l₂ ^ (-1 : ℤ) ^ length l₁
   | [], l₂ => by simp
   | a :: l₁, l₂ => by
-    simp_rw [cons_append, alternatingProd_cons, alternatingProd_append, length_cons, pow_succ,
+    simp_rw [cons_append, alternatingProd_cons, alternatingProd_append, length_cons, pow_succ',
       neg_mul, one_mul, zpow_neg, ← div_eq_mul_inv, div_div]
 #align list.alternating_prod_append List.alternatingProd_append
 #align list.alternating_sum_append List.alternatingSum_append
@@ -111,7 +111,7 @@ theorem alternatingProd_reverse :
   | [] => by simp only [alternatingProd_nil, one_zpow, reverse_nil]
   | a :: l => by
     simp_rw [reverse_cons, alternatingProd_append, alternatingProd_reverse,
-      alternatingProd_singleton, alternatingProd_cons, length_reverse, length, pow_succ, neg_mul,
+      alternatingProd_singleton, alternatingProd_cons, length_reverse, length, pow_succ', neg_mul,
       one_mul, zpow_neg, inv_inv]
     rw [mul_comm, ← div_eq_mul_inv, div_zpow]
 #align list.alternating_prod_reverse List.alternatingProd_reverse
chore: make List.mem_split an alias of List.append_of_mem (#11060)

List.mem_split duplicates List.append_of_mem from Std: https://github.com/leanprover/std4/blob/a756b7d643ae5dcd7bf314e99f8e493e5d81b9ed/Std/Data/List/Lemmas.lean#L94-L96

This PR makes it an alias.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -78,7 +78,7 @@ theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.le
 #align list.length_le_sum_of_one_le List.length_le_sum_of_one_le
 
 theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod := by
-  let ⟨s, t, h⟩ := mem_split ha
+  let ⟨s, t, h⟩ := append_of_mem ha
   rw [h, prod_append, prod_cons, mul_left_comm]
   exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
chore: Remove Init.CCLemmas (#10696)

Those lemmas were weird and unused, except the last few about transitivity of = and , which I moved to Logic.Basic

Diff
@@ -3,17 +3,16 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 -/
-import Mathlib.Init.CCLemmas
-import Mathlib.Data.List.BigOperators.Basic
 import Mathlib.Algebra.Group.Opposite
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.Algebra.GroupWithZero.Commute
 import Mathlib.Algebra.GroupWithZero.Divisibility
 import Mathlib.Algebra.Order.Monoid.OrderDual
 import Mathlib.Algebra.Ring.Basic
-import Mathlib.Algebra.Ring.Divisibility.Basic
 import Mathlib.Algebra.Ring.Commute
+import Mathlib.Algebra.Ring.Divisibility.Basic
 import Mathlib.Data.Int.Units
+import Mathlib.Data.List.BigOperators.Basic
 
 #align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
 
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
@@ -157,7 +157,8 @@ section MonoidHom
 variable [Monoid M] [Monoid N]
 
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
-theorem unop_map_list_prod {F : Type*} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
+theorem unop_map_list_prod {F : Type*} [FunLike F M Nᵐᵒᵖ] [MonoidHomClass F M Nᵐᵒᵖ]
+    (f : F) (l : List M) :
     (f l.prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.prod := by
   rw [map_list_prod f l, MulOpposite.unop_list_prod, List.map_map]
 #align unop_map_list_prod unop_map_list_prod
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -9,12 +9,11 @@ import Mathlib.Algebra.Group.Opposite
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.Algebra.GroupWithZero.Commute
 import Mathlib.Algebra.GroupWithZero.Divisibility
-import Mathlib.Algebra.Order.WithZero
+import Mathlib.Algebra.Order.Monoid.OrderDual
 import Mathlib.Algebra.Ring.Basic
 import Mathlib.Algebra.Ring.Divisibility.Basic
 import Mathlib.Algebra.Ring.Commute
 import Mathlib.Data.Int.Units
-import Mathlib.Data.Set.Basic
 
 #align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
 
chore: rename CanonicallyOrderedAddMonoid to ..AddCommMonoid (#7503)

Renames:

CanonicallyOrderedMonoid -> CanonicallyOrderedCommMonoid

CanonicallyOrderedAddMonoid -> CanonicallyOrderedAddCommMonoid

CanonicallyLinearOrderedMonoid -> CanonicallyLinearOrderedCommMonoid

CanonicallyLinearOrderedAddMonoid -> CanonicallyLinearOrderedAddCommMonoid

Diff
@@ -53,7 +53,7 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
 #align list.card_nsmul_le_sum List.card_nsmul_le_sum
 
 @[to_additive]
-theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
+theorem prod_eq_one_iff [CanonicallyOrderedCommMonoid M] (l : List M) :
     l.prod = 1 ↔ ∀ x ∈ l, x = (1 : M) :=
   ⟨all_one_of_le_one_le_of_prod_eq_one fun _ _ => one_le _, fun h => by
     rw [List.eq_replicate.2 ⟨_, h⟩, prod_replicate, one_pow]; exact (length l); rfl⟩
feat: lemmas about divisibility, mostly related to nilpotency (#7355)
Diff
@@ -11,7 +11,7 @@ import Mathlib.Algebra.GroupWithZero.Commute
 import Mathlib.Algebra.GroupWithZero.Divisibility
 import Mathlib.Algebra.Order.WithZero
 import Mathlib.Algebra.Ring.Basic
-import Mathlib.Algebra.Ring.Divisibility
+import Mathlib.Algebra.Ring.Divisibility.Basic
 import Mathlib.Algebra.Ring.Commute
 import Mathlib.Data.Int.Units
 import Mathlib.Data.Set.Basic
@@ -85,7 +85,7 @@ theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod :
   exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
-theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum := by
+theorem dvd_sum [NonUnitalSemiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum := by
   induction' l with x l ih
   · exact dvd_zero _
   · rw [List.sum_cons]
refactor: split Algebra.Hom.Group and Algebra.Hom.Ring (#7094)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 -/
+import Mathlib.Init.CCLemmas
 import Mathlib.Data.List.BigOperators.Basic
 import Mathlib.Algebra.Group.Opposite
 import Mathlib.Algebra.GroupPower.Basic
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
@@ -22,7 +22,7 @@ import Mathlib.Data.Set.Basic
 
 open MulOpposite List
 
-variable {ι α M N P M₀ G R : Type _}
+variable {ι α M N P M₀ G R : Type*}
 
 namespace Commute
 
@@ -157,7 +157,7 @@ section MonoidHom
 variable [Monoid M] [Monoid N]
 
 /-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
-theorem unop_map_list_prod {F : Type _} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
+theorem unop_map_list_prod {F : Type*} [MonoidHomClass F M Nᵐᵒᵖ] (f : F) (l : List M) :
     (f l.prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.prod := by
   rw [map_list_prod f l, MulOpposite.unop_list_prod, List.map_map]
 #align unop_map_list_prod unop_map_list_prod
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,11 +2,6 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
-
-! This file was ported from Lean 3 source module data.list.big_operators.lemmas
-! leanprover-community/mathlib commit f694c7dead66f5d4c80f446c796a5aad14707f0e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.List.BigOperators.Basic
 import Mathlib.Algebra.Group.Opposite
@@ -20,6 +15,8 @@ import Mathlib.Algebra.Ring.Commute
 import Mathlib.Data.Int.Units
 import Mathlib.Data.Set.Basic
 
+#align_import data.list.big_operators.lemmas from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
+
 /-! # Lemmas about `List.sum` and `List.prod` requiring extra algebra imports -/
 
 
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -113,8 +113,7 @@ theorem alternatingProd_append :
 theorem alternatingProd_reverse :
     ∀ l : List α, alternatingProd (reverse l) = alternatingProd l ^ (-1 : ℤ) ^ (length l + 1)
   | [] => by simp only [alternatingProd_nil, one_zpow, reverse_nil]
-  | a :: l =>
-    by
+  | a :: l => by
     simp_rw [reverse_cons, alternatingProd_append, alternatingProd_reverse,
       alternatingProd_singleton, alternatingProd_cons, length_reverse, length, pow_succ, neg_mul,
       one_mul, zpow_neg, inv_inv]
chore: update SHA for Data.List.BigOperators.Lemmas (#2665)
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
 
 ! This file was ported from Lean 3 source module data.list.big_operators.lemmas
-! leanprover-community/mathlib commit 940d371319c6658e526349d2c3e1daeeabfae0fd
+! leanprover-community/mathlib commit f694c7dead66f5d4c80f446c796a5aad14707f0e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
chore: add #align statements for to_additive decls (#1816)

Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -52,6 +52,7 @@ theorem pow_card_le_prod [Monoid M] [Preorder M]
     (l : List M) (n : M) (h : ∀ x ∈ l, n ≤ x) : n ^ l.length ≤ l.prod :=
   @prod_le_pow_card Mᵒᵈ _ _ _ _ l n h
 #align list.pow_card_le_prod List.pow_card_le_prod
+#align list.card_nsmul_le_sum List.card_nsmul_le_sum
 
 @[to_additive]
 theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
@@ -59,6 +60,7 @@ theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
   ⟨all_one_of_le_one_le_of_prod_eq_one fun _ _ => one_le _, fun h => by
     rw [List.eq_replicate.2 ⟨_, h⟩, prod_replicate, one_pow]; exact (length l); rfl⟩
 #align list.prod_eq_one_iff List.prod_eq_one_iff
+#align list.sum_eq_zero_iff List.sum_eq_zero_iff
 
 /-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
 theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l := by
@@ -105,6 +107,7 @@ theorem alternatingProd_append :
     simp_rw [cons_append, alternatingProd_cons, alternatingProd_append, length_cons, pow_succ,
       neg_mul, one_mul, zpow_neg, ← div_eq_mul_inv, div_div]
 #align list.alternating_prod_append List.alternatingProd_append
+#align list.alternating_sum_append List.alternatingSum_append
 
 @[to_additive]
 theorem alternatingProd_reverse :
@@ -117,6 +120,7 @@ theorem alternatingProd_reverse :
       one_mul, zpow_neg, inv_inv]
     rw [mul_comm, ← div_eq_mul_inv, div_zpow]
 #align list.alternating_prod_reverse List.alternatingProd_reverse
+#align list.alternating_sum_reverse List.alternatingSum_reverse
 
 end Alternating
 
chore: format by line breaks (#1523)

During porting, I usually fix the desired format we seem to want for the line breaks around by with

awk '{do {{if (match($0, "^  by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean

I noticed there are some more files that slipped through.

This pull request is the result of running this command:

grep -lr "^  by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^  by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -30,8 +30,7 @@ variable {ι α M N P M₀ G R : Type _}
 namespace Commute
 
 theorem list_sum_right [NonUnitalNonAssocSemiring R] (a : R) (l : List R)
-    (h : ∀ b ∈ l, Commute a b) : Commute a l.sum :=
-  by
+    (h : ∀ b ∈ l, Commute a b) : Commute a l.sum := by
   induction' l with x xs ih
   · exact Commute.zero_right _
   · rw [List.sum_cons]
@@ -62,8 +61,7 @@ theorem prod_eq_one_iff [CanonicallyOrderedMonoid M] (l : List M) :
 #align list.prod_eq_one_iff List.prod_eq_one_iff
 
 /-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
-theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l :=
-  by
+theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l := by
   obtain ⟨x, h₁, h₂⟩ := exists_mem_ne_one_of_prod_ne_one (ne_of_eq_of_ne h (by decide))
   exact
     Or.resolve_left
@@ -75,22 +73,19 @@ theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 :
 
 /-- If all elements in a list are bounded below by `1`, then the length of the list is bounded
 by the sum of the elements. -/
-theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.length ≤ L.sum :=
-  by
+theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.length ≤ L.sum := by
   induction' L with j L IH h; · simp
   rw [sum_cons, length, add_comm]
   exact add_le_add (h _ (mem_cons_self _ _)) (IH fun i hi => h i (mem_cons.2 (Or.inr hi)))
 #align list.length_le_sum_of_one_le List.length_le_sum_of_one_le
 
-theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod :=
-  by
+theorem dvd_prod [CommMonoid M] {a} {l : List M} (ha : a ∈ l) : a ∣ l.prod := by
   let ⟨s, t, h⟩ := mem_split ha
   rw [h, prod_append, prod_cons, mul_left_comm]
   exact dvd_mul_right _ _
 #align list.dvd_prod List.dvd_prod
 
-theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum :=
-  by
+theorem dvd_sum [Semiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum := by
   induction' l with x l ih
   · exact dvd_zero _
   · rw [List.sum_cons]
chore: tidy various files (#1595)
Diff
@@ -107,18 +107,18 @@ theorem alternatingProd_append :
       alternatingProd (l₁ ++ l₂) = alternatingProd l₁ * alternatingProd l₂ ^ (-1 : ℤ) ^ length l₁
   | [], l₂ => by simp
   | a :: l₁, l₂ => by
-    simp_rw [cons_append, alternating_prod_cons, alternatingProd_append, length_cons, pow_succ,
+    simp_rw [cons_append, alternatingProd_cons, alternatingProd_append, length_cons, pow_succ,
       neg_mul, one_mul, zpow_neg, ← div_eq_mul_inv, div_div]
 #align list.alternating_prod_append List.alternatingProd_append
 
 @[to_additive]
 theorem alternatingProd_reverse :
     ∀ l : List α, alternatingProd (reverse l) = alternatingProd l ^ (-1 : ℤ) ^ (length l + 1)
-  | [] => by simp only [alternating_prod_nil, one_zpow, reverse_nil]
+  | [] => by simp only [alternatingProd_nil, one_zpow, reverse_nil]
   | a :: l =>
     by
     simp_rw [reverse_cons, alternatingProd_append, alternatingProd_reverse,
-      alternating_prod_singleton, alternating_prod_cons, length_reverse, length, pow_succ, neg_mul,
+      alternatingProd_singleton, alternatingProd_cons, length_reverse, length, pow_succ, neg_mul,
       one_mul, zpow_neg, inv_inv]
     rw [mul_comm, ← div_eq_mul_inv, div_zpow]
 #align list.alternating_prod_reverse List.alternatingProd_reverse
feat Port/data.list.big operators.lemmas (#1423)

Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com> Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>

Dependencies 2 + 117

118 files ported (98.3%)
49962 lines ported (99.7%)
Show graph

The unported dependencies are