data.pi.algebraMathlib.Algebra.Group.Pi.Basic

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -69,12 +69,12 @@ theorem one_def [∀ i, One <| f i] : (1 : ∀ i, f i) = fun i => 1 :=
 #align pi.zero_def Pi.zero_def
 -/
 
-#print Pi.const_one /-
+#print Function.const_one /-
 @[simp, to_additive]
 theorem const_one [One β] : const α (1 : β) = 1 :=
   rfl
-#align pi.const_one Pi.const_one
-#align pi.const_zero Pi.const_zero
+#align pi.const_one Function.const_one
+#align pi.const_zero Function.const_zero
 -/
 
 #print Pi.one_comp /-
@@ -117,12 +117,12 @@ theorem mul_def [∀ i, Mul <| f i] : x * y = fun i => x i * y i :=
 #align pi.add_def Pi.add_def
 -/
 
-#print Pi.const_mul /-
+#print Function.const_mul /-
 @[simp, to_additive]
 theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) :=
   rfl
-#align pi.const_mul Pi.const_mul
-#align pi.const_add Pi.const_add
+#align pi.const_mul Function.const_mul
+#align pi.const_add Function.const_add
 -/
 
 #print Pi.mul_comp /-
@@ -157,12 +157,12 @@ theorem smul_def [∀ i, SMul α <| f i] (s : α) (x : ∀ i, f i) : s • x = f
 #align pi.vadd_def Pi.vadd_def
 -/
 
-#print Pi.smul_const /-
+#print Function.smul_const /-
 @[simp, to_additive]
 theorem smul_const [SMul α β] (a : α) (b : β) : a • const I b = const I (a • b) :=
   rfl
-#align pi.smul_const Pi.smul_const
-#align pi.vadd_const Pi.vadd_const
+#align pi.smul_const Function.smul_const
+#align pi.vadd_const Function.vadd_const
 -/
 
 #print Pi.smul_comp /-
@@ -195,13 +195,13 @@ theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i
 #align pi.smul_def Pi.smul_def
 -/
 
-#print Pi.const_pow /-
+#print Function.const_pow /-
 -- `to_additive` generates bad output if we take `has_pow α β`.
 @[simp, to_additive smul_const, to_additive_reorder 5]
 theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a) :=
   rfl
-#align pi.const_pow Pi.const_pow
-#align pi.smul_const Pi.smul_const
+#align pi.const_pow Function.const_pow
+#align pi.smul_const Function.smul_const
 -/
 
 #print Pi.pow_comp /-
@@ -250,12 +250,12 @@ theorem inv_def [∀ i, Inv <| f i] : x⁻¹ = fun i => (x i)⁻¹ :=
 #align pi.neg_def Pi.neg_def
 -/
 
-#print Pi.const_inv /-
+#print Function.const_inv /-
 @[to_additive]
 theorem const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ :=
   rfl
-#align pi.const_inv Pi.const_inv
-#align pi.const_neg Pi.const_neg
+#align pi.const_inv Function.const_inv
+#align pi.const_neg Function.const_neg
 -/
 
 #print Pi.inv_comp /-
@@ -298,12 +298,12 @@ theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x
 #align pi.sub_comp Pi.sub_comp
 -/
 
-#print Pi.const_div /-
+#print Function.const_div /-
 @[simp, to_additive]
 theorem const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) :=
   rfl
-#align pi.const_div Pi.const_div
-#align pi.const_sub Pi.const_sub
+#align pi.const_div Function.const_div
+#align pi.const_sub Function.const_sub
 -/
 
 section
Diff
@@ -3,14 +3,14 @@ Copyright (c) 2020 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
 -/
-import Mathbin.Tactic.ToAdditive
-import Mathbin.Algebra.Group.Defs
-import Mathbin.Logic.Unique
-import Mathbin.Tactic.Congr
-import Mathbin.Tactic.Simpa
-import Mathbin.Tactic.SplitIfs
-import Mathbin.Data.Sum.Basic
-import Mathbin.Data.Prod.Basic
+import Tactic.ToAdditive
+import Algebra.Group.Defs
+import Logic.Unique
+import Tactic.Congr
+import Tactic.Simpa
+import Tactic.SplitIfs
+import Data.Sum.Basic
+import Data.Prod.Basic
 
 #align_import data.pi.algebra from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2020 Eric Wieser. 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 data.pi.algebra
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Tactic.ToAdditive
 import Mathbin.Algebra.Group.Defs
@@ -17,6 +12,8 @@ import Mathbin.Tactic.SplitIfs
 import Mathbin.Data.Sum.Basic
 import Mathbin.Data.Prod.Basic
 
+#align_import data.pi.algebra from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Instances and theorems on pi types
 
Diff
@@ -80,17 +80,21 @@ theorem const_one [One β] : const α (1 : β) = 1 :=
 #align pi.const_zero Pi.const_zero
 -/
 
+#print Pi.one_comp /-
 @[simp, to_additive]
 theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
   rfl
 #align pi.one_comp Pi.one_comp
 #align pi.zero_comp Pi.zero_comp
+-/
 
+#print Pi.comp_one /-
 @[simp, to_additive]
 theorem comp_one [One β] (x : β → γ) : x ∘ 1 = const α (x 1) :=
   rfl
 #align pi.comp_one Pi.comp_one
 #align pi.comp_zero Pi.comp_zero
+-/
 
 #print Pi.instMul /-
 @[to_additive]
@@ -124,11 +128,13 @@ theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a *
 #align pi.const_add Pi.const_add
 -/
 
+#print Pi.mul_comp /-
 @[to_additive]
 theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z :=
   rfl
 #align pi.mul_comp Pi.mul_comp
 #align pi.add_comp Pi.add_comp
+-/
 
 #print Pi.instSMul /-
 @[to_additive Pi.instVAdd]
@@ -138,29 +144,37 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 #align pi.has_vadd Pi.instVAdd
 -/
 
+#print Pi.smul_apply /-
 @[simp, to_additive]
 theorem smul_apply [∀ i, SMul α <| f i] (s : α) (x : ∀ i, f i) (i : I) : (s • x) i = s • x i :=
   rfl
 #align pi.smul_apply Pi.smul_apply
 #align pi.vadd_apply Pi.vadd_apply
+-/
 
+#print Pi.smul_def /-
 @[to_additive]
 theorem smul_def [∀ i, SMul α <| f i] (s : α) (x : ∀ i, f i) : s • x = fun i => s • x i :=
   rfl
 #align pi.smul_def Pi.smul_def
 #align pi.vadd_def Pi.vadd_def
+-/
 
+#print Pi.smul_const /-
 @[simp, to_additive]
 theorem smul_const [SMul α β] (a : α) (b : β) : a • const I b = const I (a • b) :=
   rfl
 #align pi.smul_const Pi.smul_const
 #align pi.vadd_const Pi.vadd_const
+-/
 
+#print Pi.smul_comp /-
 @[to_additive]
 theorem smul_comp [SMul α γ] (a : α) (x : β → γ) (y : I → β) : (a • x) ∘ y = a • x ∘ y :=
   rfl
 #align pi.smul_comp Pi.smul_comp
 #align pi.vadd_comp Pi.vadd_comp
+-/
 
 @[to_additive Pi.instSMul]
 instance hasPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
@@ -168,30 +182,38 @@ instance hasPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
 #align pi.has_pow Pi.hasPow
 #align pi.has_smul Pi.instSMul
 
+#print Pi.pow_apply /-
 @[simp, to_additive Pi.smul_apply, to_additive_reorder 5]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 #align pi.pow_apply Pi.pow_apply
 #align pi.smul_apply Pi.smul_apply
+-/
 
+#print Pi.pow_def /-
 @[to_additive Pi.smul_def, to_additive_reorder 5]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
 #align pi.pow_def Pi.pow_def
 #align pi.smul_def Pi.smul_def
+-/
 
+#print Pi.const_pow /-
 -- `to_additive` generates bad output if we take `has_pow α β`.
 @[simp, to_additive smul_const, to_additive_reorder 5]
 theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a) :=
   rfl
 #align pi.const_pow Pi.const_pow
 #align pi.smul_const Pi.smul_const
+-/
 
+#print Pi.pow_comp /-
 @[to_additive smul_comp, to_additive_reorder 6]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
 #align pi.pow_comp Pi.pow_comp
 #align pi.smul_comp Pi.smul_comp
+-/
 
 #print Pi.bit0_apply /-
 @[simp]
@@ -239,11 +261,13 @@ theorem const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ :=
 #align pi.const_neg Pi.const_neg
 -/
 
+#print Pi.inv_comp /-
 @[to_additive]
 theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹ :=
   rfl
 #align pi.inv_comp Pi.inv_comp
 #align pi.neg_comp Pi.neg_comp
+-/
 
 #print Pi.instDiv /-
 @[to_additive]
@@ -269,11 +293,13 @@ theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i :=
 #align pi.sub_def Pi.sub_def
 -/
 
+#print Pi.div_comp /-
 @[to_additive]
 theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z :=
   rfl
 #align pi.div_comp Pi.div_comp
 #align pi.sub_comp Pi.sub_comp
+-/
 
 #print Pi.const_div /-
 @[simp, to_additive]
@@ -331,6 +357,7 @@ theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
 #align pi.single_zero Pi.single_zero
 -/
 
