category_theory.monoidal.preadditiveMathlib.CategoryTheory.Monoidal.Preadditive

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -85,7 +85,7 @@ instance tensoringRight_additive (X : C) : ((tensoringRight C).obj X).Additive w
 /-- A faithful additive monoidal functor to a monoidal preadditive category
 ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
-    (F : MonoidalFunctor D C) [Faithful F.toFunctor] [F.toFunctor.Additive] :
+    (F : MonoidalFunctor D C) [CategoryTheory.Functor.Faithful F.toFunctor] [F.toFunctor.Additive] :
     MonoidalPreadditive D :=
   { tensor_zero' := by intros; apply F.to_functor.map_injective; simp [F.map_tensor]
     zero_tensor' := by intros; apply F.to_functor.map_injective; simp [F.map_tensor]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.CategoryTheory.Preadditive.AdditiveFunctor
-import Mathbin.CategoryTheory.Monoidal.Functor
+import CategoryTheory.Preadditive.AdditiveFunctor
+import CategoryTheory.Monoidal.Functor
 
 #align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"8ef6f08ff8c781c5c07a8b12843710e1a0d8a688"
 
Diff
@@ -55,14 +55,6 @@ class MonoidalPreadditive : Prop where
 #align category_theory.monoidal_preadditive CategoryTheory.MonoidalPreadditive
 -/
 
-restate_axiom monoidal_preadditive.tensor_zero'
-
-restate_axiom monoidal_preadditive.zero_tensor'
-
-restate_axiom monoidal_preadditive.tensor_add'
-
-restate_axiom monoidal_preadditive.add_tensor'
-
 attribute [simp] monoidal_preadditive.tensor_zero monoidal_preadditive.zero_tensor
 
 variable {C} [MonoidalPreadditive C]
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.monoidal.preadditive
-! leanprover-community/mathlib commit 8ef6f08ff8c781c5c07a8b12843710e1a0d8a688
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Preadditive.AdditiveFunctor
 import Mathbin.CategoryTheory.Monoidal.Functor
 
+#align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"8ef6f08ff8c781c5c07a8b12843710e1a0d8a688"
+
 /-!
 # Preadditive monoidal categories
 
Diff
@@ -82,12 +82,17 @@ instance tensorRight_additive (X : C) : (tensorRight X).Additive where
 #align category_theory.tensor_right_additive CategoryTheory.tensorRight_additive
 -/
 
+#print CategoryTheory.tensoringLeft_additive /-
 instance tensoringLeft_additive (X : C) : ((tensoringLeft C).obj X).Additive where
 #align category_theory.tensoring_left_additive CategoryTheory.tensoringLeft_additive
+-/
 
+#print CategoryTheory.tensoringRight_additive /-
 instance tensoringRight_additive (X : C) : ((tensoringRight C).obj X).Additive where
 #align category_theory.tensoring_right_additive CategoryTheory.tensoringRight_additive
+-/
 
+#print CategoryTheory.monoidalPreadditive_of_faithful /-
 /-- A faithful additive monoidal functor to a monoidal preadditive category
 ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
@@ -106,6 +111,7 @@ theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [Monoid
       simp only [F.map_tensor, F.to_functor.map_add, preadditive.comp_add, preadditive.add_comp,
         monoidal_preadditive.add_tensor] }
 #align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithful
+-/
 
 open scoped BigOperators
 
Diff
@@ -113,7 +113,7 @@ open scoped BigOperators
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print CategoryTheory.tensor_sum /-
 theorem tensor_sum {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
-    (f ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j :=
+    f ⊗ ∑ j in s, g j = ∑ j in s, f ⊗ g j :=
   by
   rw [← tensor_id_comp_id_tensor]
   let tQ := (((tensoring_left C).obj Q).mapAddHom : (R ⟶ S) →+ _)
Diff
@@ -93,8 +93,8 @@ ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
     (F : MonoidalFunctor D C) [Faithful F.toFunctor] [F.toFunctor.Additive] :
     MonoidalPreadditive D :=
-  { tensor_zero' := by intros ; apply F.to_functor.map_injective; simp [F.map_tensor]
-    zero_tensor' := by intros ; apply F.to_functor.map_injective; simp [F.map_tensor]
+  { tensor_zero' := by intros; apply F.to_functor.map_injective; simp [F.map_tensor]
+    zero_tensor' := by intros; apply F.to_functor.map_injective; simp [F.map_tensor]
     tensor_add' := by
       intros
       apply F.to_functor.map_injective
Diff
@@ -24,7 +24,7 @@ is linear in both factors.
 
 noncomputable section
 
-open Classical
+open scoped Classical
 
 namespace CategoryTheory
 
@@ -107,7 +107,7 @@ theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [Monoid
         monoidal_preadditive.add_tensor] }
 #align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithful
 
-open BigOperators
+open scoped BigOperators
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
Diff
@@ -82,30 +82,12 @@ instance tensorRight_additive (X : C) : (tensorRight X).Additive where
 #align category_theory.tensor_right_additive CategoryTheory.tensorRight_additive
 -/
 
-/- warning: category_theory.tensoring_left_additive -> CategoryTheory.tensoringLeft_additive is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.Functor.obj.{u2, max u1 u2, u1, max u2 u1} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringLeft.{u2, u1} C _inst_1 _inst_3) X)
-but is expected to have type
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (Prefunctor.obj.{succ u2, max (succ u1) (succ u2), u1, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u1} C (CategoryTheory.Category.toCategoryStruct.{u2, u1} C _inst_1)) (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u2, max u1 u2, u1, max u1 u2} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringLeft.{u2, u1} C _inst_1 _inst_3)) X)
-Case conversion may be inaccurate. Consider using '#align category_theory.tensoring_left_additive CategoryTheory.tensoringLeft_additiveₓ'. -/
 instance tensoringLeft_additive (X : C) : ((tensoringLeft C).obj X).Additive where
 #align category_theory.tensoring_left_additive CategoryTheory.tensoringLeft_additive
 
-/- warning: category_theory.tensoring_right_additive -> CategoryTheory.tensoringRight_additive is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.Functor.obj.{u2, max u1 u2, u1, max u2 u1} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringRight.{u2, u1} C _inst_1 _inst_3) X)
-but is expected to have type
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (Prefunctor.obj.{succ u2, max (succ u1) (succ u2), u1, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u1} C (CategoryTheory.Category.toCategoryStruct.{u2, u1} C _inst_1)) (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u2, max u1 u2, u1, max u1 u2} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringRight.{u2, u1} C _inst_1 _inst_3)) X)
-Case conversion may be inaccurate. Consider using '#align category_theory.tensoring_right_additive CategoryTheory.tensoringRight_additiveₓ'. -/
 instance tensoringRight_additive (X : C) : ((tensoringRight C).obj X).Additive where
 #align category_theory.tensoring_right_additive CategoryTheory.tensoringRight_additive
 
-/- warning: category_theory.monoidal_preadditive_of_faithful -> CategoryTheory.monoidalPreadditive_of_faithful is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] {D : Type.{u3}} [_inst_5 : CategoryTheory.Category.{u4, u3} D] [_inst_6 : CategoryTheory.Preadditive.{u4, u3} D _inst_5] [_inst_7 : CategoryTheory.MonoidalCategory.{u4, u3} D _inst_5] (F : CategoryTheory.MonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3) [_inst_8 : CategoryTheory.Faithful.{u4, u2, u3, u1} D _inst_5 C _inst_1 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))] [_inst_9 : CategoryTheory.Functor.Additive.{u3, u1, u4, u2} D C _inst_5 _inst_1 _inst_6 _inst_2 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))], CategoryTheory.MonoidalPreadditive.{u3, u4} D _inst_5 _inst_6 _inst_7
-but is expected to have type
-  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u3, u4} D] [_inst_6 : CategoryTheory.Preadditive.{u3, u4} D _inst_5] [_inst_7 : CategoryTheory.MonoidalCategory.{u3, u4} D _inst_5] (F : CategoryTheory.MonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3) [_inst_8 : CategoryTheory.Faithful.{u3, u2, u4, u1} D _inst_5 C _inst_1 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))] [_inst_9 : CategoryTheory.Functor.Additive.{u4, u1, u3, u2} D C _inst_5 _inst_1 _inst_6 _inst_2 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))], CategoryTheory.MonoidalPreadditive.{u4, u3} D _inst_5 _inst_6 _inst_7
-Case conversion may be inaccurate. Consider using '#align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithfulₓ'. -/
 /-- A faithful additive monoidal functor to a monoidal preadditive category
 ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
