group_theory.group_action.prodMathlib.GroupTheory.GroupAction.Prod

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

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

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
 -/
-import Mathbin.Algebra.Group.Prod
-import Mathbin.GroupTheory.GroupAction.Defs
+import Algebra.Group.Prod
+import GroupTheory.GroupAction.Defs
 
 #align_import group_theory.group_action.prod from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
 
Diff
@@ -201,7 +201,7 @@ instance isScalarTowerBoth [Mul N] [Mul P] [SMul M N] [SMul M P] [IsScalarTower
 @[to_additive]
 instance {m : Monoid M} [MulAction M α] [MulAction M β] : MulAction M (α × β)
     where
-  mul_smul a₁ a₂ p := mk.inj_iff.mpr ⟨mul_smul _ _ _, mul_smul _ _ _⟩
+  hMul_smul a₁ a₂ p := mk.inj_iff.mpr ⟨hMul_smul _ _ _, hMul_smul _ _ _⟩
   one_smul := fun ⟨b, c⟩ => mk.inj_iff.mpr ⟨one_smul _ _, one_smul _ _⟩
 
 instance {R M N : Type _} [Zero M] [Zero N] [SMulZeroClass R M] [SMulZeroClass R N] :
@@ -217,7 +217,7 @@ instance {R M N : Type _} {r : Monoid R} [AddMonoid M] [AddMonoid N] [DistribMul
 instance {R M N : Type _} {r : Monoid R} [Monoid M] [Monoid N] [MulDistribMulAction R M]
     [MulDistribMulAction R N] : MulDistribMulAction R (M × N)
     where
-  smul_mul a p₁ p₂ := mk.inj_iff.mpr ⟨smul_mul' _ _ _, smul_mul' _ _ _⟩
+  smul_hMul a p₁ p₂ := mk.inj_iff.mpr ⟨smul_mul' _ _ _, smul_mul' _ _ _⟩
   smul_one a := mk.inj_iff.mpr ⟨smul_one _, smul_one _⟩
 
 end Prod
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
-
-! This file was ported from Lean 3 source module group_theory.group_action.prod
-! leanprover-community/mathlib commit c3291da49cfa65f0d43b094750541c0731edc932
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Group.Prod
 import Mathbin.GroupTheory.GroupAction.Defs
 
+#align_import group_theory.group_action.prod from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
+
 /-!
 # Prod instances for additive and multiplicative actions
 
Diff
@@ -46,11 +46,13 @@ variable [SMul M α] [SMul M β] [SMul N α] [SMul N β] (a : M) (x : α × β)
 instance : SMul M (α × β) :=
   ⟨fun a p => (a • p.1, a • p.2)⟩
 
+#print Prod.smul_fst /-
 @[simp, to_additive]
 theorem smul_fst : (a • x).1 = a • x.1 :=
   rfl
 #align prod.smul_fst Prod.smul_fst
 #align prod.vadd_fst Prod.vadd_fst
+-/
 
 #print Prod.smul_snd /-
 @[simp, to_additive]
@@ -60,31 +62,41 @@ theorem smul_snd : (a • x).2 = a • x.2 :=
 #align prod.vadd_snd Prod.vadd_snd
 -/
 
+#print Prod.smul_mk /-
 @[simp, to_additive]
 theorem smul_mk (a : M) (b : α) (c : β) : a • (b, c) = (a • b, a • c) :=
   rfl
 #align prod.smul_mk Prod.smul_mk
 #align prod.vadd_mk Prod.vadd_mk
+-/
 
+#print Prod.smul_def /-
 @[to_additive]
 theorem smul_def (a : M) (x : α × β) : a • x = (a • x.1, a • x.2) :=
   rfl
 #align prod.smul_def Prod.smul_def
 #align prod.vadd_def Prod.vadd_def
+-/
 
+#print Prod.smul_swap /-
 @[simp, to_additive]
 theorem smul_swap : (a • x).symm = a • x.symm :=
   rfl
 #align prod.smul_swap Prod.smul_swap
 #align prod.vadd_swap Prod.vadd_swap
+-/
 
+#print Prod.smul_zero_mk /-
 theorem smul_zero_mk {α : Type _} [Monoid M] [AddMonoid α] [DistribMulAction M α] (a : M) (c : β) :
     a • ((0 : α), c) = (0, a • c) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_zero_mk Prod.smul_zero_mk
+-/
 
+#print Prod.smul_mk_zero /-
 theorem smul_mk_zero {β : Type _} [Monoid M] [AddMonoid β] [DistribMulAction M β] (a : M) (b : α) :
     a • (b, (0 : β)) = (a • b, 0) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_mk_zero Prod.smul_mk_zero
+-/
 
 variable [Pow α E] [Pow β E]
 
@@ -95,18 +107,23 @@ instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_smul Prod.smul
 -/
 
+#print Prod.pow_fst /-
 @[simp, to_additive smul_fst, to_additive_reorder 6]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 #align prod.smul_fst Prod.smul_fst
+-/
 
+#print Prod.pow_snd /-
 @[simp, to_additive smul_snd, to_additive_reorder 6]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
 #align prod.smul_snd Prod.smul_snd
+-/
 
+#print Prod.pow_mk /-
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
@@ -115,18 +132,23 @@ theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b
   rfl
 #align prod.pow_mk Prod.pow_mk
 #align prod.smul_mk Prod.smul_mk
+-/
 
+#print Prod.pow_def /-
 @[to_additive smul_def, to_additive_reorder 6]
 theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 #align prod.smul_def Prod.smul_def
+-/
 
+#print Prod.pow_swap /-
 @[simp, to_additive smul_swap, to_additive_reorder 6]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).symm = p.symm ^ c :=
   rfl
 #align prod.pow_swap Prod.pow_swap
 #align prod.smul_swap Prod.smul_swap
+-/
 
 @[to_additive]
 instance [SMul M N] [IsScalarTower M N α] [IsScalarTower M N β] : IsScalarTower M N (α × β) :=
@@ -208,6 +230,7 @@ end Prod
 
 section BundledSmul
 
+#print smulMulHom /-
 /-- Scalar multiplication as a multiplicative homomorphism. -/
 @[simps]
 def smulMulHom [Monoid α] [Mul β] [MulAction α β] [IsScalarTower α β β] [SMulCommClass α β β] :
@@ -215,13 +238,16 @@ def smulMulHom [Monoid α] [Mul β] [MulAction α β] [IsScalarTower α β β] [
   toFun a := a.1 • a.2
   map_mul' a b := (smul_mul_smul _ _ _ _).symm
 #align smul_mul_hom smulMulHom
+-/
 
+#print smulMonoidHom /-
 /-- Scalar multiplication as a monoid homomorphism. -/
 @[simps]
 def smulMonoidHom [Monoid α] [MulOneClass β] [MulAction α β] [IsScalarTower α β β]
     [SMulCommClass α β β] : α × β →* β :=
   { smulMulHom with map_one' := one_smul _ _ }
 #align smul_monoid_hom smulMonoidHom
+-/
 
 end BundledSmul
 
Diff
@@ -46,12 +46,6 @@ variable [SMul M α] [SMul M β] [SMul N α] [SMul N β] (a : M) (x : α × β)
 instance : SMul M (α × β) :=
   ⟨fun a p => (a • p.1, a • p.2)⟩
 
-/- warning: prod.smul_fst -> Prod.smul_fst is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : SMul.{u1, u2} M α] [_inst_2 : SMul.{u1, u3} M β] (a : M) (x : Prod.{u2, u3} α β), Eq.{succ u2} α (Prod.fst.{u2, u3} α β (SMul.smul.{u1, max u2 u3} M (Prod.{u2, u3} α β) (Prod.smul.{u1, u2, u3} M α β _inst_1 _inst_2) a x)) (SMul.smul.{u1, u2} M α _inst_1 a (Prod.fst.{u2, u3} α β x))
-but is expected to have type
-  forall {M : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : SMul.{u1, u3} M α] [_inst_2 : SMul.{u1, u2} M β] (a : M) (x : Prod.{u3, u2} α β), Eq.{succ u3} α (Prod.fst.{u3, u2} α β (HSMul.hSMul.{u1, max u3 u2, max u3 u2} M (Prod.{u3, u2} α β) (Prod.{u3, u2} α β) (instHSMul.{u1, max u3 u2} M (Prod.{u3, u2} α β) (Prod.smul.{u1, u3, u2} M α β _inst_1 _inst_2)) a x)) (HSMul.hSMul.{u1, u3, u3} M α α (instHSMul.{u1, u3} M α _inst_1) a (Prod.fst.{u3, u2} α β x))
-Case conversion may be inaccurate. Consider using '#align prod.smul_fst Prod.smul_fstₓ'. -/
 @[simp, to_additive]
 theorem smul_fst : (a • x).1 = a • x.1 :=
   rfl
@@ -66,58 +60,28 @@ theorem smul_snd : (a • x).2 = a • x.2 :=
 #align prod.vadd_snd Prod.vadd_snd
 -/
 
-/- warning: prod.smul_mk -> Prod.smul_mk is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : SMul.{u1, u2} M α] [_inst_2 : SMul.{u1, u3} M β] (a : M) (b : α) (c : β), Eq.{succ (max u2 u3)} (Prod.{u2, u3} α β) (SMul.smul.{u1, max u2 u3} M (Prod.{u2, u3} α β) (Prod.smul.{u1, u2, u3} M α β _inst_1 _inst_2) a (Prod.mk.{u2, u3} α β b c)) (Prod.mk.{u2, u3} α β (SMul.smul.{u1, u2} M α _inst_1 a b) (SMul.smul.{u1, u3} M β _inst_2 a c))
-but is expected to have type
-  forall {M : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : SMul.{u1, u3} M α] [_inst_2 : SMul.{u1, u2} M β] (a : M) (b : α) (c : β), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} α β) (HSMul.hSMul.{u1, max u2 u3, max u3 u2} M (Prod.{u3, u2} α β) (Prod.{u3, u2} α β) (instHSMul.{u1, max u3 u2} M (Prod.{u3, u2} α β) (Prod.smul.{u1, u3, u2} M α β _inst_1 _inst_2)) a (Prod.mk.{u3, u2} α β b c)) (Prod.mk.{u3, u2} α β (HSMul.hSMul.{u1, u3, u3} M α α (instHSMul.{u1, u3} M α _inst_1) a b) (HSMul.hSMul.{u1, u2, u2} M β β (instHSMul.{u1, u2} M β _inst_2) a c))
-Case conversion may be inaccurate. Consider using '#align prod.smul_mk Prod.smul_mkₓ'. -/
 @[simp, to_additive]
 theorem smul_mk (a : M) (b : α) (c : β) : a • (b, c) = (a • b, a • c) :=
   rfl
 #align prod.smul_mk Prod.smul_mk
 #align prod.vadd_mk Prod.vadd_mk
 