+#print Pi.mulSingle_apply /-
 /-- On non-dependent functions, `pi.mul_single` can be expressed as an `ite` -/
 @[to_additive "On non-dependent functions, `pi.single` can be expressed as an `ite`"]
 theorem mulSingle_apply {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
@@ -338,13 +365,16 @@ theorem mulSingle_apply {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
   Function.update_apply 1 i x i'
 #align pi.mul_single_apply Pi.mulSingle_apply
 #align pi.single_apply Pi.single_apply
+-/
 
+#print Pi.mulSingle_comm /-
 /-- On non-dependent functions, `pi.mul_single` is symmetric in the two indices. -/
 @[to_additive "On non-dependent functions, `pi.single` is symmetric in the two\nindices."]
 theorem mulSingle_comm {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
     mulSingle i x i' = mulSingle i' x i := by simp [mul_single_apply, eq_comm]
 #align pi.mul_single_comm Pi.mulSingle_comm
 #align pi.single_comm Pi.single_comm
+-/
 
 #print Pi.apply_mulSingle /-
 @[to_additive]
@@ -367,13 +397,16 @@ theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i
 #align pi.apply_single₂ Pi.apply_single₂
 -/
 
+#print Pi.mulSingle_op /-
 @[to_additive]
 theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i → g i) (h : ∀ i, op i 1 = 1)
     (i : I) (x : f i) : mulSingle i (op i x) = fun j => op j (mulSingle i x j) :=
   Eq.symm <| funext <| apply_mulSingle op h i x
 #align pi.mul_single_op Pi.mulSingle_op
 #align pi.single_op Pi.single_op
+-/
 
+#print Pi.mulSingle_op₂ /-
 @[to_additive]
 theorem mulSingle_op₂ {g₁ g₂ : I → Type _} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
     (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
@@ -381,6 +414,7 @@ theorem mulSingle_op₂ {g₁ g₂ : I → Type _} [∀ i, One (g₁ i)] [∀ i,
   Eq.symm <| funext <| apply_mulSingle₂ op h i x₁ x₂
 #align pi.mul_single_op₂ Pi.mulSingle_op₂
 #align pi.single_op₂ Pi.single_op₂
+-/
 
 variable (f)
 
@@ -410,15 +444,19 @@ protected def prod (f' : ∀ i, f i) (g' : ∀ i, g i) (i : I) : f i × g i :=
 #align pi.prod Pi.prod
 -/
 
+#print Pi.prod_fst_snd /-
 @[simp]
 theorem prod_fst_snd : Pi.prod (Prod.fst : α × β → α) (Prod.snd : α × β → β) = id :=
   funext fun _ => Prod.mk.eta
 #align pi.prod_fst_snd Pi.prod_fst_snd
+-/
 
+#print Pi.prod_snd_fst /-
 @[simp]
 theorem prod_snd_fst : Pi.prod (Prod.snd : α × β → β) (Prod.fst : α × β → α) = Prod.swap :=
   rfl
 #align pi.prod_snd_fst Pi.prod_snd_fst
+-/
 
 end Pi
 
@@ -496,54 +534,68 @@ def uniqueOfSurjectiveOne (α : Type _) {β : Type _} [One β] (h : Function.Sur
 #align unique_of_surjective_zero uniqueOfSurjectiveZero
 -/
 
+#print Subsingleton.pi_mulSingle_eq /-
 @[to_additive Subsingleton.pi_single_eq]
 theorem Subsingleton.pi_mulSingle_eq {α : Type _} [DecidableEq I] [Subsingleton I] [One α] (i : I)
     (x : α) : Pi.mulSingle i x = fun _ => x :=
   funext fun j => by rw [Subsingleton.elim j i, Pi.mulSingle_eq_same]
 #align subsingleton.pi_mul_single_eq Subsingleton.pi_mulSingle_eq
 #align subsingleton.pi_single_eq Subsingleton.pi_single_eq
+-/
 
 namespace Sum
 
 variable (a a' : α → γ) (b b' : β → γ)
 
+#print Sum.elim_one_one /-
 @[simp, to_additive]
 theorem elim_one_one [One γ] : Sum.elim (1 : α → γ) (1 : β → γ) = 1 :=
   Sum.elim_const_const 1
 #align sum.elim_one_one Sum.elim_one_one
 #align sum.elim_zero_zero Sum.elim_zero_zero
+-/
 
+#print Sum.elim_mulSingle_one /-
 @[simp, to_additive]
 theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (c : γ) :
     Sum.elim (Pi.mulSingle i c) (1 : β → γ) = Pi.mulSingle (Sum.inl i) c := by
   simp only [Pi.mulSingle, Sum.elim_update_left, elim_one_one]
 #align sum.elim_mul_single_one Sum.elim_mulSingle_one
 #align sum.elim_single_zero Sum.elim_single_zero
+-/
 
+#print Sum.elim_one_mulSingle /-
 @[simp, to_additive]
 theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (c : γ) :
     Sum.elim (1 : α → γ) (Pi.mulSingle i c) = Pi.mulSingle (Sum.inr i) c := by
   simp only [Pi.mulSingle, Sum.elim_update_right, elim_one_one]
 #align sum.elim_one_mul_single Sum.elim_one_mulSingle
 #align sum.elim_zero_single Sum.elim_zero_single
+-/
 
+#print Sum.elim_inv_inv /-
 @[to_additive]
 theorem elim_inv_inv [Inv γ] : Sum.elim a⁻¹ b⁻¹ = (Sum.elim a b)⁻¹ :=
   (Sum.comp_elim Inv.inv a b).symm
 #align sum.elim_inv_inv Sum.elim_inv_inv
 #align sum.elim_neg_neg Sum.elim_neg_neg
+-/
 
+#print Sum.elim_mul_mul /-
 @[to_additive]
 theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b' := by
   ext x; cases x <;> rfl
 #align sum.elim_mul_mul Sum.elim_mul_mul
 #align sum.elim_add_add Sum.elim_add_add
+-/
 
+#print Sum.elim_div_div /-
 @[to_additive]
 theorem elim_div_div [Div γ] : Sum.elim (a / a') (b / b') = Sum.elim a b / Sum.elim a' b' := by
   ext x; cases x <;> rfl
 #align sum.elim_div_div Sum.elim_div_div
 #align sum.elim_sub_sub Sum.elim_sub_sub
+-/
 
 end Sum
 
Diff
@@ -438,7 +438,7 @@ theorem extend_one [One γ] (f : α → β) : Function.extend f (1 : α → γ)
 @[to_additive]
 theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
     Function.extend f (g₁ * g₂) (e₁ * e₂) = Function.extend f g₁ e₁ * Function.extend f g₂ e₂ :=
-  funext fun _ => by convert(apply_dite₂ (· * ·) _ _ _ _ _).symm
+  funext fun _ => by convert (apply_dite₂ (· * ·) _ _ _ _ _).symm
 #align function.extend_mul Function.extend_mul
 #align function.extend_add Function.extend_add
 -/
@@ -447,7 +447,7 @@ theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
 @[to_additive]
 theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
     Function.extend f g⁻¹ e⁻¹ = (Function.extend f g e)⁻¹ :=
-  funext fun _ => by convert(apply_dite Inv.inv _ _ _).symm
+  funext fun _ => by convert (apply_dite Inv.inv _ _ _).symm
 #align function.extend_inv Function.extend_inv
 #align function.extend_neg Function.extend_neg
 -/
@@ -456,7 +456,7 @@ theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
 @[to_additive]
 theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
     Function.extend f (g₁ / g₂) (e₁ / e₂) = Function.extend f g₁ e₁ / Function.extend f g₂ e₂ :=
-  funext fun _ => by convert(apply_dite₂ (· / ·) _ _ _ _ _).symm
+  funext fun _ => by convert (apply_dite₂ (· / ·) _ _ _ _ _).symm
 #align function.extend_div Function.extend_div
 #align function.extend_sub Function.extend_sub
 -/
Diff
@@ -80,24 +80,12 @@ theorem const_one [One β] : const α (1 : β) = 1 :=
 #align pi.const_zero Pi.const_zero
 -/
 
-/- warning: pi.one_comp -> Pi.one_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : One.{u3} γ] (x : α -> β), Eq.{max (succ u1) (succ u3)} (α -> γ) (Function.comp.{succ u1, succ u2, succ u3} α β γ (OfNat.ofNat.{max u2 u3} (β -> γ) 1 (OfNat.mk.{max u2 u3} (β -> γ) 1 (One.one.{max u2 u3} (β -> γ) (Pi.instOne.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))))) x) (OfNat.ofNat.{max u1 u3} (α -> γ) 1 (OfNat.mk.{max u1 u3} (α -> γ) 1 (One.one.{max u1 u3} (α -> γ) (Pi.instOne.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : One.{u3} γ] (x : α -> β), Eq.{max (succ u2) (succ u3)} (α -> γ) (Function.comp.{succ u2, succ u1, succ u3} α β γ (OfNat.ofNat.{max u1 u3} (β -> γ) 1 (One.toOfNat1.{max u1 u3} (β -> γ) (Pi.instOne.{u1, u3} β (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.301 : β) => γ) (fun (i : β) => _inst_1)))) x) (OfNat.ofNat.{max u2 u3} (α -> γ) 1 (One.toOfNat1.{max u2 u3} (α -> γ) (Pi.instOne.{u2, u3} α (fun (a._@.Init.Prelude._hyg.25 : α) => γ) (fun (i : α) => _inst_1))))
-Case conversion may be inaccurate. Consider using '#align pi.one_comp Pi.one_compₓ'. -/
 @[simp, to_additive]
 theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
   rfl
 #align pi.one_comp Pi.one_comp
 #align pi.zero_comp Pi.zero_comp
 
-/- warning: pi.comp_one -> Pi.comp_one is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : One.{u2} β] (x : β -> γ), Eq.{max (succ u1) (succ u3)} (α -> γ) (Function.comp.{succ u1, succ u2, succ u3} α β γ x (OfNat.ofNat.{max u1 u2} (α -> β) 1 (OfNat.mk.{max u1 u2} (α -> β) 1 (One.one.{max u1 u2} (α -> β) (Pi.instOne.{u1, u2} α (fun (ᾰ : α) => β) (fun (i : α) => _inst_1)))))) (Function.const.{succ u3, succ u1} γ α (x (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u3}} {γ : Type.{u1}} [_inst_1 : One.{u3} β] (x : β -> γ), Eq.{max (succ u2) (succ u1)} (α -> γ) (Function.comp.{succ u2, succ u3, succ u1} α β γ x (OfNat.ofNat.{max u2 u3} (α -> β) 1 (One.toOfNat1.{max u2 u3} (α -> β) (Pi.instOne.{u2, u3} α (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.349 : α) => β) (fun (i : α) => _inst_1))))) (Function.const.{succ u1, succ u2} γ α (x (OfNat.ofNat.{u3} β 1 (One.toOfNat1.{u3} β _inst_1))))
-Case conversion may be inaccurate. Consider using '#align pi.comp_one Pi.comp_oneₓ'. -/
 @[simp, to_additive]
 theorem comp_one [One β] (x : β → γ) : x ∘ 1 = const α (x 1) :=
   rfl
@@ -136,12 +124,6 @@ theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a *
 #align pi.const_add Pi.const_add
 -/
 
-/- warning: pi.mul_comp -> Pi.mul_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : Mul.{u3} γ] (x : β -> γ) (y : β -> γ) (z : α -> β), Eq.{max (succ u1) (succ u3)} (α -> γ) (Function.comp.{succ u1, succ u2, succ u3} α β γ (HMul.hMul.{max u2 u3, max u2 u3, max u2 u3} (β -> γ) (β -> γ) (β -> γ) (instHMul.{max u2 u3} (β -> γ) (Pi.instMul.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x y) z) (HMul.hMul.{max u1 u3, max u1 u3, max u1 u3} (α -> γ) (α -> γ) (α -> γ) (instHMul.{max u1 u3} (α -> γ) (Pi.instMul.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) (Function.comp.{succ u1, succ u2, succ u3} α β γ x z) (Function.comp.{succ u1, succ u2, succ u3} α β γ y z))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : Mul.{u3} γ] (x : β -> γ) (y : β -> γ) (z : α -> β), Eq.{max (succ u2) (succ u3)} (α -> γ) (Function.comp.{succ u2, succ u1, succ u3} α β γ (HMul.hMul.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHMul.{max u1 u3} (β -> γ) (Pi.instMul.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x y) z) (HMul.hMul.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHMul.{max u2 u3} (α -> γ) (Pi.instMul.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) (Function.comp.{succ u2, succ u1, succ u3} α β γ x z) (Function.comp.{succ u2, succ u1, succ u3} α β γ y z))
-Case conversion may be inaccurate. Consider using '#align pi.mul_comp Pi.mul_compₓ'. -/
 @[to_additive]
 theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z :=
   rfl
@@ -156,48 +138,24 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 #align pi.has_vadd Pi.instVAdd
 -/
 
-/- warning: pi.smul_apply -> Pi.smul_apply is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u3}} {f : I -> Type.{u2}} [_inst_1 : forall (i : I), SMul.{u3, u2} α (f i)] (s : α) (x : forall (i : I), f i) (i : I), Eq.{succ u2} (f i) (SMul.smul.{u3, max u1 u2} α (forall (i : I), f i) (Pi.instSMul.{u1, u2, u3} I α (fun (i : I) => f i) (fun (i : I) => _inst_1 i)) s x i) (SMul.smul.{u3, u2} α (f i) (_inst_1 i) s (x i))
-but is expected to have type
-  forall {I : Type.{u2}} {α : Type.{u1}} {f : I -> Type.{u3}} [_inst_1 : forall (i : I), SMul.{u1, u3} α (f i)] (s : α) (x : forall (i : I), f i) (i : I), Eq.{succ u3} (f i) (HSMul.hSMul.{u1, max u2 u3, max u2 u3} α (forall (i : I), f i) (forall (i : I), f i) (instHSMul.{u1, max u2 u3} α (forall (i : I), f i) (Pi.instSMul.{u2, u3, u1} I α (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) s x i) (HSMul.hSMul.{u1, u3, u3} α (f i) (f i) (instHSMul.{u1, u3} α (f i) (_inst_1 i)) s (x i))
-Case conversion may be inaccurate. Consider using '#align pi.smul_apply Pi.smul_applyₓ'. -/
 @[simp, to_additive]
 theorem smul_apply [∀ i, SMul α <| f i] (s : α) (x : ∀ i, f i) (i : I) : (s • x) i = s • x i :=
   rfl
 #align pi.smul_apply Pi.smul_apply
 #align pi.vadd_apply Pi.vadd_apply
 
-/- warning: pi.smul_def -> Pi.smul_def is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u3}} {f : I -> Type.{u2}} [_inst_1 : forall (i : I), SMul.{u3, u2} α (f i)] (s : α) (x : forall (i : I), f i), Eq.{succ (max u1 u2)} (forall (i : I), f i) (SMul.smul.{u3, max u1 u2} α (forall (i : I), f i) (Pi.instSMul.{u1, u2, u3} I α (fun (i : I) => f i) (fun (i : I) => _inst_1 i)) s x) (fun (i : I) => SMul.smul.{u3, u2} α (f i) (_inst_1 i) s (x i))
-but is expected to have type
-  forall {I : Type.{u2}} {α : Type.{u1}} {f : I -> Type.{u3}} [_inst_1 : forall (i : I), SMul.{u1, u3} α (f i)] (s : α) (x : forall (i : I), f i), Eq.{max (succ u2) (succ u3)} (forall (i : I), f i) (HSMul.hSMul.{u1, max u2 u3, max u2 u3} α (forall (i : I), f i) (forall (i : I), f i) (instHSMul.{u1, max u2 u3} α (forall (i : I), f i) (Pi.instSMul.{u2, u3, u1} I α (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) s x) (fun (i : I) => HSMul.hSMul.{u1, u3, u3} α (f i) (f i) (instHSMul.{u1, u3} α (f i) (_inst_1 i)) s (x i))
-Case conversion may be inaccurate. Consider using '#align pi.smul_def Pi.smul_defₓ'. -/
 @[to_additive]
 theorem smul_def [∀ i, SMul α <| f i] (s : α) (x : ∀ i, f i) : s • x = fun i => s • x i :=
   rfl
 #align pi.smul_def Pi.smul_def
 #align pi.vadd_def Pi.vadd_def
 
-/- warning: pi.smul_const -> Pi.smul_const is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : SMul.{u2, u3} α β] (a : α) (b : β), Eq.{succ (max u1 u3)} (I -> β) (SMul.smul.{u2, max u1 u3} α (I -> β) (Pi.instSMul.{u1, u3, u2} I α (fun (ᾰ : I) => β) (fun (i : I) => _inst_1)) a (Function.const.{succ u3, succ u1} β I b)) (Function.const.{succ u3, succ u1} β I (SMul.smul.{u2, u3} α β _inst_1 a b))
-but is expected to have type
-  forall {I : Type.{u3}} {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : SMul.{u1, u2} α β] (a : α) (b : β), Eq.{max (succ u3) (succ u2)} (I -> β) (HSMul.hSMul.{u1, max u3 u2, max u3 u2} α (I -> β) (I -> β) (instHSMul.{u1, max u3 u2} α (I -> β) (Pi.instSMul.{u3, u2, u1} I α (fun (a._@.Init.Prelude._hyg.54 : I) => β) (fun (i : I) => _inst_1))) a (Function.const.{succ u2, succ u3} β I b)) (Function.const.{succ u2, succ u3} β I (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β _inst_1) a b))
-Case conversion may be inaccurate. Consider using '#align pi.smul_const Pi.smul_constₓ'. -/
 @[simp, to_additive]
 theorem smul_const [SMul α β] (a : α) (b : β) : a • const I b = const I (a • b) :=
   rfl
 #align pi.smul_const Pi.smul_const
 #align pi.vadd_const Pi.vadd_const
 
-/- warning: pi.smul_comp -> Pi.smul_comp is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {γ : Type.{u4}} [_inst_1 : SMul.{u2, u4} α γ] (a : α) (x : β -> γ) (y : I -> β), Eq.{max (succ u1) (succ u4)} (I -> γ) (Function.comp.{succ u1, succ u3, succ u4} I β γ (SMul.smul.{u2, max u3 u4} α (β -> γ) (Pi.instSMul.{u3, u4, u2} β α (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)) a x) y) (SMul.smul.{u2, max u1 u4} α (I -> γ) (Pi.instSMul.{u1, u4, u2} I α (fun (ᾰ : I) => γ) (fun (i : I) => _inst_1)) a (Function.comp.{succ u1, succ u3, succ u4} I β γ x y))
-but is expected to have type
-  forall {I : Type.{u4}} {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : SMul.{u2, u3} α γ] (a : α) (x : β -> γ) (y : I -> β), Eq.{max (succ u4) (succ u3)} (I -> γ) (Function.comp.{succ u4, succ u1, succ u3} I β γ (HSMul.hSMul.{u2, max u1 u3, max u1 u3} α (β -> γ) (β -> γ) (instHSMul.{u2, max u1 u3} α (β -> γ) (Pi.instSMul.{u1, u3, u2} β α (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.1026 : β) => γ) (fun (i : β) => _inst_1))) a x) y) (HSMul.hSMul.{u2, max u4 u3, max u4 u3} α (I -> γ) (I -> γ) (instHSMul.{u2, max u4 u3} α (I -> γ) (Pi.instSMul.{u4, u3, u2} I α (fun (a._@.Init.Prelude._hyg.25 : I) => γ) (fun (i : I) => _inst_1))) a (Function.comp.{succ u4, succ u1, succ u3} I β γ x y))
-Case conversion may be inaccurate. Consider using '#align pi.smul_comp Pi.smul_compₓ'. -/
 @[to_additive]
 theorem smul_comp [SMul α γ] (a : α) (x : β → γ) (y : I → β) : (a • x) ∘ y = a • x ∘ y :=
   rfl
@@ -210,36 +168,18 @@ instance hasPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
 #align pi.has_pow Pi.hasPow
 #align pi.has_smul Pi.instSMul
 
-/- warning: pi.pow_apply -> Pi.pow_apply is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {β : Type.{u3}} {f : I -> Type.{u2}} [_inst_1 : forall (i : I), Pow.{u2, u3} (f i) β] (x : forall (i : I), f i) (b : β) (i : I), Eq.{succ u2} (f i) (HPow.hPow.{max u1 u2, u3, max u1 u2} (forall (i : I), f i) β (forall (i : I), f i) (instHPow.{max u1 u2, u3} (forall (i : I), f i) β (Pi.hasPow.{u1, u2, u3} I β (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) x b i) (HPow.hPow.{u2, u3, u2} (f i) β (f i) (instHPow.{u2, u3} (f i) β (_inst_1 i)) (x i) b)
-but is expected to have type
-  forall {I : Type.{u2}} {β : Type.{u1}} {f : I -> Type.{u3}} [_inst_1 : forall (i : I), Pow.{u3, u1} (f i) β] (x : forall (i : I), f i) (b : β) (i : I), Eq.{succ u3} (f i) (HPow.hPow.{max u2 u3, u1, max u2 u3} (forall (i : I), f i) β (forall (i : I), f i) (instHPow.{max u2 u3, u1} (forall (i : I), f i) β (Pi.instPow.{u2, u3, u1} I β (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) x b i) (HPow.hPow.{u3, u1, u3} (f i) β (f i) (instHPow.{u3, u1} (f i) β (_inst_1 i)) (x i) b)
-Case conversion may be inaccurate. Consider using '#align pi.pow_apply Pi.pow_applyₓ'. -/
 @[simp, to_additive Pi.smul_apply, to_additive_reorder 5]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 #align pi.pow_apply Pi.pow_apply
 #align pi.smul_apply Pi.smul_apply
 
-/- warning: pi.pow_def -> Pi.pow_def is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {β : Type.{u3}} {f : I -> Type.{u2}} [_inst_1 : forall (i : I), Pow.{u2, u3} (f i) β] (x : forall (i : I), f i) (b : β), Eq.{succ (max u1 u2)} (forall (i : I), f i) (HPow.hPow.{max u1 u2, u3, max u1 u2} (forall (i : I), f i) β (forall (i : I), f i) (instHPow.{max u1 u2, u3} (forall (i : I), f i) β (Pi.hasPow.{u1, u2, u3} I β (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) x b) (fun (i : I) => HPow.hPow.{u2, u3, u2} (f i) β (f i) (instHPow.{u2, u3} (f i) β (_inst_1 i)) (x i) b)
-but is expected to have type
-  forall {I : Type.{u2}} {β : Type.{u1}} {f : I -> Type.{u3}} [_inst_1 : forall (i : I), Pow.{u3, u1} (f i) β] (x : forall (i : I), f i) (b : β), Eq.{max (succ u2) (succ u3)} (forall (i : I), f i) (HPow.hPow.{max u2 u3, u1, max u2 u3} (forall (i : I), f i) β (forall (i : I), f i) (instHPow.{max u2 u3, u1} (forall (i : I), f i) β (Pi.instPow.{u2, u3, u1} I β (fun (i : I) => f i) (fun (i : I) => _inst_1 i))) x b) (fun (i : I) => HPow.hPow.{u3, u1, u3} (f i) β (f i) (instHPow.{u3, u1} (f i) β (_inst_1 i)) (x i) b)
-Case conversion may be inaccurate. Consider using '#align pi.pow_def Pi.pow_defₓ'. -/
 @[to_additive Pi.smul_def, to_additive_reorder 5]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
 #align pi.pow_def Pi.pow_def
 #align pi.smul_def Pi.smul_def
 
-/- warning: pi.const_pow -> Pi.const_pow is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : Pow.{u3, u2} β α] (b : β) (a : α), Eq.{succ (max u1 u3)} (I -> β) (HPow.hPow.{max u1 u3, u2, max u1 u3} (I -> β) α (I -> β) (instHPow.{max u1 u3, u2} (I -> β) α (Pi.hasPow.{u1, u3, u2} I α (fun (ᾰ : I) => β) (fun (i : I) => _inst_1))) (Function.const.{succ u3, succ u1} β I b) a) (Function.const.{succ u3, succ u1} β I (HPow.hPow.{u3, u2, u3} β α β (instHPow.{u3, u2} β α _inst_1) b a))
-but is expected to have type
-  forall {I : Type.{u3}} {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Pow.{u2, u1} α β] (b : α) (a : β), Eq.{max (succ u3) (succ u2)} (I -> α) (HPow.hPow.{max u3 u2, u1, max u3 u2} (I -> α) β (I -> α) (instHPow.{max u3 u2, u1} (I -> α) β (Pi.instPow.{u3, u2, u1} I β (fun (ᾰ : I) => α) (fun (i : I) => _inst_1))) (Function.const.{succ u2, succ u3} α I b) a) (Function.const.{succ u2, succ u3} α I (HPow.hPow.{u2, u1, u2} α β α (instHPow.{u2, u1} α β _inst_1) b a))
-Case conversion may be inaccurate. Consider using '#align pi.const_pow Pi.const_powₓ'. -/
 -- `to_additive` generates bad output if we take `has_pow α β`.
 @[simp, to_additive smul_const, to_additive_reorder 5]
 theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a) :=
@@ -247,12 +187,6 @@ theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a
 #align pi.const_pow Pi.const_pow
 #align pi.smul_const Pi.smul_const
 
-/- warning: pi.pow_comp -> Pi.pow_comp is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {γ : Type.{u4}} [_inst_1 : Pow.{u4, u2} γ α] (x : β -> γ) (a : α) (y : I -> β), Eq.{max (succ u1) (succ u4)} (I -> γ) (Function.comp.{succ u1, succ u3, succ u4} I β γ (HPow.hPow.{max u3 u4, u2, max u3 u4} (β -> γ) α (β -> γ) (instHPow.{max u3 u4, u2} (β -> γ) α (Pi.hasPow.{u3, u4, u2} β α (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x a) y) (HPow.hPow.{max u1 u4, u2, max u1 u4} (I -> γ) α (I -> γ) (instHPow.{max u1 u4, u2} (I -> γ) α (Pi.hasPow.{u1, u4, u2} I α (fun (ᾰ : I) => γ) (fun (i : I) => _inst_1))) (Function.comp.{succ u1, succ u3, succ u4} I β γ x y) a)
-but is expected to have type
-  forall {I : Type.{u4}} {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : Pow.{u3, u2} γ α] (x : β -> γ) (a : α) (y : I -> β), Eq.{max (succ u4) (succ u3)} (I -> γ) (Function.comp.{succ u4, succ u1, succ u3} I β γ (HPow.hPow.{max u1 u3, u2, max u1 u3} (β -> γ) α (β -> γ) (instHPow.{max u1 u3, u2} (β -> γ) α (Pi.instPow.{u1, u3, u2} β α (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x a) y) (HPow.hPow.{max u4 u3, u2, max u4 u3} (I -> γ) α (I -> γ) (instHPow.{max u4 u3, u2} (I -> γ) α (Pi.instPow.{u4, u3, u2} I α (fun (ᾰ : I) => γ) (fun (i : I) => _inst_1))) (Function.comp.{succ u4, succ u1, succ u3} I β γ x y) a)
-Case conversion may be inaccurate. Consider using '#align pi.pow_comp Pi.pow_compₓ'. -/
 @[to_additive smul_comp, to_additive_reorder 6]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
@@ -305,12 +239,6 @@ theorem const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ :=
 #align pi.const_neg Pi.const_neg
 -/
 
-/- warning: pi.inv_comp -> Pi.inv_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : Inv.{u3} γ] (x : β -> γ) (y : α -> β), Eq.{max (succ u1) (succ u3)} (α -> γ) (Function.comp.{succ u1, succ u2, succ u3} α β γ (Inv.inv.{max u2 u3} (β -> γ) (Pi.instInv.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)) x) y) (Inv.inv.{max u1 u3} (α -> γ) (Pi.instInv.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1)) (Function.comp.{succ u1, succ u2, succ u3} α β γ x y))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : Inv.{u3} γ] (x : β -> γ) (y : α -> β), Eq.{max (succ u2) (succ u3)} (α -> γ) (Function.comp.{succ u2, succ u1, succ u3} α β γ (Inv.inv.{max u1 u3} (β -> γ) (Pi.instInv.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)) x) y) (Inv.inv.{max u2 u3} (α -> γ) (Pi.instInv.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1)) (Function.comp.{succ u2, succ u1, succ u3} α β γ x y))
-Case conversion may be inaccurate. Consider using '#align pi.inv_comp Pi.inv_compₓ'. -/
 @[to_additive]
 theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹ :=
   rfl
@@ -341,12 +269,6 @@ theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i :=
 #align pi.sub_def Pi.sub_def
 -/
 
-/- warning: pi.div_comp -> Pi.div_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : Div.{u3} γ] (x : β -> γ) (y : β -> γ) (z : α -> β), Eq.{max (succ u1) (succ u3)} (α -> γ) (Function.comp.{succ u1, succ u2, succ u3} α β γ (HDiv.hDiv.{max u2 u3, max u2 u3, max u2 u3} (β -> γ) (β -> γ) (β -> γ) (instHDiv.{max u2 u3} (β -> γ) (Pi.instDiv.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x y) z) (HDiv.hDiv.{max u1 u3, max u1 u3, max u1 u3} (α -> γ) (α -> γ) (α -> γ) (instHDiv.{max u1 u3} (α -> γ) (Pi.instDiv.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) (Function.comp.{succ u1, succ u2, succ u3} α β γ x z) (Function.comp.{succ u1, succ u2, succ u3} α β γ y z))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : Div.{u3} γ] (x : β -> γ) (y : β -> γ) (z : α -> β), Eq.{max (succ u2) (succ u3)} (α -> γ) (Function.comp.{succ u2, succ u1, succ u3} α β γ (HDiv.hDiv.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHDiv.{max u1 u3} (β -> γ) (Pi.instDiv.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) x y) z) (HDiv.hDiv.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHDiv.{max u2 u3} (α -> γ) (Pi.instDiv.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) (Function.comp.{succ u2, succ u1, succ u3} α β γ x z) (Function.comp.{succ u2, succ u1, succ u3} α β γ y z))
-Case conversion may be inaccurate. Consider using '#align pi.div_comp Pi.div_compₓ'. -/
 @[to_additive]
 theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z :=
   rfl
@@ -409,12 +331,6 @@ theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
 #align pi.single_zero Pi.single_zero
 -/
 
-/- warning: pi.mul_single_apply -> Pi.mulSingle_apply is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} I] {β : Type.{u2}} [_inst_5 : One.{u2} β] (i : I) (x : β) (i' : I), Eq.{succ u2} β (Pi.mulSingle.{u1, u2} I (fun (i : I) => β) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5) i x i') (ite.{succ u2} β (Eq.{succ u1} I i' i) (_inst_1 i' i) x (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_5))))
-but is expected to have type
-  forall {I : Type.{u2}} {_inst_1 : Type.{u1}} [β : DecidableEq.{succ u2} I] [_inst_5 : One.{u1} _inst_1] (i : I) (x : _inst_1) (i' : I), Eq.{succ u1} _inst_1 (Pi.mulSingle.{u2, u1} I (fun (i : I) => _inst_1) (fun (a : I) (b : I) => β a b) (fun (i : I) => _inst_5) i x i') (ite.{succ u1} _inst_1 (Eq.{succ u2} I i' i) (β i' i) x (OfNat.ofNat.{u1} _inst_1 1 (One.toOfNat1.{u1} _inst_1 _inst_5)))
-Case conversion may be inaccurate. Consider using '#align pi.mul_single_apply Pi.mulSingle_applyₓ'. -/
 /-- On non-dependent functions, `pi.mul_single` can be expressed as an `ite` -/
 @[to_additive "On non-dependent functions, `pi.single` can be expressed as an `ite`"]
 theorem mulSingle_apply {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
@@ -423,12 +339,6 @@ theorem mulSingle_apply {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
 #align pi.mul_single_apply Pi.mulSingle_apply
 #align pi.single_apply Pi.single_apply
 
-/- warning: pi.mul_single_comm -> Pi.mulSingle_comm is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} I] {β : Type.{u2}} [_inst_5 : One.{u2} β] (i : I) (x : β) (i' : I), Eq.{succ u2} β (Pi.mulSingle.{u1, u2} I (fun (i : I) => β) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5) i x i') (Pi.mulSingle.{u1, u2} I (fun (i' : I) => β) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5) i' x i)
-but is expected to have type
-  forall {I : Type.{u2}} {_inst_1 : Type.{u1}} [β : DecidableEq.{succ u2} I] [_inst_5 : One.{u1} _inst_1] (i : I) (x : _inst_1) (i' : I), Eq.{succ u1} _inst_1 (Pi.mulSingle.{u2, u1} I (fun (i : I) => _inst_1) (fun (a : I) (b : I) => β a b) (fun (i : I) => _inst_5) i x i') (Pi.mulSingle.{u2, u1} I (fun (i' : I) => _inst_1) (fun (a : I) (b : I) => β a b) (fun (i : I) => _inst_5) i' x i)
-Case conversion may be inaccurate. Consider using '#align pi.mul_single_comm Pi.mulSingle_commₓ'. -/
 /-- On non-dependent functions, `pi.mul_single` is symmetric in the two indices. -/
 @[to_additive "On non-dependent functions, `pi.single` is symmetric in the two\nindices."]
 theorem mulSingle_comm {β : Sort _} [One β] (i : I) (x : β) (i' : I) :
@@ -457,12 +367,6 @@ theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i
 #align pi.apply_single₂ Pi.apply_single₂
 -/
 
-/- warning: pi.mul_single_op -> Pi.mulSingle_op is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} I] [_inst_2 : forall (i : I), One.{u2} (f i)] {g : I -> Type.{u3}} [_inst_5 : forall (i : I), One.{u3} (g i)] (op : forall (i : I), (f i) -> (g i)), (forall (i : I), Eq.{succ u3} (g i) (op i (OfNat.ofNat.{u2} (f i) 1 (OfNat.mk.{u2} (f i) 1 (One.one.{u2} (f i) (_inst_2 i))))) (OfNat.ofNat.{u3} (g i) 1 (OfNat.mk.{u3} (g i) 1 (One.one.{u3} (g i) (_inst_5 i))))) -> (forall (i : I) (x : f i), Eq.{max (succ u1) (succ u3)} (forall (i : I), g i) (Pi.mulSingle.{u1, u3} I (fun (i : I) => g i) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5 i) i (op i x)) (fun (j : I) => op j (Pi.mulSingle.{u1, u2} I f (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_2 i) i x j)))
-but is expected to have type
-  forall {I : Type.{u2}} {f : I -> Type.{u3}} [_inst_1 : DecidableEq.{succ u2} I] [_inst_2 : forall (i : I), One.{u3} (f i)] {g : I -> Type.{u1}} [_inst_5 : forall (i : I), One.{u1} (g i)] (op : forall (i : I), (f i) -> (g i)), (forall (i : I), Eq.{succ u1} (g i) (op i (OfNat.ofNat.{u3} (f i) 1 (One.toOfNat1.{u3} (f i) (_inst_2 i)))) (OfNat.ofNat.{u1} (g i) 1 (One.toOfNat1.{u1} (g i) (_inst_5 i)))) -> (forall (i : I) (x : f i), Eq.{max (succ u2) (succ u1)} (forall (i : I), g i) (Pi.mulSingle.{u2, u1} I g (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5 i) i (op i x)) (fun (j : I) => op j (Pi.mulSingle.{u2, u3} I f (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_2 i) i x j)))
-Case conversion may be inaccurate. Consider using '#align pi.mul_single_op Pi.mulSingle_opₓ'. -/
 @[to_additive]
 theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i → g i) (h : ∀ i, op i 1 = 1)
     (i : I) (x : f i) : mulSingle i (op i x) = fun j => op j (mulSingle i x j) :=
@@ -470,12 +374,6 @@ theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i →
 #align pi.mul_single_op Pi.mulSingle_op
 #align pi.single_op Pi.single_op
 
-/- warning: pi.mul_single_op₂ -> Pi.mulSingle_op₂ is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} I] [_inst_2 : forall (i : I), One.{u2} (f i)] {g₁ : I -> Type.{u3}} {g₂ : I -> Type.{u4}} [_inst_5 : forall (i : I), One.{u3} (g₁ i)] [_inst_6 : forall (i : I), One.{u4} (g₂ i)] (op : forall (i : I), (g₁ i) -> (g₂ i) -> (f i)), (forall (i : I), Eq.{succ u2} (f i) (op i (OfNat.ofNat.{u3} (g₁ i) 1 (OfNat.mk.{u3} (g₁ i) 1 (One.one.{u3} (g₁ i) (_inst_5 i)))) (OfNat.ofNat.{u4} (g₂ i) 1 (OfNat.mk.{u4} (g₂ i) 1 (One.one.{u4} (g₂ i) (_inst_6 i))))) (OfNat.ofNat.{u2} (f i) 1 (OfNat.mk.{u2} (f i) 1 (One.one.{u2} (f i) (_inst_2 i))))) -> (forall (i : I) (x₁ : g₁ i) (x₂ : g₂ i), Eq.{max (succ u1) (succ u2)} (forall (i : I), f i) (Pi.mulSingle.{u1, u2} I (fun (i : I) => f i) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_2 i) i (op i x₁ x₂)) (fun (j : I) => op j (Pi.mulSingle.{u1, u3} I g₁ (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5 i) i x₁ j) (Pi.mulSingle.{u1, u4} I g₂ (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_6 i) i x₂ j)))
-but is expected to have type
-  forall {I : Type.{u3}} {f : I -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} I] [_inst_2 : forall (i : I), One.{u4} (f i)] {g₁ : I -> Type.{u2}} {g₂ : I -> Type.{u1}} [_inst_5 : forall (i : I), One.{u2} (g₁ i)] [_inst_6 : forall (i : I), One.{u1} (g₂ i)] (op : forall (i : I), (g₁ i) -> (g₂ i) -> (f i)), (forall (i : I), Eq.{succ u4} (f i) (op i (OfNat.ofNat.{u2} (g₁ i) 1 (One.toOfNat1.{u2} (g₁ i) (_inst_5 i))) (OfNat.ofNat.{u1} (g₂ i) 1 (One.toOfNat1.{u1} (g₂ i) (_inst_6 i)))) (OfNat.ofNat.{u4} (f i) 1 (One.toOfNat1.{u4} (f i) (_inst_2 i)))) -> (forall (i : I) (x₁ : g₁ i) (x₂ : g₂ i), Eq.{max (succ u3) (succ u4)} (forall (i : I), f i) (Pi.mulSingle.{u3, u4} I f (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_2 i) i (op i x₁ x₂)) (fun (j : I) => op j (Pi.mulSingle.{u3, u2} I g₁ (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_5 i) i x₁ j) (Pi.mulSingle.{u3, u1} I g₂ (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_6 i) i x₂ j)))
-Case conversion may be inaccurate. Consider using '#align pi.mul_single_op₂ Pi.mulSingle_op₂ₓ'. -/
 @[to_additive]
 theorem mulSingle_op₂ {g₁ g₂ : I → Type _} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
     (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
@@ -512,23 +410,11 @@ protected def prod (f' : ∀ i, f i) (g' : ∀ i, g i) (i : I) : f i × g i :=
 #align pi.prod Pi.prod
 -/
 
-/- warning: pi.prod_fst_snd -> Pi.prod_fst_snd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{max (succ (max u1 u2)) (succ u1) (succ u2)} ((Prod.{u1, u2} α β) -> (Prod.{u1, u2} α β)) (Pi.prod.{max u1 u2, u1, u2} (Prod.{u1, u2} α β) (fun (self : Prod.{u1, u2} α β) => α) (fun (self : Prod.{u1, u2} α β) => β) (Prod.fst.{u1, u2} α β) (Prod.snd.{u1, u2} α β)) (id.{max (succ u1) (succ u2)} (Prod.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} ((Prod.{u2, u1} α β) -> (Prod.{u2, u1} α β)) (Pi.prod.{max u2 u1, u2, u1} (Prod.{u2, u1} α β) (fun (self : Prod.{u2, u1} α β) => α) (fun (self : Prod.{u2, u1} α β) => β) (Prod.fst.{u2, u1} α β) (Prod.snd.{u2, u1} α β)) (id.{max (succ u2) (succ u1)} (Prod.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align pi.prod_fst_snd Pi.prod_fst_sndₓ'. -/
 @[simp]
 theorem prod_fst_snd : Pi.prod (Prod.fst : α × β → α) (Prod.snd : α × β → β) = id :=
   funext fun _ => Prod.mk.eta
 #align pi.prod_fst_snd Pi.prod_fst_snd
 
-/- warning: pi.prod_snd_fst -> Pi.prod_snd_fst is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{max (succ (max u1 u2)) (succ u2) (succ u1)} ((Prod.{u1, u2} α β) -> (Prod.{u2, u1} β α)) (Pi.prod.{max u1 u2, u2, u1} (Prod.{u1, u2} α β) (fun (self : Prod.{u1, u2} α β) => β) (fun (self : Prod.{u1, u2} α β) => α) (Prod.snd.{u1, u2} α β) (Prod.fst.{u1, u2} α β)) (Prod.swap.{u1, u2} α β)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} ((Prod.{u2, u1} α β) -> (Prod.{u1, u2} β α)) (Pi.prod.{max u2 u1, u1, u2} (Prod.{u2, u1} α β) (fun (self : Prod.{u2, u1} α β) => β) (fun (self : Prod.{u2, u1} α β) => α) (Prod.snd.{u2, u1} α β) (Prod.fst.{u2, u1} α β)) (Prod.swap.{u2, u1} α β)
-Case conversion may be inaccurate. Consider using '#align pi.prod_snd_fst Pi.prod_snd_fstₓ'. -/
 @[simp]
 theorem prod_snd_fst : Pi.prod (Prod.snd : α × β → β) (Prod.fst : α × β → α) = Prod.swap :=
   rfl
@@ -610,12 +496,6 @@ def uniqueOfSurjectiveOne (α : Type _) {β : Type _} [One β] (h : Function.Sur
 #align unique_of_surjective_zero uniqueOfSurjectiveZero
 -/
 
-/- warning: subsingleton.pi_mul_single_eq -> Subsingleton.pi_mulSingle_eq is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {α : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} I] [_inst_2 : Subsingleton.{succ u1} I] [_inst_3 : One.{u2} α] (i : I) (x : α), Eq.{max (succ u1) (succ u2)} (I -> α) (Pi.mulSingle.{u1, u2} I (fun (i : I) => α) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_3) i x) (fun (_x : I) => x)
-but is expected to have type
-  forall {I : Type.{u2}} {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} I] [_inst_2 : Subsingleton.{succ u2} I] [_inst_3 : One.{u1} α] (i : I) (x : α), Eq.{max (succ u2) (succ u1)} (I -> α) (Pi.mulSingle.{u2, u1} I (fun (i : I) => α) (fun (a : I) (b : I) => _inst_1 a b) (fun (i : I) => _inst_3) i x) (fun (_x : I) => x)
-Case conversion may be inaccurate. Consider using '#align subsingleton.pi_mul_single_eq Subsingleton.pi_mulSingle_eqₓ'. -/
 @[to_additive Subsingleton.pi_single_eq]
 theorem Subsingleton.pi_mulSingle_eq {α : Type _} [DecidableEq I] [Subsingleton I] [One α] (i : I)
     (x : α) : Pi.mulSingle i x = fun _ => x :=
@@ -627,24 +507,12 @@ namespace Sum
 
 variable (a a' : α → γ) (b b' : β → γ)
 
-/- warning: sum.elim_one_one -> Sum.elim_one_one is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : One.{u3} γ], Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (OfNat.ofNat.{max u1 u3} (α -> γ) 1 (OfNat.mk.{max u1 u3} (α -> γ) 1 (One.one.{max u1 u3} (α -> γ) (Pi.instOne.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))))) (OfNat.ofNat.{max u2 u3} (β -> γ) 1 (OfNat.mk.{max u2 u3} (β -> γ) 1 (One.one.{max u2 u3} (β -> γ) (Pi.instOne.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)))))) (OfNat.ofNat.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) 1 (OfNat.mk.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) 1 (One.one.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) (Pi.instOne.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (i : Sum.{u1, u2} α β) => _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} [_inst_1 : One.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (OfNat.ofNat.{max u2 u3} (α -> γ) 1 (One.toOfNat1.{max u2 u3} (α -> γ) (Pi.instOne.{u2, u3} α (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.4107 : α) => γ) (fun (i : α) => _inst_1)))) (OfNat.ofNat.{max u1 u3} (β -> γ) 1 (One.toOfNat1.{max u1 u3} (β -> γ) (Pi.instOne.{u1, u3} β (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.4113 : β) => γ) (fun (i : β) => _inst_1))))) (OfNat.ofNat.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) 1 (One.toOfNat1.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instOne.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (a._@.Mathlib.Data.Sum.Basic._hyg.1871 : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1))))
-Case conversion may be inaccurate. Consider using '#align sum.elim_one_one Sum.elim_one_oneₓ'. -/
 @[simp, to_additive]
 theorem elim_one_one [One γ] : Sum.elim (1 : α → γ) (1 : β → γ) = 1 :=
   Sum.elim_const_const 1
 #align sum.elim_one_one Sum.elim_one_one
 #align sum.elim_zero_zero Sum.elim_zero_zero
 