Diff
@@ -111,14 +111,8 @@ ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
     (F : MonoidalFunctor D C) [Faithful F.toFunctor] [F.toFunctor.Additive] :
     MonoidalPreadditive D :=
-  { tensor_zero' := by
-      intros
-      apply F.to_functor.map_injective
-      simp [F.map_tensor]
-    zero_tensor' := by
-      intros
-      apply F.to_functor.map_injective
-      simp [F.map_tensor]
+  { tensor_zero' := by intros ; apply F.to_functor.map_injective; simp [F.map_tensor]
+    zero_tensor' := by intros ; apply F.to_functor.map_injective; simp [F.map_tensor]
     tensor_add' := by
       intros
       apply F.to_functor.map_injective
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.monoidal.preadditive
-! leanprover-community/mathlib commit 986c4d5761f938b2e1c43c01f001b6d9d88c2055
+! leanprover-community/mathlib commit 8ef6f08ff8c781c5c07a8b12843710e1a0d8a688
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.CategoryTheory.Monoidal.Functor
 /-!
 # Preadditive monoidal categories
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 A monoidal category is `monoidal_preadditive` if it is preadditive and tensor product of morphisms
 is linear in both factors.
 -/
Diff
@@ -31,6 +31,7 @@ open CategoryTheory.MonoidalCategory
 
 variable (C : Type _) [Category C] [Preadditive C] [MonoidalCategory C]
 
+#print CategoryTheory.MonoidalPreadditive /-
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -52,6 +53,7 @@ class MonoidalPreadditive : Prop where
   add_tensor' : ∀ {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
     obviously
 #align category_theory.monoidal_preadditive CategoryTheory.MonoidalPreadditive
+-/
 
 restate_axiom monoidal_preadditive.tensor_zero'
 
@@ -67,18 +69,40 @@ variable {C} [MonoidalPreadditive C]
 
 attribute [local simp] monoidal_preadditive.tensor_add monoidal_preadditive.add_tensor
 
+#print CategoryTheory.tensorLeft_additive /-
 instance tensorLeft_additive (X : C) : (tensorLeft X).Additive where
 #align category_theory.tensor_left_additive CategoryTheory.tensorLeft_additive
+-/
 
+#print CategoryTheory.tensorRight_additive /-
 instance tensorRight_additive (X : C) : (tensorRight X).Additive where
 #align category_theory.tensor_right_additive CategoryTheory.tensorRight_additive
+-/
 
+/- warning: category_theory.tensoring_left_additive -> CategoryTheory.tensoringLeft_additive is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.Functor.obj.{u2, max u1 u2, u1, max u2 u1} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringLeft.{u2, u1} C _inst_1 _inst_3) X)
+but is expected to have type
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (Prefunctor.obj.{succ u2, max (succ u1) (succ u2), u1, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u1} C (CategoryTheory.Category.toCategoryStruct.{u2, u1} C _inst_1)) (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u2, max u1 u2, u1, max u1 u2} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringLeft.{u2, u1} C _inst_1 _inst_3)) X)
+Case conversion may be inaccurate. Consider using '#align category_theory.tensoring_left_additive CategoryTheory.tensoringLeft_additiveₓ'. -/
 instance tensoringLeft_additive (X : C) : ((tensoringLeft C).obj X).Additive where
 #align category_theory.tensoring_left_additive CategoryTheory.tensoringLeft_additive
 
+/- warning: category_theory.tensoring_right_additive -> CategoryTheory.tensoringRight_additive is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.Functor.obj.{u2, max u1 u2, u1, max u2 u1} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringRight.{u2, u1} C _inst_1 _inst_3) X)
+but is expected to have type
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] (X : C), CategoryTheory.Functor.Additive.{u1, u1, u2, u2} C C _inst_1 _inst_1 _inst_2 _inst_2 (Prefunctor.obj.{succ u2, max (succ u1) (succ u2), u1, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u1} C (CategoryTheory.Category.toCategoryStruct.{u2, u1} C _inst_1)) (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u1 u2, max u1 u2} (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u2, max u1 u2, u1, max u1 u2} C _inst_1 (CategoryTheory.Functor.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.Functor.category.{u2, u2, u1, u1} C _inst_1 C _inst_1) (CategoryTheory.MonoidalCategory.tensoringRight.{u2, u1} C _inst_1 _inst_3)) X)
+Case conversion may be inaccurate. Consider using '#align category_theory.tensoring_right_additive CategoryTheory.tensoringRight_additiveₓ'. -/
 instance tensoringRight_additive (X : C) : ((tensoringRight C).obj X).Additive where
 #align category_theory.tensoring_right_additive CategoryTheory.tensoringRight_additive
 
+/- warning: category_theory.monoidal_preadditive_of_faithful -> CategoryTheory.monoidalPreadditive_of_faithful is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] {D : Type.{u3}} [_inst_5 : CategoryTheory.Category.{u4, u3} D] [_inst_6 : CategoryTheory.Preadditive.{u4, u3} D _inst_5] [_inst_7 : CategoryTheory.MonoidalCategory.{u4, u3} D _inst_5] (F : CategoryTheory.MonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3) [_inst_8 : CategoryTheory.Faithful.{u4, u2, u3, u1} D _inst_5 C _inst_1 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))] [_inst_9 : CategoryTheory.Functor.Additive.{u3, u1, u4, u2} D C _inst_5 _inst_1 _inst_6 _inst_2 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u4, u2, u3, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))], CategoryTheory.MonoidalPreadditive.{u3, u4} D _inst_5 _inst_6 _inst_7
+but is expected to have type
+  forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.MonoidalCategory.{u2, u1} C _inst_1] [_inst_4 : CategoryTheory.MonoidalPreadditive.{u1, u2} C _inst_1 _inst_2 _inst_3] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u3, u4} D] [_inst_6 : CategoryTheory.Preadditive.{u3, u4} D _inst_5] [_inst_7 : CategoryTheory.MonoidalCategory.{u3, u4} D _inst_5] (F : CategoryTheory.MonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3) [_inst_8 : CategoryTheory.Faithful.{u3, u2, u4, u1} D _inst_5 C _inst_1 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))] [_inst_9 : CategoryTheory.Functor.Additive.{u4, u1, u3, u2} D C _inst_5 _inst_1 _inst_6 _inst_2 (CategoryTheory.LaxMonoidalFunctor.toFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 (CategoryTheory.MonoidalFunctor.toLaxMonoidalFunctor.{u3, u2, u4, u1} D _inst_5 _inst_7 C _inst_1 _inst_3 F))], CategoryTheory.MonoidalPreadditive.{u4, u3} D _inst_5 _inst_6 _inst_7
+Case conversion may be inaccurate. Consider using '#align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithfulₓ'. -/
 /-- A faithful additive monoidal functor to a monoidal preadditive category
 ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