-/- warning: prod.smul_def -> Prod.smul_def is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : SMul.{u1, u2} M α] [_inst_2 : SMul.{u1, u3} M β] (a : M) (x : Prod.{u2, u3} α β), Eq.{succ (max u2 u3)} (Prod.{u2, u3} α β) (SMul.smul.{u1, max u2 u3} M (Prod.{u2, u3} α β) (Prod.smul.{u1, u2, u3} M α β _inst_1 _inst_2) a x) (Prod.mk.{u2, u3} α β (SMul.smul.{u1, u2} M α _inst_1 a (Prod.fst.{u2, u3} α β x)) (SMul.smul.{u1, u3} M β _inst_2 a (Prod.snd.{u2, u3} α β x)))
-but is expected to have type
-  forall {M : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : SMul.{u1, u3} M α] [_inst_2 : SMul.{u1, u2} M β] (a : M) (x : Prod.{u3, u2} α β), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} α β) (HSMul.hSMul.{u1, max u3 u2, max u3 u2} M (Prod.{u3, u2} α β) (Prod.{u3, u2} α β) (instHSMul.{u1, max u3 u2} M (Prod.{u3, u2} α β) (Prod.smul.{u1, u3, u2} M α β _inst_1 _inst_2)) a x) (Prod.mk.{u3, u2} α β (HSMul.hSMul.{u1, u3, u3} M α α (instHSMul.{u1, u3} M α _inst_1) a (Prod.fst.{u3, u2} α β x)) (HSMul.hSMul.{u1, u2, u2} M β β (instHSMul.{u1, u2} M β _inst_2) a (Prod.snd.{u3, u2} α β x)))
-Case conversion may be inaccurate. Consider using '#align prod.smul_def Prod.smul_defₓ'. -/
 @[to_additive]
 theorem smul_def (a : M) (x : α × β) : a • x = (a • x.1, a • x.2) :=
   rfl
 #align prod.smul_def Prod.smul_def
 #align prod.vadd_def Prod.vadd_def
 
-/- warning: prod.smul_swap -> Prod.smul_swap is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : SMul.{u1, u2} M α] [_inst_2 : SMul.{u1, u3} M β] (a : M) (x : Prod.{u2, u3} α β), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} β α) (Prod.swap.{u2, u3} α β (SMul.smul.{u1, max u2 u3} M (Prod.{u2, u3} α β) (Prod.smul.{u1, u2, u3} M α β _inst_1 _inst_2) a x)) (SMul.smul.{u1, max u3 u2} M (Prod.{u3, u2} β α) (Prod.smul.{u1, u3, u2} M β α _inst_2 _inst_1) a (Prod.swap.{u2, u3} α β x))
-but is expected to have type
-  forall {M : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : SMul.{u1, u3} M α] [_inst_2 : SMul.{u1, u2} M β] (a : M) (x : Prod.{u3, u2} α β), Eq.{max (succ u3) (succ u2)} (Prod.{u2, u3} β α) (Prod.swap.{u3, u2} α β (HSMul.hSMul.{u1, max u3 u2, max u3 u2} M (Prod.{u3, u2} α β) (Prod.{u3, u2} α β) (instHSMul.{u1, max u3 u2} M (Prod.{u3, u2} α β) (Prod.smul.{u1, u3, u2} M α β _inst_1 _inst_2)) a x)) (HSMul.hSMul.{u1, max u3 u2, max u3 u2} M (Prod.{u2, u3} β α) (Prod.{u2, u3} β α) (instHSMul.{u1, max u3 u2} M (Prod.{u2, u3} β α) (Prod.smul.{u1, u2, u3} M β α _inst_2 _inst_1)) a (Prod.swap.{u3, u2} α β x))
-Case conversion may be inaccurate. Consider using '#align prod.smul_swap Prod.smul_swapₓ'. -/
 @[simp, to_additive]
 theorem smul_swap : (a • x).symm = a • x.symm :=
   rfl
 #align prod.smul_swap Prod.smul_swap
 #align prod.vadd_swap Prod.vadd_swap
 
