category_theory.triangulated.rotateMathlib.CategoryTheory.Triangulated.Rotate

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)

(last sync)

chore(category_theory): removed stupid example (#18701)
Diff
@@ -86,8 +86,6 @@ def rotate : triangle C ⥤ triangle C :=
     hom₃ := f.hom₁⟦1⟧',
     comm₃' := by { dsimp, simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁], }, }, }
 
-example : ℕ:= 42
-
 /--
 The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -173,11 +173,11 @@ def triangleRotation : Equivalence (Triangle C) (Triangle C)
 
 variable {C}
 
-instance : IsEquivalence (rotate C) := by change is_equivalence (triangle_rotation C).Functor;
-  infer_instance
+instance : CategoryTheory.Functor.IsEquivalence (rotate C) := by
+  change is_equivalence (triangle_rotation C).Functor; infer_instance
 
-instance : IsEquivalence (invRotate C) := by change is_equivalence (triangle_rotation C).inverse;
-  infer_instance
+instance : CategoryTheory.Functor.IsEquivalence (invRotate C) := by
+  change is_equivalence (triangle_rotation C).inverse; infer_instance
 
 end CategoryTheory.Pretriangulated
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Luke Kershaw. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw, Joël Riou
 -/
-import Mathbin.CategoryTheory.Preadditive.AdditiveFunctor
-import Mathbin.CategoryTheory.Triangulated.Basic
+import CategoryTheory.Preadditive.AdditiveFunctor
+import CategoryTheory.Triangulated.Basic
 
 #align_import category_theory.triangulated.rotate from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Luke Kershaw. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw, Joël Riou
-
-! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
-! 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.Triangulated.Basic
 
+#align_import category_theory.triangulated.rotate from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
+
 /-!
 # Rotate
 
Diff
@@ -43,6 +43,7 @@ variable [HasShift C ℤ]
 
 variable (X : C)
 
+#print CategoryTheory.Pretriangulated.Triangle.rotate /-
 /-- If you rotate a triangle, you get another triangle.
 Given a triangle of the form:
 ```
@@ -59,9 +60,11 @@ applying `rotate` gives a triangle of the form:
 def Triangle.rotate (T : Triangle C) : Triangle C :=
   Triangle.mk T.mor₂ T.mor₃ (-T.mor₁⟦1⟧')
 #align category_theory.pretriangulated.triangle.rotate CategoryTheory.Pretriangulated.Triangle.rotate
+-/
 
 section
 
+#print CategoryTheory.Pretriangulated.Triangle.invRotate /-
 /-- Given a triangle of the form:
 ```
       f       g       h
@@ -80,11 +83,13 @@ def Triangle.invRotate (T : Triangle C) : Triangle C :=
   Triangle.mk (-T.mor₃⟦(-1 : ℤ)⟧' ≫ (shiftShiftNeg _ _).Hom) T.mor₁
     (T.mor₂ ≫ (shiftNegShift _ _).inv)
 #align category_theory.pretriangulated.triangle.inv_rotate CategoryTheory.Pretriangulated.Triangle.invRotate
+-/
 
 end
 
 variable (C)
 
+#print CategoryTheory.Pretriangulated.rotate /-
 /-- Rotating triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -97,7 +102,9 @@ def rotate : Triangle C ⥤ Triangle C
       hom₃ := f.hom₁⟦1⟧'
       comm₃' := by dsimp; simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
+-/
 
+#print CategoryTheory.Pretriangulated.invRotate /-
 /-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -116,6 +123,7 @@ def invRotate : Triangle C ⥤ Triangle C
         rfl
       comm₃' := by dsimp; erw [← f.comm₂_assoc, assoc, ← nat_trans.naturality]; rfl }
 #align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotate
+-/
 
 variable {C}
 
@@ -125,6 +133,7 @@ attribute [local simp] shift_shift_neg' shift_neg_shift'
   shift_shift_functor_comp_iso_id_add_neg_self_inv_app
   shift_shift_functor_comp_iso_id_add_neg_self_hom_app
 
+#print CategoryTheory.Pretriangulated.rotCompInvRot /-
 /-- The unit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -135,7 +144,9 @@ def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C :=
         (by tidy) (by tidy) (by tidy))
     (by tidy)
 #align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRot
+-/
 
+#print CategoryTheory.Pretriangulated.invRotCompRot /-
 /-- The counit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -146,9 +157,11 @@ def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C) :=
         (by tidy) (by tidy) (by tidy))
     (by tidy)
 #align category_theory.pretriangulated.inv_rot_comp_rot CategoryTheory.Pretriangulated.invRotCompRot