-/- warning: sum.elim_mul_single_one -> Sum.elim_mulSingle_one is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] [_inst_3 : One.{u3} γ] (i : α) (c : γ), Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (Pi.mulSingle.{u1, u3} α (fun (i : α) => γ) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => _inst_3) i c) (OfNat.ofNat.{max u2 u3} (β -> γ) 1 (OfNat.mk.{max u2 u3} (β -> γ) 1 (One.one.{max u2 u3} (β -> γ) (Pi.instOne.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_3)))))) (Pi.mulSingle.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (a : Sum.{u1, u2} α β) (b : Sum.{u1, u2} α β) => Sum.decidableEq.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) β (fun (a : β) (b : β) => _inst_2 a b) a b) (fun (i : Sum.{u1, u2} α β) => _inst_3) (Sum.inl.{u1, u2} α β i) c)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} [_inst_1 : DecidableEq.{succ u3} α] [_inst_2 : DecidableEq.{succ u2} β] [_inst_3 : One.{u1} γ] (i : α) (c : γ), Eq.{max (max (succ u3) (succ u2)) (succ u1)} ((Sum.{u3, u2} α β) -> γ) (Sum.elim.{u3, u2, succ u1} α β γ (Pi.mulSingle.{u3, u1} α (fun (i : α) => γ) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => _inst_3) i c) (OfNat.ofNat.{max u2 u1} (β -> γ) 1 (One.toOfNat1.{max u2 u1} (β -> γ) (Pi.instOne.{u2, u1} β (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.4181 : β) => γ) (fun (i : β) => _inst_3))))) (Pi.mulSingle.{max u2 u3, u1} (Sum.{u3, u2} α β) (fun (ᾰ : Sum.{u3, u2} α β) => γ) (fun (a : Sum.{u3, u2} α β) (b : Sum.{u3, u2} α β) => Sum.instDecidableEqSum.{u3, u2} α β (fun (a : α) (b : α) => _inst_1 a b) (fun (a : β) (b : β) => _inst_2 a b) a b) (fun (i : Sum.{u3, u2} α β) => _inst_3) (Sum.inl.{u3, u2} α β i) c)
-Case conversion may be inaccurate. Consider using '#align sum.elim_mul_single_one Sum.elim_mulSingle_oneₓ'. -/
 @[simp, to_additive]
 theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (c : γ) :
     Sum.elim (Pi.mulSingle i c) (1 : β → γ) = Pi.mulSingle (Sum.inl i) c := by