-/- warning: prod.smul_zero_mk -> Prod.smul_zero_mk is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {β : Type.{u2}} [_inst_2 : SMul.{u1, u2} M β] {α : Type.{u3}} [_inst_5 : Monoid.{u1} M] [_inst_6 : AddMonoid.{u3} α] [_inst_7 : DistribMulAction.{u1, u3} M α _inst_5 _inst_6] (a : M) (c : β), Eq.{succ (max u3 u2)} (Prod.{u3, u2} α β) (SMul.smul.{u1, max u3 u2} M (Prod.{u3, u2} α β) (Prod.smul.{u1, u3, u2} M α β (SMulZeroClass.toHasSmul.{u1, u3} M α (AddZeroClass.toHasZero.{u3} α (AddMonoid.toAddZeroClass.{u3} α _inst_6)) (DistribSMul.toSmulZeroClass.{u1, u3} M α (AddMonoid.toAddZeroClass.{u3} α _inst_6) (DistribMulAction.toDistribSMul.{u1, u3} M α _inst_5 _inst_6 _inst_7))) _inst_2) a (Prod.mk.{u3, u2} α β (OfNat.ofNat.{u3} α 0 (OfNat.mk.{u3} α 0 (Zero.zero.{u3} α (AddZeroClass.toHasZero.{u3} α (AddMonoid.toAddZeroClass.{u3} α _inst_6))))) c)) (Prod.mk.{u3, u2} α β (OfNat.ofNat.{u3} α 0 (OfNat.mk.{u3} α 0 (Zero.zero.{u3} α (AddZeroClass.toHasZero.{u3} α (AddMonoid.toAddZeroClass.{u3} α _inst_6))))) (SMul.smul.{u1, u2} M β _inst_2 a c))
-but is expected to have type
-  forall {M : Type.{u2}} {β : Type.{u1}} [_inst_2 : SMul.{u2, u1} M β] {α : Type.{u3}} [_inst_5 : Monoid.{u2} M] [_inst_6 : AddMonoid.{u3} α] [_inst_7 : DistribMulAction.{u2, u3} M α _inst_5 _inst_6] (a : M) (c : β), Eq.{max (succ u1) (succ u3)} (Prod.{u3, u1} α β) (HSMul.hSMul.{u2, max u1 u3, max u1 u3} M (Prod.{u3, u1} α β) (Prod.{u3, u1} α β) (instHSMul.{u2, max u1 u3} M (Prod.{u3, u1} α β) (Prod.smul.{u2, u3, u1} M α β (SMulZeroClass.toSMul.{u2, u3} M α (AddMonoid.toZero.{u3} α _inst_6) (DistribSMul.toSMulZeroClass.{u2, u3} M α (AddMonoid.toAddZeroClass.{u3} α _inst_6) (DistribMulAction.toDistribSMul.{u2, u3} M α _inst_5 _inst_6 _inst_7))) _inst_2)) a (Prod.mk.{u3, u1} α β (OfNat.ofNat.{u3} α 0 (Zero.toOfNat0.{u3} α (AddMonoid.toZero.{u3} α _inst_6))) c)) (Prod.mk.{u3, u1} α β (OfNat.ofNat.{u3} α 0 (Zero.toOfNat0.{u3} α (AddMonoid.toZero.{u3} α _inst_6))) (HSMul.hSMul.{u2, u1, u1} M β β (instHSMul.{u2, u1} M β _inst_2) a c))
-Case conversion may be inaccurate. Consider using '#align prod.smul_zero_mk Prod.smul_zero_mkₓ'. -/
 theorem smul_zero_mk {α : Type _} [Monoid M] [AddMonoid α] [DistribMulAction M α] (a : M) (c : β) :
     a • ((0 : α), c) = (0, a • c) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_zero_mk Prod.smul_zero_mk
 
-/- warning: prod.smul_mk_zero -> Prod.smul_mk_zero is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} {α : Type.{u2}} [_inst_1 : SMul.{u1, u2} M α] {β : Type.{u3}} [_inst_5 : Monoid.{u1} M] [_inst_6 : AddMonoid.{u3} β] [_inst_7 : DistribMulAction.{u1, u3} M β _inst_5 _inst_6] (a : M) (b : α), Eq.{succ (max u2 u3)} (Prod.{u2, u3} α β) (SMul.smul.{u1, max u2 u3} M (Prod.{u2, u3} α β) (Prod.smul.{u1, u2, u3} M α β _inst_1 (SMulZeroClass.toHasSmul.{u1, u3} M β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β _inst_6)) (DistribSMul.toSmulZeroClass.{u1, u3} M β (AddMonoid.toAddZeroClass.{u3} β _inst_6) (DistribMulAction.toDistribSMul.{u1, u3} M β _inst_5 _inst_6 _inst_7)))) a (Prod.mk.{u2, u3} α β b (OfNat.ofNat.{u3} β 0 (OfNat.mk.{u3} β 0 (Zero.zero.{u3} β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β _inst_6))))))) (Prod.mk.{u2, u3} α β (SMul.smul.{u1, u2} M α _inst_1 a b) (OfNat.ofNat.{u3} β 0 (OfNat.mk.{u3} β 0 (Zero.zero.{u3} β (AddZeroClass.toHasZero.{u3} β (AddMonoid.toAddZeroClass.{u3} β _inst_6))))))
-but is expected to have type
-  forall {M : Type.{u2}} {α : Type.{u1}} [_inst_1 : SMul.{u2, u1} M α] {β : Type.{u3}} [_inst_5 : Monoid.{u2} M] [_inst_6 : AddMonoid.{u3} β] [_inst_7 : DistribMulAction.{u2, u3} M β _inst_5 _inst_6] (a : M) (b : α), Eq.{max (succ u1) (succ u3)} (Prod.{u1, u3} α β) (HSMul.hSMul.{u2, max u3 u1, max u1 u3} M (Prod.{u1, u3} α β) (Prod.{u1, u3} α β) (instHSMul.{u2, max u1 u3} M (Prod.{u1, u3} α β) (Prod.smul.{u2, u1, u3} M α β _inst_1 (SMulZeroClass.toSMul.{u2, u3} M β (AddMonoid.toZero.{u3} β _inst_6) (DistribSMul.toSMulZeroClass.{u2, u3} M β (AddMonoid.toAddZeroClass.{u3} β _inst_6) (DistribMulAction.toDistribSMul.{u2, u3} M β _inst_5 _inst_6 _inst_7))))) a (Prod.mk.{u1, u3} α β b (OfNat.ofNat.{u3} β 0 (Zero.toOfNat0.{u3} β (AddMonoid.toZero.{u3} β _inst_6))))) (Prod.mk.{u1, u3} α β (HSMul.hSMul.{u2, u1, u1} M α α (instHSMul.{u2, u1} M α _inst_1) a b) (OfNat.ofNat.{u3} β 0 (Zero.toOfNat0.{u3} β (AddMonoid.toZero.{u3} β _inst_6))))
-Case conversion may be inaccurate. Consider using '#align prod.smul_mk_zero Prod.smul_mk_zeroₓ'. -/
 theorem smul_mk_zero {β : Type _} [Monoid M] [AddMonoid β] [DistribMulAction M β] (a : M) (b : α) :
     a • (b, (0 : β)) = (a • b, 0) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_mk_zero Prod.smul_mk_zero
@@ -131,36 +95,18 @@ instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_smul Prod.smul
 -/
 