+-/
 
 variable (C)
 
+#print CategoryTheory.Pretriangulated.triangleRotation /-
 /-- Rotating triangles gives an auto-equivalence on the category of triangles in `C`.
 -/
 @[simps]
@@ -159,6 +172,7 @@ def triangleRotation : Equivalence (Triangle C) (Triangle C)
   unitIso := rotCompInvRot
   counitIso := invRotCompRot
 #align category_theory.pretriangulated.triangle_rotation CategoryTheory.Pretriangulated.triangleRotation
+-/
 
 variable {C}
 
Diff
@@ -121,8 +121,9 @@ variable {C}
 
 variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 
-attribute [local simp]
-  shift_shift_neg' shift_neg_shift' shift_shift_functor_comp_iso_id_add_neg_self_inv_app shift_shift_functor_comp_iso_id_add_neg_self_hom_app
+attribute [local simp] shift_shift_neg' shift_neg_shift'
+  shift_shift_functor_comp_iso_id_add_neg_self_inv_app
+  shift_shift_functor_comp_iso_id_add_neg_self_hom_app
 
 /-- The unit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
Diff
@@ -43,12 +43,6 @@ variable [HasShift C ℤ]
 
 variable (X : C)
 
-/- warning: category_theory.pretriangulated.triangle.rotate -> CategoryTheory.Pretriangulated.Triangle.rotate is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle.rotate CategoryTheory.Pretriangulated.Triangle.rotateₓ'. -/
 /-- If you rotate a triangle, you get another triangle.
 Given a triangle of the form:
 ```
@@ -68,12 +62,6 @@ def Triangle.rotate (T : Triangle C) : Triangle C :=
 
 section
 
-/- warning: category_theory.pretriangulated.triangle.inv_rotate -> CategoryTheory.Pretriangulated.Triangle.invRotate is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle.inv_rotate CategoryTheory.Pretriangulated.Triangle.invRotateₓ'. -/
 /-- Given a triangle of the form:
 ```
       f       g       h
@@ -97,12 +85,6 @@ end
 
 variable (C)
 
-/- warning: category_theory.pretriangulated.rotate -> CategoryTheory.Pretriangulated.rotate is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotateₓ'. -/
 /-- Rotating triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -116,12 +98,6 @@ def rotate : Triangle C ⥤ Triangle C
       comm₃' := by dsimp; simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
 
-/- warning: category_theory.pretriangulated.inv_rotate -> CategoryTheory.Pretriangulated.invRotate is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotateₓ'. -/
 /-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -148,12 +124,6 @@ variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 attribute [local simp]
   shift_shift_neg' shift_neg_shift' shift_shift_functor_comp_iso_id_add_neg_self_inv_app shift_shift_functor_comp_iso_id_add_neg_self_hom_app
 
-/- warning: category_theory.pretriangulated.rot_comp_inv_rot -> CategoryTheory.Pretriangulated.rotCompInvRot is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3))
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRotₓ'. -/
 /-- The unit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -165,12 +135,6 @@ def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C :=
     (by tidy)
 #align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRot
 
-/- warning: category_theory.pretriangulated.inv_rot_comp_rot -> CategoryTheory.Pretriangulated.invRotCompRot is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3))
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.inv_rot_comp_rot CategoryTheory.Pretriangulated.invRotCompRotₓ'. -/
 /-- The counit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -184,12 +148,6 @@ def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C) :=
 
 variable (C)
 
-/- warning: category_theory.pretriangulated.triangle_rotation -> CategoryTheory.Pretriangulated.triangleRotation is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Equivalence.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Equivalence.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle_rotation CategoryTheory.Pretriangulated.triangleRotationₓ'. -/
 /-- Rotating triangles gives an auto-equivalence on the category of triangles in `C`.
 -/
 @[simps]
Diff
@@ -113,9 +113,7 @@ def rotate : Triangle C ⥤ Triangle C
     { hom₁ := f.hom₂
       hom₂ := f.hom₃
       hom₃ := f.hom₁⟦1⟧'
-      comm₃' := by
-        dsimp
-        simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
+      comm₃' := by dsimp; simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
 
 /- warning: category_theory.pretriangulated.inv_rotate -> CategoryTheory.Pretriangulated.invRotate is a dubious translation:
@@ -140,10 +138,7 @@ def invRotate : Triangle C ⥤ Triangle C
           functor.map_comp, assoc]
         erw [← nat_trans.naturality]
         rfl