@@ -652,12 +520,6 @@ theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (
 #align sum.elim_mul_single_one Sum.elim_mulSingle_one
 #align sum.elim_single_zero Sum.elim_single_zero
 
-/- warning: sum.elim_one_mul_single -> Sum.elim_one_mulSingle is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] [_inst_3 : One.{u3} γ] (i : β) (c : γ), Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (OfNat.ofNat.{max u1 u3} (α -> γ) 1 (OfNat.mk.{max u1 u3} (α -> γ) 1 (One.one.{max u1 u3} (α -> γ) (Pi.instOne.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_3))))) (Pi.mulSingle.{u2, u3} β (fun (ᾰ : β) => γ) (fun (a : β) (b : β) => _inst_2 a b) (fun (i : β) => _inst_3) i c)) (Pi.mulSingle.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (a : Sum.{u1, u2} α β) (b : Sum.{u1, u2} α β) => Sum.decidableEq.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) β (fun (a : β) (b : β) => _inst_2 a b) a b) (fun (i : Sum.{u1, u2} α β) => _inst_3) (Sum.inr.{u1, u2} α β i) c)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} [_inst_1 : DecidableEq.{succ u3} α] [_inst_2 : DecidableEq.{succ u2} β] [_inst_3 : One.{u1} γ] (i : β) (c : γ), Eq.{max (max (succ u3) (succ u2)) (succ u1)} ((Sum.{u3, u2} α β) -> γ) (Sum.elim.{u3, u2, succ u1} α β γ (OfNat.ofNat.{max u3 u1} (α -> γ) 1 (One.toOfNat1.{max u3 u1} (α -> γ) (Pi.instOne.{u3, u1} α (fun (a._@.Mathlib.Data.Pi.Algebra._hyg.4249 : α) => γ) (fun (i : α) => _inst_3)))) (Pi.mulSingle.{u2, u1} β (fun (ᾰ : β) => γ) (fun (a : β) (b : β) => _inst_2 a b) (fun (i : β) => _inst_3) i c)) (Pi.mulSingle.{max u2 u3, u1} (Sum.{u3, u2} α β) (fun (ᾰ : Sum.{u3, u2} α β) => γ) (fun (a : Sum.{u3, u2} α β) (b : Sum.{u3, u2} α β) => Sum.instDecidableEqSum.{u3, u2} α β (fun (a : α) (b : α) => _inst_1 a b) (fun (a : β) (b : β) => _inst_2 a b) a b) (fun (i : Sum.{u3, u2} α β) => _inst_3) (Sum.inr.{u3, u2} α β i) c)
-Case conversion may be inaccurate. Consider using '#align sum.elim_one_mul_single Sum.elim_one_mulSingleₓ'. -/
 @[simp, to_additive]
 theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (c : γ) :
     Sum.elim (1 : α → γ) (Pi.mulSingle i c) = Pi.mulSingle (Sum.inr i) c := by
@@ -665,36 +527,18 @@ theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (
 #align sum.elim_one_mul_single Sum.elim_one_mulSingle
 #align sum.elim_zero_single Sum.elim_zero_single
 
-/- warning: sum.elim_inv_inv -> Sum.elim_inv_inv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (a : α -> γ) (b : β -> γ) [_inst_1 : Inv.{u3} γ], Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (Inv.inv.{max u1 u3} (α -> γ) (Pi.instInv.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1)) a) (Inv.inv.{max u2 u3} (β -> γ) (Pi.instInv.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)) b)) (Inv.inv.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) (Pi.instInv.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (i : Sum.{u1, u2} α β) => _inst_1)) (Sum.elim.{u1, u2, succ u3} α β γ a b))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (a : α -> γ) (b : β -> γ) [_inst_1 : Inv.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (Inv.inv.{max u2 u3} (α -> γ) (Pi.instInv.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1)) a) (Inv.inv.{max u3 u1} (β -> γ) (Pi.instInv.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1)) b)) (Inv.inv.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instInv.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (ᾰ : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1)) (Sum.elim.{u2, u1, succ u3} α β γ a b))
-Case conversion may be inaccurate. Consider using '#align sum.elim_inv_inv Sum.elim_inv_invₓ'. -/
 @[to_additive]
 theorem elim_inv_inv [Inv γ] : Sum.elim a⁻¹ b⁻¹ = (Sum.elim a b)⁻¹ :=
   (Sum.comp_elim Inv.inv a b).symm
 #align sum.elim_inv_inv Sum.elim_inv_inv
 #align sum.elim_neg_neg Sum.elim_neg_neg
 