-/- warning: prod.pow_fst -> Prod.pow_fst is a dubious translation:
-lean 3 declaration is
-  forall {E : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_5 : Pow.{u2, u1} α E] [_inst_6 : Pow.{u3, u1} β E] (p : Prod.{u2, u3} α β) (c : E), Eq.{succ u2} α (Prod.fst.{u2, u3} α β (HPow.hPow.{max u2 u3, u1, max u2 u3} (Prod.{u2, u3} α β) E (Prod.{u2, u3} α β) (instHPow.{max u2 u3, u1} (Prod.{u2, u3} α β) E (Prod.pow.{u1, u2, u3} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{u2, u1, u2} α E α (instHPow.{u2, u1} α E _inst_5) (Prod.fst.{u2, u3} α β p) c)
-but is expected to have type
-  forall {E : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_5 : Pow.{u3, u1} α E] [_inst_6 : Pow.{u2, u1} β E] (p : Prod.{u3, u2} α β) (c : E), Eq.{succ u3} α (Prod.fst.{u3, u2} α β (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} α β) E (Prod.{u3, u2} α β) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} α β) E (Prod.pow.{u1, u3, u2} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{u3, u1, u3} α E α (instHPow.{u3, u1} α E _inst_5) (Prod.fst.{u3, u2} α β p) c)
-Case conversion may be inaccurate. Consider using '#align prod.pow_fst Prod.pow_fstₓ'. -/
 @[simp, to_additive smul_fst, to_additive_reorder 6]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 #align prod.smul_fst Prod.smul_fst
 
-/- warning: prod.pow_snd -> Prod.pow_snd is a dubious translation:
-lean 3 declaration is
-  forall {E : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_5 : Pow.{u2, u1} α E] [_inst_6 : Pow.{u3, u1} β E] (p : Prod.{u2, u3} α β) (c : E), Eq.{succ u3} β (Prod.snd.{u2, u3} α β (HPow.hPow.{max u2 u3, u1, max u2 u3} (Prod.{u2, u3} α β) E (Prod.{u2, u3} α β) (instHPow.{max u2 u3, u1} (Prod.{u2, u3} α β) E (Prod.pow.{u1, u2, u3} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{u3, u1, u3} β E β (instHPow.{u3, u1} β E _inst_6) (Prod.snd.{u2, u3} α β p) c)
-but is expected to have type
-  forall {E : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_5 : Pow.{u3, u1} α E] [_inst_6 : Pow.{u2, u1} β E] (p : Prod.{u3, u2} α β) (c : E), Eq.{succ u2} β (Prod.snd.{u3, u2} α β (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} α β) E (Prod.{u3, u2} α β) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} α β) E (Prod.pow.{u1, u3, u2} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{u2, u1, u2} β E β (instHPow.{u2, u1} β E _inst_6) (Prod.snd.{u3, u2} α β p) c)
-Case conversion may be inaccurate. Consider using '#align prod.pow_snd Prod.pow_sndₓ'. -/
 @[simp, to_additive smul_snd, to_additive_reorder 6]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
 #align prod.smul_snd Prod.smul_snd
 
-/- warning: prod.pow_mk -> Prod.pow_mk is a dubious translation:
-lean 3 declaration is
-  forall {E : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_5 : Pow.{u2, u1} α E] [_inst_6 : Pow.{u3, u1} β E] (c : E) (a : α) (b : β), Eq.{succ (max u2 u3)} (Prod.{u2, u3} α β) (HPow.hPow.{max u2 u3, u1, max u2 u3} (Prod.{u2, u3} α β) E (Prod.{u2, u3} α β) (instHPow.{max u2 u3, u1} (Prod.{u2, u3} α β) E (Prod.pow.{u1, u2, u3} E α β _inst_5 _inst_6)) (Prod.mk.{u2, u3} α β a b) c) (Prod.mk.{u2, u3} α β (HPow.hPow.{u2, u1, u2} α E α (instHPow.{u2, u1} α E _inst_5) a c) (HPow.hPow.{u3, u1, u3} β E β (instHPow.{u3, u1} β E _inst_6) b c))
-but is expected to have type
-  forall {E : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_5 : Pow.{u3, u1} α E] [_inst_6 : Pow.{u2, u1} β E] (c : E) (a : α) (b : β), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} α β) (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} α β) E (Prod.{u3, u2} α β) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} α β) E (Prod.pow.{u1, u3, u2} E α β _inst_5 _inst_6)) (Prod.mk.{u3, u2} α β a b) c) (Prod.mk.{u3, u2} α β (HPow.hPow.{u3, u1, u3} α E α (instHPow.{u3, u1} α E _inst_5) a c) (HPow.hPow.{u2, u1, u2} β E β (instHPow.{u2, u1} β E _inst_6) b c))
-Case conversion may be inaccurate. Consider using '#align prod.pow_mk Prod.pow_mkₓ'. -/
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
@@ -170,24 +116,12 @@ theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b
 #align prod.pow_mk Prod.pow_mk
 #align prod.smul_mk Prod.smul_mk
 
-/- warning: prod.pow_def -> Prod.pow_def is a dubious translation:
-lean 3 declaration is
-  forall {E : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_5 : Pow.{u2, u1} α E] [_inst_6 : Pow.{u3, u1} β E] (p : Prod.{u2, u3} α β) (c : E), Eq.{succ (max u2 u3)} (Prod.{u2, u3} α β) (HPow.hPow.{max u2 u3, u1, max u2 u3} (Prod.{u2, u3} α β) E (Prod.{u2, u3} α β) (instHPow.{max u2 u3, u1} (Prod.{u2, u3} α β) E (Prod.pow.{u1, u2, u3} E α β _inst_5 _inst_6)) p c) (Prod.mk.{u2, u3} α β (HPow.hPow.{u2, u1, u2} α E α (instHPow.{u2, u1} α E _inst_5) (Prod.fst.{u2, u3} α β p) c) (HPow.hPow.{u3, u1, u3} β E β (instHPow.{u3, u1} β E _inst_6) (Prod.snd.{u2, u3} α β p) c))
-but is expected to have type
-  forall {E : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_5 : Pow.{u3, u1} α E] [_inst_6 : Pow.{u2, u1} β E] (p : Prod.{u3, u2} α β) (c : E), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} α β) (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} α β) E (Prod.{u3, u2} α β) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} α β) E (Prod.pow.{u1, u3, u2} E α β _inst_5 _inst_6)) p c) (Prod.mk.{u3, u2} α β (HPow.hPow.{u3, u1, u3} α E α (instHPow.{u3, u1} α E _inst_5) (Prod.fst.{u3, u2} α β p) c) (HPow.hPow.{u2, u1, u2} β E β (instHPow.{u2, u1} β E _inst_6) (Prod.snd.{u3, u2} α β p) c))
-Case conversion may be inaccurate. Consider using '#align prod.pow_def Prod.pow_defₓ'. -/
 @[to_additive smul_def, to_additive_reorder 6]
 theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 #align prod.smul_def Prod.smul_def
 
-/- warning: prod.pow_swap -> Prod.pow_swap is a dubious translation:
-lean 3 declaration is
-  forall {E : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_5 : Pow.{u2, u1} α E] [_inst_6 : Pow.{u3, u1} β E] (p : Prod.{u2, u3} α β) (c : E), Eq.{max (succ u3) (succ u2)} (Prod.{u3, u2} β α) (Prod.swap.{u2, u3} α β (HPow.hPow.{max u2 u3, u1, max u2 u3} (Prod.{u2, u3} α β) E (Prod.{u2, u3} α β) (instHPow.{max u2 u3, u1} (Prod.{u2, u3} α β) E (Prod.pow.{u1, u2, u3} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} β α) E (Prod.{u3, u2} β α) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} β α) E (Prod.pow.{u1, u3, u2} E β α _inst_6 _inst_5)) (Prod.swap.{u2, u3} α β p) c)
-but is expected to have type
-  forall {E : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_5 : Pow.{u3, u1} α E] [_inst_6 : Pow.{u2, u1} β E] (p : Prod.{u3, u2} α β) (c : E), Eq.{max (succ u3) (succ u2)} (Prod.{u2, u3} β α) (Prod.swap.{u3, u2} α β (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u3, u2} α β) E (Prod.{u3, u2} α β) (instHPow.{max u3 u2, u1} (Prod.{u3, u2} α β) E (Prod.pow.{u1, u3, u2} E α β _inst_5 _inst_6)) p c)) (HPow.hPow.{max u3 u2, u1, max u3 u2} (Prod.{u2, u3} β α) E (Prod.{u2, u3} β α) (instHPow.{max u3 u2, u1} (Prod.{u2, u3} β α) E (Prod.pow.{u1, u2, u3} E β α _inst_6 _inst_5)) (Prod.swap.{u3, u2} α β p) c)
-Case conversion may be inaccurate. Consider using '#align prod.pow_swap Prod.pow_swapₓ'. -/
 @[simp, to_additive smul_swap, to_additive_reorder 6]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).symm = p.symm ^ c :=
   rfl