-      comm₃' := by
-        dsimp
-        erw [← f.comm₂_assoc, assoc, ← nat_trans.naturality]
-        rfl }
+      comm₃' := by dsimp; erw [← f.comm₂_assoc, assoc, ← nat_trans.naturality]; rfl }
 #align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotate
 
 variable {C}
@@ -208,14 +203,10 @@ def triangleRotation : Equivalence (Triangle C) (Triangle C)
 
 variable {C}
 
-instance : IsEquivalence (rotate C) :=
-  by
-  change is_equivalence (triangle_rotation C).Functor
+instance : IsEquivalence (rotate C) := by change is_equivalence (triangle_rotation C).Functor;
   infer_instance
 
-instance : IsEquivalence (invRotate C) :=
-  by
-  change is_equivalence (triangle_rotation C).inverse
+instance : IsEquivalence (invRotate C) := by change is_equivalence (triangle_rotation C).inverse;
   infer_instance
 
 end CategoryTheory.Pretriangulated
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw, Joël Riou
 
 ! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 94d4e70e97c36c896cb70fb42821acfed040de60
+! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
 ! 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.Triangulated.Basic
 /-!
 # Rotate
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file adds the ability to rotate triangles and triangle morphisms.
 It also shows that rotation gives an equivalence on the category of triangles.
 
Diff
@@ -40,6 +40,12 @@ variable [HasShift C ℤ]
 
 variable (X : C)
 
+/- warning: category_theory.pretriangulated.triangle.rotate -> CategoryTheory.Pretriangulated.Triangle.rotate is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle.rotate CategoryTheory.Pretriangulated.Triangle.rotateₓ'. -/
 /-- If you rotate a triangle, you get another triangle.
 Given a triangle of the form:
 ```
@@ -59,6 +65,12 @@ def Triangle.rotate (T : Triangle C) : Triangle C :=
 
 section
 
+/- warning: category_theory.pretriangulated.triangle.inv_rotate -> CategoryTheory.Pretriangulated.Triangle.invRotate is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) -> (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle.inv_rotate CategoryTheory.Pretriangulated.Triangle.invRotateₓ'. -/
 /-- Given a triangle of the form:
 ```
       f       g       h
@@ -82,6 +94,12 @@ end
 
 variable (C)
 
+/- warning: category_theory.pretriangulated.rotate -> CategoryTheory.Pretriangulated.rotate is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+but is expected to have type
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotateₓ'. -/
 /-- Rotating triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -97,6 +115,12 @@ def rotate : Triangle C ⥤ Triangle C
         simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
 
+/- warning: category_theory.pretriangulated.inv_rotate -> CategoryTheory.Pretriangulated.invRotate is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+but is expected to have type
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt], CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotateₓ'. -/
 /-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
@@ -126,6 +150,12 @@ variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 attribute [local simp]
   shift_shift_neg' shift_neg_shift' shift_shift_functor_comp_iso_id_add_neg_self_inv_app shift_shift_functor_comp_iso_id_add_neg_self_hom_app
 
+/- warning: category_theory.pretriangulated.rot_comp_inv_rot -> CategoryTheory.Pretriangulated.rotCompInvRot is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3))
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRotₓ'. -/
 /-- The unit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -137,6 +167,12 @@ def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C :=
     (by tidy)
 #align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRot
 
+/- warning: category_theory.pretriangulated.inv_rot_comp_rot -> CategoryTheory.Pretriangulated.invRotCompRot is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Iso.{max u2 u1, max u2 u1} (CategoryTheory.Functor.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.category.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)) (CategoryTheory.Functor.comp.{u1, u1, u1, max u2 u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.invRotate.{u1, u2} C _inst_1 _inst_2 _inst_3) (CategoryTheory.Pretriangulated.rotate.{u1, u2} C _inst_1 _inst_2 _inst_3)) (CategoryTheory.Functor.id.{u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3))
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.inv_rot_comp_rot CategoryTheory.Pretriangulated.invRotCompRotₓ'. -/
 /-- The counit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
 `triangle C` given by the rotation of triangles. -/
 @[simps]
@@ -150,6 +186,12 @@ def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C) :=
 
 variable (C)
 