-/- warning: sum.elim_mul_mul -> Sum.elim_mul_mul is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Mul.{u3} γ], Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (HMul.hMul.{max u1 u3, max u1 u3, max u1 u3} (α -> γ) (α -> γ) (α -> γ) (instHMul.{max u1 u3} (α -> γ) (Pi.instMul.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HMul.hMul.{max u2 u3, max u2 u3, max u2 u3} (β -> γ) (β -> γ) (β -> γ) (instHMul.{max u2 u3} (β -> γ) (Pi.instMul.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HMul.hMul.{max (max u1 u2) u3, max (max u1 u2) u3, max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) ((Sum.{u1, u2} α β) -> γ) ((Sum.{u1, u2} α β) -> γ) (instHMul.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) (Pi.instMul.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (i : Sum.{u1, u2} α β) => _inst_1))) (Sum.elim.{u1, u2, succ u3} α β γ a b) (Sum.elim.{u1, u2, succ u3} α β γ a' b'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Mul.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (HMul.hMul.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHMul.{max u2 u3} (α -> γ) (Pi.instMul.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HMul.hMul.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHMul.{max u1 u3} (β -> γ) (Pi.instMul.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HMul.hMul.{max (max u2 u1) u3, max (max u2 u1) u3, max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) (instHMul.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instMul.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (ᾰ : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1))) (Sum.elim.{u2, u1, succ u3} α β γ a b) (Sum.elim.{u2, u1, succ u3} α β γ a' b'))
-Case conversion may be inaccurate. Consider using '#align sum.elim_mul_mul Sum.elim_mul_mulₓ'. -/
 @[to_additive]
 theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b' := by
   ext x; cases x <;> rfl
 #align sum.elim_mul_mul Sum.elim_mul_mul
 #align sum.elim_add_add Sum.elim_add_add
 
-/- warning: sum.elim_div_div -> Sum.elim_div_div is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Div.{u3} γ], Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((Sum.{u1, u2} α β) -> γ) (Sum.elim.{u1, u2, succ u3} α β γ (HDiv.hDiv.{max u1 u3, max u1 u3, max u1 u3} (α -> γ) (α -> γ) (α -> γ) (instHDiv.{max u1 u3} (α -> γ) (Pi.instDiv.{u1, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HDiv.hDiv.{max u2 u3, max u2 u3, max u2 u3} (β -> γ) (β -> γ) (β -> γ) (instHDiv.{max u2 u3} (β -> γ) (Pi.instDiv.{u2, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HDiv.hDiv.{max (max u1 u2) u3, max (max u1 u2) u3, max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) ((Sum.{u1, u2} α β) -> γ) ((Sum.{u1, u2} α β) -> γ) (instHDiv.{max (max u1 u2) u3} ((Sum.{u1, u2} α β) -> γ) (Pi.instDiv.{max u1 u2, u3} (Sum.{u1, u2} α β) (fun (ᾰ : Sum.{u1, u2} α β) => γ) (fun (i : Sum.{u1, u2} α β) => _inst_1))) (Sum.elim.{u1, u2, succ u3} α β γ a b) (Sum.elim.{u1, u2, succ u3} α β γ a' b'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Div.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (HDiv.hDiv.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHDiv.{max u2 u3} (α -> γ) (Pi.instDiv.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HDiv.hDiv.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHDiv.{max u1 u3} (β -> γ) (Pi.instDiv.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HDiv.hDiv.{max (max u2 u1) u3, max (max u2 u1) u3, max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) (instHDiv.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instDiv.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (ᾰ : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1))) (Sum.elim.{u2, u1, succ u3} α β γ a b) (Sum.elim.{u2, u1, succ u3} α β γ a' b'))
-Case conversion may be inaccurate. Consider using '#align sum.elim_div_div Sum.elim_div_divₓ'. -/
 @[to_additive]
 theorem elim_div_div [Div γ] : Sum.elim (a / a') (b / b') = Sum.elim a b / Sum.elim a' b' := by
   ext x; cases x <;> rfl
Diff
@@ -451,8 +451,7 @@ theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i
     (y : g i) (j : I) : f' j (mulSingle i x j) (mulSingle i y j) = mulSingle i (f' i x y) j :=
   by
   by_cases h : j = i
-  · subst h
-    simp only [mul_single_eq_same]
+  · subst h; simp only [mul_single_eq_same]
   · simp only [mul_single_eq_of_ne h, hf']
 #align pi.apply_mul_single₂ Pi.apply_mulSingle₂
 #align pi.apply_single₂ Pi.apply_single₂
@@ -685,10 +684,8 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Mul.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (HMul.hMul.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHMul.{max u2 u3} (α -> γ) (Pi.instMul.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HMul.hMul.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHMul.{max u1 u3} (β -> γ) (Pi.instMul.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HMul.hMul.{max (max u2 u1) u3, max (max u2 u1) u3, max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) (instHMul.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instMul.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (ᾰ : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1))) (Sum.elim.{u2, u1, succ u3} α β γ a b) (Sum.elim.{u2, u1, succ u3} α β γ a' b'))
 Case conversion may be inaccurate. Consider using '#align sum.elim_mul_mul Sum.elim_mul_mulₓ'. -/
 @[to_additive]
-theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b' :=
-  by
-  ext x
-  cases x <;> rfl
+theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b' := by
+  ext x; cases x <;> rfl
 #align sum.elim_mul_mul Sum.elim_mul_mul
 #align sum.elim_add_add Sum.elim_add_add
 
@@ -699,10 +696,8 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (a : α -> γ) (a' : α -> γ) (b : β -> γ) (b' : β -> γ) [_inst_1 : Div.{u3} γ], Eq.{max (max (succ u2) (succ u1)) (succ u3)} ((Sum.{u2, u1} α β) -> γ) (Sum.elim.{u2, u1, succ u3} α β γ (HDiv.hDiv.{max u2 u3, max u2 u3, max u2 u3} (α -> γ) (α -> γ) (α -> γ) (instHDiv.{max u2 u3} (α -> γ) (Pi.instDiv.{u2, u3} α (fun (ᾰ : α) => γ) (fun (i : α) => _inst_1))) a a') (HDiv.hDiv.{max u1 u3, max u1 u3, max u1 u3} (β -> γ) (β -> γ) (β -> γ) (instHDiv.{max u1 u3} (β -> γ) (Pi.instDiv.{u1, u3} β (fun (ᾰ : β) => γ) (fun (i : β) => _inst_1))) b b')) (HDiv.hDiv.{max (max u2 u1) u3, max (max u2 u1) u3, max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) ((Sum.{u2, u1} α β) -> γ) (instHDiv.{max (max u2 u1) u3} ((Sum.{u2, u1} α β) -> γ) (Pi.instDiv.{max u2 u1, u3} (Sum.{u2, u1} α β) (fun (ᾰ : Sum.{u2, u1} α β) => γ) (fun (i : Sum.{u2, u1} α β) => _inst_1))) (Sum.elim.{u2, u1, succ u3} α β γ a b) (Sum.elim.{u2, u1, succ u3} α β γ a' b'))
 Case conversion may be inaccurate. Consider using '#align sum.elim_div_div Sum.elim_div_divₓ'. -/
 @[to_additive]
-theorem elim_div_div [Div γ] : Sum.elim (a / a') (b / b') = Sum.elim a b / Sum.elim a' b' :=
-  by
-  ext x
-  cases x <;> rfl
+theorem elim_div_div [Div γ] : Sum.elim (a / a') (b / b') = Sum.elim a b / Sum.elim a' b' := by
+  ext x; cases x <;> rfl
 #align sum.elim_div_div Sum.elim_div_div
 #align sum.elim_sub_sub Sum.elim_sub_sub
 
Diff
@@ -553,7 +553,7 @@ theorem extend_one [One γ] (f : α → β) : Function.extend f (1 : α → γ)
 @[to_additive]
 theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
     Function.extend f (g₁ * g₂) (e₁ * e₂) = Function.extend f g₁ e₁ * Function.extend f g₂ e₂ :=
-  funext fun _ => by convert (apply_dite₂ (· * ·) _ _ _ _ _).symm
+  funext fun _ => by convert(apply_dite₂ (· * ·) _ _ _ _ _).symm
 #align function.extend_mul Function.extend_mul
 #align function.extend_add Function.extend_add
 -/
@@ -562,7 +562,7 @@ theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
 @[to_additive]
 theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
     Function.extend f g⁻¹ e⁻¹ = (Function.extend f g e)⁻¹ :=
-  funext fun _ => by convert (apply_dite Inv.inv _ _ _).symm
+  funext fun _ => by convert(apply_dite Inv.inv _ _ _).symm
 #align function.extend_inv Function.extend_inv
 #align function.extend_neg Function.extend_neg
 -/
@@ -571,7 +571,7 @@ theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
 @[to_additive]
 theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
     Function.extend f (g₁ / g₂) (e₁ / e₂) = Function.extend f g₁ e₁ / Function.extend f g₂ e₂ :=
-  funext fun _ => by convert (apply_dite₂ (· / ·) _ _ _ _ _).symm
+  funext fun _ => by convert(apply_dite₂ (· / ·) _ _ _ _ _).symm
 #align function.extend_div Function.extend_div
 #align function.extend_sub Function.extend_sub
 -/

Changes in mathlib4

mathlib3
mathlib4
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -40,7 +40,6 @@ variable {α β γ : Type*}
 
 -- The families of types already equipped with instances
 variable {f : I → Type v₁} {g : I → Type v₂} {h : I → Type v₃}
-
 variable (x y : ∀ i, f i) (i : I)
 
 namespace Pi
@@ -352,7 +351,6 @@ instance cancelCommMonoid [∀ i, CancelCommMonoid (f i)] : CancelCommMonoid (
 section
 
 variable [DecidableEq I]
-
 variable [∀ i, One (f i)] [∀ i, One (g i)] [∀ i, One (h i)]
 
 /-- The function supported at `i`, with value `x` there, and `1` elsewhere. -/
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
@@ -246,7 +246,7 @@ instance mulOneClass [∀ i, MulOneClass (f i)] : MulOneClass (∀ i, f i) where
 
 @[to_additive]
 instance invOneClass [∀ i, InvOneClass (f i)] : InvOneClass (∀ i, f i) where
-  inv_one := by intros; ext; exact inv_one
+  inv_one := by ext; exact inv_one
 
 @[to_additive]
 instance monoid [∀ i, Monoid (f i)] : Monoid (∀ i, f i) where
Composing non_zero function with injective fun is non_zero (#11244)

Some basic missing lemmas about injective function composition. See this Zulip thread

Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -548,6 +548,20 @@ theorem bijective_pi_map {F : ∀ i, f i → g i} (hF : ∀ i, Bijective (F i))
   ⟨injective_pi_map fun i => (hF i).injective, surjective_pi_map fun i => (hF i).surjective⟩
 #align function.bijective_pi_map Function.bijective_pi_map
 
+lemma comp_eq_const_iff (b : β) (f : α → β) {g : β → γ} (hg : Injective g) :
+    g ∘ f = Function.const _ (g b) ↔ f = Function.const _ b :=
+  hg.comp_left.eq_iff' rfl
+
+@[to_additive]
+lemma comp_eq_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
+    g ∘ f = 1 ↔ f = 1 := by
+  simpa [hg0, const_one] using comp_eq_const_iff 1 f hg
+
+@[to_additive]
+lemma comp_ne_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
+    g ∘ f ≠ 1 ↔ f ≠ 1 :=
+  (comp_eq_one_iff f hg hg0).ne
+
 end Function
 
 /-- If the one function is surjective, the codomain is trivial. -/
style: reduce spacing variation in "porting note" comments (#10886)

In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.

Diff
@@ -465,13 +465,13 @@ protected def prod (f' : ∀ i, f i) (g' : ∀ i, g i) (i : I) : f i × g i :=
   (f' i, g' i)
 #align pi.prod Pi.prod
 
--- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
+-- Porting note: simp now unfolds the lhs, so we are not marking these as simp.
 -- @[simp]
 theorem prod_fst_snd : Pi.prod (Prod.fst : α × β → α) (Prod.snd : α × β → β) = id :=
   rfl
 #align pi.prod_fst_snd Pi.prod_fst_snd
 
--- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
+-- Porting note: simp now unfolds the lhs, so we are not marking these as simp.
 -- @[simp]
 theorem prod_snd_fst : Pi.prod (Prod.snd : α × β → β) (Prod.fst : α × β → α) = Prod.swap :=
   rfl
chore: change from plural to singular in porting notes (#10761)
Diff
@@ -388,7 +388,7 @@ theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
 #align pi.mul_single_one Pi.mulSingle_one
 #align pi.single_zero Pi.single_zero
 
--- Porting notes:
+-- Porting note:
 -- 1) Why do I have to specify the type of `mulSingle i x` explicitly?
 -- 2) Why do I have to specify the type of `(1 : I → β)`?
 -- 3) Removed `{β : Sort*}` as `[One β]` converts it to a type anyways.
@@ -400,7 +400,7 @@ theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
 #align pi.mul_single_apply Pi.mulSingle_apply
 #align pi.single_apply Pi.single_apply
 
--- Porting notes : Same as above.
+-- Porting note: Same as above.
 /-- On non-dependent functions, `Pi.mulSingle` is symmetric in the two indices. -/
 @[to_additive "On non-dependent functions, `Pi.single` is symmetric in the two indices."]
 theorem mulSingle_comm [One β] (i : I) (x : β) (i' : I) :
move: Algebraic pi instances (#10693)

Rename

  • Data.Pi.Algebra to Algebra.Group.Pi.Basic
  • Algebra.Group.Pi to Algebra.Group.Pi.Lemmas

Move a few instances from the latter to the former, the goal being that Algebra.Group.Pi.Basic is about all the pi instances of the classes defined in Algebra.Group.Defs. Algebra.Group.Pi.Lemmas will need further rearranging.

Diff
@@ -5,19 +5,30 @@ Authors: Simon Hudon, Patrick Massot, Eric Wieser
 -/
 import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
-import Mathlib.Logic.Unique
 import Mathlib.Data.Sum.Basic
+import Mathlib.Logic.Unique
+import Mathlib.Tactic.Spread
 
 #align_import data.pi.algebra from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
 
 /-!
 # Instances and theorems on pi types
 
-This file provides basic definitions and notation instances for Pi types.
+This file provides instances for the typeclass defined in `Algebra.Group.Defs`. More sophisticated
+instances are defined in `Algebra.Group.Pi.Lemmas` files elsewhere.
+
+## Porting note
 
-Instances of more sophisticated classes are defined in `Pi.lean` files elsewhere.
+This file relied on the `pi_instance` tactic, which was not available at the time of porting. The
+comment `--pi_instance` is inserted before all fields which were previously derived by
+`pi_instance`. See this Zulip discussion:
+[https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/not.20porting.20pi_instance]
 -/
 
+-- We enforce to only import `Algebra.Group.Defs` and basic logic
+assert_not_exists Set.range
+assert_not_exists MonoidHom
+
 open Function
 
 universe u v₁ v₂ v₃
@@ -214,6 +225,130 @@ lemma _root_.Function.const_div [Div β] (a b : β) : const α a / const α b =
 #align pi.const_div Function.const_div
 #align pi.const_sub Function.const_sub
 
+@[to_additive]
+instance semigroup [∀ i, Semigroup (f i)] : Semigroup (∀ i, f i) where
+  mul_assoc := by intros; ext; exact mul_assoc _ _ _
+#align pi.semigroup Pi.semigroup
+#align pi.add_semigroup Pi.addSemigroup
+
+@[to_additive]
+instance commSemigroup [∀ i, CommSemigroup (f i)] : CommSemigroup (∀ i, f i) where
+  mul_comm := by intros; ext; exact mul_comm _ _
+#align pi.comm_semigroup Pi.commSemigroup
+#align pi.add_comm_semigroup Pi.addCommSemigroup
+
+@[to_additive]
+instance mulOneClass [∀ i, MulOneClass (f i)] : MulOneClass (∀ i, f i) where
+  one_mul := by intros; ext; exact one_mul _
+  mul_one := by intros; ext; exact mul_one _
+#align pi.mul_one_class Pi.mulOneClass
+#align pi.add_zero_class Pi.addZeroClass
+
+@[to_additive]
+instance invOneClass [∀ i, InvOneClass (f i)] : InvOneClass (∀ i, f i) where
+  inv_one := by intros; ext; exact inv_one
+
+@[to_additive]
+instance monoid [∀ i, Monoid (f i)] : Monoid (∀ i, f i) where
+  __ := semigroup
+  __ := mulOneClass
+  npow := fun n x i => x i ^ n
+  npow_zero := by intros; ext; exact Monoid.npow_zero _
+  npow_succ := by intros; ext; exact Monoid.npow_succ _ _
+#align pi.monoid Pi.monoid
+#align pi.add_monoid Pi.addMonoid
+
+@[to_additive]
+instance commMonoid [∀ i, CommMonoid (f i)] : CommMonoid (∀ i, f i) :=
+  { monoid, commSemigroup with }
+#align pi.comm_monoid Pi.commMonoid
+#align pi.add_comm_monoid Pi.addCommMonoid
+
+@[to_additive Pi.subNegMonoid]
+instance divInvMonoid [∀ i, DivInvMonoid (f i)] : DivInvMonoid (∀ i, f i) where
+  zpow := fun z x i => x i ^ z
+  div_eq_mul_inv := by intros; ext; exact div_eq_mul_inv _ _
+  zpow_zero' := by intros; ext; exact DivInvMonoid.zpow_zero' _
+  zpow_succ' := by intros; ext; exact DivInvMonoid.zpow_succ' _ _
+  zpow_neg' := by intros; ext; exact DivInvMonoid.zpow_neg' _ _
+
+@[to_additive Pi.subNegZeroMonoid]
+instance divInvOneMonoid [∀ i, DivInvOneMonoid (f i)] : DivInvOneMonoid (∀ i, f i) where
+  inv_one := by ext; exact inv_one
+
+@[to_additive]
+instance involutiveInv [∀ i, InvolutiveInv (f i)] : InvolutiveInv (∀ i, f i) where
+  inv_inv := by intros; ext; exact inv_inv _
+
+@[to_additive Pi.subtractionMonoid]
+instance divisionMonoid [∀ i, DivisionMonoid (f i)] : DivisionMonoid (∀ i, f i) where
+  __ := divInvMonoid
+  __ := involutiveInv
+  mul_inv_rev := by intros; ext; exact mul_inv_rev _ _
+  inv_eq_of_mul := by intros _ _ h; ext; exact DivisionMonoid.inv_eq_of_mul _ _ (congrFun h _)
+
+@[to_additive instSubtractionCommMonoid]
+instance divisionCommMonoid [∀ i, DivisionCommMonoid (f i)] : DivisionCommMonoid (∀ i, f i) :=
+  { divisionMonoid, commSemigroup with }
+
+@[to_additive]
+instance group [∀ i, Group (f i)] : Group (∀ i, f i) where
+  mul_left_inv := by intros; ext; exact mul_left_inv _
+#align pi.group Pi.group
+#align pi.add_group Pi.addGroup
+
+@[to_additive]
+instance commGroup [∀ i, CommGroup (f i)] : CommGroup (∀ i, f i) := { group, commMonoid with }
+#align pi.comm_group Pi.commGroup
+#align pi.add_comm_group Pi.addCommGroup
+
+@[to_additive] instance instIsLeftCancelMul [∀ i, Mul (f i)] [∀ i, IsLeftCancelMul (f i)] :
+    IsLeftCancelMul (∀ i, f i) where
+  mul_left_cancel  _ _ _ h := funext fun _ ↦ mul_left_cancel (congr_fun h _)
+
+@[to_additive] instance instIsRightCancelMul [∀ i, Mul (f i)] [∀ i, IsRightCancelMul (f i)] :
+    IsRightCancelMul (∀ i, f i) where
+  mul_right_cancel  _ _ _ h := funext fun _ ↦ mul_right_cancel (congr_fun h _)
+
+@[to_additive] instance instIsCancelMul [∀ i, Mul (f i)] [∀ i, IsCancelMul (f i)] :
+    IsCancelMul (∀ i, f i) where
+
+@[to_additive]
+instance leftCancelSemigroup [∀ i, LeftCancelSemigroup (f i)] : LeftCancelSemigroup (∀ i, f i) :=
+  { semigroup with mul_left_cancel := fun _ _ _ => mul_left_cancel }
+#align pi.left_cancel_semigroup Pi.leftCancelSemigroup
+#align pi.add_left_cancel_semigroup Pi.addLeftCancelSemigroup
+
+@[to_additive]
+instance rightCancelSemigroup [∀ i, RightCancelSemigroup (f i)] : RightCancelSemigroup (∀ i, f i) :=
+  { semigroup with mul_right_cancel := fun _ _ _ => mul_right_cancel }
+#align pi.right_cancel_semigroup Pi.rightCancelSemigroup
+#align pi.add_right_cancel_semigroup Pi.addRightCancelSemigroup
+
+@[to_additive]
+instance leftCancelMonoid [∀ i, LeftCancelMonoid (f i)] : LeftCancelMonoid (∀ i, f i) :=
+  { leftCancelSemigroup, monoid with }
+#align pi.left_cancel_monoid Pi.leftCancelMonoid
+#align pi.add_left_cancel_monoid Pi.addLeftCancelMonoid
+
+@[to_additive]
+instance rightCancelMonoid [∀ i, RightCancelMonoid (f i)] : RightCancelMonoid (∀ i, f i) :=
+  { rightCancelSemigroup, monoid with }
+#align pi.right_cancel_monoid Pi.rightCancelMonoid
+#align pi.add_right_cancel_monoid Pi.addRightCancelMonoid
+
+@[to_additive]
+instance cancelMonoid [∀ i, CancelMonoid (f i)] : CancelMonoid (∀ i, f i) :=
+  { leftCancelMonoid, rightCancelMonoid with }
+#align pi.cancel_monoid Pi.cancelMonoid
+#align pi.add_cancel_monoid Pi.addCancelMonoid
+
+@[to_additive]
+instance cancelCommMonoid [∀ i, CancelCommMonoid (f i)] : CancelCommMonoid (∀ i, f i) :=
+  { leftCancelMonoid, commMonoid with }
+#align pi.cancel_comm_monoid Pi.cancelCommMonoid
+#align pi.add_cancel_comm_monoid Pi.addCancelCommMonoid
+
 section
 
 variable [DecidableEq I]
chore: Move lemmas about Function.const to the Function namespace (#10220)

They were in the Pi namespace instead.

Diff
@@ -54,11 +54,9 @@ theorem one_def [∀ i, One <| f i] : (1 : ∀ i, f i) = fun _ => 1 :=
 #align pi.one_def Pi.one_def
 #align pi.zero_def Pi.zero_def
 
-@[to_additive (attr := simp)]
-theorem const_one [One β] : const α (1 : β) = 1 :=
-  rfl
-#align pi.const_one Pi.const_one
-#align pi.const_zero Pi.const_zero
+@[to_additive (attr := simp)] lemma _root_.Function.const_one [One β] : const α (1 : β) = 1 := rfl
+#align pi.const_one Function.const_one
+#align pi.const_zero Function.const_zero
 
 @[to_additive (attr := simp)]
 theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
@@ -91,10 +89,9 @@ theorem mul_def [∀ i, Mul <| f i] : x * y = fun i => x i * y i :=
 #align pi.add_def Pi.add_def
 
 @[to_additive (attr := simp)]
-theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) :=
-  rfl
-#align pi.const_mul Pi.const_mul
-#align pi.const_add Pi.const_add
+lemma _root_.Function.const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) := rfl
+#align pi.const_mul Function.const_mul
+#align pi.const_add Function.const_add
 
 @[to_additive]
 theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z :=
@@ -127,11 +124,10 @@ theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i
 #align pi.vadd_def Pi.vadd_def
 
 @[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
-theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
-  rfl
-#align pi.const_pow Pi.const_pow
-#align pi.smul_const Pi.smul_const
-#align pi.vadd_const Pi.vadd_const
+lemma _root_.Function.const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) := rfl
+#align pi.const_pow Function.const_pow
+#align pi.smul_const Function.smul_const
+#align pi.vadd_const Function.vadd_const
 
 @[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
@@ -179,10 +175,9 @@ theorem inv_def [∀ i, Inv <| f i] : x⁻¹ = fun i => (x i)⁻¹ :=
 #align pi.neg_def Pi.neg_def
 
 @[to_additive]
-theorem const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ :=
-  rfl
-#align pi.const_inv Pi.const_inv
-#align pi.const_neg Pi.const_neg
+lemma _root_.Function.const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ := rfl
+#align pi.const_inv Function.const_inv
+#align pi.const_neg Function.const_neg
 
 @[to_additive]
 theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹ :=
@@ -215,10 +210,9 @@ theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x
 #align pi.sub_comp Pi.sub_comp
 
 @[to_additive (attr := simp)]
-theorem const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) :=
-  rfl
-#align pi.const_div Pi.const_div
-#align pi.const_sub Pi.const_sub
+lemma _root_.Function.const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) := rfl
+#align pi.const_div Function.const_div
+#align pi.const_sub Function.const_sub
 
 section
 
chore: remove classical, it has been moved to Std (#10121)

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

Diff
@@ -7,7 +7,6 @@ import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
 import Mathlib.Logic.Unique
 import Mathlib.Data.Sum.Basic
-import Mathlib.Tactic.Classical
 
 #align_import data.pi.algebra from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
 
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -368,7 +368,7 @@ theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
   funext x
   simp only [not_exists, extend_def, Pi.mul_apply, apply_dite₂, dite_eq_ite, ite_self]
 -- Porting note: The Lean3 statement was
--- `funext $ λ _, by convert (apply_dite2 (*) _ _ _ _ _).symm`
+-- `funext <| λ _, by convert (apply_dite2 (*) _ _ _ _ _).symm`
 -- which converts to
 -- `funext fun _ => by convert (apply_dite₂ (· * ·) _ _ _ _ _).symm`
 -- However this does not work, and we're not sure why.
@@ -382,7 +382,7 @@ theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
   funext x
   simp only [not_exists, extend_def, Pi.inv_apply, apply_dite Inv.inv]
 -- Porting note: The Lean3 statement was
--- `funext $ λ _, by convert (apply_dite has_inv.inv _ _ _).symm`
+-- `funext <| λ _, by convert (apply_dite has_inv.inv _ _ _).symm`
 -- which converts to
 -- `funext fun _ => by convert (apply_dite Inv.inv _ _ _).symm`
 -- However this does not work, and we're not sure why.
@@ -396,7 +396,7 @@ theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
   funext x
   simp [Function.extend_def, apply_dite₂]
 -- Porting note: The Lean3 statement was
--- `funext $ λ _, by convert (apply_dite2 (/) _ _ _ _ _).symm`
+-- `funext <| λ _, by convert (apply_dite2 (/) _ _ _ _ _).symm`
 -- which converts to
 -- `funext fun _ => by convert (apply_dite₂ (· / ·) _ _ _ _ _).symm`
 -- However this does not work, and we're not sure why.
chore: delay import of Tactic.Common (#7000)

I know that this is contrary to what we've done previously, but:

  • I'm trying to upstream a great many tactics from Mathlib to Std (essentially, everything that non-mathematicians want too).
  • This makes it much easier for me to see what is going on, and understand the import requirements (particularly for the "big" tactics norm_num / ring / linarith)
  • It's actually not as bad as it looks here, because as these tactics move up to Std they will start disappearing again from explicit imports, but Mathlib can happily import all of Std.

(Oh

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

Diff
@@ -7,6 +7,7 @@ import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
 import Mathlib.Logic.Unique
 import Mathlib.Data.Sum.Basic
+import Mathlib.Tactic.Classical
 
 #align_import data.pi.algebra from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
 
chore: cleanup Mathlib.Init.Data.Prod (#6972)

Removing from Mathlib.Init.Data.Prod from the early parts of the import hierarchy.

While at it, remove unnecessary uses of Prod.mk.eta across the library.

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

Diff
@@ -339,7 +339,7 @@ protected def prod (f' : ∀ i, f i) (g' : ∀ i, g i) (i : I) : f i × g i :=
 -- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
 -- @[simp]
 theorem prod_fst_snd : Pi.prod (Prod.fst : α × β → α) (Prod.snd : α × β → β) = id :=
-  funext fun _ => Prod.mk.eta
+  rfl
 #align pi.prod_fst_snd Pi.prod_fst_snd
 
 -- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
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
@@ -25,7 +25,7 @@ universe u v₁ v₂ v₃
 variable {I : Type u}
 
 -- The indexing type
-variable {α β γ : Type _}
+variable {α β γ : Type*}
 
 -- The families of types already equipped with instances
 variable {f : I → Type v₁} {g : I → Type v₂} {h : I → Type v₃}
@@ -262,7 +262,7 @@ theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
 -- Porting notes:
 -- 1) Why do I have to specify the type of `mulSingle i x` explicitly?
 -- 2) Why do I have to specify the type of `(1 : I → β)`?
--- 3) Removed `{β : Sort _}` as `[One β]` converts it to a type anyways.
+-- 3) Removed `{β : Sort*}` as `[One β]` converts it to a type anyways.
 /-- On non-dependent functions, `Pi.mulSingle` can be expressed as an `ite` -/
 @[to_additive "On non-dependent functions, `Pi.single` can be expressed as an `ite`"]
 theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
@@ -299,7 +299,7 @@ theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i
 #align pi.apply_single₂ Pi.apply_single₂
 
 @[to_additive]
-theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i → g i)
+theorem mulSingle_op {g : I → Type*} [∀ i, One (g i)] (op : ∀ i, f i → g i)
     (h : ∀ i, op i 1 = 1) (i : I) (x : f i) :
     mulSingle i (op i x) = fun j => op j (mulSingle i x j) :=
   Eq.symm <| funext <| apply_mulSingle op h i x
@@ -307,7 +307,7 @@ theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i →
 #align pi.single_op Pi.single_op
 
 @[to_additive]
-theorem mulSingle_op₂ {g₁ g₂ : I → Type _} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
+theorem mulSingle_op₂ {g₁ g₂ : I → Type*} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
     (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
     mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j) :=
   Eq.symm <| funext <| apply_mulSingle₂ op h i x₁ x₂
@@ -423,14 +423,14 @@ end Function
 
 /-- If the one function is surjective, the codomain is trivial. -/
 @[to_additive "If the zero function is surjective, the codomain is trivial."]
-def uniqueOfSurjectiveOne (α : Type _) {β : Type _} [One β] (h : Function.Surjective (1 : α → β)) :
+def uniqueOfSurjectiveOne (α : Type*) {β : Type*} [One β] (h : Function.Surjective (1 : α → β)) :
     Unique β :=
   h.uniqueOfSurjectiveConst α (1 : β)
 #align unique_of_surjective_one uniqueOfSurjectiveOne
 #align unique_of_surjective_zero uniqueOfSurjectiveZero
 
 @[to_additive]
-theorem Subsingleton.pi_mulSingle_eq {α : Type _} [DecidableEq I] [Subsingleton I] [One α]
+theorem Subsingleton.pi_mulSingle_eq {α : Type*} [DecidableEq I] [Subsingleton I] [One α]
     (i : I) (x : α) : Pi.mulSingle i x = fun _ => x :=
   funext fun j => by rw [Subsingleton.elim j i, Pi.mulSingle_eq_same]
 #align subsingleton.pi_mul_single_eq Subsingleton.pi_mulSingle_eq
chore: remove 'Ported by' headers (#6018)

Briefly during the port we were adding "Ported by" headers, but only ~60 / 3000 files ended up with such a header.

I propose deleting them.

We could consider adding these uniformly via a script, as part of the great history rewrite...?

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

Diff
@@ -2,7 +2,6 @@
 Copyright (c) 2020 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
-Ported by: Jon Eugster
 -/
 import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
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
@@ -3,17 +3,14 @@ Copyright (c) 2020 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
 Ported by: Jon Eugster
-
-! This file was ported from Lean 3 source module data.pi.algebra
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
 import Mathlib.Logic.Unique
 import Mathlib.Data.Sum.Basic
 
+#align_import data.pi.algebra from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
+
 /-!
 # Instances and theorems on pi types
 
chore: formatting issues (#4947)

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

Diff
@@ -130,7 +130,7 @@ theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i
 #align pi.smul_def Pi.smul_def
 #align pi.vadd_def Pi.vadd_def
 
-@[to_additive (attr := simp, to_additive) (reorder:= 2 3, 5 6) smul_const]
+@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
 theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
   rfl
 #align pi.const_pow Pi.const_pow
@@ -365,7 +365,7 @@ theorem extend_one [One γ] (f : α → β) : Function.extend f (1 : α → γ)
 #align function.extend_zero Function.extend_zero
 
 @[to_additive]
-theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ):
+theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
     Function.extend f (g₁ * g₂) (e₁ * e₂) = Function.extend f g₁ e₁ * Function.extend f g₂ e₂ := by
   classical
   funext x
feat: add Mathlib.Tactic.Common, and import (#4056)

This makes a mathlib4 version of mathlib3's tactic.basic, now called Mathlib.Tactic.Common, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.

This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.

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

Diff
@@ -13,7 +13,6 @@ import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic
 import Mathlib.Logic.Unique
 import Mathlib.Data.Sum.Basic
-import Mathlib.Tactic.Classical
 
 /-!
 # Instances and theorems on pi types
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
@@ -117,28 +117,28 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
   ⟨fun x b i => x i ^ b⟩
 
-@[to_additive (attr := simp, to_additive) (reorder := 5) smul_apply]
+@[to_additive (attr := simp, to_additive) (reorder := 5 6) smul_apply]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 #align pi.pow_apply Pi.pow_apply
 #align pi.smul_apply Pi.smul_apply
 #align pi.vadd_apply Pi.vadd_apply
 
-@[to_additive (attr := to_additive) (reorder := 5) smul_def]
+@[to_additive (attr := to_additive) (reorder := 5 6) smul_def]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
 #align pi.pow_def Pi.pow_def
 #align pi.smul_def Pi.smul_def
 #align pi.vadd_def Pi.vadd_def
 
-@[to_additive (attr := simp, to_additive) (reorder := 2 5) smul_const]
+@[to_additive (attr := simp, to_additive) (reorder:= 2 3, 5 6) smul_const]
 theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
   rfl
 #align pi.const_pow Pi.const_pow
 #align pi.smul_const Pi.smul_const
 #align pi.vadd_const Pi.vadd_const
 
-@[to_additive (attr := to_additive) (reorder := 6) smul_comp]
+@[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
 #align pi.pow_comp Pi.pow_comp
chore: fix #align lines (#3640)

This PR fixes two things:

  • Most align statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align). This is often seen in the mathport output after ending calc blocks.
  • All remaining more-than-one-line #align statements. (This was needed for a script I wrote for #3630.)
Diff
@@ -44,7 +44,6 @@ namespace Pi
 @[to_additive]
 instance instOne [∀ i, One <| f i] : One (∀ i : I, f i) :=
   ⟨fun _ => 1⟩
-
 #align pi.has_one Pi.instOne
 #align pi.has_zero Pi.instZero
 
@@ -81,7 +80,6 @@ theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x
 @[to_additive]
 instance instMul [∀ i, Mul <| f i] : Mul (∀ i : I, f i) :=
   ⟨fun f g i => f i * g i⟩
-
 #align pi.has_mul Pi.instMul
 #align pi.has_add Pi.instAdd
 
@@ -112,7 +110,6 @@ theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x
 @[to_additive]
 instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
   ⟨fun s x => fun i => s • x i⟩
-
 #align pi.has_smul Pi.instSMul
 #align pi.has_vadd Pi.instVAdd
 
@@ -171,7 +168,6 @@ end deprecated
 @[to_additive]
 instance instInv [∀ i, Inv <| f i] : Inv (∀ i : I, f i) :=
   ⟨fun f i => (f i)⁻¹⟩
-
 #align pi.has_inv Pi.instInv
 #align pi.has_neg Pi.instNeg
 
@@ -202,7 +198,6 @@ theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x 
 @[to_additive]
 instance instDiv [∀ i, Div <| f i] : Div (∀ i : I, f i) :=
   ⟨fun f g i => f i / g i⟩
-
 #align pi.has_div Pi.instDiv
 #align pi.has_sub Pi.instSub
 
@@ -240,21 +235,18 @@ variable [∀ i, One (f i)] [∀ i, One (g i)] [∀ i, One (h i)]
 @[to_additive "The function supported at `i`, with value `x` there, and `0` elsewhere."]
 def mulSingle (i : I) (x : f i) : ∀ (j : I), f j :=
   Function.update 1 i x
-
 #align pi.mul_single Pi.mulSingle
 #align pi.single Pi.single
 
 @[to_additive (attr := simp)]
 theorem mulSingle_eq_same (i : I) (x : f i) : mulSingle i x i = x :=
   Function.update_same i x _
-
 #align pi.mul_single_eq_same Pi.mulSingle_eq_same
 #align pi.single_eq_same Pi.single_eq_same
 
 @[to_additive (attr := simp)]
 theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i' = 1 :=
   Function.update_noteq h x _
-
 #align pi.mul_single_eq_of_ne Pi.mulSingle_eq_of_ne
 #align pi.single_eq_of_ne Pi.single_eq_of_ne
 
@@ -263,14 +255,12 @@ theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i
   "Abbreviation for `single_eq_of_ne h.symm`, for ease of use by `simp`."]
 theorem mulSingle_eq_of_ne' {i i' : I} (h : i ≠ i') (x : f i) : mulSingle i x i' = 1 :=
   mulSingle_eq_of_ne h.symm x
-
 #align pi.mul_single_eq_of_ne' Pi.mulSingle_eq_of_ne'
 #align pi.single_eq_of_ne' Pi.single_eq_of_ne'
 
 @[to_additive (attr := simp)]
 theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
   Function.update_eq_self _ _
-
 #align pi.mul_single_one Pi.mulSingle_one
 #align pi.single_zero Pi.single_zero
 
@@ -283,7 +273,6 @@ theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
 theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
     (mulSingle i x : I → β) i' = if i' = i then x else 1 :=
   Function.update_apply (1 : I → β) i x i'
-
 #align pi.mul_single_apply Pi.mulSingle_apply
 #align pi.single_apply Pi.single_apply
 
@@ -293,7 +282,6 @@ theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
 theorem mulSingle_comm [One β] (i : I) (x : β) (i' : I) :
     (mulSingle i x : I → β) i' = (mulSingle i' x : I → β) i := by
   simp [mulSingle_apply, eq_comm]
-
 #align pi.mul_single_comm Pi.mulSingle_comm
 #align pi.single_comm Pi.single_comm
 
@@ -301,7 +289,6 @@ theorem mulSingle_comm [One β] (i : I) (x : β) (i' : I) :
 theorem apply_mulSingle (f' : ∀ i, f i → g i) (hf' : ∀ i, f' i 1 = 1) (i : I) (x : f i) (j : I) :
     f' j (mulSingle i x j) = mulSingle i (f' i x) j := by
   simpa only [Pi.one_apply, hf', mulSingle] using Function.apply_update f' 1 i x j
-
 #align pi.apply_mul_single Pi.apply_mulSingle
 #align pi.apply_single Pi.apply_single
 
@@ -313,7 +300,6 @@ theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i
   · subst h
     simp only [mulSingle_eq_same]
   · simp only [mulSingle_eq_of_ne h, hf']
-
 #align pi.apply_mul_single₂ Pi.apply_mulSingle₂
 #align pi.apply_single₂ Pi.apply_single₂
 
@@ -322,7 +308,6 @@ theorem mulSingle_op {g : I → Type _} [∀ i, One (g i)] (op : ∀ i, f i →
     (h : ∀ i, op i 1 = 1) (i : I) (x : f i) :
     mulSingle i (op i x) = fun j => op j (mulSingle i x j) :=
   Eq.symm <| funext <| apply_mulSingle op h i x
-
 #align pi.mul_single_op Pi.mulSingle_op
 #align pi.single_op Pi.single_op
 
@@ -331,7 +316,6 @@ theorem mulSingle_op₂ {g₁ g₂ : I → Type _} [∀ i, One (g₁ i)] [∀ i,
     (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
     mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j) :=
   Eq.symm <| funext <| apply_mulSingle₂ op h i x₁ x₂
-
 #align pi.mul_single_op₂ Pi.mulSingle_op₂
 #align pi.single_op₂ Pi.single_op₂
 
@@ -340,14 +324,12 @@ variable (f)
 @[to_additive]
 theorem mulSingle_injective (i : I) : Function.Injective (mulSingle i : f i → ∀ i, f i) :=
   Function.update_injective _ i
-
 #align pi.mul_single_injective Pi.mulSingle_injective
 #align pi.single_injective Pi.single_injective
 
 @[to_additive (attr := simp)]
 theorem mulSingle_inj (i : I) {x y : f i} : mulSingle i x = mulSingle i y ↔ x = y :=
   (Pi.mulSingle_injective _ _).eq_iff
-
 #align pi.mul_single_inj Pi.mulSingle_inj
 #align pi.single_inj Pi.single_inj
 
@@ -456,7 +438,6 @@ def uniqueOfSurjectiveOne (α : Type _) {β : Type _} [One β] (h : Function.Sur
 theorem Subsingleton.pi_mulSingle_eq {α : Type _} [DecidableEq I] [Subsingleton I] [One α]
     (i : I) (x : α) : Pi.mulSingle i x = fun _ => x :=
   funext fun j => by rw [Subsingleton.elim j i, Pi.mulSingle_eq_same]
-
 #align subsingleton.pi_mul_single_eq Subsingleton.pi_mulSingle_eq
 #align subsingleton.pi_single_eq Subsingleton.pi_single_eq
 
@@ -479,7 +460,6 @@ theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (
 theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (c : γ) :
     Sum.elim (1 : α → γ) (Pi.mulSingle i c) = Pi.mulSingle (Sum.inr i) c := by
   simp only [Pi.mulSingle, Sum.elim_update_right, elim_one_one]
-
 #align sum.elim_mul_single_one Sum.elim_mulSingle_one
 #align sum.elim_one_mul_single Sum.elim_one_mulSingle
 #align sum.elim_single_zero Sum.elim_single_zero
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
@@ -116,7 +116,7 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 #align pi.has_smul Pi.instSMul
 #align pi.has_vadd Pi.instVAdd
 
-@[to_additive instSMul]
+@[to_additive existing instSMul]
 instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
   ⟨fun x b i => x i ^ b⟩
 
feat: to_additive raises linter errors; nested to_additive (#1819)
  • Turn info messages of to_additive into linter errors
  • Allow @[to_additive (attr := to_additive)] to additivize the generated lemma. This is useful for Pow -> SMul -> VAdd lemmas. We can write e.g. @[to_additive (attr := to_additive, simp)] to add the simp attribute to all 3 generated lemmas, and we can provide other options to each to_additive call separately (specifying a name / reorder).
  • The previous point was needed to cleanly get rid of some linter warnings. It also required some additional changes (addToAdditiveAttr now returns a value, turn a few (meta) definitions into mutual partial def, reorder some definitions, generalize additivizeLemmas to lists of more than 2 elements) that should have no visible effects for the user.
Diff
@@ -120,34 +120,32 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
   ⟨fun x b i => x i ^ b⟩
 
-@[to_additive (attr := simp) (reorder := 5) smul_apply]
+@[to_additive (attr := simp, to_additive) (reorder := 5) smul_apply]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 #align pi.pow_apply Pi.pow_apply
 #align pi.smul_apply Pi.smul_apply
+#align pi.vadd_apply Pi.vadd_apply
 
-@[to_additive (reorder := 5) smul_def]
+@[to_additive (attr := to_additive) (reorder := 5) smul_def]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
 #align pi.pow_def Pi.pow_def
 #align pi.smul_def Pi.smul_def
+#align pi.vadd_def Pi.vadd_def
 
-@[to_additive (attr := simp) (reorder := 2 5) smul_const]
+@[to_additive (attr := simp, to_additive) (reorder := 2 5) smul_const]
 theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
   rfl
 #align pi.const_pow Pi.const_pow
 #align pi.smul_const Pi.smul_const
+#align pi.vadd_const Pi.vadd_const
 
-@[to_additive (reorder := 6) smul_comp]
+@[to_additive (attr := to_additive) (reorder := 6) smul_comp]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
 #align pi.pow_comp Pi.pow_comp
 #align pi.smul_comp Pi.smul_comp
-
-attribute [to_additive] smul_apply smul_def smul_const smul_comp
-#align pi.vadd_def Pi.vadd_def
-#align pi.vadd_const Pi.vadd_const
-#align pi.vadd_apply Pi.vadd_apply
 #align pi.vadd_comp Pi.vadd_comp
 
 /-!
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
@@ -51,22 +51,32 @@ instance instOne [∀ i, One <| f i] : One (∀ i : I, f i) :=
 @[to_additive (attr := simp)]
 theorem one_apply [∀ i, One <| f i] : (1 : ∀ i, f i) i = 1 :=
   rfl
+#align pi.one_apply Pi.one_apply
+#align pi.zero_apply Pi.zero_apply
 
 @[to_additive]
 theorem one_def [∀ i, One <| f i] : (1 : ∀ i, f i) = fun _ => 1 :=
   rfl
+#align pi.one_def Pi.one_def
+#align pi.zero_def Pi.zero_def
 
 @[to_additive (attr := simp)]
 theorem const_one [One β] : const α (1 : β) = 1 :=
   rfl
+#align pi.const_one Pi.const_one
+#align pi.const_zero Pi.const_zero
 
 @[to_additive (attr := simp)]
 theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
   rfl
+#align pi.one_comp Pi.one_comp
+#align pi.zero_comp Pi.zero_comp
 
 @[to_additive (attr := simp)]
 theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x 1) :=
   rfl
+#align pi.comp_one Pi.comp_one
+#align pi.comp_zero Pi.comp_zero
 
 @[to_additive]
 instance instMul [∀ i, Mul <| f i] : Mul (∀ i : I, f i) :=
@@ -78,18 +88,26 @@ instance instMul [∀ i, Mul <| f i] : Mul (∀ i : I, f i) :=
 @[to_additive (attr := simp)]
 theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i :=
   rfl
+#align pi.mul_apply Pi.mul_apply
+#align pi.add_apply Pi.add_apply
 
 @[to_additive]
 theorem mul_def [∀ i, Mul <| f i] : x * y = fun i => x i * y i :=
   rfl
+#align pi.mul_def Pi.mul_def
+#align pi.add_def Pi.add_def
 
 @[to_additive (attr := simp)]
 theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) :=
   rfl
+#align pi.const_mul Pi.const_mul
+#align pi.const_add Pi.const_add
 
 @[to_additive]
 theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z :=
   rfl
+#align pi.mul_comp Pi.mul_comp
+#align pi.add_comp Pi.add_comp
 
 @[to_additive]
 instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
@@ -105,20 +123,32 @@ instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
 @[to_additive (attr := simp) (reorder := 5) smul_apply]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
+#align pi.pow_apply Pi.pow_apply
+#align pi.smul_apply Pi.smul_apply
 
 @[to_additive (reorder := 5) smul_def]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
+#align pi.pow_def Pi.pow_def
+#align pi.smul_def Pi.smul_def
 
 @[to_additive (attr := simp) (reorder := 2 5) smul_const]
 theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
   rfl
+#align pi.const_pow Pi.const_pow
+#align pi.smul_const Pi.smul_const
 
 @[to_additive (reorder := 6) smul_comp]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
+#align pi.pow_comp Pi.pow_comp
+#align pi.smul_comp Pi.smul_comp
 
 attribute [to_additive] smul_apply smul_def smul_const smul_comp
+#align pi.vadd_def Pi.vadd_def
+#align pi.vadd_const Pi.vadd_const
+#align pi.vadd_apply Pi.vadd_apply
+#align pi.vadd_comp Pi.vadd_comp
 
 /-!
 Porting note: `bit0` and `bit1` are deprecated. This section can be removed entirely
@@ -131,10 +161,12 @@ set_option linter.deprecated false
 @[simp, deprecated]
 theorem bit0_apply [∀ i, Add <| f i] : (bit0 x) i = bit0 (x i) :=
   rfl
+#align pi.bit0_apply Pi.bit0_apply
 
 @[simp, deprecated]
 theorem bit1_apply [∀ i, Add <| f i] [∀ i, One <| f i] : (bit1 x) i = bit1 (x i) :=
   rfl
+#align pi.bit1_apply Pi.bit1_apply
 
 end deprecated
 
@@ -148,18 +180,26 @@ instance instInv [∀ i, Inv <| f i] : Inv (∀ i : I, f i) :=
 @[to_additive (attr := simp)]
 theorem inv_apply [∀ i, Inv <| f i] : x⁻¹ i = (x i)⁻¹ :=
   rfl
+#align pi.inv_apply Pi.inv_apply
+#align pi.neg_apply Pi.neg_apply
 
 @[to_additive]
 theorem inv_def [∀ i, Inv <| f i] : x⁻¹ = fun i => (x i)⁻¹ :=
   rfl
+#align pi.inv_def Pi.inv_def
+#align pi.neg_def Pi.neg_def
 
 @[to_additive]
 theorem const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ :=
   rfl
+#align pi.const_inv Pi.const_inv
+#align pi.const_neg Pi.const_neg
 
 @[to_additive]
 theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹ :=
   rfl
+#align pi.inv_comp Pi.inv_comp
+#align pi.neg_comp Pi.neg_comp
 
 @[to_additive]
 instance instDiv [∀ i, Div <| f i] : Div (∀ i : I, f i) :=
@@ -171,18 +211,26 @@ instance instDiv [∀ i, Div <| f i] : Div (∀ i : I, f i) :=
 @[to_additive (attr := simp)]
 theorem div_apply [∀ i, Div <| f i] : (x / y) i = x i / y i :=
   rfl
+#align pi.div_apply Pi.div_apply
+#align pi.sub_apply Pi.sub_apply
 
 @[to_additive]
 theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i :=
   rfl
+#align pi.div_def Pi.div_def
+#align pi.sub_def Pi.sub_def
 
 @[to_additive]
 theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z :=
   rfl
+#align pi.div_comp Pi.div_comp
+#align pi.sub_comp Pi.sub_comp
 
 @[to_additive (attr := simp)]
 theorem const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) :=
   rfl
+#align pi.const_div Pi.const_div
+#align pi.const_sub Pi.const_sub
 
 section
 
@@ -311,16 +359,19 @@ end
 @[simp]
 protected def prod (f' : ∀ i, f i) (g' : ∀ i, g i) (i : I) : f i × g i :=
   (f' i, g' i)
+#align pi.prod Pi.prod
 
 -- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
 -- @[simp]
 theorem prod_fst_snd : Pi.prod (Prod.fst : α × β → α) (Prod.snd : α × β → β) = id :=
   funext fun _ => Prod.mk.eta
+#align pi.prod_fst_snd Pi.prod_fst_snd
 
 -- Porting note : simp now unfolds the lhs, so we are not marking these as simp.
 -- @[simp]
 theorem prod_snd_fst : Pi.prod (Prod.snd : α × β → β) (Prod.fst : α × β → α) = Prod.swap :=
   rfl
+#align pi.prod_snd_fst Pi.prod_snd_fst
 
 end Pi
 
@@ -331,6 +382,8 @@ section Extend
 @[to_additive]
 theorem extend_one [One γ] (f : α → β) : Function.extend f (1 : α → γ) (1 : β → γ) = 1 :=
   funext fun _ => by apply ite_self
+#align function.extend_one Function.extend_one
+#align function.extend_zero Function.extend_zero
 
 @[to_additive]
 theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ):
@@ -343,6 +396,8 @@ theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
 -- which converts to
 -- `funext fun _ => by convert (apply_dite₂ (· * ·) _ _ _ _ _).symm`
 -- However this does not work, and we're not sure why.
+#align function.extend_mul Function.extend_mul
+#align function.extend_add Function.extend_add
 
 @[to_additive]
 theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
@@ -355,6 +410,8 @@ theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
 -- which converts to
 -- `funext fun _ => by convert (apply_dite Inv.inv _ _ _).symm`
 -- However this does not work, and we're not sure why.
+#align function.extend_inv Function.extend_inv
+#align function.extend_neg Function.extend_neg
 
 @[to_additive]
 theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
@@ -367,20 +424,25 @@ theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ :
 -- which converts to
 -- `funext fun _ => by convert (apply_dite₂ (· / ·) _ _ _ _ _).symm`
 -- However this does not work, and we're not sure why.
+#align function.extend_div Function.extend_div
+#align function.extend_sub Function.extend_sub
 
 end Extend
 
 theorem surjective_pi_map {F : ∀ i, f i → g i} (hF : ∀ i, Surjective (F i)) :
     Surjective fun x : ∀ i, f i => fun i => F i (x i) := fun y =>
   ⟨fun i => (hF i (y i)).choose, funext fun i => (hF i (y i)).choose_spec⟩
+#align function.surjective_pi_map Function.surjective_pi_map
 
 theorem injective_pi_map {F : ∀ i, f i → g i} (hF : ∀ i, Injective (F i)) :
     Injective fun x : ∀ i, f i => fun i => F i (x i) :=
   fun _ _ h => funext fun i => hF i <| (congr_fun h i : _)
+#align function.injective_pi_map Function.injective_pi_map
 
 theorem bijective_pi_map {F : ∀ i, f i → g i} (hF : ∀ i, Bijective (F i)) :
     Bijective fun x : ∀ i, f i => fun i => F i (x i) :=
   ⟨injective_pi_map fun i => (hF i).injective, surjective_pi_map fun i => (hF i).surjective⟩
+#align function.bijective_pi_map Function.bijective_pi_map
 
 end Function
 
@@ -389,6 +451,8 @@ end Function
 def uniqueOfSurjectiveOne (α : Type _) {β : Type _} [One β] (h : Function.Surjective (1 : α → β)) :
     Unique β :=
   h.uniqueOfSurjectiveConst α (1 : β)
+#align unique_of_surjective_one uniqueOfSurjectiveOne
+#align unique_of_surjective_zero uniqueOfSurjectiveZero
 
 @[to_additive]
 theorem Subsingleton.pi_mulSingle_eq {α : Type _} [DecidableEq I] [Subsingleton I] [One α]
@@ -405,6 +469,8 @@ variable (a a' : α → γ) (b b' : β → γ)
 @[to_additive (attr := simp)]
 theorem elim_one_one [One γ] : Sum.elim (1 : α → γ) (1 : β → γ) = 1 :=
   Sum.elim_const_const 1
+#align sum.elim_one_one Sum.elim_one_one
+#align sum.elim_zero_zero Sum.elim_zero_zero
 
 @[to_additive (attr := simp)]
 theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (c : γ) :
@@ -424,15 +490,21 @@ theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (
 @[to_additive]
 theorem elim_inv_inv [Inv γ] : Sum.elim a⁻¹ b⁻¹ = (Sum.elim a b)⁻¹ :=
   (Sum.comp_elim Inv.inv a b).symm
+#align sum.elim_inv_inv Sum.elim_inv_inv
+#align sum.elim_neg_neg Sum.elim_neg_neg
 
 @[to_additive]
 theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b' := by
   ext x
   cases x <;> rfl
+#align sum.elim_mul_mul Sum.elim_mul_mul
+#align sum.elim_add_add Sum.elim_add_add
 
 @[to_additive]
 theorem elim_div_div [Div γ] : Sum.elim (a / a') (b / b') = Sum.elim a b / Sum.elim a' b' := by
   ext x
   cases x <;> rfl
+#align sum.elim_div_div Sum.elim_div_div
+#align sum.elim_sub_sub Sum.elim_sub_sub
 
 end Sum
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
@@ -98,24 +98,23 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 #align pi.has_smul Pi.instSMul
 #align pi.has_vadd Pi.instVAdd
 
-@[to_additive]
+@[to_additive instSMul]
 instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
   ⟨fun x b i => x i ^ b⟩
 
-@[to_additive (attr := simp) (reorder := 5)]
+@[to_additive (attr := simp) (reorder := 5) smul_apply]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 
-@[to_additive (reorder := 5)]
+@[to_additive (reorder := 5) smul_def]
 theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
   rfl
 
--- `to_additive` generates bad output if we take `Pow α β`.
-@[to_additive (attr := simp) (reorder := 5) smul_const]
-theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a) :=
+@[to_additive (attr := simp) (reorder := 2 5) smul_const]
+theorem const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) :=
   rfl
 
-@[to_additive (reorder := 6)]
+@[to_additive (reorder := 6) smul_comp]
 theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
   rfl
 
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
@@ -48,7 +48,7 @@ instance instOne [∀ i, One <| f i] : One (∀ i : I, f i) :=
 #align pi.has_one Pi.instOne
 #align pi.has_zero Pi.instZero
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem one_apply [∀ i, One <| f i] : (1 : ∀ i, f i) i = 1 :=
   rfl
 
@@ -56,15 +56,15 @@ theorem one_apply [∀ i, One <| f i] : (1 : ∀ i, f i) i = 1 :=
 theorem one_def [∀ i, One <| f i] : (1 : ∀ i, f i) = fun _ => 1 :=
   rfl
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem const_one [One β] : const α (1 : β) = 1 :=
   rfl
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
   rfl
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x 1) :=
   rfl
 
@@ -75,7 +75,7 @@ instance instMul [∀ i, Mul <| f i] : Mul (∀ i : I, f i) :=
 #align pi.has_mul Pi.instMul
 #align pi.has_add Pi.instAdd
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i :=
   rfl
 
@@ -83,7 +83,7 @@ theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i :=
 theorem mul_def [∀ i, Mul <| f i] : x * y = fun i => x i * y i :=
   rfl
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) :=
   rfl
 
@@ -102,7 +102,7 @@ instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
 instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
   ⟨fun x b i => x i ^ b⟩
 
-@[simp, to_additive (reorder := 5)]
+@[to_additive (attr := simp) (reorder := 5)]
 theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
   rfl
 
@@ -111,7 +111,7 @@ theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i
   rfl
 
 -- `to_additive` generates bad output if we take `Pow α β`.
-@[simp, to_additive (reorder := 5) smul_const]
+@[to_additive (attr := simp) (reorder := 5) smul_const]
 theorem const_pow [Pow β α] (b : β) (a : α) : const I b ^ a = const I (b ^ a) :=
   rfl
 
@@ -146,7 +146,7 @@ instance instInv [∀ i, Inv <| f i] : Inv (∀ i : I, f i) :=
 #align pi.has_inv Pi.instInv
 #align pi.has_neg Pi.instNeg
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem inv_apply [∀ i, Inv <| f i] : x⁻¹ i = (x i)⁻¹ :=
   rfl
 
@@ -169,7 +169,7 @@ instance instDiv [∀ i, Div <| f i] : Div (∀ i : I, f i) :=
 #align pi.has_div Pi.instDiv
 #align pi.has_sub Pi.instSub
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem div_apply [∀ i, Div <| f i] : (x / y) i = x i / y i :=
   rfl
 
@@ -181,7 +181,7 @@ theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i :=
 theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z :=
   rfl
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) :=
   rfl
 
@@ -199,14 +199,14 @@ def mulSingle (i : I) (x : f i) : ∀ (j : I), f j :=
 #align pi.mul_single Pi.mulSingle
 #align pi.single Pi.single
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem mulSingle_eq_same (i : I) (x : f i) : mulSingle i x i = x :=
   Function.update_same i x _
 
 #align pi.mul_single_eq_same Pi.mulSingle_eq_same
 #align pi.single_eq_same Pi.single_eq_same
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i' = 1 :=
   Function.update_noteq h x _
 
@@ -214,14 +214,15 @@ theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i
 #align pi.single_eq_of_ne Pi.single_eq_of_ne
 
 /-- Abbreviation for `mulSingle_eq_of_ne h.symm`, for ease of use by `simp`. -/
-@[simp, to_additive "Abbreviation for `single_eq_of_ne h.symm`, for ease of use by `simp`."]
+@[to_additive (attr := simp)
+  "Abbreviation for `single_eq_of_ne h.symm`, for ease of use by `simp`."]
 theorem mulSingle_eq_of_ne' {i i' : I} (h : i ≠ i') (x : f i) : mulSingle i x i' = 1 :=
   mulSingle_eq_of_ne h.symm x
 
 #align pi.mul_single_eq_of_ne' Pi.mulSingle_eq_of_ne'
 #align pi.single_eq_of_ne' Pi.single_eq_of_ne'
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
   Function.update_eq_self _ _
 
@@ -298,7 +299,7 @@ theorem mulSingle_injective (i : I) : Function.Injective (mulSingle i : f i →
 #align pi.mul_single_injective Pi.mulSingle_injective
 #align pi.single_injective Pi.single_injective
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem mulSingle_inj (i : I) {x y : f i} : mulSingle i x = mulSingle i y ↔ x = y :=
   (Pi.mulSingle_injective _ _).eq_iff
 
@@ -402,16 +403,16 @@ namespace Sum
 
 variable (a a' : α → γ) (b b' : β → γ)
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem elim_one_one [One γ] : Sum.elim (1 : α → γ) (1 : β → γ) = 1 :=
   Sum.elim_const_const 1
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (c : γ) :
     Sum.elim (Pi.mulSingle i c) (1 : β → γ) = Pi.mulSingle (Sum.inl i) c := by
   simp only [Pi.mulSingle, Sum.elim_update_left, elim_one_one]
 
-@[simp, to_additive]
+@[to_additive (attr := simp)]
 theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (c : γ) :
     Sum.elim (1 : α → γ) (Pi.mulSingle i c) = Pi.mulSingle (Sum.inr i) c := by
   simp only [Pi.mulSingle, Sum.elim_update_right, elim_one_one]
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -3,6 +3,11 @@ Copyright (c) 2020 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot, Eric Wieser
 Ported by: Jon Eugster
+
+! This file was ported from Lean 3 source module data.pi.algebra
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Group.Defs
 import Mathlib.Data.Prod.Basic

Dependencies 9

10 files ported (100.0%)
5196 lines ported (100.0%)

All dependencies are ported!