@@ -274,12 +208,6 @@ end Prod
 
 section BundledSmul
 
-/- warning: smul_mul_hom -> smulMulHom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Monoid.{u1} α] [_inst_2 : Mul.{u2} β] [_inst_3 : MulAction.{u1, u2} α β _inst_1] [_inst_4 : IsScalarTower.{u1, u2, u2} α β β (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β _inst_2) (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3)] [_inst_5 : SMulCommClass.{u1, u2, u2} α β β (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β _inst_2)], MulHom.{max u1 u2, u2} (Prod.{u1, u2} α β) β (Prod.hasMul.{u1, u2} α β (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) _inst_2) _inst_2
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Monoid.{u1} α] [_inst_2 : Mul.{u2} β] [_inst_3 : MulAction.{u1, u2} α β _inst_1] [_inst_4 : IsScalarTower.{u1, u2, u2} α β β (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β _inst_2) (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3)] [_inst_5 : SMulCommClass.{u1, u2, u2} α β β (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β _inst_2)], MulHom.{max u2 u1, u2} (Prod.{u1, u2} α β) β (Prod.instMulProd.{u1, u2} α β (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) _inst_2) _inst_2
-Case conversion may be inaccurate. Consider using '#align smul_mul_hom smulMulHomₓ'. -/
 /-- Scalar multiplication as a multiplicative homomorphism. -/
 @[simps]
 def smulMulHom [Monoid α] [Mul β] [MulAction α β] [IsScalarTower α β β] [SMulCommClass α β β] :
@@ -288,12 +216,6 @@ def smulMulHom [Monoid α] [Mul β] [MulAction α β] [IsScalarTower α β β] [
   map_mul' a b := (smul_mul_smul _ _ _ _).symm
 #align smul_mul_hom smulMulHom
 
-/- warning: smul_monoid_hom -> smulMonoidHom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Monoid.{u1} α] [_inst_2 : MulOneClass.{u2} β] [_inst_3 : MulAction.{u1, u2} α β _inst_1] [_inst_4 : IsScalarTower.{u1, u2, u2} α β β (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β (MulOneClass.toHasMul.{u2} β _inst_2)) (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3)] [_inst_5 : SMulCommClass.{u1, u2, u2} α β β (MulAction.toHasSmul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β (MulOneClass.toHasMul.{u2} β _inst_2))], MonoidHom.{max u1 u2, u2} (Prod.{u1, u2} α β) β (Prod.mulOneClass.{u1, u2} α β (Monoid.toMulOneClass.{u1} α _inst_1) _inst_2) _inst_2
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Monoid.{u1} α] [_inst_2 : MulOneClass.{u2} β] [_inst_3 : MulAction.{u1, u2} α β _inst_1] [_inst_4 : IsScalarTower.{u1, u2, u2} α β β (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β (MulOneClass.toMul.{u2} β _inst_2)) (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3)] [_inst_5 : SMulCommClass.{u1, u2, u2} α β β (MulAction.toSMul.{u1, u2} α β _inst_1 _inst_3) (Mul.toSMul.{u2} β (MulOneClass.toMul.{u2} β _inst_2))], MonoidHom.{max u2 u1, u2} (Prod.{u1, u2} α β) β (Prod.instMulOneClassProd.{u1, u2} α β (Monoid.toMulOneClass.{u1} α _inst_1) _inst_2) _inst_2
-Case conversion may be inaccurate. Consider using '#align smul_monoid_hom smulMonoidHomₓ'. -/
 /-- Scalar multiplication as a monoid homomorphism. -/
 @[simps]
 def smulMonoidHom [Monoid α] [MulOneClass β] [MulAction α β] [IsScalarTower α β β]

Changes in mathlib4