+/- warning: category_theory.pretriangulated.triangle_rotation -> CategoryTheory.Pretriangulated.triangleRotation is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.addMonoid] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.addMonoid _inst_3 n)], CategoryTheory.Equivalence.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+but is expected to have type
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.HasShift.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt] [_inst_4 : forall (n : Int), CategoryTheory.Functor.Additive.{u2, u2, u1, u1} C C _inst_1 _inst_1 _inst_2 _inst_2 (CategoryTheory.shiftFunctor.{u1, u2, 0} C Int _inst_1 Int.instAddMonoidInt _inst_3 n)], CategoryTheory.Equivalence.{u1, u1, max u2 u1, max u2 u1} (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.Triangle.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3) (CategoryTheory.Pretriangulated.triangleCategory.{u1, u2} C _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align category_theory.pretriangulated.triangle_rotation CategoryTheory.Pretriangulated.triangleRotationₓ'. -/
 /-- Rotating triangles gives an auto-equivalence on the category of triangles in `C`.
 -/
 @[simps]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw, Joël Riou
 
 ! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
+! leanprover-community/mathlib commit 94d4e70e97c36c896cb70fb42821acfed040de60
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -97,9 +97,6 @@ def rotate : Triangle C ⥤ Triangle C
         simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
 
-example : ℕ :=
-  42
-
 /-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
Diff
@@ -1,10 +1,10 @@
 /-
 Copyright (c) 2021 Luke Kershaw. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
-Authors: Luke Kershaw
+Authors: Luke Kershaw, Joël Riou
 
 ! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 19786714ebe478f40b503acb4705fb058ba47303
+! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -59,8 +59,6 @@ def Triangle.rotate (T : Triangle C) : Triangle C :=
 
 section
 
-attribute [local semireducible] shift_shift_neg shift_neg_shift
-
 /-- Given a triangle of the form:
 ```
       f       g       h
@@ -82,92 +80,6 @@ def Triangle.invRotate (T : Triangle C) : Triangle C :=
 
 end
 
-namespace TriangleMorphism
-
-variable {T₁ T₂ T₃ T₄ : Triangle C}
-
-open Triangle
-
-/-- You can also rotate a triangle morphism to get a morphism between the two rotated triangles.
-Given a triangle morphism of the form:
-```
-      f       g       h
-  X  ───> Y  ───> Z  ───> X⟦1⟧
-  │       │       │        │
-  │a      │b      │c       │a⟦1⟧
-  V       V       V        V
-  X' ───> Y' ───> Z' ───> X'⟦1⟧
-      f'      g'      h'
-```
-applying `rotate` gives a triangle morphism of the form:
-
-```
-      g        h       -f⟦1⟧
-  Y  ───> Z  ───>  X⟦1⟧ ───> Y⟦1⟧
-  │       │         │         │
-  │b      │c        │a⟦1⟧     │b⟦1⟧'
-  V       V         V         V
-  Y' ───> Z' ───> X'⟦1⟧ ───> Y'⟦1⟧
-      g'      h'       -f'⟦1⟧
-```
--/
-@[simps]
-def rotate (f : TriangleMorphism T₁ T₂) : TriangleMorphism T₁.rotate T₂.rotate
-    where
-  hom₁ := f.hom₂
-  hom₂ := f.hom₃
-  hom₃ := f.hom₁⟦1⟧'
-  comm₃' := by
-    dsimp
-    simp only [rotate_mor₃, comp_neg, neg_comp, ← functor.map_comp, f.comm₁]
-#align category_theory.pretriangulated.triangle_morphism.rotate CategoryTheory.Pretriangulated.TriangleMorphism.rotate
-
-/-- Given a triangle morphism of the form:
-```
-      f       g       h
-  X  ───> Y  ───> Z  ───> X⟦1⟧
-  │       │       │        │
-  │a      │b      │c       │a⟦1⟧
-  V       V       V        V
-  X' ───> Y' ───> Z' ───> X'⟦1⟧
-      f'      g'      h'
-```
-applying `inv_rotate` gives a triangle morphism that can be thought of as:
-```
-        -h⟦-1⟧      f         g
-  Z⟦-1⟧  ───>  X   ───>  Y   ───>  Z
-    │          │         │         │
-    │c⟦-1⟧'    │a        │b        │c
-    V          V         V         V
-  Z'⟦-1⟧ ───>  X'  ───>  Y'  ───>  Z'
-       -h'⟦-1⟧     f'        g'
-```
-(note that this diagram doesn't technically fit the definition of triangle morphism,
-as `Z⟦-1⟧⟦1⟧` is not necessarily equal to `Z`, and `Z'⟦-1⟧⟦1⟧` is not necessarily equal to `Z'`,
-but they are isomorphic, by the `counit_iso` of `shift C`)
--/
-@[simps]
-def invRotate (f : TriangleMorphism T₁ T₂) : TriangleMorphism T₁.invRotate T₂.invRotate
-    where
-  hom₁ := f.hom₃⟦-1⟧'
-  hom₂ := f.hom₁
-  hom₃ := f.hom₂
-  comm₁' := by
-    dsimp [inv_rotate_mor₁]
-    simp only [discrete.functor_map_id, id_comp, preadditive.comp_neg, assoc, neg_inj,
-      nat_trans.id_app, preadditive.neg_comp]
-    rw [← functor.map_comp_assoc, ← f.comm₃, functor.map_comp_assoc, μ_naturality_assoc,
-      nat_trans.naturality, functor.id_map]
-  comm₃' := by
-    dsimp
-    simp only [discrete.functor_map_id, id_comp, μ_inv_naturality, category.assoc, nat_trans.id_app,
-      unit_of_tensor_iso_unit_inv_app]
-    erw [ε_naturality_assoc]
-    rw [comm₂_assoc]
-#align category_theory.pretriangulated.triangle_morphism.inv_rotate CategoryTheory.Pretriangulated.TriangleMorphism.invRotate
-
-end TriangleMorphism
-
 variable (C)
 
 /-- Rotating triangles gives an endofunctor on the category of triangles in `C`.
@@ -176,165 +88,67 @@ variable (C)
 def rotate : Triangle C ⥤ Triangle C
     where
   obj := Triangle.rotate
-  map _ _ f := f.rotate
+  map T₁ T₂ f :=
+    { hom₁ := f.hom₂
+      hom₂ := f.hom₃
+      hom₃ := f.hom₁⟦1⟧'
+      comm₃' := by
+        dsimp
+        simp only [comp_neg, neg_comp, ← functor.map_comp, f.comm₁] }
 #align category_theory.pretriangulated.rotate CategoryTheory.Pretriangulated.rotate
 
+example : ℕ :=
+  42
+
 /-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
 -/
 @[simps]
 def invRotate : Triangle C ⥤ Triangle C
     where
   obj := Triangle.invRotate
-  map _ _ f := f.invRotate
+  map T₁ T₂ f :=
+    { hom₁ := f.hom₃⟦-1⟧'
+      hom₂ := f.hom₁
+      hom₃ := f.hom₂
+      comm₁' := by
+        dsimp
+        rw [neg_comp, assoc, comp_neg, neg_inj, ← functor.map_comp_assoc, ← f.comm₃,
+          functor.map_comp, assoc]
+        erw [← nat_trans.naturality]
+        rfl
+      comm₃' := by
+        dsimp
+        erw [← f.comm₂_assoc, assoc, ← nat_trans.naturality]
+        rfl }
 #align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotate
 
 variable {C}
 
 variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 
-/-- There is a natural map from a triangle to the `inv_rotate` of its `rotate`. -/
-@[simps]
-def toInvRotateRotate (T : Triangle C) : T ⟶ (invRotate C).obj ((rotate C).obj T)
-    where
-  hom₁ := (shiftShiftNeg _ _).inv
-  hom₂ := 𝟙 T.obj₂
-  hom₃ := 𝟙 T.obj₃
-  comm₃' := by
-    dsimp
-    simp only [ε_app_obj, eq_to_iso.hom, discrete.functor_map_id, id_comp, eq_to_iso.inv,
-      category.assoc, obj_μ_inv_app, functor.map_comp, nat_trans.id_app, obj_ε_app,
-      unit_of_tensor_iso_unit_inv_app]
-    erw [μ_inv_hom_app_assoc]
-    rfl
-#align category_theory.pretriangulated.to_inv_rotate_rotate CategoryTheory.Pretriangulated.toInvRotateRotate
-
-/-- There is a natural transformation between the identity functor on triangles in `C`,
-and the composition of a rotation with an inverse rotation.
--/
-@[simps]
-def rotCompInvRotHom : 𝟭 (Triangle C) ⟶ rotate C ⋙ invRotate C
-    where
-  app := toInvRotateRotate
-  naturality' := by
-    introv ; ext
-    · dsimp
-      simp only [nat_iso.cancel_nat_iso_inv_right_assoc, discrete.functor_map_id, id_comp,
-        μ_inv_naturality, assoc, nat_trans.id_app, unit_of_tensor_iso_unit_inv_app]
-      erw [ε_naturality]
-    · dsimp
-      rw [comp_id, id_comp]
-    · dsimp
-      rw [comp_id, id_comp]
-#align category_theory.pretriangulated.rot_comp_inv_rot_hom CategoryTheory.Pretriangulated.rotCompInvRotHom
-
-/-- There is a natural map from the `inv_rotate` of the `rotate` of a triangle to itself. -/
-@[simps]
-def fromInvRotateRotate (T : Triangle C) : (invRotate C).obj ((rotate C).obj T) ⟶ T
-    where
-  hom₁ := (shiftEquiv C 1).unitInv.app T.obj₁
-  hom₂ := 𝟙 T.obj₂
-  hom₃ := 𝟙 T.obj₃
-  comm₃' := by
-    dsimp
-    rw [unit_of_tensor_iso_unit_inv_app, ε_app_obj]
-    simp only [discrete.functor_map_id, nat_trans.id_app, id_comp, assoc, functor.map_comp,
-      obj_μ_app, obj_ε_inv_app, comp_id, μ_inv_hom_app_assoc]
-    erw [μ_inv_hom_app, μ_inv_hom_app_assoc, category.comp_id]
-#align category_theory.pretriangulated.from_inv_rotate_rotate CategoryTheory.Pretriangulated.fromInvRotateRotate
-
-/-- There is a natural transformation between the composition of a rotation with an inverse rotation
-on triangles in `C`, and the identity functor.
--/
-@[simps]
-def rotCompInvRotInv : rotate C ⋙ invRotate C ⟶ 𝟭 (Triangle C) where app := fromInvRotateRotate
-#align category_theory.pretriangulated.rot_comp_inv_rot_inv CategoryTheory.Pretriangulated.rotCompInvRotInv
+attribute [local simp]
+  shift_shift_neg' shift_neg_shift' shift_shift_functor_comp_iso_id_add_neg_self_inv_app shift_shift_functor_comp_iso_id_add_neg_self_hom_app
 
-/-- The natural transformations between the identity functor on triangles in `C` and the composition
-of a rotation with an inverse rotation are natural isomorphisms (they are isomorphisms in the
-category of functors).
--/
+/-- The unit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
+`triangle C` given by the rotation of triangles. -/
 @[simps]
-def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C
-    where
-  Hom := rotCompInvRotHom
-  inv := rotCompInvRotInv
+def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C :=
+  NatIso.ofComponents
+    (fun T =>
+      Triangle.isoMk _ _ ((shiftEquiv C (1 : ℤ)).unitIso.app T.obj₁) (Iso.refl _) (Iso.refl _)
+        (by tidy) (by tidy) (by tidy))
+    (by tidy)
 #align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRot
 
-/-- There is a natural map from the `rotate` of the `inv_rotate` of a triangle to itself. -/
+/-- The counit isomorphism of the auto-equivalence of categories `triangle_rotation C` of
+`triangle C` given by the rotation of triangles. -/
 @[simps]
-def fromRotateInvRotate (T : Triangle C) : (rotate C).obj ((invRotate C).obj T) ⟶ T
-    where
-  hom₁ := 𝟙 T.obj₁
-  hom₂ := 𝟙 T.obj₂
-  hom₃ := (shiftEquiv C 1).counit.app T.obj₃
-  comm₂' := by
-    dsimp
-    rw [unit_of_tensor_iso_unit_inv_app]
-    simp only [discrete.functor_map_id, nat_trans.id_app, id_comp, add_neg_equiv_counit_iso_hom,
-      eq_to_hom_refl, nat_trans.comp_app, assoc, μ_inv_hom_app_assoc, ε_hom_inv_app]
-    exact category.comp_id _
-  comm₃' := by
-    dsimp
-    simp only [discrete.functor_map_id, nat_trans.id_app, id_comp, functor.map_neg,
-      functor.map_comp, obj_μ_app, obj_ε_inv_app, comp_id, assoc, μ_naturality_assoc, neg_neg,
-      CategoryTheory.Functor.map_id, add_neg_equiv_counit_iso_hom, eq_to_hom_refl,
-      nat_trans.comp_app]
-    erw [μ_inv_hom_app, category.comp_id, obj_zero_map_μ_app]
-    rw [discrete.functor_map_id, nat_trans.id_app, comp_id]
-#align category_theory.pretriangulated.from_rotate_inv_rotate CategoryTheory.Pretriangulated.fromRotateInvRotate
-
-/-- There is a natural transformation between the composition of an inverse rotation with a rotation
-on triangles in `C`, and the identity functor.
--/
-@[simps]
-def invRotCompRotHom : invRotate C ⋙ rotate C ⟶ 𝟭 (Triangle C) where app := fromRotateInvRotate
-#align category_theory.pretriangulated.inv_rot_comp_rot_hom CategoryTheory.Pretriangulated.invRotCompRotHom
-
-/-- There is a natural map from a triangle to the `rotate` of its `inv_rotate`. -/
-@[simps]
-def toRotateInvRotate (T : Triangle C) : T ⟶ (rotate C).obj ((invRotate C).obj T)
-    where
-  hom₁ := 𝟙 T.obj₁
-  hom₂ := 𝟙 T.obj₂
-  hom₃ := (shiftEquiv C 1).counitInv.app T.obj₃
-  comm₃' := by
-    dsimp
-    rw [CategoryTheory.Functor.map_id]
-    simp only [comp_id, add_neg_equiv_counit_iso_inv, eq_to_hom_refl, id_comp, nat_trans.comp_app,
-      discrete.functor_map_id, nat_trans.id_app, functor.map_neg, functor.map_comp, obj_μ_app,
-      obj_ε_inv_app, assoc, μ_naturality_assoc, neg_neg, μ_inv_hom_app_assoc]
-    erw [μ_inv_hom_app, category.comp_id, obj_zero_map_μ_app]
-    simp only [discrete.functor_map_id, nat_trans.id_app, comp_id, ε_hom_inv_app_assoc]
-#align category_theory.pretriangulated.to_rotate_inv_rotate CategoryTheory.Pretriangulated.toRotateInvRotate
-
-/-- There is a natural transformation between the identity functor on triangles in `C`,
-and the composition of an inverse rotation with a rotation.
--/
-@[simps]
-def invRotCompRotInv : 𝟭 (Triangle C) ⟶ invRotate C ⋙ rotate C
-    where
-  app := toRotateInvRotate
-  naturality' := by
-    introv ; ext
-    · dsimp
-      rw [comp_id, id_comp]
-    · dsimp
-      rw [comp_id, id_comp]
-    · dsimp
-      rw [add_neg_equiv_counit_iso_inv, eq_to_hom_map, eq_to_hom_refl, id_comp]
-      simp only [nat_trans.comp_app, assoc]
-      erw [μ_inv_naturality, ε_naturality_assoc]
-#align category_theory.pretriangulated.inv_rot_comp_rot_inv CategoryTheory.Pretriangulated.invRotCompRotInv
-
-/-- The natural transformations between the composition of a rotation with an inverse rotation
-on triangles in `C`, and the identity functor on triangles are natural isomorphisms
-(they are isomorphisms in the category of functors).
--/
-@[simps]
-def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C)
-    where
-  Hom := invRotCompRotHom
-  inv := invRotCompRotInv
+def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C) :=
+  NatIso.ofComponents
+    (fun T =>
+      Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _) ((shiftEquiv C (1 : ℤ)).counitIso.app T.obj₃)
+        (by tidy) (by tidy) (by tidy))
+    (by tidy)
 #align category_theory.pretriangulated.inv_rot_comp_rot CategoryTheory.Pretriangulated.invRotCompRot
 
 variable (C)
@@ -348,19 +162,6 @@ def triangleRotation : Equivalence (Triangle C) (Triangle C)
   inverse := invRotate C
   unitIso := rotCompInvRot
   counitIso := invRotCompRot
-  functor_unitIso_comp' := by
-    introv ; ext
-    · dsimp
-      rw [comp_id]
-    · dsimp
-      rw [comp_id]
-    · dsimp
-      rw [unit_of_tensor_iso_unit_inv_app]
-      simp only [discrete.functor_map_id, nat_trans.id_app, id_comp, functor.map_comp, obj_ε_app,
-        obj_μ_inv_app, assoc, add_neg_equiv_counit_iso_hom, eq_to_hom_refl, nat_trans.comp_app,
-        ε_inv_app_obj, comp_id, μ_inv_hom_app_assoc]
-      erw [μ_inv_hom_app_assoc, μ_inv_hom_app]
-      rfl
 #align category_theory.pretriangulated.triangle_rotation CategoryTheory.Pretriangulated.triangleRotation
 
 variable {C}

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
@@ -151,12 +151,12 @@ def triangleRotation : Equivalence (Triangle C) (Triangle C)
 
 variable {C}
 
-instance : IsEquivalence (rotate C) := by
-  change IsEquivalence (triangleRotation C).functor
+instance : (rotate C).IsEquivalence := by
+  change (triangleRotation C).functor.IsEquivalence
   infer_instance
 
-instance : IsEquivalence (invRotate C) := by
-  change IsEquivalence (triangleRotation C).inverse
+instance : (invRotate C).IsEquivalence := by
+  change (triangleRotation C).inverse.IsEquivalence
   infer_instance
 
 end CategoryTheory.Pretriangulated
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


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

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

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

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -32,9 +32,7 @@ namespace CategoryTheory.Pretriangulated
 open CategoryTheory.Category
 
 variable {C : Type u} [Category.{v} C] [Preadditive C]
-
 variable [HasShift C ℤ]
-
 variable (X : C)
 
 /-- If you rotate a triangle, you get another triangle.
@@ -120,7 +118,6 @@ def invRotate : Triangle C ⥤ Triangle C
 #align category_theory.pretriangulated.inv_rotate CategoryTheory.Pretriangulated.invRotate
 
 variable {C}
-
 variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 
 /-- The unit isomorphism of the auto-equivalence of categories `triangleRotation C` of
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 Luke Kershaw. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw
-
-! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 94d4e70e97c36c896cb70fb42821acfed040de60
-! 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.Triangulated.Basic
 
+#align_import category_theory.triangulated.rotate from "leanprover-community/mathlib"@"94d4e70e97c36c896cb70fb42821acfed040de60"
+
 /-!
 # Rotate
 
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -70,7 +70,7 @@ applying `invRotate` gives a triangle that can be thought of as:
   Z⟦-1⟧  ───>  X  ───> Y  ───> Z
 ```
 (note that this diagram doesn't technically fit the definition of triangle, as `Z⟦-1⟧⟦1⟧` is
-not necessarily equal to `Z`, but it is isomorphic, by the `counitIso` of `shifEquiv C 1`)
+not necessarily equal to `Z`, but it is isomorphic, by the `counitIso` of `shiftEquiv C 1`)
 -/
 @[simps!]
 def Triangle.invRotate (T : Triangle C) : Triangle C :=
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
@@ -130,18 +130,16 @@ variable [∀ n : ℤ, Functor.Additive (shiftFunctor C n)]
 `Triangle C` given by the rotation of triangles. -/
 @[simps!]
 def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C :=