@@ -108,6 +132,7 @@ open BigOperators
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.tensor_sum /-
 theorem tensor_sum {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (f ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j :=
   by
@@ -118,9 +143,11 @@ theorem tensor_sum {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g :
   dsimp [tQ]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.tensor_sum CategoryTheory.tensor_sum
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.sum_tensor /-
 theorem sum_tensor {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (∑ j in s, g j) ⊗ f = ∑ j in s, g j ⊗ f :=
   by
@@ -131,6 +158,7 @@ theorem sum_tensor {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g :
   dsimp [tQ]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.sum_tensor CategoryTheory.sum_tensor
+-/
 
 variable {C}
 
@@ -165,12 +193,15 @@ variable [HasFiniteBiproducts C]
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.leftDistributor /-
 /-- The isomorphism showing how tensor product on the left distributes over direct sums. -/
 def leftDistributor {J : Type} [Fintype J] (X : C) (f : J → C) : X ⊗ ⨁ f ≅ ⨁ fun j => X ⊗ f j :=
   (tensorLeft X).mapBiproduct f
 #align category_theory.left_distributor CategoryTheory.leftDistributor
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.leftDistributor_hom /-
 @[simp]
 theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     (leftDistributor X f).Hom = ∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι _ j :=
@@ -178,8 +209,10 @@ theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
   ext; dsimp [tensor_left, left_distributor]
   simp [preadditive.sum_comp, biproduct.ι_π, comp_dite]
 #align category_theory.left_distributor_hom CategoryTheory.leftDistributor_hom
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.leftDistributor_inv /-
 @[simp]
 theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
     (leftDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (𝟙 X ⊗ biproduct.ι f j) :=
@@ -187,9 +220,11 @@ theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
   ext; dsimp [tensor_left, left_distributor]
   simp [preadditive.comp_sum, biproduct.ι_π_assoc, dite_comp]
 #align category_theory.left_distributor_inv CategoryTheory.leftDistributor_inv
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.leftDistributor_assoc /-
 theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     (asIso (𝟙 X) ⊗ leftDistributor Y f) ≪≫ leftDistributor X _ =
       (α_ X Y (⨁ f)).symm ≪≫ leftDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => α_ X Y _ :=
@@ -205,15 +240,19 @@ theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     tensor_id, if_true, dif_ctx_congr, Finset.sum_congr, Finset.mem_univ, Finset.sum_dite_eq']
   simp only [← tensor_id, associator_naturality, iso.inv_hom_id_assoc]
 #align category_theory.left_distributor_assoc CategoryTheory.leftDistributor_assoc
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.rightDistributor /-
 /-- The isomorphism showing how tensor product on the right distributes over direct sums. -/
 def rightDistributor {J : Type} [Fintype J] (X : C) (f : J → C) : (⨁ f) ⊗ X ≅ ⨁ fun j => f j ⊗ X :=
   (tensorRight X).mapBiproduct f
 #align category_theory.right_distributor CategoryTheory.rightDistributor
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.rightDistributor_hom /-
 @[simp]
 theorem rightDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     (rightDistributor X f).Hom = ∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι _ j :=
@@ -221,8 +260,10 @@ theorem rightDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
   ext; dsimp [tensor_right, right_distributor]
   simp [preadditive.sum_comp, biproduct.ι_π, comp_dite]
 #align category_theory.right_distributor_hom CategoryTheory.rightDistributor_hom
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.rightDistributor_inv /-
 @[simp]
 theorem rightDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
     (rightDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (biproduct.ι f j ⊗ 𝟙 X) :=
@@ -230,9 +271,11 @@ theorem rightDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
   ext; dsimp [tensor_right, right_distributor]
   simp [preadditive.comp_sum, biproduct.ι_π_assoc, dite_comp]
 #align category_theory.right_distributor_inv CategoryTheory.rightDistributor_inv
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.rightDistributor_assoc /-
 theorem rightDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     (rightDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor Y _ =
       α_ (⨁ f) X Y ≪≫ rightDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => (α_ _ X Y).symm :=
@@ -249,9 +292,11 @@ theorem rightDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     Finset.sum_dite_eq']
   simp only [← tensor_id, associator_inv_naturality, iso.hom_inv_id_assoc]
 #align category_theory.right_distributor_assoc CategoryTheory.rightDistributor_assoc
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print CategoryTheory.leftDistributor_rightDistributor_assoc /-
 theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J] (X Y : C) (f : J → C) :
     (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor Y _ =
       α_ X (⨁ f) Y ≪≫
@@ -272,6 +317,7 @@ theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J] (X Y : C
     Finset.sum_dite_eq']
   simp only [associator_inv_naturality, iso.hom_inv_id_assoc]
 #align category_theory.left_distributor_right_distributor_assoc CategoryTheory.leftDistributor_rightDistributor_assoc
+-/
 
 end CategoryTheory
 

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

These notions on functors are now Functor.Full, Functor.Faithful, Functor.EssSurj, Functor.IsEquivalence, Functor.ReflectsIsomorphisms. Deprecated aliases are introduced for the previous names.

Diff
@@ -80,7 +80,7 @@ instance tensoringRight_additive (X : C) : ((tensoringRight C).obj X).Additive w
 /-- A faithful additive monoidal functor to a monoidal preadditive category
 ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
-    (F : MonoidalFunctor D C) [Faithful F.toFunctor] [F.toFunctor.Additive] :
+    (F : MonoidalFunctor D C) [F.Faithful] [F.Additive] :
     MonoidalPreadditive D :=
   { whiskerLeft_zero := by
       intros
chore(CategoryTheory/Monoidal): replace 𝟙 X ⊗ f with X ◁ f (#11223)

Extracted from #6307

Diff
@@ -202,7 +202,7 @@ theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
   simp_rw [← id_tensorHom]
   simp only [← id_tensor_comp, biproduct.ι_π]
   simp only [id_tensor_comp, tensor_dite, comp_dite]
-  simp [id_tensorHom]
+  simp
 #align category_theory.left_distributor_assoc CategoryTheory.leftDistributor_assoc
 
 /-- The isomorphism showing how tensor product on the right distributes over direct sums. -/
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -17,7 +17,7 @@ is linear in both factors.
 
 noncomputable section
 
-open Classical
+open scoped Classical
 
 namespace CategoryTheory
 
feat(CategoryTheory/Monoidal): replace 𝟙 X ⊗ f with X ◁ f (#10912)

We set id_tensorHom and tensorHom_id as simp lemmas. Partially extracted from #6307.

Diff
@@ -85,20 +85,20 @@ theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [Monoid
   { whiskerLeft_zero := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_whiskerLeft']
+      simp [F.map_whiskerLeft]
     zero_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_whiskerRight']
+      simp [F.map_whiskerRight]
     whiskerLeft_add := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_whiskerLeft', Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+      simp only [F.map_whiskerLeft, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
         MonoidalPreadditive.whiskerLeft_add]
     add_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_whiskerRight', Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+      simp only [F.map_whiskerRight, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
         MonoidalPreadditive.add_whiskerRight] }
 #align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithful
 
feat(CategoryTheory/Monoidal): redefine tensorLeft by using whiskering (#10898)

Extracted from #6307

Diff
@@ -33,11 +33,10 @@ Note we don't `extend Preadditive C` here, as `Abelian C` already extends it,
 and we'll need to have both typeclasses sometimes.
 -/
 class MonoidalPreadditive : Prop where
-  -- Note: `𝟙 X ⊗ f` will be replaced by `X ◁ f` (and similarly for `f ⊗ 𝟙 X`) in #6307.
-  whiskerLeft_zero : ∀ {X Y Z : C}, 𝟙 X ⊗ (0 : Y ⟶ Z) = 0 := by aesop_cat
-  zero_whiskerRight : ∀ {X Y Z : C}, (0 : Y ⟶ Z) ⊗ 𝟙 X = 0 := by aesop_cat
-  whiskerLeft_add : ∀ {X Y Z : C} (f g : Y ⟶ Z), 𝟙 X ⊗ (f + g) = 𝟙 X ⊗ f + 𝟙 X ⊗ g := by aesop_cat
-  add_whiskerRight : ∀ {X Y Z : C} (f g : Y ⟶ Z), (f + g) ⊗ 𝟙 X = f ⊗ 𝟙 X + g ⊗ 𝟙 X := by aesop_cat
+  whiskerLeft_zero : ∀ {X Y Z : C}, X ◁ (0 : Y ⟶ Z) = 0 := by aesop_cat
+  zero_whiskerRight : ∀ {X Y Z : C}, (0 : Y ⟶ Z) ▷ X = 0 := by aesop_cat
+  whiskerLeft_add : ∀ {X Y Z : C} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g := by aesop_cat
+  add_whiskerRight : ∀ {X Y Z : C} (f g : Y ⟶ Z), (f + g) ▷ X = f ▷ X + g ▷ X := by aesop_cat
 #align category_theory.monoidal_preadditive CategoryTheory.MonoidalPreadditive
 
 attribute [simp] MonoidalPreadditive.whiskerLeft_zero MonoidalPreadditive.zero_whiskerRight
@@ -51,22 +50,18 @@ namespace MonoidalPreadditive
 -- The priority setting will not be needed when we replace `𝟙 X ⊗ f` by `X ◁ f`.
 @[simp (low)]
 theorem tensor_zero {W X Y Z : C} (f : W ⟶ X) : f ⊗ (0 : Y ⟶ Z) = 0 := by
-  rw [← tensor_id_comp_id_tensor]
-  simp
+  simp [tensorHom_def]
 
 -- The priority setting will not be needed when we replace `f ⊗ 𝟙 X` by `f ▷ X`.
 @[simp (low)]
 theorem zero_tensor {W X Y Z : C} (f : Y ⟶ Z) : (0 : W ⟶ X) ⊗ f = 0 := by
-  rw [← tensor_id_comp_id_tensor]
-  simp
+  simp [tensorHom_def]
 
 theorem tensor_add {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z) : f ⊗ (g + h) = f ⊗ g + f ⊗ h := by
-  rw [← tensor_id_comp_id_tensor]
-  simp [tensor_id_comp_id_tensor]
+  simp [tensorHom_def]
 
 theorem add_tensor {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z) : (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
-  rw [← tensor_id_comp_id_tensor]
-  simp [tensor_id_comp_id_tensor]
+  simp [tensorHom_def]
 
 end MonoidalPreadditive
 
@@ -90,43 +85,41 @@ theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [Monoid
   { whiskerLeft_zero := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_whiskerLeft]
+      simp [F.map_whiskerLeft']
     zero_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_whiskerRight]
+      simp [F.map_whiskerRight']
     whiskerLeft_add := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_whiskerLeft, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+      simp only [F.map_whiskerLeft', Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
         MonoidalPreadditive.whiskerLeft_add]
     add_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_whiskerRight, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+      simp only [F.map_whiskerRight', Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
         MonoidalPreadditive.add_whiskerRight] }
 #align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithful
 
 open BigOperators
 
+theorem whiskerLeft_sum (P : C) {Q R : C} {J : Type*} (s : Finset J) (g : J → (Q ⟶ R)) :
+    P ◁ ∑ j in s, g j = ∑ j in s, P ◁ g j :=
+  map_sum ((tensoringLeft C).obj P).mapAddHom g s
+
+theorem sum_whiskerRight {Q R : C} {J : Type*} (s : Finset J) (g : J → (Q ⟶ R)) (P : C) :
+    (∑ j in s, g j) ▷ P = ∑ j in s, g j ▷ P :=
+  map_sum ((tensoringRight C).obj P).mapAddHom g s
+
 theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (f ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j := by
-  rw [← tensor_id_comp_id_tensor]
-  let tQ := (((tensoringLeft C).obj Q).mapAddHom : (R ⟶ S) →+ _)
-  change _ ≫ tQ _ = _
-  rw [map_sum, Preadditive.comp_sum]
-  dsimp [tQ, Functor.mapAddHom]
-  simp only [tensor_id_comp_id_tensor]
+  simp only [tensorHom_def, whiskerLeft_sum, Preadditive.comp_sum]
 #align category_theory.tensor_sum CategoryTheory.tensor_sum
 
 theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (∑ j in s, g j) ⊗ f = ∑ j in s, g j ⊗ f := by
-  rw [← tensor_id_comp_id_tensor]
-  let tQ := (((tensoringRight C).obj P).mapAddHom : (R ⟶ S) →+ _)
-  change tQ _ ≫ _ = _
-  rw [map_sum, Preadditive.sum_comp]
-  dsimp [tQ, Functor.mapAddHom]
-  simp only [tensor_id_comp_id_tensor]
+  simp only [tensorHom_def, sum_whiskerRight, Preadditive.sum_comp]
 #align category_theory.sum_tensor CategoryTheory.sum_tensor
 
 -- In a closed monoidal category, this would hold because
@@ -137,6 +130,7 @@ instance (X : C) : PreservesFiniteBiproducts (tensorLeft X) where
     { preserves := fun {f} =>
         { preserves := fun {b} i => isBilimitOfTotal _ (by
             dsimp
+            simp_rw [← id_tensorHom]
             simp only [← tensor_comp, Category.comp_id, ← tensor_sum, ← tensor_id,
               IsBilimit.total i]) } }
 
@@ -145,6 +139,7 @@ instance (X : C) : PreservesFiniteBiproducts (tensorRight X) where
     { preserves := fun {f} =>
         { preserves := fun {b} i => isBilimitOfTotal _ (by
             dsimp
+            simp_rw [← tensorHom_id]
             simp only [← tensor_comp, Category.comp_id, ← sum_tensor, ← tensor_id,
                IsBilimit.total i]) } }
 
@@ -157,7 +152,7 @@ def leftDistributor {J : Type} [Fintype J] (X : C) (f : J → C) : X ⊗ ⨁ f 
 
 theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     (leftDistributor X f).hom =
-      ∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j := by
+      ∑ j : J, (X ◁ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j := by
   ext
   dsimp [leftDistributor, Functor.mapBiproduct, Functor.mapBicone]
   erw [biproduct.lift_π]
@@ -166,7 +161,7 @@ theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
 #align category_theory.left_distributor_hom CategoryTheory.leftDistributor_hom
 
 theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
-    (leftDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (𝟙 X ⊗ biproduct.ι f j) := by
+    (leftDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (X ◁ biproduct.ι f j) := by
   ext
   dsimp [leftDistributor, Functor.mapBiproduct, Functor.mapBicone]
   simp only [Preadditive.comp_sum, biproduct.ι_π_assoc, dite_comp, zero_comp,
@@ -176,24 +171,24 @@ theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
 
 @[reassoc (attr := simp)]
 theorem leftDistributor_hom_comp_biproduct_π {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
-    (leftDistributor X f).hom ≫ biproduct.π _ j = 𝟙 X ⊗ biproduct.π _ j := by
+    (leftDistributor X f).hom ≫ biproduct.π _ j = X ◁ biproduct.π _ j := by
   simp [leftDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]
 
 @[reassoc (attr := simp)]
 theorem biproduct_ι_comp_leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
-    (𝟙 X ⊗ biproduct.ι _ j) ≫ (leftDistributor X f).hom = biproduct.ι (fun j => X ⊗ f j) j := by
-  simp [leftDistributor_hom, Preadditive.comp_sum, ← id_tensor_comp_assoc, biproduct.ι_π,
-    tensor_dite, dite_comp]
+    (X ◁ biproduct.ι _ j) ≫ (leftDistributor X f).hom = biproduct.ι (fun j => X ⊗ f j) j := by
+  simp [leftDistributor_hom, Preadditive.comp_sum, ← MonoidalCategory.whiskerLeft_comp_assoc,
+    biproduct.ι_π, whiskerLeft_dite, dite_comp]
 
 @[reassoc (attr := simp)]
 theorem leftDistributor_inv_comp_biproduct_π {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
-    (leftDistributor X f).inv ≫ (𝟙 X ⊗ biproduct.π _ j) = biproduct.π _ j := by
-  simp [leftDistributor_inv, Preadditive.sum_comp, ← id_tensor_comp, biproduct.ι_π, tensor_dite,
-    comp_dite]
+    (leftDistributor X f).inv ≫ (X ◁ biproduct.π _ j) = biproduct.π _ j := by
+  simp [leftDistributor_inv, Preadditive.sum_comp, ← MonoidalCategory.whiskerLeft_comp,
+    biproduct.ι_π, whiskerLeft_dite, comp_dite]
 
 @[reassoc (attr := simp)]
 theorem biproduct_ι_comp_leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
-    biproduct.ι _ j ≫ (leftDistributor X f).inv = 𝟙 X ⊗ biproduct.ι _ j := by
+    biproduct.ι _ j ≫ (leftDistributor X f).inv = X ◁ biproduct.ι _ j := by
   simp [leftDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc, dite_comp]
 
 theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
@@ -204,11 +199,10 @@ theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     asIso_hom, comp_zero, comp_dite, Preadditive.sum_comp, Preadditive.comp_sum, tensor_sum,
     id_tensor_comp, tensorIso_hom, leftDistributor_hom, biproduct.mapIso_hom, biproduct.ι_map,
     biproduct.ι_π, Finset.sum_dite_irrel, Finset.sum_dite_eq', Finset.sum_const_zero]
+  simp_rw [← id_tensorHom]
   simp only [← id_tensor_comp, biproduct.ι_π]
   simp only [id_tensor_comp, tensor_dite, comp_dite]
-  simp only [Category.comp_id, comp_zero, MonoidalPreadditive.tensor_zero, eqToHom_refl,
-    tensor_id, if_true, dif_ctx_congr, Finset.sum_congr, Finset.mem_univ, Finset.sum_dite_eq']
-  simp only [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]
+  simp [id_tensorHom]
 #align category_theory.left_distributor_assoc CategoryTheory.leftDistributor_assoc
 
 /-- The isomorphism showing how tensor product on the right distributes over direct sums. -/
@@ -218,7 +212,7 @@ def rightDistributor {J : Type} [Fintype J] (f : J → C) (X : C) : (⨁ f) ⊗
 
 theorem rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) :
     (rightDistributor f X).hom =
-      ∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j := by
+      ∑ j : J, (biproduct.π f j ▷ X) ≫ biproduct.ι (fun j => f j ⊗ X) j := by
   ext
   dsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]
   erw [biproduct.lift_π]
@@ -227,7 +221,7 @@ theorem rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) :
 #align category_theory.right_distributor_hom CategoryTheory.rightDistributor_hom
 
 theorem rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) :
-    (rightDistributor f X).inv = ∑ j : J, biproduct.π _ j ≫ (biproduct.ι f j ⊗ 𝟙 X) := by
+    (rightDistributor f X).inv = ∑ j : J, biproduct.π _ j ≫ (biproduct.ι f j ▷ X) := by
   ext
   dsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]
   simp only [biproduct.ι_desc, Preadditive.comp_sum, ne_eq, biproduct.ι_π_assoc, dite_comp,
@@ -236,24 +230,24 @@ theorem rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) :
 
 @[reassoc (attr := simp)]
 theorem rightDistributor_hom_comp_biproduct_π {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
-    (rightDistributor f X).hom ≫ biproduct.π _ j = biproduct.π _ j ⊗ 𝟙 X := by
+    (rightDistributor f X).hom ≫ biproduct.π _ j = biproduct.π _ j ▷ X := by
   simp [rightDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]
 
 @[reassoc (attr := simp)]
 theorem biproduct_ι_comp_rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
-    (biproduct.ι _ j ⊗ 𝟙 X) ≫ (rightDistributor f X).hom = biproduct.ι (fun j => f j ⊗ X) j := by
-  simp [rightDistributor_hom, Preadditive.comp_sum, ← comp_tensor_id_assoc, biproduct.ι_π,
-    dite_tensor, dite_comp]
+    (biproduct.ι _ j ▷ X) ≫ (rightDistributor f X).hom = biproduct.ι (fun j => f j ⊗ X) j := by
+  simp [rightDistributor_hom, Preadditive.comp_sum, ← comp_whiskerRight_assoc, biproduct.ι_π,
+    dite_whiskerRight, dite_comp]
 
 @[reassoc (attr := simp)]
 theorem rightDistributor_inv_comp_biproduct_π {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
-    (rightDistributor f X).inv ≫ (biproduct.π _ j ⊗ 𝟙 X) = biproduct.π _ j := by
-  simp [rightDistributor_inv, Preadditive.sum_comp, ← comp_tensor_id, biproduct.ι_π, dite_tensor,
-    comp_dite]
+    (rightDistributor f X).inv ≫ (biproduct.π _ j ▷ X) = biproduct.π _ j := by
+  simp [rightDistributor_inv, Preadditive.sum_comp, ← MonoidalCategory.comp_whiskerRight,
+    biproduct.ι_π, dite_whiskerRight, comp_dite]
 
 @[reassoc (attr := simp)]
 theorem biproduct_ι_comp_rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
-    biproduct.ι _ j ≫ (rightDistributor f X).inv = biproduct.ι _ j ⊗ 𝟙 X := by
+    biproduct.ι _ j ≫ (rightDistributor f X).inv = biproduct.ι _ j ▷ X := by
   simp [rightDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc,
     dite_comp]
 
@@ -266,11 +260,9 @@ theorem rightDistributor_assoc {J : Type} [Fintype J] (f : J → C) (X Y : C) :
     comp_tensor_id, tensorIso_hom, rightDistributor_hom, biproduct.mapIso_hom, biproduct.ι_map,
     biproduct.ι_π, Finset.sum_dite_irrel, Finset.sum_dite_eq', Finset.sum_const_zero,
     Finset.mem_univ, if_true]
+  simp_rw [← tensorHom_id]
   simp only [← comp_tensor_id, biproduct.ι_π, dite_tensor, comp_dite]
-  simp only [Category.comp_id, comp_tensor_id, eqToHom_refl, tensor_id, comp_zero,
-    MonoidalPreadditive.zero_tensor, if_true, dif_ctx_congr, Finset.mem_univ, Finset.sum_congr,
-    Finset.sum_dite_eq']
-  simp only [← tensor_id, associator_inv_naturality, Iso.hom_inv_id_assoc]
+  simp
 #align category_theory.right_distributor_assoc CategoryTheory.rightDistributor_assoc
 
 theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J]
@@ -285,18 +277,15 @@ theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J]
     tensor_sum, comp_tensor_id, tensorIso_hom, leftDistributor_hom, rightDistributor_hom,
     biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π, Finset.sum_dite_irrel,
     Finset.sum_dite_eq', Finset.sum_const_zero, Finset.mem_univ, if_true]
+  simp_rw [← tensorHom_id, ← id_tensorHom]
   simp only [← comp_tensor_id, ← id_tensor_comp_assoc, Category.assoc, biproduct.ι_π, comp_dite,
     dite_comp, tensor_dite, dite_tensor]
-  simp only [Category.comp_id, Category.id_comp, Category.assoc, id_tensor_comp, comp_zero,
-    zero_comp, MonoidalPreadditive.tensor_zero, MonoidalPreadditive.zero_tensor, comp_tensor_id,
-    eqToHom_refl, tensor_id, if_true, dif_ctx_congr, Finset.sum_congr, Finset.mem_univ,
-    Finset.sum_dite_eq']
-  simp only [associator_inv_naturality, Iso.hom_inv_id_assoc]
+  simp
 #align category_theory.left_distributor_right_distributor_assoc CategoryTheory.leftDistributor_rightDistributor_assoc
 
 @[ext]
 theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⊗ ⨁ f ⟶ Y}
-    (w : ∀ j, (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h) : g = h := by
+    (w : ∀ j, (X ◁ biproduct.ι f j) ≫ g = (X ◁ biproduct.ι f j) ≫ h) : g = h := by
   apply (cancel_epi (leftDistributor X f).inv).mp
   ext
   simp? [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
@@ -306,7 +295,7 @@ theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C}
 
 @[ext]
 theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⟶ Y ⊗ ⨁ f}
-    (w : ∀ j, g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)) : g = h := by
+    (w : ∀ j, g ≫ (Y ◁ biproduct.π f j) = h ≫ (Y ◁ biproduct.π f j)) : g = h := by
   apply (cancel_mono (leftDistributor Y f).hom).mp
   ext
   simp? [leftDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
@@ -321,25 +310,25 @@ theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C}
 @[ext]
 theorem leftDistributor_ext₂_left {J : Type} [Fintype J]
     {X Y Z : C} {f : J → C} {g h : X ⊗ (Y ⊗ ⨁ f) ⟶ Z}
-    (w : ∀ j, (𝟙 X ⊗ (𝟙 Y ⊗ biproduct.ι f j)) ≫ g = (𝟙 X ⊗ (𝟙 Y ⊗ biproduct.ι f j)) ≫ h) :
+    (w : ∀ j, (X ◁ (Y ◁ biproduct.ι f j)) ≫ g = (X ◁ (Y ◁ biproduct.ι f j)) ≫ h) :
     g = h := by
   apply (cancel_epi (α_ _ _ _).hom).mp
   ext
-  simp_rw [← tensor_id, associator_naturality_assoc, w]
+  simp [w]
 
 @[ext]
 theorem leftDistributor_ext₂_right {J : Type} [Fintype J]
     {X Y Z : C} {f : J → C} {g h : X ⟶ Y ⊗ (Z ⊗ ⨁ f)}
-    (w : ∀ j, g ≫ (𝟙 Y ⊗ (𝟙 Z ⊗ biproduct.π f j)) = h ≫ (𝟙 Y ⊗ (𝟙 Z ⊗ biproduct.π f j))) :
+    (w : ∀ j, g ≫ (Y ◁ (Z ◁ biproduct.π f j)) = h ≫ (Y ◁ (Z ◁ biproduct.π f j))) :
     g = h := by
   apply (cancel_mono (α_ _ _ _).inv).mp
   ext
-  simp_rw [← tensor_id, Category.assoc, ← associator_inv_naturality, ← Category.assoc, w]
+  simp [w]
 
 @[ext]
 theorem rightDistributor_ext_left {J : Type} [Fintype J]
     {f : J → C} {X Y : C} {g h : (⨁ f) ⊗ X ⟶ Y}
-    (w : ∀ j, (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h) : g = h := by
+    (w : ∀ j, (biproduct.ι f j ▷ X) ≫ g = (biproduct.ι f j ▷ X) ≫ h) : g = h := by
   apply (cancel_epi (rightDistributor f X).inv).mp
   ext
   simp? [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
@@ -351,7 +340,7 @@ theorem rightDistributor_ext_left {J : Type} [Fintype J]
 @[ext]
 theorem rightDistributor_ext_right {J : Type} [Fintype J]
     {f : J → C} {X Y : C} {g h : X ⟶ (⨁ f) ⊗ Y}
-    (w : ∀ j, g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)) : g = h := by
+    (w : ∀ j, g ≫ (biproduct.π f j ▷ Y) = h ≫ (biproduct.π f j ▷ Y)) : g = h := by
   apply (cancel_mono (rightDistributor f Y).hom).mp
   ext
   simp? [rightDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
@@ -364,19 +353,19 @@ theorem rightDistributor_ext_right {J : Type} [Fintype J]
 @[ext]
 theorem rightDistributor_ext₂_left {J : Type} [Fintype J]
     {f : J → C} {X Y Z : C} {g h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z}
-    (w : ∀ j, ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ g = ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ h) :
+    (w : ∀ j, ((biproduct.ι f j ▷ X) ▷ Y) ≫ g = ((biproduct.ι f j ▷ X) ▷ Y) ≫ h) :
     g = h := by
   apply (cancel_epi (α_ _ _ _).inv).mp
   ext
-  simp_rw [← tensor_id, associator_inv_naturality_assoc, w]
+  simp [w]
 
 @[ext]
 theorem rightDistributor_ext₂_right {J : Type} [Fintype J]
     {f : J → C} {X Y Z : C} {g h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z}
-    (w : ∀ j, g ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z) = h ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z)) :
+    (w : ∀ j, g ≫ ((biproduct.π f j ▷ Y) ▷ Z) = h ≫ ((biproduct.π f j ▷ Y) ▷ Z)) :
     g = h := by
   apply (cancel_mono (α_ _ _ _).hom).mp
   ext
-  simp_rw [← tensor_id, Category.assoc, ← associator_naturality, ← Category.assoc, w]
+  simp [w]
 
 end CategoryTheory
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -115,7 +115,7 @@ theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J
   let tQ := (((tensoringLeft C).obj Q).mapAddHom : (R ⟶ S) →+ _)
   change _ ≫ tQ _ = _
   rw [map_sum, Preadditive.comp_sum]
-  dsimp [Functor.mapAddHom]
+  dsimp [tQ, Functor.mapAddHom]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.tensor_sum CategoryTheory.tensor_sum
 
@@ -125,7 +125,7 @@ theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J
   let tQ := (((tensoringRight C).obj P).mapAddHom : (R ⟶ S) →+ _)
   change tQ _ ≫ _ = _
   rw [map_sum, Preadditive.sum_comp]
-  dsimp [Functor.mapAddHom]
+  dsimp [tQ, Functor.mapAddHom]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.sum_tensor CategoryTheory.sum_tensor
 
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -15,7 +15,6 @@ A monoidal category is `MonoidalPreadditive` if it is preadditive and tensor pro
 is linear in both factors.
 -/
 
-
 noncomputable section
 
 open Classical
@@ -302,7 +301,7 @@ theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C}
   ext
   simp? [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
     simp only [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp,
-      zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]
+      zero_comp, Finset.sum_dite_eq, Finset.mem_univ, ↓reduceIte, eqToHom_refl, Category.id_comp]
   apply w
 
 @[ext]
@@ -311,10 +310,10 @@ theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C}
   apply (cancel_mono (leftDistributor Y f).hom).mp
   ext
   simp? [leftDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
-    comp_dite] says
-    simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π,
-      comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
-      ite_true]
+      comp_dite] says
+    simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π, comp_dite,
+      comp_zero, Finset.sum_dite_eq', Finset.mem_univ, ↓reduceIte, eqToHom_refl, Category.comp_id]
+
   apply w
 
 -- One might wonder how many iterated tensor products we need simp lemmas for.
@@ -344,9 +343,9 @@ theorem rightDistributor_ext_left {J : Type} [Fintype J]
   apply (cancel_epi (rightDistributor f X).inv).mp
   ext
   simp? [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
-    simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc,
-      dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp,
-      ite_true]
+    simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp,
+      zero_comp, Finset.sum_dite_eq, Finset.mem_univ, ↓reduceIte, eqToHom_refl, Category.id_comp]
+
   apply w
 
 @[ext]
@@ -356,10 +355,10 @@ theorem rightDistributor_ext_right {J : Type} [Fintype J]
   apply (cancel_mono (rightDistributor f Y).hom).mp
   ext
   simp? [rightDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
-    comp_dite] says
-    simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π,
-      comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
-      ite_true]
+      comp_dite] says
+    simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π, comp_dite,
+      comp_zero, Finset.sum_dite_eq', Finset.mem_univ, ↓reduceIte, eqToHom_refl, Category.comp_id]
+
   apply w
 
 @[ext]
feat(CategoryTheory/Monoidal): partially setting simp lemmas (#10061)

Extracted from #6307. The main reason why #6307 is so large is that many tensoring of identity morphisms that appear in mathlib should be replaced with whiskerings. This PR will leave this issue and deal with other parts. That is, we do not set id_tensorHom and tensorHom_id as simple lemmas at this moment, We can set them as simp lemmas locally to enable simple normal forms.

Diff
@@ -63,11 +63,11 @@ theorem zero_tensor {W X Y Z : C} (f : Y ⟶ Z) : (0 : W ⟶ X) ⊗ f = 0 := by
 
 theorem tensor_add {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z) : f ⊗ (g + h) = f ⊗ g + f ⊗ h := by
   rw [← tensor_id_comp_id_tensor]
-  simp
+  simp [tensor_id_comp_id_tensor]
 
 theorem add_tensor {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z) : (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
   rw [← tensor_id_comp_id_tensor]
-  simp
+  simp [tensor_id_comp_id_tensor]
 
 end MonoidalPreadditive
 
refactor(CategoryTheory/Monoidal): replace axioms with those more suitable for the whiskerings (#9991)

Extracted from #6307. We replace some axioms by those more preferable when using the whiskerings instead of the tensor of morphisms.

Diff
@@ -34,24 +34,42 @@ Note we don't `extend Preadditive C` here, as `Abelian C` already extends it,
 and we'll need to have both typeclasses sometimes.
 -/
 class MonoidalPreadditive : Prop where
-  /-- tensoring on the right with a zero morphism gives zero -/
-  tensor_zero : ∀ {W X Y Z : C} (f : W ⟶ X), f ⊗ (0 : Y ⟶ Z) = 0 := by aesop_cat
-  /-- tensoring on the left with a zero morphism gives zero -/
-  zero_tensor : ∀ {W X Y Z : C} (f : Y ⟶ Z), (0 : W ⟶ X) ⊗ f = 0 := by aesop_cat
-  /-- left tensoring with a morphism is compatible with addition -/
-  tensor_add : ∀ {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z), f ⊗ (g + h) = f ⊗ g + f ⊗ h := by
-    aesop_cat
-  /-- right tensoring with a morphism is compatible with addition -/
-  add_tensor : ∀ {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
-    aesop_cat
+  -- Note: `𝟙 X ⊗ f` will be replaced by `X ◁ f` (and similarly for `f ⊗ 𝟙 X`) in #6307.
+  whiskerLeft_zero : ∀ {X Y Z : C}, 𝟙 X ⊗ (0 : Y ⟶ Z) = 0 := by aesop_cat
+  zero_whiskerRight : ∀ {X Y Z : C}, (0 : Y ⟶ Z) ⊗ 𝟙 X = 0 := by aesop_cat
+  whiskerLeft_add : ∀ {X Y Z : C} (f g : Y ⟶ Z), 𝟙 X ⊗ (f + g) = 𝟙 X ⊗ f + 𝟙 X ⊗ g := by aesop_cat
+  add_whiskerRight : ∀ {X Y Z : C} (f g : Y ⟶ Z), (f + g) ⊗ 𝟙 X = f ⊗ 𝟙 X + g ⊗ 𝟙 X := by aesop_cat
 #align category_theory.monoidal_preadditive CategoryTheory.MonoidalPreadditive
 
-attribute [simp] MonoidalPreadditive.tensor_zero MonoidalPreadditive.zero_tensor
+attribute [simp] MonoidalPreadditive.whiskerLeft_zero MonoidalPreadditive.zero_whiskerRight
+attribute [simp] MonoidalPreadditive.whiskerLeft_add MonoidalPreadditive.add_whiskerRight
 
 variable {C}
 variable [MonoidalPreadditive C]
 
-attribute [local simp] MonoidalPreadditive.tensor_add MonoidalPreadditive.add_tensor
+namespace MonoidalPreadditive
+
+-- The priority setting will not be needed when we replace `𝟙 X ⊗ f` by `X ◁ f`.
+@[simp (low)]
+theorem tensor_zero {W X Y Z : C} (f : W ⟶ X) : f ⊗ (0 : Y ⟶ Z) = 0 := by
+  rw [← tensor_id_comp_id_tensor]
+  simp
+
+-- The priority setting will not be needed when we replace `f ⊗ 𝟙 X` by `f ▷ X`.
+@[simp (low)]
+theorem zero_tensor {W X Y Z : C} (f : Y ⟶ Z) : (0 : W ⟶ X) ⊗ f = 0 := by
+  rw [← tensor_id_comp_id_tensor]
+  simp
+
+theorem tensor_add {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z) : f ⊗ (g + h) = f ⊗ g + f ⊗ h := by
+  rw [← tensor_id_comp_id_tensor]
+  simp
+
+theorem add_tensor {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z) : (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
+  rw [← tensor_id_comp_id_tensor]
+  simp
+
+end MonoidalPreadditive
 
 instance tensorLeft_additive (X : C) : (tensorLeft X).Additive where
 #align category_theory.tensor_left_additive CategoryTheory.tensorLeft_additive
@@ -70,24 +88,24 @@ ensures that the domain is monoidal preadditive. -/
 theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [MonoidalCategory D]
     (F : MonoidalFunctor D C) [Faithful F.toFunctor] [F.toFunctor.Additive] :
     MonoidalPreadditive D :=
-  { tensor_zero := by
+  { whiskerLeft_zero := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_tensor]
-    zero_tensor := by
+      simp [F.map_whiskerLeft]
+    zero_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp [F.map_tensor]
-    tensor_add := by
+      simp [F.map_whiskerRight]
+    whiskerLeft_add := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_tensor, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
-        MonoidalPreadditive.tensor_add]
-    add_tensor := by
+      simp only [F.map_whiskerLeft, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+        MonoidalPreadditive.whiskerLeft_add]
+    add_whiskerRight := by
       intros
       apply F.toFunctor.map_injective
-      simp only [F.map_tensor, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
-        MonoidalPreadditive.add_tensor] }
+      simp only [F.map_whiskerRight, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp,
+        MonoidalPreadditive.add_whiskerRight] }
 #align category_theory.monoidal_preadditive_of_faithful CategoryTheory.monoidalPreadditive_of_faithful
 
 open BigOperators
chore: move to v4.5.0-rc1, and merge changes from bump/v4.5.0 branch. (#9188)

This PR:

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

Diff
@@ -283,9 +283,8 @@ theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C}
   apply (cancel_epi (leftDistributor X f).inv).mp
   ext
   simp? [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
-    simp only [leftDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc,
-      dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp,
-      ite_true]
+    simp only [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp,
+      zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]
   apply w
 
 @[ext]
@@ -295,7 +294,7 @@ theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C}
   ext
   simp? [leftDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
     comp_dite] says
-    simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,
+    simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π,
       comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
       ite_true]
   apply w
@@ -327,7 +326,7 @@ theorem rightDistributor_ext_left {J : Type} [Fintype J]
   apply (cancel_epi (rightDistributor f X).inv).mp
   ext
   simp? [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
-    simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc,
+    simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc,
       dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp,
       ite_true]
   apply w
@@ -340,7 +339,7 @@ theorem rightDistributor_ext_right {J : Type} [Fintype J]
   ext
   simp? [rightDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
     comp_dite] says
-    simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,
+    simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, biproduct.ι_π,
       comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
       ite_true]
   apply w
chore: remove deprecated MonoidHom.map_prod, AddMonoidHom.map_sum (#8787)
Diff
@@ -97,7 +97,7 @@ theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J
   rw [← tensor_id_comp_id_tensor]
   let tQ := (((tensoringLeft C).obj Q).mapAddHom : (R ⟶ S) →+ _)
   change _ ≫ tQ _ = _
-  rw [tQ.map_sum, Preadditive.comp_sum]
+  rw [map_sum, Preadditive.comp_sum]
   dsimp [Functor.mapAddHom]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.tensor_sum CategoryTheory.tensor_sum
@@ -107,7 +107,7 @@ theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J
   rw [← tensor_id_comp_id_tensor]
   let tQ := (((tensoringRight C).obj P).mapAddHom : (R ⟶ S) →+ _)
   change tQ _ ≫ _ = _
-  rw [tQ.map_sum, Preadditive.sum_comp]
+  rw [map_sum, Preadditive.sum_comp]
   dsimp [Functor.mapAddHom]
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.sum_tensor CategoryTheory.sum_tensor
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
@@ -26,7 +26,7 @@ open CategoryTheory.Limits
 
 open CategoryTheory.MonoidalCategory
 
-variable (C : Type _) [Category C] [Preadditive C] [MonoidalCategory C]
+variable (C : Type*) [Category C] [Preadditive C] [MonoidalCategory C]
 
 /-- A category is `MonoidalPreadditive` if tensoring is additive in both factors.
 
@@ -92,7 +92,7 @@ theorem monoidalPreadditive_of_faithful {D} [Category D] [Preadditive D] [Monoid
 
 open BigOperators
 
-theorem tensor_sum {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
+theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (f ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j := by
   rw [← tensor_id_comp_id_tensor]
   let tQ := (((tensoringLeft C).obj Q).mapAddHom : (R ⟶ S) →+ _)
@@ -102,7 +102,7 @@ theorem tensor_sum {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g :
   simp only [tensor_id_comp_id_tensor]
 #align category_theory.tensor_sum CategoryTheory.tensor_sum
 
-theorem sum_tensor {P Q R S : C} {J : Type _} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
+theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
     (∑ j in s, g j) ⊗ f = ∑ j in s, g j ⊗ f := by
   rw [← tensor_id_comp_id_tensor]
   let tQ := (((tensoringRight C).obj P).mapAddHom : (R ⟶ S) →+ _)
chore: cleanup API for distributors in preadditive monoidal categories (#6257)

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

Diff
@@ -138,7 +138,6 @@ def leftDistributor {J : Type} [Fintype J] (X : C) (f : J → C) : X ⊗ ⨁ f 
   (tensorLeft X).mapBiproduct f
 #align category_theory.left_distributor CategoryTheory.leftDistributor
 
-@[simp]
 theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     (leftDistributor X f).hom =
       ∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j := by
@@ -149,7 +148,6 @@ theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     Finset.sum_dite_eq', Finset.mem_univ, ite_true, eqToHom_refl, Category.comp_id]
 #align category_theory.left_distributor_hom CategoryTheory.leftDistributor_hom
 
-@[simp]
 theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
     (leftDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (𝟙 X ⊗ biproduct.ι f j) := by
   ext
@@ -159,6 +157,28 @@ theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
     biproduct.ι_desc]
 #align category_theory.left_distributor_inv CategoryTheory.leftDistributor_inv
 
+@[reassoc (attr := simp)]
+theorem leftDistributor_hom_comp_biproduct_π {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
+    (leftDistributor X f).hom ≫ biproduct.π _ j = 𝟙 X ⊗ biproduct.π _ j := by
+  simp [leftDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]
+
+@[reassoc (attr := simp)]
+theorem biproduct_ι_comp_leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
+    (𝟙 X ⊗ biproduct.ι _ j) ≫ (leftDistributor X f).hom = biproduct.ι (fun j => X ⊗ f j) j := by
+  simp [leftDistributor_hom, Preadditive.comp_sum, ← id_tensor_comp_assoc, biproduct.ι_π,
+    tensor_dite, dite_comp]
+
+@[reassoc (attr := simp)]
+theorem leftDistributor_inv_comp_biproduct_π {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
+    (leftDistributor X f).inv ≫ (𝟙 X ⊗ biproduct.π _ j) = biproduct.π _ j := by
+  simp [leftDistributor_inv, Preadditive.sum_comp, ← id_tensor_comp, biproduct.ι_π, tensor_dite,
+    comp_dite]
+
+@[reassoc (attr := simp)]
+theorem biproduct_ι_comp_leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
+    biproduct.ι _ j ≫ (leftDistributor X f).inv = 𝟙 X ⊗ biproduct.ι _ j := by
+  simp [leftDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc, dite_comp]
+
 theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
     (asIso (𝟙 X) ⊗ leftDistributor Y f) ≪≫ leftDistributor X _ =
       (α_ X Y (⨁ f)).symm ≪≫ leftDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => α_ X Y _ := by
@@ -175,13 +195,12 @@ theorem leftDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
 #align category_theory.left_distributor_assoc CategoryTheory.leftDistributor_assoc
 
 /-- The isomorphism showing how tensor product on the right distributes over direct sums. -/
-def rightDistributor {J : Type} [Fintype J] (X : C) (f : J → C) : (⨁ f) ⊗ X ≅ ⨁ fun j => f j ⊗ X :=
+def rightDistributor {J : Type} [Fintype J] (f : J → C) (X : C) : (⨁ f) ⊗ X ≅ ⨁ fun j => f j ⊗ X :=
   (tensorRight X).mapBiproduct f
 #align category_theory.right_distributor CategoryTheory.rightDistributor
 
-@[simp]
-theorem rightDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
-    (rightDistributor X f).hom =
+theorem rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) :
+    (rightDistributor f X).hom =
       ∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j := by
   ext
   dsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]
@@ -190,18 +209,40 @@ theorem rightDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) :
     Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]
 #align category_theory.right_distributor_hom CategoryTheory.rightDistributor_hom
 
-@[simp]
-theorem rightDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
-    (rightDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (biproduct.ι f j ⊗ 𝟙 X) := by
+theorem rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) :
+    (rightDistributor f X).inv = ∑ j : J, biproduct.π _ j ≫ (biproduct.ι f j ⊗ 𝟙 X) := by
   ext
   dsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]
   simp only [biproduct.ι_desc, Preadditive.comp_sum, ne_eq, biproduct.ι_π_assoc, dite_comp,
     zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]
 #align category_theory.right_distributor_inv CategoryTheory.rightDistributor_inv
 
-theorem rightDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
-    (rightDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor Y _ =
-      α_ (⨁ f) X Y ≪≫ rightDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => (α_ _ X Y).symm := by
+@[reassoc (attr := simp)]
+theorem rightDistributor_hom_comp_biproduct_π {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
+    (rightDistributor f X).hom ≫ biproduct.π _ j = biproduct.π _ j ⊗ 𝟙 X := by
+  simp [rightDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]
+
+@[reassoc (attr := simp)]
+theorem biproduct_ι_comp_rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
+    (biproduct.ι _ j ⊗ 𝟙 X) ≫ (rightDistributor f X).hom = biproduct.ι (fun j => f j ⊗ X) j := by
+  simp [rightDistributor_hom, Preadditive.comp_sum, ← comp_tensor_id_assoc, biproduct.ι_π,
+    dite_tensor, dite_comp]
+
+@[reassoc (attr := simp)]
+theorem rightDistributor_inv_comp_biproduct_π {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
+    (rightDistributor f X).inv ≫ (biproduct.π _ j ⊗ 𝟙 X) = biproduct.π _ j := by
+  simp [rightDistributor_inv, Preadditive.sum_comp, ← comp_tensor_id, biproduct.ι_π, dite_tensor,
+    comp_dite]
+
+@[reassoc (attr := simp)]
+theorem biproduct_ι_comp_rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
+    biproduct.ι _ j ≫ (rightDistributor f X).inv = biproduct.ι _ j ⊗ 𝟙 X := by
+  simp [rightDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc,
+    dite_comp]
+
+theorem rightDistributor_assoc {J : Type} [Fintype J] (f : J → C) (X Y : C) :
+    (rightDistributor f X ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor _ Y =
+      α_ (⨁ f) X Y ≪≫ rightDistributor f (X ⊗ Y) ≪≫ biproduct.mapIso fun j => (α_ _ X Y).symm := by
   ext
   simp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom,
     asIso_hom, comp_zero, comp_dite, Preadditive.sum_comp, Preadditive.comp_sum, sum_tensor,
@@ -215,10 +256,11 @@ theorem rightDistributor_assoc {J : Type} [Fintype J] (X Y : C) (f : J → C) :
   simp only [← tensor_id, associator_inv_naturality, Iso.hom_inv_id_assoc]
 #align category_theory.right_distributor_assoc CategoryTheory.rightDistributor_assoc
 
-theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J] (X Y : C) (f : J → C) :
-    (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor Y _ =
+theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J]
+    (X : C) (f : J → C) (Y : C) :
+    (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor _ Y =
       α_ X (⨁ f) Y ≪≫
-        (asIso (𝟙 X) ⊗ rightDistributor Y _) ≪≫
+        (asIso (𝟙 X) ⊗ rightDistributor _ Y) ≪≫
           leftDistributor X _ ≪≫ biproduct.mapIso fun j => (α_ _ _ _).symm := by
   ext
   simp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom,
@@ -235,4 +277,90 @@ theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J] (X Y : C
   simp only [associator_inv_naturality, Iso.hom_inv_id_assoc]
 #align category_theory.left_distributor_right_distributor_assoc CategoryTheory.leftDistributor_rightDistributor_assoc
 
+@[ext]
+theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⊗ ⨁ f ⟶ Y}
+    (w : ∀ j, (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h) : g = h := by
+  apply (cancel_epi (leftDistributor X f).inv).mp
+  ext
+  simp? [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
+    simp only [leftDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc,
+      dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp,
+      ite_true]
+  apply w
+
+@[ext]
+theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⟶ Y ⊗ ⨁ f}
+    (w : ∀ j, g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)) : g = h := by
+  apply (cancel_mono (leftDistributor Y f).hom).mp
+  ext
+  simp? [leftDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
+    comp_dite] says
+    simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,
+      comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
+      ite_true]
+  apply w
+
+-- One might wonder how many iterated tensor products we need simp lemmas for.
+-- The answer is two: this lemma is needed to verify the pentagon identity.
+@[ext]
+theorem leftDistributor_ext₂_left {J : Type} [Fintype J]
+    {X Y Z : C} {f : J → C} {g h : X ⊗ (Y ⊗ ⨁ f) ⟶ Z}
+    (w : ∀ j, (𝟙 X ⊗ (𝟙 Y ⊗ biproduct.ι f j)) ≫ g = (𝟙 X ⊗ (𝟙 Y ⊗ biproduct.ι f j)) ≫ h) :
+    g = h := by
+  apply (cancel_epi (α_ _ _ _).hom).mp
+  ext
+  simp_rw [← tensor_id, associator_naturality_assoc, w]
+
+@[ext]
+theorem leftDistributor_ext₂_right {J : Type} [Fintype J]
+    {X Y Z : C} {f : J → C} {g h : X ⟶ Y ⊗ (Z ⊗ ⨁ f)}
+    (w : ∀ j, g ≫ (𝟙 Y ⊗ (𝟙 Z ⊗ biproduct.π f j)) = h ≫ (𝟙 Y ⊗ (𝟙 Z ⊗ biproduct.π f j))) :
+    g = h := by
+  apply (cancel_mono (α_ _ _ _).inv).mp
+  ext
+  simp_rw [← tensor_id, Category.assoc, ← associator_inv_naturality, ← Category.assoc, w]
+
+@[ext]
+theorem rightDistributor_ext_left {J : Type} [Fintype J]
+    {f : J → C} {X Y : C} {g h : (⨁ f) ⊗ X ⟶ Y}
+    (w : ∀ j, (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h) : g = h := by
+  apply (cancel_epi (rightDistributor f X).inv).mp
+  ext
+  simp? [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc, dite_comp] says
+    simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc,
+      dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp,
+      ite_true]
+  apply w
+
+@[ext]
+theorem rightDistributor_ext_right {J : Type} [Fintype J]
+    {f : J → C} {X Y : C} {g h : X ⟶ (⨁ f) ⊗ Y}
+    (w : ∀ j, g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)) : g = h := by
+  apply (cancel_mono (rightDistributor f Y).hom).mp
+  ext
+  simp? [rightDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,
+    comp_dite] says
+    simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,
+      comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id,
+      ite_true]
+  apply w
+
+@[ext]
+theorem rightDistributor_ext₂_left {J : Type} [Fintype J]
+    {f : J → C} {X Y Z : C} {g h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z}
+    (w : ∀ j, ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ g = ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ h) :
+    g = h := by
+  apply (cancel_epi (α_ _ _ _).inv).mp
+  ext
+  simp_rw [← tensor_id, associator_inv_naturality_assoc, w]
+
+@[ext]
+theorem rightDistributor_ext₂_right {J : Type} [Fintype J]
+    {f : J → C} {X Y Z : C} {g h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z}
+    (w : ∀ j, g ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z) = h ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z)) :
+    g = h := by
+  apply (cancel_mono (α_ _ _ _).hom).mp
+  ext
+  simp_rw [← tensor_id, Category.assoc, ← associator_naturality, ← Category.assoc, w]
+
 end CategoryTheory
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.monoidal.preadditive
-! leanprover-community/mathlib commit 986c4d5761f938b2e1c43c01f001b6d9d88c2055
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
 import Mathlib.CategoryTheory.Monoidal.Functor
 
+#align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055"
+
 /-!
 # Preadditive monoidal categories
 
chore: review of automation in category theory (#4793)

Clean up of automation in the category theory library. Leaving out unnecessary proof steps, or fields done by aesop_cat, and making more use of available autoparameters.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -49,14 +49,6 @@ class MonoidalPreadditive : Prop where
     aesop_cat
 #align category_theory.monoidal_preadditive CategoryTheory.MonoidalPreadditive
 
---restate_axiom monoidal_preadditive.tensor_zero'
---
---restate_axiom monoidal_preadditive.zero_tensor'
---
---restate_axiom monoidal_preadditive.tensor_add'
---
---restate_axiom monoidal_preadditive.add_tensor'
-
 attribute [simp] MonoidalPreadditive.tensor_zero MonoidalPreadditive.zero_tensor
 
 variable {C}
feat: port CategoryTheory.Monoidal.Preadditive (#3033)

Dependencies 3 + 297

298 files ported (99.0%)
121075 lines ported (99.1%)
Show graph

The unported dependencies are