mathlib3
mathlib4
chore(GroupTheory): remove autoImplicit (#12134)
Diff
@@ -29,9 +29,6 @@ https://leanprover.zulipchat.com/#narrow/near/316087838
 This was not done as part of the port in order to stay as close as possible to the mathlib3 code.
 -/
 
-set_option autoImplicit true
-
-
 variable {M N P E α β : Type*}
 
 namespace Prod
@@ -176,11 +173,11 @@ instance distribSMul {R M N : Type*} [AddZeroClass M] [AddZeroClass N] [DistribS
     [DistribSMul R N] : DistribSMul R (M × N) where
   smul_add _ _ _ := mk.inj_iff.mpr ⟨smul_add _ _ _, smul_add _ _ _⟩
 
-instance distribMulAction [Monoid R] [AddMonoid M] [AddMonoid N]
+instance distribMulAction {R : Type*} [Monoid R] [AddMonoid M] [AddMonoid N]
     [DistribMulAction R M] [DistribMulAction R N] : DistribMulAction R (M × N) :=
   { Prod.mulAction, Prod.distribSMul with }
 
-instance mulDistribMulAction [Monoid R] [Monoid M] [Monoid N]
+instance mulDistribMulAction {R : Type*} [Monoid R] [Monoid M] [Monoid N]
     [MulDistribMulAction R M] [MulDistribMulAction R N] : MulDistribMulAction R (M × N) where
   smul_mul _ _ _ := mk.inj_iff.mpr ⟨smul_mul' _ _ _, smul_mul' _ _ _⟩
   smul_one _ := mk.inj_iff.mpr ⟨smul_one _, smul_one _⟩
chore: remove tactics (#11365)

More tactics that are not used, found using the linter at #11308.

The PR consists of tactic removals, whitespace changes and replacing a porting note by an explanation.

Diff
@@ -243,7 +243,7 @@ def MulAction.prodEquiv :
     letI := _insts.1; letI := _insts.2.1; have := _insts.2.2
     MulAction.prodOfSMulCommClass M N α
   left_inv := by
-    rintro ⟨-, hsmul⟩; dsimp only; congr; ext ⟨m, n⟩ a
+    rintro ⟨-, hsmul⟩; dsimp only; ext ⟨m, n⟩ a
     change (m, (1 : N)) • ((1 : M), n) • a = _
     rw [← hsmul, Prod.mk_mul_mk, mul_one, one_mul]; rfl
   right_inv := by
@@ -252,7 +252,7 @@ def MulAction.prodEquiv :
     · ext m a; conv_rhs => rw [← hN.one_smul a]; rfl
     congr 1
     · funext; congr; ext m a; conv_rhs => rw [← hN.one_smul a]; rfl
-    · congr 1; ext n a; conv_rhs => rw [← hM.one_smul (SMul.smul n a)]; rfl
+    · ext n a; conv_rhs => rw [← hM.one_smul (SMul.smul n a)]; rfl
     · apply heq_prop
 
 variable [AddMonoid α]
@@ -276,7 +276,7 @@ def DistribMulAction.prodEquiv : DistribMulAction (M × N) α ≃
     letI := _insts.1; letI := _insts.2.1; have := _insts.2.2
     DistribMulAction.prodOfSMulCommClass M N α
   left_inv _ := by
-    dsimp only; congr; ext ⟨m, n⟩ a
+    dsimp only; ext ⟨m, n⟩ a
     change (m, (1 : N)) • ((1 : M), n) • a = _
     rw [smul_smul, Prod.mk_mul_mk, mul_one, one_mul]; rfl
   right_inv := by
@@ -285,7 +285,7 @@ def DistribMulAction.prodEquiv : DistribMulAction (M × N) α ≃
     · ext m a; conv_rhs => rw [← one_smul N a]; rfl
     congr 1
     · funext i; congr; ext m a; clear i; conv_rhs => rw [← one_smul N a]; rfl
-    · congr 1; ext n a; conv_rhs => rw [← one_smul M (SMul.smul n a)]; rfl
+    · ext n a; conv_rhs => rw [← one_smul M (SMul.smul n a)]; rfl
     · apply heq_prop
 
 end Action_by_Prod
feat: MulAction by product monoid (#8634)

Commuting (Distrib)MulActions by two monoids on the same type give rise to a (Distrib)MulAction by the product monoid, and vice versa.

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -209,3 +209,83 @@ def smulMonoidHom [Monoid α] [MulOneClass β] [MulAction α β] [IsScalarTower
 #align smul_monoid_hom_apply smulMonoidHom_apply
 
 end BundledSMul
+
+section Action_by_Prod
+
+variable (M N α) [Monoid M] [Monoid N]
+
+/-- Construct a `MulAction` by a product monoid from `MulAction`s by the factors.
+  This is not an instance to avoid diamonds for example when `α := M × N`. -/
+@[to_additive AddAction.prodOfVAddCommClass
+  "Construct an `AddAction` by a product monoid from `AddAction`s by the factors.
+  This is not an instance to avoid diamonds for example when `α := M × N`."]
+abbrev MulAction.prodOfSMulCommClass [MulAction M α] [MulAction N α] [SMulCommClass M N α] :
+    MulAction (M × N) α where
+  smul mn a := mn.1 • mn.2 • a
+  one_smul a := (one_smul M _).trans (one_smul N a)
+  mul_smul x y a := by
+    change (x.1 * y.1) • (x.2 * y.2) • a = x.1 • x.2 • y.1 • y.2 • a
+    rw [mul_smul, mul_smul, smul_comm y.1 x.2]
+
+/-- A `MulAction` by a product monoid is equivalent to commuting `MulAction`s by the factors. -/
+@[to_additive AddAction.prodEquiv "An `AddAction` by a product monoid is equivalent to
+  commuting `AddAction`s by the factors."]
+def MulAction.prodEquiv :
+    MulAction (M × N) α ≃ Σ' (_ : MulAction M α) (_ : MulAction N α), SMulCommClass M N α where
+  toFun _ :=
+    letI instM := MulAction.compHom α (.inl M N)
+    letI instN := MulAction.compHom α (.inr M N)
+    ⟨instM, instN,
+    { smul_comm := fun m n a ↦ by
+        change (m, (1 : N)) • ((1 : M), n) • a = ((1 : M), n) • (m, (1 : N)) • a
+        simp_rw [smul_smul, Prod.mk_mul_mk, mul_one, one_mul] }⟩
+  invFun _insts :=
+    letI := _insts.1; letI := _insts.2.1; have := _insts.2.2
+    MulAction.prodOfSMulCommClass M N α
+  left_inv := by
+    rintro ⟨-, hsmul⟩; dsimp only; congr; ext ⟨m, n⟩ a
+    change (m, (1 : N)) • ((1 : M), n) • a = _
+    rw [← hsmul, Prod.mk_mul_mk, mul_one, one_mul]; rfl
+  right_inv := by
+    rintro ⟨hM, hN, -⟩
+    dsimp only; congr 1
+    · ext m a; conv_rhs => rw [← hN.one_smul a]; rfl
+    congr 1
+    · funext; congr; ext m a; conv_rhs => rw [← hN.one_smul a]; rfl
+    · congr 1; ext n a; conv_rhs => rw [← hM.one_smul (SMul.smul n a)]; rfl
+    · apply heq_prop
+
+variable [AddMonoid α]
+
+/-- Construct a `DistribMulAction` by a product monoid from `DistribMulAction`s by the factors. -/
+abbrev DistribMulAction.prodOfSMulCommClass [DistribMulAction M α] [DistribMulAction N α]
+    [SMulCommClass M N α] : DistribMulAction (M × N) α where
+  __ := MulAction.prodOfSMulCommClass M N α
+  smul_zero mn := by change mn.1 • mn.2 • 0 = (0 : α); rw [smul_zero, smul_zero]
+  smul_add mn a a' := by change mn.1 • mn.2 • _ = (_ : α); rw [smul_add, smul_add]; rfl
+
+/-- A `DistribMulAction` by a product monoid is equivalent to
+  commuting `DistribMulAction`s by the factors. -/
+def DistribMulAction.prodEquiv : DistribMulAction (M × N) α ≃
+    Σ' (_ : DistribMulAction M α) (_ : DistribMulAction N α), SMulCommClass M N α where
+  toFun _ :=
+    letI instM := DistribMulAction.compHom α (.inl M N)
+    letI instN := DistribMulAction.compHom α (.inr M N)
+    ⟨instM, instN, (MulAction.prodEquiv M N α inferInstance).2.2⟩
+  invFun _insts :=
+    letI := _insts.1; letI := _insts.2.1; have := _insts.2.2
+    DistribMulAction.prodOfSMulCommClass M N α
+  left_inv _ := by
+    dsimp only; congr; ext ⟨m, n⟩ a
+    change (m, (1 : N)) • ((1 : M), n) • a = _
+    rw [smul_smul, Prod.mk_mul_mk, mul_one, one_mul]; rfl
+  right_inv := by
+    rintro ⟨_, x, _⟩
+    dsimp only; congr 1
+    · ext m a; conv_rhs => rw [← one_smul N a]; rfl
+    congr 1
+    · funext i; congr; ext m a; clear i; conv_rhs => rw [← one_smul N a]; rfl
+    · congr 1; ext n a; conv_rhs => rw [← one_smul M (SMul.smul n a)]; rfl
+    · apply heq_prop
+
+end Action_by_Prod
chore: remove trailing space in backticks (#7617)

This will improve spaces in the mathlib4 docs.

Diff
@@ -13,7 +13,7 @@ import Mathlib.GroupTheory.GroupAction.Defs
 This file defines instances for binary product of additive and multiplicative actions and provides
 scalar multiplication as a homomorphism from `α × β` to `β`.
 ## Main declarations
-* `smulMulHom `/`smulMonoidHom `: Scalar multiplication bundled as a multiplicative/monoid
+* `smulMulHom`/`smulMonoidHom`: Scalar multiplication bundled as a multiplicative/monoid
   homomorphism.
 ## See also
 * `Mathlib.GroupTheory.GroupAction.Option`
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -29,6 +29,8 @@ https://leanprover.zulipchat.com/#narrow/near/316087838
 This was not done as part of the port in order to stay as close as possible to the mathlib3 code.
 -/
 
+set_option autoImplicit true
+
 
 variable {M N P E α β : Type*}
 
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
@@ -30,7 +30,7 @@ This was not done as part of the port in order to stay as close as possible to t
 -/
 
 
-variable {M N P E α β : Type _}
+variable {M N P E α β : Type*}
 
 namespace Prod
 
@@ -72,11 +72,11 @@ theorem smul_swap : (a • x).swap = a • x.swap :=
 #align prod.smul_swap Prod.smul_swap
 #align prod.vadd_swap Prod.vadd_swap
 
-theorem smul_zero_mk {α : Type _} [Monoid M] [AddMonoid α] [DistribMulAction M α] (a : M) (c : β) :
+theorem smul_zero_mk {α : Type*} [Monoid M] [AddMonoid α] [DistribMulAction M α] (a : M) (c : β) :
     a • ((0 : α), c) = (0, a • c) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_zero_mk Prod.smul_zero_mk
 
-theorem smul_mk_zero {β : Type _} [Monoid M] [AddMonoid β] [DistribMulAction M β] (a : M) (b : α) :
+theorem smul_mk_zero {β : Type*} [Monoid M] [AddMonoid β] [DistribMulAction M β] (a : M) (b : α) :
     a • (b, (0 : β)) = (a • b, 0) := by rw [Prod.smul_mk, smul_zero]
 #align prod.smul_mk_zero Prod.smul_mk_zero
 
@@ -167,10 +167,10 @@ instance mulAction [Monoid M] [MulAction M α] [MulAction M β] : MulAction M (
   mul_smul _ _ _ := mk.inj_iff.mpr ⟨mul_smul _ _ _, mul_smul _ _ _⟩
   one_smul := fun ⟨_, _⟩ => mk.inj_iff.mpr ⟨one_smul _ _, one_smul _ _⟩
 
-instance smulZeroClass {R M N : Type _} [Zero M] [Zero N] [SMulZeroClass R M] [SMulZeroClass R N] :
+instance smulZeroClass {R M N : Type*} [Zero M] [Zero N] [SMulZeroClass R M] [SMulZeroClass R N] :
     SMulZeroClass R (M × N) where smul_zero _ := mk.inj_iff.mpr ⟨smul_zero _, smul_zero _⟩
 
-instance distribSMul {R M N : Type _} [AddZeroClass M] [AddZeroClass N] [DistribSMul R M]
+instance distribSMul {R M N : Type*} [AddZeroClass M] [AddZeroClass N] [DistribSMul R M]
     [DistribSMul R N] : DistribSMul R (M × N) where
   smul_add _ _ _ := mk.inj_iff.mpr ⟨smul_add _ _ _, smul_add _ _ _⟩
 
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,14 +2,12 @@
 Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
-! This file was ported from Lean 3 source module group_theory.group_action.prod
-! leanprover-community/mathlib commit aba57d4d3dae35460225919dcd82fe91355162f9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Group.Prod
 import Mathlib.GroupTheory.GroupAction.Defs
 
+#align_import group_theory.group_action.prod from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9"
+
 /-!
 # Prod instances for additive and multiplicative actions
 This file defines instances for binary product of additive and multiplicative actions and provides
perf: improve performance of to_additive (#3632)
  • applyReplacementFun now treats applications f x_1 ... x_n as atomic, and recurses directly into f and x_i (before it recursed on the partial appliations f x_1 ... x_j)
  • I had to reimplement the way to_additive reorders arguments, so at the same time I also made it more flexible. We can now reorder with an arbitrary permutation, and you have to specify this by providing a permutation using cycle notation (e.g. (reorder := 1 2 3, 8 9) means we're permuting the first three arguments and swapping arguments 8 and 9). This implements the first item of #1074.
  • additiveTest now memorizes the test on previously-visited subexpressions. Thanks to @kmill for this suggestion!

The performance on (one of) the slowest declaration(s) to additivize (MonoidLocalization.lift) is summarized below (note: dsimp only refers to adding a single dsimp only tactic in the declaration, which was done in #3580)

original: 27400ms
better applyReplacementFun: 1550ms
better applyReplacementFun + better additiveTest: 176ms

dsimp only: 6710ms
better applyReplacementFun + dsimp only: 425ms
better applyReplacementFun + better additiveTest + dsimp only: 128ms
Diff
@@ -89,12 +89,12 @@ instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_pow Prod.pow
 #align prod.has_smul Prod.smul
 
-@[to_additive existing (attr := simp) (reorder := 6) smul_fst]
+@[to_additive existing (attr := simp) (reorder := 6 7) smul_fst]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 
-@[to_additive existing (attr := simp) (reorder := 6) smul_snd]
+@[to_additive existing (attr := simp) (reorder := 6 7) smul_snd]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
@@ -102,17 +102,17 @@ theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
-@[to_additive existing (attr := simp) (reorder := 6) smul_mk]
+@[to_additive existing (attr := simp) (reorder := 6 7) smul_mk]
 theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b ^ c) :=
   rfl
 #align prod.pow_mk Prod.pow_mk
 
-@[to_additive existing (reorder := 6) smul_def]
+@[to_additive existing (reorder := 6 7) smul_def]
 theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 
-@[to_additive existing (attr := simp) (reorder := 6) smul_swap]
+@[to_additive existing (attr := simp) (reorder := 6 7) smul_swap]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).swap = p.swap ^ c :=
   rfl
 #align prod.pow_swap Prod.pow_swap
chore: bump to nightly-2023-04-11 (#3139)
Diff
@@ -165,7 +165,7 @@ instance isScalarTowerBoth [Mul N] [Mul P] [SMul M N] [SMul M P] [IsScalarTower
 #align prod.is_scalar_tower_both Prod.isScalarTowerBoth
 
 @[to_additive]
-instance mulAction {_ : Monoid M} [MulAction M α] [MulAction M β] : MulAction M (α × β) where
+instance mulAction [Monoid M] [MulAction M α] [MulAction M β] : MulAction M (α × β) where
   mul_smul _ _ _ := mk.inj_iff.mpr ⟨mul_smul _ _ _, mul_smul _ _ _⟩
   one_smul := fun ⟨_, _⟩ => mk.inj_iff.mpr ⟨one_smul _ _, one_smul _ _⟩
 
@@ -176,11 +176,11 @@ instance distribSMul {R M N : Type _} [AddZeroClass M] [AddZeroClass N] [Distrib
     [DistribSMul R N] : DistribSMul R (M × N) where
   smul_add _ _ _ := mk.inj_iff.mpr ⟨smul_add _ _ _, smul_add _ _ _⟩
 
-instance distribMulAction {R M N : Type _} {_ : Monoid R} [AddMonoid M] [AddMonoid N]
+instance distribMulAction [Monoid R] [AddMonoid M] [AddMonoid N]
     [DistribMulAction R M] [DistribMulAction R N] : DistribMulAction R (M × N) :=
   { Prod.mulAction, Prod.distribSMul with }
 
-instance mulDistribMulAction {R M N : Type _} {_ : Monoid R} [Monoid M] [Monoid N]
+instance mulDistribMulAction [Monoid R] [Monoid M] [Monoid N]
     [MulDistribMulAction R M] [MulDistribMulAction R N] : MulDistribMulAction R (M × N) where
   smul_mul _ _ _ := mk.inj_iff.mpr ⟨smul_mul' _ _ _, smul_mul' _ _ _⟩
   smul_one _ := mk.inj_iff.mpr ⟨smul_one _, smul_one _⟩
chore: Missing to_additive on CommSemigroup.isCentralScalar (#2344)

The SHA was already updated in #2498, but the #align was forgotten, and the instance name was incorrectly generated.

Match https://github.com/leanprover-community/mathlib/pull/16975.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -127,10 +127,12 @@ instance smulCommClass [SMulCommClass M N α] [SMulCommClass M N β] :
     SMulCommClass M N (α × β) where
   smul_comm _ _ _ := mk.inj_iff.mpr ⟨smul_comm _ _ _, smul_comm _ _ _⟩
 
-@[to_additive isCentralVAdd]
+@[to_additive]
 instance isCentralScalar [SMul Mᵐᵒᵖ α] [SMul Mᵐᵒᵖ β] [IsCentralScalar M α] [IsCentralScalar M β] :
     IsCentralScalar M (α × β) :=
   ⟨fun _ _ => Prod.ext (op_smul_eq_smul _ _) (op_smul_eq_smul _ _)⟩
+#align prod.is_central_scalar Prod.isCentralScalar
+#align prod.is_central_vadd Prod.isCentralVAdd
 
 @[to_additive]
 instance faithfulSMulLeft [FaithfulSMul M α] [Nonempty β] : FaithfulSMul M (α × β) :=
feat: add to_additive linter checking whether additive decl exists (#1881)
  • Force the user to specify whether the additive declaration already exists.
  • Will raise a linter error if the user specified it wrongly
  • Requested on Zulip
Diff
@@ -84,17 +84,17 @@ theorem smul_mk_zero {β : Type _} [Monoid M] [AddMonoid β] [DistribMulAction M
 
 variable [Pow α E] [Pow β E]
 
-@[to_additive smul]
+@[to_additive existing smul]
 instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_pow Prod.pow
 #align prod.has_smul Prod.smul
 
-@[to_additive (attr := simp) (reorder := 6) smul_fst]
+@[to_additive existing (attr := simp) (reorder := 6) smul_fst]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 
-@[to_additive (attr := simp) (reorder := 6) smul_snd]
+@[to_additive existing (attr := simp) (reorder := 6) smul_snd]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
@@ -102,17 +102,17 @@ theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
-@[to_additive (attr := simp) (reorder := 6) smul_mk]
+@[to_additive existing (attr := simp) (reorder := 6) smul_mk]
 theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b ^ c) :=
   rfl
 #align prod.pow_mk Prod.pow_mk
 
-@[to_additive (reorder := 6) smul_def]
+@[to_additive existing (reorder := 6) smul_def]
 theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 
-@[to_additive (attr := simp) (reorder := 6) smul_swap]
+@[to_additive existing (attr := simp) (reorder := 6) smul_swap]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).swap = p.swap ^ c :=
   rfl
 #align prod.pow_swap Prod.pow_swap
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -196,6 +196,7 @@ def smulMulHom [Monoid α] [Mul β] [MulAction α β] [IsScalarTower α β β] [
   toFun a := a.1 • a.2
   map_mul' _ _ := (smul_mul_smul _ _ _ _).symm
 #align smul_mul_hom smulMulHom
+#align smul_mul_hom_apply smulMulHom_apply
 
 /-- Scalar multiplication as a monoid homomorphism. -/
 @[simps]
@@ -203,5 +204,6 @@ def smulMonoidHom [Monoid α] [MulOneClass β] [MulAction α β] [IsScalarTower
     [SMulCommClass α β β] : α × β →* β :=
   { smulMulHom with map_one' := one_smul _ _ }
 #align smul_monoid_hom smulMonoidHom
+#align smul_monoid_hom_apply smulMonoidHom_apply
 
 end BundledSMul
chore: add #align statements for to_additive decls (#1816)

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

Diff
@@ -87,6 +87,7 @@ variable [Pow α E] [Pow β E]
 @[to_additive smul]
 instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_pow Prod.pow
+#align prod.has_smul Prod.smul
 
 @[to_additive (attr := simp) (reorder := 6) smul_fst]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
fix: to_additive translates pow to nsmul (#1502)
  • I tried translating it to smul in #715, but that was a bad decision
  • It is possible that some lemmas that want to be called smul now use nsmul. This doesn't raise an error unless they are aligned or explicitly used elsewhere.
  • Rename some lemmas from smul to nsmul.
  • Zulip

Co-authored-by: Reid Barton <rwbarton@gmail.com>

Diff
@@ -84,16 +84,16 @@ theorem smul_mk_zero {β : Type _} [Monoid M] [AddMonoid β] [DistribMulAction M
 
 variable [Pow α E] [Pow β E]
 
-@[to_additive]
+@[to_additive smul]
 instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_pow Prod.pow
 
-@[to_additive (attr := simp) (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6) smul_fst]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 
-@[to_additive (attr := simp) (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6) smul_snd]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
@@ -101,17 +101,17 @@ theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
-@[to_additive (attr := simp) (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6) smul_mk]
 theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b ^ c) :=
   rfl
 #align prod.pow_mk Prod.pow_mk
 
-@[to_additive (reorder := 6)]
+@[to_additive (reorder := 6) smul_def]
 theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 
-@[to_additive (attr := simp) (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6) smul_swap]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).swap = p.swap ^ c :=
   rfl
 #align prod.pow_swap Prod.pow_swap
feat: improve the way to_additive deals with attributes (#1314)
  • The new syntax for any attributes that need to be copied by to_additive is @[to_additive (attrs := simp, ext, simps)]
  • Adds the auxiliary declarations generated by the simp and simps attributes to the to_additive-dictionary.
  • Future issue: Does not yet translate auxiliary declarations for other attributes (including custom simp-attributes). In particular it's possible that norm_cast might generate some auxiliary declarations.
  • Fixes #950
  • Fixes #953
  • Fixes #1149
  • This moves the interaction between to_additive and simps from the Simps file to the toAdditive file for uniformity.
  • Make the same changes to @[reassoc]

Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -44,19 +44,19 @@ variable [SMul M α] [SMul M β] [SMul N α] [SMul N β] (a : M) (x : α × β)
 instance smul : SMul M (α × β) :=
   ⟨fun a p => (a • p.1, a • p.2)⟩
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem smul_fst : (a • x).1 = a • x.1 :=
   rfl
 #align prod.smul_fst Prod.smul_fst
 #align prod.vadd_fst Prod.vadd_fst
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem smul_snd : (a • x).2 = a • x.2 :=
   rfl
 #align prod.smul_snd Prod.smul_snd
 #align prod.vadd_snd Prod.vadd_snd
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem smul_mk (a : M) (b : α) (c : β) : a • (b, c) = (a • b, a • c) :=
   rfl
 #align prod.smul_mk Prod.smul_mk
@@ -68,7 +68,7 @@ theorem smul_def (a : M) (x : α × β) : a • x = (a • x.1, a • x.2) :=
 #align prod.smul_def Prod.smul_def
 #align prod.vadd_def Prod.vadd_def
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem smul_swap : (a • x).swap = a • x.swap :=
   rfl
 #align prod.smul_swap Prod.smul_swap
@@ -88,12 +88,12 @@ variable [Pow α E] [Pow β E]
 instance pow : Pow (α × β) E where pow p c := (p.1 ^ c, p.2 ^ c)
 #align prod.has_pow Prod.pow
 
-@[simp, to_additive (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6)]
 theorem pow_fst (p : α × β) (c : E) : (p ^ c).fst = p.fst ^ c :=
   rfl
 #align prod.pow_fst Prod.pow_fst
 
-@[simp, to_additive (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6)]
 theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
   rfl
 #align prod.pow_snd Prod.pow_snd
@@ -101,7 +101,7 @@ theorem pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c :=
 /- Note that the `c` arguments to this lemmas cannot be in the more natural right-most positions due
 to limitations in `to_additive` and `to_additive_reorder`, which will silently fail to reorder more
 than two adjacent arguments -/
-@[simp, to_additive (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6)]
 theorem pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b ^ c) :=
   rfl
 #align prod.pow_mk Prod.pow_mk
@@ -111,7 +111,7 @@ theorem pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c) :=
   rfl
 #align prod.pow_def Prod.pow_def
 
-@[simp, to_additive (reorder := 6)]
+@[to_additive (attr := simp) (reorder := 6)]
 theorem pow_swap (p : α × β) (c : E) : (p ^ c).swap = p.swap ^ c :=
   rfl
 #align prod.pow_swap Prod.pow_swap
chore: fix casing per naming scheme (#1183)

Fix a lot of wrong casing mostly in the docstrings but also sometimes in def/theorem names. E.g. fin 2 --> Fin 2, add_monoid_hom --> AddMonoidHom

Remove \n from to_additive docstrings that were inserted by mathport.

Move files and directories with Gcd and Smul to GCD and SMul

Diff
@@ -186,7 +186,7 @@ end Prod
 
 /-! ### Scalar multiplication as a homomorphism -/
 
-section BundledSmul
+section BundledSMul
 
 /-- Scalar multiplication as a multiplicative homomorphism. -/
 @[simps]
@@ -203,4 +203,4 @@ def smulMonoidHom [Monoid α] [MulOneClass β] [MulAction α β] [IsScalarTower
   { smulMulHom with map_one' := one_smul _ _ }
 #align smul_monoid_hom smulMonoidHom
 
-end BundledSmul
+end BundledSMul
feat: Port GroupTheory.GroupAction.Prod (#1056)

mathlib3 SHA: aba57d4d

Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>

Dependencies 46

47 files ported (100.0%)
19535 lines ported (100.0%)

All dependencies are ported!