-  NatIso.ofComponents (fun T => Triangle.isoMk _ _
+  NatIso.ofComponents fun T => Triangle.isoMk _ _
     ((shiftEquiv C (1 : ℤ)).unitIso.app T.obj₁) (Iso.refl _) (Iso.refl _)
-    (by aesop_cat) (by aesop_cat) (by aesop_cat)) (by aesop_cat)
 #align category_theory.pretriangulated.rot_comp_inv_rot CategoryTheory.Pretriangulated.rotCompInvRot
 
 /-- The counit isomorphism of the auto-equivalence of categories `triangleRotation C` of
 `Triangle C` given by the rotation of triangles. -/
 @[simps!]
 def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C) :=
-  NatIso.ofComponents (fun T => Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
+  NatIso.ofComponents fun T => Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
     ((shiftEquiv C (1 : ℤ)).counitIso.app T.obj₃)
-    (by aesop_cat) (by aesop_cat) (by aesop_cat)) (by aesop_cat)
 #align category_theory.pretriangulated.inv_rot_comp_rot CategoryTheory.Pretriangulated.invRotCompRot
 
 variable (C)
feat: port CategoryTheory.Triangulated.Triangulated (#3072)

Also actually corrects the SHA that was incorrectly corrected in #3346; the stupid example was in CategoryTheory.Triangulated.Rotate and not CategoryTheory.Triangulated.Basic.

Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: Jon Eugster <eugster.jon@gmail.com> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: qawbecrdtey <qawbecrdtey@kaist.ac.kr> Co-authored-by: Jeremy Tan Jie Rui <e0191785@u.nus.edu> Co-authored-by: Sebastian Zivota <loewenheim@mailbox.org> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Luke Kershaw
 
 ! This file was ported from Lean 3 source module category_theory.triangulated.rotate
-! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
+! leanprover-community/mathlib commit 94d4e70e97c36c896cb70fb42821acfed040de60
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
feat: port CategoryTheory.Triangulated.Rotate (#3047)

Co-authored-by: Jeremy Tan Jie Rui <e0191785@u.nus.edu> Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Jon Eugster <eugster.jon@gmail.com> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: qawbecrdtey <qawbecrdtey@kaist.ac.kr> Co-authored-by: Sebastian Zivota <loewenheim@mailbox.org> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Dependencies 3 + 302

303 files ported (99.0%)
122521 lines ported (99.2%)
Show graph

The unported dependencies are