category_theory.graded_objectMathlib.CategoryTheory.GradedObject

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -236,7 +236,7 @@ The `total` functor taking a graded object to the coproduct of its graded compon
 To prove this, we need to know that the coprojections into the coproduct are monomorphisms,
 which follows from the fact we have zero morphisms and decidable equality for the grading.
 -/
-instance : Faithful (total β C)
+instance : CategoryTheory.Functor.Faithful (total β C)
     where map_injective' X Y f g w := by
     classical
     ext i
Diff
@@ -241,7 +241,7 @@ instance : Faithful (total β C)
     classical
     ext i
     replace w := sigma.ι (fun i : β => X i) i ≫= w
-    erw [colimit.ι_map, colimit.ι_map] at w 
+    erw [colimit.ι_map, colimit.ι_map] at w
     simp at *
     exact mono.right_cancellation _ _ w
 
Diff
@@ -236,7 +236,14 @@ The `total` functor taking a graded object to the coproduct of its graded compon
 To prove this, we need to know that the coprojections into the coproduct are monomorphisms,
 which follows from the fact we have zero morphisms and decidable equality for the grading.
 -/
-instance : Faithful (total β C) where map_injective' X Y f g w := by classical
+instance : Faithful (total β C)
+    where map_injective' X Y f g w := by
+    classical
+    ext i
+    replace w := sigma.ι (fun i : β => X i) i ≫= w
+    erw [colimit.ι_map, colimit.ι_map] at w 
+    simp at *
+    exact mono.right_cancellation _ _ w
 
 end GradedObject
 
Diff
@@ -236,14 +236,7 @@ The `total` functor taking a graded object to the coproduct of its graded compon
 To prove this, we need to know that the coprojections into the coproduct are monomorphisms,
 which follows from the fact we have zero morphisms and decidable equality for the grading.
 -/
-instance : Faithful (total β C)
-    where map_injective' X Y f g w := by
-    classical
-    ext i
-    replace w := sigma.ι (fun i : β => X i) i ≫= w
-    erw [colimit.ι_map, colimit.ι_map] at w 
-    simp at *
-    exact mono.right_cancellation _ _ w
+instance : Faithful (total β C) where map_injective' X Y f g w := by classical
 
 end GradedObject
 
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.Algebra.GroupPower.Lemmas
-import Mathbin.CategoryTheory.Pi.Basic
-import Mathbin.CategoryTheory.Shift.Basic
-import Mathbin.CategoryTheory.ConcreteCategory.Basic
+import Algebra.GroupPower.Lemmas
+import CategoryTheory.Pi.Basic
+import CategoryTheory.Shift.Basic
+import CategoryTheory.ConcreteCategory.Basic
 
 #align_import category_theory.graded_object from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 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.graded_object
-! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.GroupPower.Lemmas
 import Mathbin.CategoryTheory.Pi.Basic
 import Mathbin.CategoryTheory.Shift.Basic
 import Mathbin.CategoryTheory.ConcreteCategory.Basic
 
+#align_import category_theory.graded_object from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
+
 /-!
 # The category of graded objects
 
Diff
@@ -114,7 +114,7 @@ theorem comapEq_symm {β γ : Type w} {f g : β → γ} (h : f = g) :
 theorem comapEq_trans {β γ : Type w} {f g h : β → γ} (k : f = g) (l : g = h) :
     comapEq C (k.trans l) = comapEq C k ≪≫ comapEq C l :=
   by
-  ext (X b)
+  ext X b
   simp
 #align category_theory.graded_object.comap_eq_trans CategoryTheory.GradedObject.comapEq_trans
 -/
Diff
@@ -126,6 +126,7 @@ theorem eqToHom_apply {β : Type w} {X Y : ∀ b : β, C} (h : X = Y) (b : β) :
 #align category_theory.graded_object.eq_to_hom_apply CategoryTheory.GradedObject.eqToHom_apply
 -/
 
+#print CategoryTheory.GradedObject.comapEquiv /-
 /-- The equivalence between β-graded objects and γ-graded objects,
 given an equivalence between β and γ.
 -/
@@ -138,10 +139,12 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
   unitIso := (comapEq C (by ext; simp)).trans (comapComp _ _ _).symm
   functor_unitIso_comp' X := by ext b; dsimp; simp
 #align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquiv
+-/
 
 -- See note [dsimp, simp].
 end
 
+#print CategoryTheory.GradedObject.hasShift /-
 instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { f := fun n => comap (fun _ => C) fun b : β => b + n • s
@@ -151,19 +154,24 @@ instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObj
       zero_add_hom_app := fun n X => by ext; dsimp; simpa
       add_zero_hom_app := fun n X => by ext; dsimp; simpa }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
+-/
 
+#print CategoryTheory.GradedObject.shiftFunctor_obj_apply /-
 @[simp]
 theorem shiftFunctor_obj_apply {β : Type _} [AddCommGroup β] (s : β) (X : β → C) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).obj X t = X (t + n • s) :=
   rfl
 #align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_apply
+-/
 
+#print CategoryTheory.GradedObject.shiftFunctor_map_apply /-
 @[simp]
 theorem shiftFunctor_map_apply {β : Type _} [AddCommGroup β] (s : β)
     {X Y : GradedObjectWithShift s C} (f : X ⟶ Y) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).map f t = f (t + n • s) :=
   rfl
 #align category_theory.graded_object.shift_functor_map_apply CategoryTheory.GradedObject.shiftFunctor_map_apply
+-/
 
 #print CategoryTheory.GradedObject.hasZeroMorphisms /-
 instance hasZeroMorphisms [HasZeroMorphisms C] (β : Type w) :
Diff
@@ -234,11 +234,11 @@ which follows from the fact we have zero morphisms and decidable equality for th
 instance : Faithful (total β C)
     where map_injective' X Y f g w := by
     classical
-      ext i
-      replace w := sigma.ι (fun i : β => X i) i ≫= w
-      erw [colimit.ι_map, colimit.ι_map] at w 
-      simp at *
-      exact mono.right_cancellation _ _ w
+    ext i
+    replace w := sigma.ι (fun i : β => X i) i ≫= w
+    erw [colimit.ι_map, colimit.ι_map] at w 
+    simp at *
+    exact mono.right_cancellation _ _ w
 
 end GradedObject
 
Diff
@@ -236,7 +236,7 @@ instance : Faithful (total β C)
     classical
       ext i
       replace w := sigma.ι (fun i : β => X i) i ≫= w
-      erw [colimit.ι_map, colimit.ι_map] at w
+      erw [colimit.ι_map, colimit.ι_map] at w 
       simp at *
       exact mono.right_cancellation _ _ w
 
Diff
@@ -181,7 +181,7 @@ theorem zero_apply [HasZeroMorphisms C] (β : Type w) (X Y : GradedObject β C)
 
 section
 
-open ZeroObject
+open scoped ZeroObject
 
 #print CategoryTheory.GradedObject.hasZeroObject /-
 instance hasZeroObject [HasZeroObject C] [HasZeroMorphisms C] (β : Type w) :
Diff
@@ -126,12 +126,6 @@ theorem eqToHom_apply {β : Type w} {X Y : ∀ b : β, C} (h : X = Y) (b : β) :
 #align category_theory.graded_object.eq_to_hom_apply CategoryTheory.GradedObject.eqToHom_apply
 -/
 
-/- warning: category_theory.graded_object.comap_equiv -> CategoryTheory.GradedObject.comapEquiv is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} {γ : Type.{u1}}, (Equiv.{succ u1, succ u1} β γ) -> (CategoryTheory.Equivalence.{max u1 u2, max u1 u2, max u1 u3, max u1 u3} (CategoryTheory.GradedObject.{u1, u3} β C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObject.{u1, u3} γ C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 γ))
-but is expected to have type
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} {γ : Type.{u1}}, (Equiv.{succ u1, succ u1} β γ) -> (CategoryTheory.Equivalence.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObject.{u1, u3} β C) (CategoryTheory.GradedObject.{u1, u3} γ C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 γ))
-Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquivₓ'. -/
 /-- The equivalence between β-graded objects and γ-graded objects,
 given an equivalence between β and γ.
 -/
@@ -148,12 +142,6 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
 -- See note [dsimp, simp].
 end
 
-/- warning: category_theory.graded_object.has_shift -> CategoryTheory.GradedObject.hasShift is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β), CategoryTheory.HasShift.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β), CategoryTheory.HasShift.{max u1 u3, max u2 u3, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.instAddMonoidInt
-Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShiftₓ'. -/
 instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { f := fun n => comap (fun _ => C) fun b : β => b + n • s
@@ -164,24 +152,12 @@ instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObj
       add_zero_hom_app := fun n X => by ext; dsimp; simpa }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
-/- warning: category_theory.graded_object.shift_functor_obj_apply -> CategoryTheory.GradedObject.shiftFunctor_obj_apply is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β) (X : β -> C) (t : β) (n : Int), Eq.{succ u2} C (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X t) (X (HAdd.hAdd.{u3, u3, u3} β β β (instHAdd.{u3} β (AddZeroClass.toHasAdd.{u3} β (AddMonoid.toAddZeroClass.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2)))))) t (SMul.smul.{0, u3} Int β (SubNegMonoid.SMulInt.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2))) n s)))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} [_inst_2 : AddCommGroup.{u1} β] (s : β) (X : β -> C) (t : β) (n : Int), Eq.{succ u3} C (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X t) (X (HAdd.hAdd.{u1, u1, u1} β β β (instHAdd.{u1} β (AddZeroClass.toAdd.{u1} β (AddMonoid.toAddZeroClass.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))))) t (HSMul.hSMul.{0, u1, u1} Int β β (instHSMul.{0, u1} Int β (SubNegMonoid.SMulInt.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))) n s)))
-Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_applyₓ'. -/
 @[simp]
 theorem shiftFunctor_obj_apply {β : Type _} [AddCommGroup β] (s : β) (X : β → C) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).obj X t = X (t + n • s) :=
   rfl
 #align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_apply
 
-/- warning: category_theory.graded_object.shift_functor_map_apply -> CategoryTheory.GradedObject.shiftFunctor_map_apply is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β) {X : CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C} {Y : CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C} (f : Quiver.Hom.{succ (max u3 u1), max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u3 u1, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u3 u1, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β))) X Y) (t : β) (n : Int), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} ((fun (_x : β) => C) t) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} ((fun (_x : β) => C) t) (CategoryTheory.Category.toCategoryStruct.{u1, u2} ((fun (_x : β) => C) t) ((fun (i : β) => _inst_1) t))) (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X t) (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) Y t)) (CategoryTheory.Functor.map.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X Y f t) (f (HAdd.hAdd.{u3, u3, u3} β β β (instHAdd.{u3} β (AddZeroClass.toHasAdd.{u3} β (AddMonoid.toAddZeroClass.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2)))))) t (SMul.smul.{0, u3} Int β (SubNegMonoid.SMulInt.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2))) n s)))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} [_inst_2 : AddCommGroup.{u1} β] (s : β) {X : CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C} {Y : CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C} (f : Quiver.Hom.{max (succ u2) (succ u1), max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) X Y) (t : β) (n : Int), Eq.{succ u2} (Quiver.Hom.{succ u2, u3} ((fun (_x : β) => C) t) (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} ((fun (_x : β) => C) t) (CategoryTheory.Category.toCategoryStruct.{u2, u3} ((fun (_x : β) => C) t) ((fun (i : β) => _inst_1) t))) (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X t) (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) Y t)) (Prefunctor.map.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X Y f t) (f (HAdd.hAdd.{u1, u1, u1} β β β (instHAdd.{u1} β (AddZeroClass.toAdd.{u1} β (AddMonoid.toAddZeroClass.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))))) t (HSMul.hSMul.{0, u1, u1} Int β β (instHSMul.{0, u1} Int β (SubNegMonoid.SMulInt.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))) n s)))
-Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.shift_functor_map_apply CategoryTheory.GradedObject.shiftFunctor_map_applyₓ'. -/
 @[simp]
 theorem shiftFunctor_map_apply {β : Type _} [AddCommGroup β] (s : β)
     {X Y : GradedObjectWithShift s C} (f : X ⟶ Y) (t : β) (n : ℤ) :
Diff
@@ -122,10 +122,7 @@ theorem comapEq_trans {β γ : Type w} {f g h : β → γ} (k : f = g) (l : g =
 #print CategoryTheory.GradedObject.eqToHom_apply /-
 @[simp]
 theorem eqToHom_apply {β : Type w} {X Y : ∀ b : β, C} (h : X = Y) (b : β) :
-    (eqToHom h : X ⟶ Y) b = eqToHom (by subst h) :=
-  by
-  subst h
-  rfl
+    (eqToHom h : X ⟶ Y) b = eqToHom (by subst h) := by subst h; rfl
 #align category_theory.graded_object.eq_to_hom_apply CategoryTheory.GradedObject.eqToHom_apply
 -/
 
@@ -143,22 +140,9 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
     where
   Functor := comap (fun _ => C) (e.symm : γ → β)
   inverse := comap (fun _ => C) (e : β → γ)
-  counitIso :=
-    (comapComp (fun _ => C) _ _).trans
-      (comapEq C
-        (by
-          ext
-          simp))
-  unitIso :=
-    (comapEq C
-          (by
-            ext
-            simp)).trans
-      (comapComp _ _ _).symm
-  functor_unitIso_comp' X := by
-    ext b
-    dsimp
-    simp
+  counitIso := (comapComp (fun _ => C) _ _).trans (comapEq C (by ext; simp))
+  unitIso := (comapEq C (by ext; simp)).trans (comapComp _ _ _).symm
+  functor_unitIso_comp' X := by ext b; dsimp; simp
 #align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquiv
 
 -- See note [dsimp, simp].
@@ -173,30 +157,11 @@ Case conversion may be inaccurate. Consider using '#align category_theory.graded
 instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { f := fun n => comap (fun _ => C) fun b : β => b + n • s
-      zero :=
-        comapEq C
-            (by
-              ext
-              simp) ≪≫
-          comapId β fun _ => C
-      add := fun m n =>
-        comapEq C
-            (by
-              ext
-              simp [add_zsmul, add_comm]) ≪≫
-          (comapComp _ _ _).symm
-      assoc_hom_app := fun m₁ m₂ m₃ X => by
-        ext
-        dsimp
-        simp
-      zero_add_hom_app := fun n X => by
-        ext
-        dsimp
-        simpa
-      add_zero_hom_app := fun n X => by
-        ext
-        dsimp
-        simpa }
+      zero := comapEq C (by ext; simp) ≪≫ comapId β fun _ => C
+      add := fun m n => comapEq C (by ext; simp [add_zsmul, add_comm]) ≪≫ (comapComp _ _ _).symm
+      assoc_hom_app := fun m₁ m₂ m₃ X => by ext; dsimp; simp
+      zero_add_hom_app := fun n X => by ext; dsimp; simpa
+      add_zero_hom_app := fun n X => by ext; dsimp; simpa }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
 /- warning: category_theory.graded_object.shift_functor_obj_apply -> CategoryTheory.GradedObject.shiftFunctor_obj_apply is a dubious translation:
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.graded_object
-! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
+! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.CategoryTheory.ConcreteCategory.Basic
 /-!
 # The category of graded objects
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 For any type `β`, a `β`-graded object over some category `C` is just
 a function `β → C` into the objects of `C`.
 We put the "pointwise" category structure on these, as the non-dependent specialization of
Diff
@@ -39,17 +39,22 @@ namespace CategoryTheory
 
 universe w v u
 
+#print CategoryTheory.GradedObject /-
 /-- A type synonym for `β → C`, used for `β`-graded objects in a category `C`. -/
 def GradedObject (β : Type w) (C : Type u) : Type max w u :=
   β → C
 #align category_theory.graded_object CategoryTheory.GradedObject
+-/
 
+#print CategoryTheory.inhabitedGradedObject /-
 -- Satisfying the inhabited linter...
 instance inhabitedGradedObject (β : Type w) (C : Type u) [Inhabited C] :
     Inhabited (GradedObject β C) :=
   ⟨fun b => Inhabited.default⟩
 #align category_theory.inhabited_graded_object CategoryTheory.inhabitedGradedObject
+-/
 
+#print CategoryTheory.GradedObjectWithShift /-
 -- `s` is here to distinguish type synonyms asking for different shifts
 /-- A type synonym for `β → C`, used for `β`-graded objects in a category `C`
 with a shift functor given by translation by `s`.
@@ -58,15 +63,19 @@ with a shift functor given by translation by `s`.
 abbrev GradedObjectWithShift {β : Type w} [AddCommGroup β] (s : β) (C : Type u) : Type max w u :=
   GradedObject β C
 #align category_theory.graded_object_with_shift CategoryTheory.GradedObjectWithShift
+-/
 
 namespace GradedObject
 
 variable {C : Type u} [Category.{v} C]
 
+#print CategoryTheory.GradedObject.categoryOfGradedObjects /-
 instance categoryOfGradedObjects (β : Type w) : Category.{max w v} (GradedObject β C) :=
   CategoryTheory.pi fun _ => C
 #align category_theory.graded_object.category_of_graded_objects CategoryTheory.GradedObject.categoryOfGradedObjects
+-/
 
+#print CategoryTheory.GradedObject.eval /-
 /-- The projection of a graded object to its `i`-th component. -/
 @[simps]
 def eval {β : Type w} (b : β) : GradedObject β C ⥤ C
@@ -74,11 +83,13 @@ def eval {β : Type w} (b : β) : GradedObject β C ⥤ C
   obj X := X b
   map X Y f := f b
 #align category_theory.graded_object.eval CategoryTheory.GradedObject.eval
+-/
 
 section
 
 variable (C)
 
+#print CategoryTheory.GradedObject.comapEq /-
 /-- The natural isomorphism comparing between
 pulling back along two propositionally equal functions.
 -/
@@ -88,18 +99,24 @@ def comapEq {β γ : Type w} {f g : β → γ} (h : f = g) : comap (fun _ => C)
   Hom := { app := fun X b => eqToHom (by dsimp [comap]; subst h) }
   inv := { app := fun X b => eqToHom (by dsimp [comap]; subst h) }
 #align category_theory.graded_object.comap_eq CategoryTheory.GradedObject.comapEq
+-/
 
+#print CategoryTheory.GradedObject.comapEq_symm /-
 theorem comapEq_symm {β γ : Type w} {f g : β → γ} (h : f = g) :
     comapEq C h.symm = (comapEq C h).symm := by tidy
 #align category_theory.graded_object.comap_eq_symm CategoryTheory.GradedObject.comapEq_symm
+-/
 
+#print CategoryTheory.GradedObject.comapEq_trans /-
 theorem comapEq_trans {β γ : Type w} {f g h : β → γ} (k : f = g) (l : g = h) :
     comapEq C (k.trans l) = comapEq C k ≪≫ comapEq C l :=
   by
   ext (X b)
   simp
 #align category_theory.graded_object.comap_eq_trans CategoryTheory.GradedObject.comapEq_trans
+-/
 
+#print CategoryTheory.GradedObject.eqToHom_apply /-
 @[simp]
 theorem eqToHom_apply {β : Type w} {X Y : ∀ b : β, C} (h : X = Y) (b : β) :
     (eqToHom h : X ⟶ Y) b = eqToHom (by subst h) :=
@@ -107,7 +124,14 @@ theorem eqToHom_apply {β : Type w} {X Y : ∀ b : β, C} (h : X = Y) (b : β) :
   subst h
   rfl
 #align category_theory.graded_object.eq_to_hom_apply CategoryTheory.GradedObject.eqToHom_apply
+-/
 
+/- warning: category_theory.graded_object.comap_equiv -> CategoryTheory.GradedObject.comapEquiv is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} {γ : Type.{u1}}, (Equiv.{succ u1, succ u1} β γ) -> (CategoryTheory.Equivalence.{max u1 u2, max u1 u2, max u1 u3, max u1 u3} (CategoryTheory.GradedObject.{u1, u3} β C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObject.{u1, u3} γ C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 γ))
+but is expected to have type
+  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} {γ : Type.{u1}}, (Equiv.{succ u1, succ u1} β γ) -> (CategoryTheory.Equivalence.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObject.{u1, u3} β C) (CategoryTheory.GradedObject.{u1, u3} γ C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 γ))
+Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquivₓ'. -/
 /-- The equivalence between β-graded objects and γ-graded objects,
 given an equivalence between β and γ.
 -/
@@ -137,6 +161,12 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
 -- See note [dsimp, simp].
 end
 
+/- warning: category_theory.graded_object.has_shift -> CategoryTheory.GradedObject.hasShift is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β), CategoryTheory.HasShift.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β), CategoryTheory.HasShift.{max u1 u3, max u2 u3, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.instAddMonoidInt
+Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShiftₓ'. -/
 instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { f := fun n => comap (fun _ => C) fun b : β => b + n • s
@@ -166,12 +196,24 @@ instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObj
         simpa }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
+/- warning: category_theory.graded_object.shift_functor_obj_apply -> CategoryTheory.GradedObject.shiftFunctor_obj_apply is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β) (X : β -> C) (t : β) (n : Int), Eq.{succ u2} C (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X t) (X (HAdd.hAdd.{u3, u3, u3} β β β (instHAdd.{u3} β (AddZeroClass.toHasAdd.{u3} β (AddMonoid.toAddZeroClass.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2)))))) t (SMul.smul.{0, u3} Int β (SubNegMonoid.SMulInt.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2))) n s)))
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} [_inst_2 : AddCommGroup.{u1} β] (s : β) (X : β -> C) (t : β) (n : Int), Eq.{succ u3} C (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X t) (X (HAdd.hAdd.{u1, u1, u1} β β β (instHAdd.{u1} β (AddZeroClass.toAdd.{u1} β (AddMonoid.toAddZeroClass.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))))) t (HSMul.hSMul.{0, u1, u1} Int β β (instHSMul.{0, u1} Int β (SubNegMonoid.SMulInt.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))) n s)))
+Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_applyₓ'. -/
 @[simp]
 theorem shiftFunctor_obj_apply {β : Type _} [AddCommGroup β] (s : β) (X : β → C) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).obj X t = X (t + n • s) :=
   rfl
 #align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_apply
 
+/- warning: category_theory.graded_object.shift_functor_map_apply -> CategoryTheory.GradedObject.shiftFunctor_map_apply is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {β : Type.{u3}} [_inst_2 : AddCommGroup.{u3} β] (s : β) {X : CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C} {Y : CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C} (f : Quiver.Hom.{succ (max u3 u1), max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u3 u1, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u3 u1, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β))) X Y) (t : β) (n : Int), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} ((fun (_x : β) => C) t) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} ((fun (_x : β) => C) t) (CategoryTheory.Category.toCategoryStruct.{u1, u2} ((fun (_x : β) => C) t) ((fun (i : β) => _inst_1) t))) (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X t) (CategoryTheory.Functor.obj.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) Y t)) (CategoryTheory.Functor.map.{max u3 u1, max u3 u1, max u3 u2, max u3 u2} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u3 u1, max u3 u2, 0} (CategoryTheory.GradedObjectWithShift.{u3, u2} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u3, u1, u2} C _inst_1 β) Int.addMonoid (CategoryTheory.GradedObject.hasShift.{u1, u2, u3} C _inst_1 β _inst_2 s) n) X Y f t) (f (HAdd.hAdd.{u3, u3, u3} β β β (instHAdd.{u3} β (AddZeroClass.toHasAdd.{u3} β (AddMonoid.toAddZeroClass.{u3} β (SubNegMonoid.toAddMonoid.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2)))))) t (SMul.smul.{0, u3} Int β (SubNegMonoid.SMulInt.{u3} β (AddGroup.toSubNegMonoid.{u3} β (AddCommGroup.toAddGroup.{u3} β _inst_2))) n s)))
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] {β : Type.{u1}} [_inst_2 : AddCommGroup.{u1} β] (s : β) {X : CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C} {Y : CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C} (f : Quiver.Hom.{max (succ u2) (succ u1), max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) X Y) (t : β) (n : Int), Eq.{succ u2} (Quiver.Hom.{succ u2, u3} ((fun (_x : β) => C) t) (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} ((fun (_x : β) => C) t) (CategoryTheory.Category.toCategoryStruct.{u2, u3} ((fun (_x : β) => C) t) ((fun (i : β) => _inst_1) t))) (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X t) (Prefunctor.obj.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) Y t)) (Prefunctor.map.{max (succ u2) (succ u1), max (succ u2) (succ u1), max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β))) (CategoryTheory.Functor.toPrefunctor.{max u2 u1, max u2 u1, max u3 u1, max u3 u1} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) (CategoryTheory.shiftFunctor.{max u2 u1, max u3 u1, 0} (CategoryTheory.GradedObjectWithShift.{u1, u3} β _inst_2 s C) Int (CategoryTheory.GradedObject.categoryOfGradedObjects.{u1, u2, u3} C _inst_1 β) Int.instAddMonoidInt (CategoryTheory.GradedObject.hasShift.{u2, u3, u1} C _inst_1 β _inst_2 s) n)) X Y f t) (f (HAdd.hAdd.{u1, u1, u1} β β β (instHAdd.{u1} β (AddZeroClass.toAdd.{u1} β (AddMonoid.toAddZeroClass.{u1} β (SubNegMonoid.toAddMonoid.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))))) t (HSMul.hSMul.{0, u1, u1} Int β β (instHSMul.{0, u1} Int β (SubNegMonoid.SMulInt.{u1} β (AddGroup.toSubNegMonoid.{u1} β (AddCommGroup.toAddGroup.{u1} β _inst_2)))) n s)))
+Case conversion may be inaccurate. Consider using '#align category_theory.graded_object.shift_functor_map_apply CategoryTheory.GradedObject.shiftFunctor_map_applyₓ'. -/
 @[simp]
 theorem shiftFunctor_map_apply {β : Type _} [AddCommGroup β] (s : β)
     {X Y : GradedObjectWithShift s C} (f : X ⟶ Y) (t : β) (n : ℤ) :
@@ -179,20 +221,25 @@ theorem shiftFunctor_map_apply {β : Type _} [AddCommGroup β] (s : β)
   rfl
 #align category_theory.graded_object.shift_functor_map_apply CategoryTheory.GradedObject.shiftFunctor_map_apply
 
+#print CategoryTheory.GradedObject.hasZeroMorphisms /-
 instance hasZeroMorphisms [HasZeroMorphisms C] (β : Type w) :
     HasZeroMorphisms.{max w v} (GradedObject β C) where Zero X Y := { zero := fun b => 0 }
 #align category_theory.graded_object.has_zero_morphisms CategoryTheory.GradedObject.hasZeroMorphisms
+-/
 
+#print CategoryTheory.GradedObject.zero_apply /-
 @[simp]
 theorem zero_apply [HasZeroMorphisms C] (β : Type w) (X Y : GradedObject β C) (b : β) :
     (0 : X ⟶ Y) b = 0 :=
   rfl
 #align category_theory.graded_object.zero_apply CategoryTheory.GradedObject.zero_apply
+-/
 
 section
 
 open ZeroObject
 
+#print CategoryTheory.GradedObject.hasZeroObject /-
 instance hasZeroObject [HasZeroObject C] [HasZeroMorphisms C] (β : Type w) :
     HasZeroObject.{max w v} (GradedObject β C) := by
   refine'
@@ -200,6 +247,7 @@ instance hasZeroObject [HasZeroObject C] [HasZeroMorphisms C] (β : Type w) :
           ⟨⟨⟨fun b => 0⟩, fun f => _⟩⟩⟩⟩ <;>
     ext
 #align category_theory.graded_object.has_zero_object CategoryTheory.GradedObject.hasZeroObject
+-/
 
 end
 
@@ -220,6 +268,7 @@ section
 
 attribute [local tidy] tactic.discrete_cases
 
+#print CategoryTheory.GradedObject.total /-
 /-- The total object of a graded object is the coproduct of the graded components.
 -/
 noncomputable def total : GradedObject β C ⥤ C
@@ -227,6 +276,7 @@ noncomputable def total : GradedObject β C ⥤ C
   obj X := ∐ fun i : β => X i
   map X Y f := Limits.Sigma.map fun i => f i
 #align category_theory.graded_object.total CategoryTheory.GradedObject.total
+-/
 
 end
 
Diff
@@ -4,13 +4,13 @@ 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.graded_object
-! leanprover-community/mathlib commit 11613e2875d27371f380af8692498a22b66140a5
+! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.GroupPower.Lemmas
 import Mathbin.CategoryTheory.Pi.Basic
-import Mathbin.CategoryTheory.Shift
+import Mathbin.CategoryTheory.Shift.Basic
 import Mathbin.CategoryTheory.ConcreteCategory.Basic
 
 /-!
@@ -140,33 +140,30 @@ end
 instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { f := fun n => comap (fun _ => C) fun b : β => b + n • s
-      ε :=
-        (comapId β fun _ => C).symm ≪≫
-          comapEq C
+      zero :=
+        comapEq C
             (by
               ext
-              simp)
-      μ := fun m n =>
-        comapComp _ _ _ ≪≫
-          comapEq C
+              simp) ≪≫
+          comapId β fun _ => C
+      add := fun m n =>
+        comapEq C
             (by
               ext
-              simp [add_zsmul, add_comm])
-      left_unitality := by
-        introv
+              simp [add_zsmul, add_comm]) ≪≫
+          (comapComp _ _ _).symm
+      assoc_hom_app := fun m₁ m₂ m₃ X => by
         ext
         dsimp
-        simpa
-      right_unitality := by
-        introv
+        simp
+      zero_add_hom_app := fun n X => by
         ext
         dsimp
         simpa
-      associativity := by
-        introv
+      add_zero_hom_app := fun n X => by
         ext
         dsimp
-        simp }
+        simpa }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
 @[simp]

Changes in mathlib4

mathlib3
mathlib4
chore: split Subsingleton,Nontrivial off of Data.Set.Basic (#11832)

Moves definition of and lemmas related to Set.Subsingleton and Set.Nontrivial to a new file, so that Basic can be shorter.

Diff
@@ -7,7 +7,7 @@ import Mathlib.Algebra.Group.Int
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.CategoryTheory.ConcreteCategory.Basic
 import Mathlib.CategoryTheory.Shift.Basic
-import Mathlib.Data.Set.Basic
+import Mathlib.Data.Set.Subsingleton
 
 #align_import category_theory.graded_object from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803"
 
chore: remove autoImplicit from more files (#11798)

and reduce its scope in a few other instances. Mostly in CategoryTheory and Data this time; some Combinatorics also.

Co-authored-by: Richard Osborn <richardosborn@mac.com>

Diff
@@ -33,8 +33,6 @@ have a functor `map : GradedObject I C ⥤ GradedObject J C`.
 
 -/
 
-set_option autoImplicit true
-
 namespace CategoryTheory
 
 open Category Limits
@@ -72,7 +70,7 @@ instance categoryOfGradedObjects (β : Type w) : Category.{max w v} (GradedObjec
 
 -- Porting note (#10688): added to ease automation
 @[ext]
-lemma hom_ext {X Y : GradedObject β C} (f g : X ⟶ Y) (h : ∀ x, f x = g x) : f = g := by
+lemma hom_ext {β : Type*} {X Y : GradedObject β C} (f g : X ⟶ Y) (h : ∀ x, f x = g x) : f = g := by
   funext
   apply h
 
@@ -128,7 +126,7 @@ abbrev comap {I J : Type*} (h : J → I) : GradedObject I C ⥤ GradedObject J C
 
 -- Porting note: added to ease the port, this is a special case of `Functor.eqToHom_proj`
 @[simp]
-theorem eqToHom_proj {x x' : GradedObject I C} (h : x = x') (i : I) :
+theorem eqToHom_proj {I : Type*} {x x' : GradedObject I C} (h : x = x') (i : I) :
     (eqToHom h : x ⟶ x') i = eqToHom (Function.funext_iff.mp h i) := by
   subst h
   rfl
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
@@ -248,7 +248,7 @@ The `total` functor taking a graded object to the coproduct of its graded compon
 To prove this, we need to know that the coprojections into the coproduct are monomorphisms,
 which follows from the fact we have zero morphisms and decidable equality for the grading.
 -/
-instance : Faithful (total β C) where
+instance : (total β C).Faithful where
   map_injective {X Y} f g w := by
     ext i
     replace w := Sigma.ι (fun i : β => X i) i ≫= w
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -435,8 +435,7 @@ def cofanMapObjComp : X.CofanMapObjFun r k :=
 In other words, if we have, for all `j : J` such that `hj : q j = k`,
 a colimit cofan `c j hj` which computes the coproduct of the `X i` such that `p i = j`,
 and also a colimit cofan which computes the coproduct of the points of these `c j hj`, then
-the point of this latter cofan computes the coproduct of the `X i` such that `r i = k`.
-.-/
+the point of this latter cofan computes the coproduct of the `X i` such that `r i = k`. -/
 @[simp]
 def isColimitCofanMapObjComp :
     IsColimit (cofanMapObjComp X p q r hpqr k c c') :=
chore: Split Data.{Nat,Int}{.Order}.Basic in group vs ring instances (#11924)

Scatter the content of Data.Nat.Basic across:

  • Data.Nat.Defs for the lemmas having no dependencies
  • Algebra.Group.Nat for the monoid instances and the few miscellaneous lemmas needing them.
  • Algebra.Ring.Nat for the semiring instance and the few miscellaneous lemmas following it.

Similarly, scatter

  • Data.Int.Basic across Data.Int.Defs, Algebra.Group.Int, Algebra.Ring.Int
  • Data.Nat.Order.Basic across Data.Nat.Defs, Algebra.Order.Group.Nat, Algebra.Order.Ring.Nat
  • Data.Int.Order.Basic across Data.Int.Defs, Algebra.Order.Group.Int, Algebra.Order.Ring.Int

Also move a few lemmas from Data.Nat.Order.Lemmas to Data.Nat.Defs.

Before pre_11924

After post_11924

Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Joël Riou
 -/
+import Mathlib.Algebra.Group.Int
 import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.CategoryTheory.ConcreteCategory.Basic
 import Mathlib.CategoryTheory.Shift.Basic
-import Mathlib.Data.Int.Basic
 import Mathlib.Data.Set.Basic
 
 #align_import category_theory.graded_object from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803"
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
@@ -227,9 +227,7 @@ namespace GradedObject
 -- Since we're typically interested in grading by ℤ or a finite group, this should be okay.
 -- If you're grading by things in higher universes, have fun!
 variable (β : Type)
-
 variable (C : Type u) [Category.{v} C]
-
 variable [HasCoproducts.{0} C]
 
 section
@@ -265,7 +263,6 @@ namespace GradedObject
 noncomputable section
 
 variable (β : Type)
-
 variable (C : Type (u + 1)) [LargeCategory C] [ConcreteCategory C] [HasCoproducts.{0} C]
   [HasZeroMorphisms C]
 
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -121,12 +121,12 @@ section
 
 variable (C)
 
--- porting note: added to ease the port
+-- Porting note: added to ease the port
 /-- Pull back an `I`-graded object in `C` to a `J`-graded object along a function `J → I`. -/
 abbrev comap {I J : Type*} (h : J → I) : GradedObject I C ⥤ GradedObject J C :=
   Pi.comap (fun _ => C) h
 
--- porting note: added to ease the port, this is a special case of `Functor.eqToHom_proj`
+-- Porting note: added to ease the port, this is a special case of `Functor.eqToHom_proj`
 @[simp]
 theorem eqToHom_proj {x x' : GradedObject I C} (h : x = x') (i : I) :
     (eqToHom h : x ⟶ x') i = eqToHom (Function.funext_iff.mp h i) := by
feat(Algebra/Homology): the total complex functor (#10711)

In this PR, the construction of the total complex of a bicomplex is extended to a functor HomologicalComplex₂.totalFunctor : HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex C c₁₂.

Diff
@@ -481,6 +481,14 @@ lemma ιMapObjOrZero_eq (h : p i = j) : X.ιMapObjOrZero p i j = X.ιMapObj p i
 
 lemma ιMapObjOrZero_eq_zero (h : p i ≠ j) : X.ιMapObjOrZero p i j = 0 := dif_neg h
 
+variable {X Y} in
+@[reassoc (attr := simp)]
+lemma ιMapObjOrZero_mapMap :
+    X.ιMapObjOrZero p i j ≫ mapMap φ p j = φ i ≫ Y.ιMapObjOrZero p i j := by
+  by_cases h : p i = j
+  · simp only [ιMapObjOrZero_eq _ _ _ _ h, ι_mapMap]
+  · simp only [ιMapObjOrZero_eq_zero _ _ _ _ h, zero_comp, comp_zero]
+
 end GradedObject
 
 end CategoryTheory
chore: classify added to ease automation porting notes (#10689)
  • Classifies by adding issue number (#10688) to porting notes claiming anything semantically equivalent to added to ease automation.
  • Enforce singular convention converting "porting notes" to "porting note".
Diff
@@ -70,7 +70,7 @@ instance categoryOfGradedObjects (β : Type w) : Category.{max w v} (GradedObjec
   CategoryTheory.pi fun _ => C
 #align category_theory.graded_object.category_of_graded_objects CategoryTheory.GradedObject.categoryOfGradedObjects
 
--- porting note: added to ease automation
+-- Porting note (#10688): added to ease automation
 @[ext]
 lemma hom_ext {X Y : GradedObject β C} (f g : X ⟶ Y) (h : ∀ x, f x = g x) : f = g := by
   funext
feat(Algebra/Homology): the total complex of a bicomplex (#9331)
Diff
@@ -465,6 +465,22 @@ lemma hasMap_comp [X.HasMap p] [(X.mapObj p).HasMap q] : X.HasMap r :=
 
 end
 
+section HasZeroMorphisms
+
+end HasZeroMorphisms
+
+variable [HasZeroMorphisms C] [DecidableEq J] (i : I) (j : J)
+
+/-- The canonical inclusion `X i ⟶ X.mapObj p j` when `p i = j`, the zero morphism otherwise. -/
+noncomputable def ιMapObjOrZero : X i ⟶ X.mapObj p j :=
+  if h : p i = j
+    then X.ιMapObj p i j h
+    else 0
+
+lemma ιMapObjOrZero_eq (h : p i = j) : X.ιMapObjOrZero p i j = X.ιMapObj p i j h := dif_pos h
+
+lemma ιMapObjOrZero_eq_zero (h : p i ≠ j) : X.ιMapObjOrZero p i j = 0 := dif_neg h
+
 end GradedObject
 
 end CategoryTheory
chore(*): shake imports (#10199)
  • Remove Data.Set.Basic from scripts/noshake.json.
  • Remove an exception that was used by examples only, move these examples to a new test file.
  • Drop an exception for Order.Filter.Basic dependency on Control.Traversable.Instances, as the relevant parts were moved to Order.Filter.ListTraverse.
  • Run lake exe shake --fix.
Diff
@@ -7,6 +7,7 @@ import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.CategoryTheory.ConcreteCategory.Basic
 import Mathlib.CategoryTheory.Shift.Basic
 import Mathlib.Data.Int.Basic
+import Mathlib.Data.Set.Basic
 
 #align_import category_theory.graded_object from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803"
 
chore: Move zpow lemmas (#9720)

These lemmas can be proved much earlier with little to no change to their proofs.

Part of #9411

Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Joël Riou
 -/
-import Mathlib.Algebra.GroupPower.Lemmas
-import Mathlib.CategoryTheory.Pi.Basic
-import Mathlib.CategoryTheory.Shift.Basic
+import Mathlib.Algebra.GroupPower.Basic
 import Mathlib.CategoryTheory.ConcreteCategory.Basic
+import Mathlib.CategoryTheory.Shift.Basic
+import Mathlib.Data.Int.Basic
 
 #align_import category_theory.graded_object from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803"
 
chore(*): use α → β instead of ∀ _ : α, β (#9529)
Diff
@@ -150,7 +150,7 @@ theorem comapEq_trans {β γ : Type w} {f g h : β → γ} (k : f = g) (l : g =
 #align category_theory.graded_object.comap_eq_trans CategoryTheory.GradedObject.comapEq_trans
 
 @[simp]
-theorem eqToHom_apply {β : Type w} {X Y : ∀ _ : β, C} (h : X = Y) (b : β) :
+theorem eqToHom_apply {β : Type w} {X Y : β → C} (h : X = Y) (b : β) :
     (eqToHom h : X ⟶ Y) b = eqToHom (by rw [h]) := by
   subst h
   rfl
feat(CategoryTheory/GradedObject): action of a composition of bifunctors (#8242)

The action on graded objects of a trifunctor obtained by composition of two bifunctors can be computed as a composition of the actions of these two bifunctors. In this PR, we consider the case when we apply a bifunctor to the first two variables and then a bifunctor to this result and the remaining third variable.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

Diff
@@ -34,11 +34,10 @@ have a functor `map : GradedObject I C ⥤ GradedObject J C`.
 
 set_option autoImplicit true
 
-
-open CategoryTheory.Limits
-
 namespace CategoryTheory
 
+open Category Limits
+
 universe w v u
 
 /-- A type synonym for `β → C`, used for `β`-graded objects in a category `C`. -/
@@ -279,7 +278,7 @@ end GradedObject
 
 namespace GradedObject
 
-variable {I J : Type*} {C : Type*} [Category C]
+variable {I J K : Type*} {C : Type*} [Category C]
   (X Y Z : GradedObject I C) (φ : X ⟶ Y) (e : X ≅ Y) (ψ : Y ⟶ Z) (p : I → J)
 
 /-- If `X : GradedObject I C` and `p : I → J`, `X.mapObjFun p j` is the family of objects `X i`
@@ -413,6 +412,58 @@ noncomputable def map [∀ (j : J), HasColimitsOfShape (Discrete (p ⁻¹' {j}))
   obj X := X.mapObj p
   map φ := mapMap φ p
 
+variable {C} (X Y)
+variable (q : J → K) (r : I → K) (hpqr : ∀ i, q (p i) = r i)
+
+section
+
+variable (k : K) (c : ∀ (j : J), q j = k → X.CofanMapObjFun p j)
+  (hc : ∀ j hj, IsColimit (c j hj))
+  (c' : Cofan (fun (j : q ⁻¹' {k}) => (c j.1 j.2).pt)) (hc' : IsColimit c')
+
+/-- Given maps `p : I → J`, `q : J → K` and `r : I → K` such that `q.comp p = r`,
+`X : GradedObject I C`, `k : K`, the datum of cofans `X.CofanMapObjFun p j` for all
+`j : J` and of a cofan for all the points of these cofans, this is a cofan of
+type `X.CofanMapObjFun r k`, which is a colimit (see `isColimitCofanMapObjComp`) if the
+given cofans are. -/
+@[simp]
+def cofanMapObjComp : X.CofanMapObjFun r k :=
+  CofanMapObjFun.mk _ _ _ c'.pt (fun i hi =>
+    (c (p i) (by rw [hpqr, hi])).inj ⟨i, rfl⟩ ≫ c'.inj (⟨p i, by
+      rw [Set.mem_preimage, Set.mem_singleton_iff, hpqr, hi]⟩))
+
+/-- Given maps `p : I → J`, `q : J → K` and `r : I → K` such that `q.comp p = r`,
+`X : GradedObject I C`, `k : K`, the cofan constructed by `cofanMapObjComp` is a colimit.
+In other words, if we have, for all `j : J` such that `hj : q j = k`,
+a colimit cofan `c j hj` which computes the coproduct of the `X i` such that `p i = j`,
+and also a colimit cofan which computes the coproduct of the points of these `c j hj`, then
+the point of this latter cofan computes the coproduct of the `X i` such that `r i = k`.
+.-/
+@[simp]
+def isColimitCofanMapObjComp :
+    IsColimit (cofanMapObjComp X p q r hpqr k c c') :=
+  mkCofanColimit _
+    (fun s => Cofan.IsColimit.desc hc'
+      (fun ⟨j, (hj : q j = k)⟩ => Cofan.IsColimit.desc (hc j hj)
+        (fun ⟨i, (hi : p i = j)⟩ => s.inj ⟨i, by
+          simp only [Set.mem_preimage, Set.mem_singleton_iff, ← hpqr, hi, hj]⟩)))
+    (fun s ⟨i, (hi : r i = k)⟩ => by simp)
+    (fun s m hm => by
+      apply Cofan.IsColimit.hom_ext hc'
+      rintro ⟨j, rfl : q j = k⟩
+      apply Cofan.IsColimit.hom_ext (hc j rfl)
+      rintro ⟨i, rfl : p i = j⟩
+      dsimp
+      rw [Cofan.IsColimit.fac, Cofan.IsColimit.fac, ← hm]
+      dsimp
+      rw [assoc])
+
+lemma hasMap_comp [X.HasMap p] [(X.mapObj p).HasMap q] : X.HasMap r :=
+  fun k => ⟨_, isColimitCofanMapObjComp X p q r hpqr k _
+    (fun j _ => X.isColimitCofanMapObj p j) _ ((X.mapObj p).isColimitCofanMapObj q k)⟩
+
+end
+
 end GradedObject
 
 end CategoryTheory
chore: Remove nonterminal simp at (#7795)

Removes nonterminal uses of simp at. Replaces most of these with instances of simp? ... says.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -255,7 +255,7 @@ instance : Faithful (total β C) where
     ext i
     replace w := Sigma.ι (fun i : β => X i) i ≫= w
     erw [colimit.ι_map, colimit.ι_map] at w
-    simp at *
+    simp? at * says simp only [Discrete.functor_obj, Discrete.natTrans_app] at *
     exact Mono.right_cancellation _ _ w
 
 end GradedObject
feat(CategoryTheory): covariant functoriality of graded objects on the index set (#7425)
Diff
@@ -1,7 +1,7 @@
 /-
 Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
-Authors: Scott Morrison
+Authors: Scott Morrison, Joël Riou
 -/
 import Mathlib.Algebra.GroupPower.Lemmas
 import Mathlib.CategoryTheory.Pi.Basic
@@ -25,6 +25,11 @@ functor on `β`-graded objects
 
 When `C` has coproducts we construct the `total` functor `GradedObject β C ⥤ C`,
 show that it is faithful, and deduce that when `C` is concrete so is `GradedObject β C`.
+
+A covariant functoriality of `GradedObject β C` with respect to the index set `β` is also
+introduced: if `p : I → J` is a map such that `C` has coproducts indexed by `p ⁻¹' {j}`, we
+have a functor `map : GradedObject I C ⥤ GradedObject J C`.
+
 -/
 
 set_option autoImplicit true
@@ -80,6 +85,40 @@ def eval {β : Type w} (b : β) : GradedObject β C ⥤ C where
 
 section
 
+variable {β : Type*} (X Y : GradedObject β C)
+
+/-- Constructor for isomorphisms in `GradedObject` -/
+@[simps]
+def isoMk (e : ∀ i, X i ≅ Y i) : X ≅ Y where
+  hom i := (e i).hom
+  inv i := (e i).inv
+
+variable {X Y}
+
+-- this lemma is not an instance as it may create a loop with `isIso_apply_of_isIso`
+lemma isIso_of_isIso_apply (f : X ⟶ Y) [hf : ∀ i, IsIso (f i)] :
+    IsIso f := by
+  change IsIso (isoMk X Y (fun i => asIso (f i))).hom
+  infer_instance
+
+@[reassoc (attr := simp)]
+lemma iso_hom_inv_id_apply (e : X ≅ Y) (i : β) :
+    e.hom i ≫ e.inv i = 𝟙 _ :=
+  congr_fun e.hom_inv_id i
+
+@[reassoc (attr := simp)]
+lemma iso_inv_hom_id_apply (e : X ≅ Y) (i : β) :
+    e.inv i ≫ e.hom i = 𝟙 _ :=
+  congr_fun e.inv_hom_id i
+
+instance isIso_apply_of_isIso (f : X ⟶ Y) [IsIso f] (i : β) : IsIso (f i) := by
+  change IsIso ((eval i).map f)
+  infer_instance
+
+end
+
+section
+
 variable (C)
 
 -- porting note: added to ease the port
@@ -238,4 +277,142 @@ end
 
 end GradedObject
 
+namespace GradedObject
+
+variable {I J : Type*} {C : Type*} [Category C]
+  (X Y Z : GradedObject I C) (φ : X ⟶ Y) (e : X ≅ Y) (ψ : Y ⟶ Z) (p : I → J)
+
+/-- If `X : GradedObject I C` and `p : I → J`, `X.mapObjFun p j` is the family of objects `X i`
+for `i : I` such that `p i = j`. -/
+abbrev mapObjFun (j : J) (i : p ⁻¹' {j}) : C := X i
+
+variable (j : J)
+
+/-- Given `X : GradedObject I C` and `p : I → J`, `X.HasMap p` is the condition that
+for all `j : J`, the coproduct of all `X i` such `p i = j` exists. -/
+abbrev HasMap : Prop := ∀ (j : J), HasCoproduct (X.mapObjFun p j)
+
+variable [X.HasMap p] [Y.HasMap p] [Z.HasMap p]
+
+/-- Given `X : GradedObject I C` and `p : I → J`, `X.mapObj p` is the graded object by `J`
+which in degree `j` consists of the coproduct of the `X i` such that `p i = j`. -/
+noncomputable def mapObj : GradedObject J C := fun j => ∐ (X.mapObjFun p j)
+
+/-- The canonical inclusion `X i ⟶ X.mapObj p j` when `i : I` and `j : J` are such
+that `p i = j`. -/
+noncomputable def ιMapObj (i : I) (j : J) (hij : p i = j) : X i ⟶ X.mapObj p j :=
+  Sigma.ι (X.mapObjFun p j) ⟨i, hij⟩
+
+/-- Given `X : GradedObject I C`, `p : I → J` and `j : J`,
+`CofanMapObjFun X p j` is the type `Cofan (X.mapObjFun p j)`. The point object of
+such colimits cofans are isomorphic to `X.mapObj p j`, see `CofanMapObjFun.iso`. -/
+abbrev CofanMapObjFun (j : J) : Type _ := Cofan (X.mapObjFun p j)
+
+-- in order to use the cofan API, some definitions below
+-- have a `simp` attribute rather than `simps`
+/-- Constructor for `CofanMapObjFun X p j`. -/
+@[simp]
+def CofanMapObjFun.mk (j : J) (pt : C) (ι' : ∀ (i : I) (_ : p i = j), X i ⟶ pt) :
+    CofanMapObjFun X p j :=
+  Cofan.mk pt (fun ⟨i, hi⟩ => ι' i hi)
+
+/-- The tautological cofan corresponding to the coproduct decomposition of `X.mapObj p j`. -/
+@[simp]
+noncomputable def cofanMapObj (j : J) : CofanMapObjFun X p j :=
+  CofanMapObjFun.mk X p j (X.mapObj p j) (fun i hi => X.ιMapObj p i j hi)
+
+/-- Given `X : GradedObject I C`, `p : I → J` and `j : J`, `X.mapObj p j` satisfies
+the universal property of the coproduct of those `X i` such that `p i = j`. -/
+noncomputable def isColimitCofanMapObj (j : J) : IsColimit (X.cofanMapObj p j) :=
+  colimit.isColimit _
+
+@[ext]
+lemma mapObj_ext {A : C} {j : J} (f g : X.mapObj p j ⟶ A)
+    (hfg : ∀ (i : I) (hij : p i = j), X.ιMapObj p i j hij ≫ f = X.ιMapObj p i j hij ≫ g) :
+    f = g :=
+  Cofan.IsColimit.hom_ext (X.isColimitCofanMapObj p j) _ _ (fun ⟨i, hij⟩ => hfg i hij)
+
+/-- This is the morphism `X.mapObj p j ⟶ A` constructed from a family of
+morphisms `X i ⟶ A` for all `i : I` such that `p i = j`. -/
+noncomputable def descMapObj {A : C} {j : J} (φ : ∀ (i : I) (_ : p i = j), X i ⟶ A) :
+    X.mapObj p j ⟶ A :=
+  Cofan.IsColimit.desc (X.isColimitCofanMapObj p j) (fun ⟨i, hi⟩ => φ i hi)
+
+@[reassoc (attr := simp)]
+lemma ι_descMapObj {A : C} {j : J}
+    (φ : ∀ (i : I) (_ : p i = j), X i ⟶ A) (i : I) (hi : p i = j) :
+    X.ιMapObj p i j hi ≫ X.descMapObj p φ = φ i hi := by
+  apply Cofan.IsColimit.fac
+
+namespace CofanMapObjFun
+
+lemma hasMap (c : ∀ j, CofanMapObjFun X p j) (hc : ∀ j, IsColimit (c j)) :
+    X.HasMap p := fun j => ⟨_, hc j⟩
+
+variable {j X p}
+  {c : CofanMapObjFun X p j} (hc : IsColimit c) [X.HasMap p]
+
+/-- If `c : CofanMapObjFun X p j` is a colimit cofan, this is the induced
+isomorphism `c.pt ≅ X.mapObj p j`. -/
+noncomputable def iso : c.pt ≅ X.mapObj p j :=
+  IsColimit.coconePointUniqueUpToIso hc (X.isColimitCofanMapObj p j)
+
+@[reassoc (attr := simp)]
+lemma inj_iso_hom (i : I) (hi : p i = j) :
+    c.inj ⟨i, hi⟩ ≫ (c.iso hc).hom = X.ιMapObj p i j hi := by
+  apply IsColimit.comp_coconePointUniqueUpToIso_hom
+
+@[reassoc (attr := simp)]
+lemma ιMapObj_iso_inv (i : I) (hi : p i = j) :
+    X.ιMapObj p i j hi ≫ (c.iso hc).inv = c.inj ⟨i, hi⟩ := by
+  apply IsColimit.comp_coconePointUniqueUpToIso_inv
+
+end CofanMapObjFun
+
+variable {X Y}
+
+/-- The canonical morphism of `J`-graded objects `X.mapObj p ⟶ Y.mapObj p` induced by
+a morphism `X ⟶ Y` of `I`-graded objects and a map `p : I → J`. -/
+noncomputable def mapMap : X.mapObj p ⟶ Y.mapObj p := fun j =>
+  X.descMapObj p (fun i hi => φ i ≫ Y.ιMapObj p i j hi)
+
+@[reassoc (attr := simp)]
+lemma ι_mapMap (i : I) (j : J) (hij : p i = j) :
+    X.ιMapObj p i j hij ≫ mapMap φ p j = φ i ≫ Y.ιMapObj p i j hij := by
+  simp only [mapMap, ι_descMapObj]
+
+lemma congr_mapMap (φ₁ φ₂ : X ⟶ Y) (h : φ₁ = φ₂) : mapMap φ₁ p = mapMap φ₂ p := by
+  subst h
+  rfl
+
+variable (X)
+
+@[simp]
+lemma mapMap_id : mapMap (𝟙 X) p = 𝟙 _ := by aesop_cat
+
+variable {X Z}
+
+@[simp, reassoc]
+lemma mapMap_comp : mapMap (φ ≫ ψ) p = mapMap φ p ≫ mapMap ψ p := by aesop_cat
+
+/-- The isomorphism of `J`-graded objects `X.mapObj p ≅ Y.mapObj p` induced by an
+isomorphism `X ≅ Y` of graded objects and a map `p : I → J`. -/
+@[simps]
+noncomputable def mapIso : X.mapObj p ≅ Y.mapObj p where
+  hom := mapMap e.hom p
+  inv := mapMap e.inv p
+
+variable (C)
+
+/-- Given a map `p : I → J`, this is the functor `GradedObject I C ⥤ GradedObject J C` which
+sends an `I`-object `X` to the graded object `X.mapObj p` which in degree `j : J` is given
+by the coproduct of those `X i` such that `p i = j`. -/
+@[simps]
+noncomputable def map [∀ (j : J), HasColimitsOfShape (Discrete (p ⁻¹' {j})) C] :
+    GradedObject I C ⥤ GradedObject J C where
+  obj X := X.mapObj p
+  map φ := mapMap φ p
+
+end GradedObject
+
 end CategoryTheory
fix: disable autoImplicit globally (#6528)

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

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

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

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

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

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

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

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

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

Diff
@@ -27,6 +27,8 @@ When `C` has coproducts we construct the `total` functor `GradedObject β C ⥤
 show that it is faithful, and deduce that when `C` is concrete so is `GradedObject β C`.
 -/
 
+set_option autoImplicit true
+
 
 open CategoryTheory.Limits
 
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
@@ -82,7 +82,7 @@ variable (C)
 
 -- porting note: added to ease the port
 /-- Pull back an `I`-graded object in `C` to a `J`-graded object along a function `J → I`. -/
-abbrev comap {I J : Type _} (h : J → I) : GradedObject I C ⥤ GradedObject J C :=
+abbrev comap {I J : Type*} (h : J → I) : GradedObject I C ⥤ GradedObject J C :=
   Pi.comap (fun _ => C) h
 
 -- porting note: added to ease the port, this is a special case of `Functor.eqToHom_proj`
@@ -132,7 +132,7 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
 -- See note [dsimp, simp].
 end
 
-instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
+instance hasShift {β : Type*} [AddCommGroup β] (s : β) : HasShift (GradedObjectWithShift s C) ℤ :=
   hasShiftMk _ _
     { F := fun n => comap C fun b : β => b + n • s
       zero := comapEq C (by aesop_cat) ≪≫ Pi.comapId β fun _ => C
@@ -141,13 +141,13 @@ instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObj
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
 @[simp]
-theorem shiftFunctor_obj_apply {β : Type _} [AddCommGroup β] (s : β) (X : β → C) (t : β) (n : ℤ) :
+theorem shiftFunctor_obj_apply {β : Type*} [AddCommGroup β] (s : β) (X : β → C) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).obj X t = X (t + n • s) :=
   rfl
 #align category_theory.graded_object.shift_functor_obj_apply CategoryTheory.GradedObject.shiftFunctor_obj_apply
 
 @[simp]
-theorem shiftFunctor_map_apply {β : Type _} [AddCommGroup β] (s : β)
+theorem shiftFunctor_map_apply {β : Type*} [AddCommGroup β] (s : β)
     {X Y : GradedObjectWithShift s C} (f : X ⟶ Y) (t : β) (n : ℤ) :
     (shiftFunctor (GradedObjectWithShift s C) n).map f t = f (t + n • s) :=
   rfl
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,17 +2,14 @@
 Copyright (c) 2020 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.graded_object
-! leanprover-community/mathlib commit 6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.GroupPower.Lemmas
 import Mathlib.CategoryTheory.Pi.Basic
 import Mathlib.CategoryTheory.Shift.Basic
 import Mathlib.CategoryTheory.ConcreteCategory.Basic
 
+#align_import category_theory.graded_object from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e1945c6e8803"
+
 /-!
 # The category of graded objects
 
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -100,8 +100,8 @@ pulling back along two propositionally equal functions.
 -/
 @[simps]
 def comapEq {β γ : Type w} {f g : β → γ} (h : f = g) : comap C f ≅ comap C g where
-  hom := { app := fun X b => eqToHom (by dsimp ; simp only [h]) }
-  inv := { app := fun X b => eqToHom (by dsimp ; simp only [h]) }
+  hom := { app := fun X b => eqToHom (by dsimp; simp only [h]) }
+  inv := { app := fun X b => eqToHom (by dsimp; simp only [h]) }
 #align category_theory.graded_object.comap_eq CategoryTheory.GradedObject.comapEq
 
 theorem comapEq_symm {β γ : Type w} {f g : β → γ} (h : f = g) :
@@ -127,9 +127,9 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
   functor := comap C (e.symm : γ → β)
   inverse := comap C (e : β → γ)
   counitIso :=
-    (Pi.comapComp (fun _ => C) _ _).trans (comapEq C (by ext ; simp))
+    (Pi.comapComp (fun _ => C) _ _).trans (comapEq C (by ext; simp))
   unitIso :=
-    (comapEq C (by ext ; simp)).trans (Pi.comapComp _ _ _).symm
+    (comapEq C (by ext; simp)).trans (Pi.comapComp _ _ _).symm
 #align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquiv
 
 -- See note [dsimp, simp].
@@ -139,7 +139,7 @@ instance hasShift {β : Type _} [AddCommGroup β] (s : β) : HasShift (GradedObj
   hasShiftMk _ _
     { F := fun n => comap C fun b : β => b + n • s
       zero := comapEq C (by aesop_cat) ≪≫ Pi.comapId β fun _ => C
-      add := fun m n => comapEq C (by ext ; dsimp ; rw [add_comm m n, add_zsmul, add_assoc]) ≪≫
+      add := fun m n => comapEq C (by ext; dsimp; rw [add_comm m n, add_zsmul, add_assoc]) ≪≫
           (Pi.comapComp _ _ _).symm }
 #align category_theory.graded_object.has_shift CategoryTheory.GradedObject.hasShift
 
feat: add Aesop rules for Discrete category (#2519)

Adds a global Aesop cases rule for the Discrete category. This rule was previously added locally in several places.

Diff
@@ -196,8 +196,6 @@ variable [HasCoproducts.{0} C]
 
 section
 
-attribute [local aesop safe cases (rule_sets [CategoryTheory])] Discrete
-
 /-- The total object of a graded object is the coproduct of the graded components.
 -/
 noncomputable def total : GradedObject β C ⥤ C where
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,7 +130,6 @@ def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedOb
     (Pi.comapComp (fun _ => C) _ _).trans (comapEq C (by ext ; simp))
   unitIso :=
     (comapEq C (by ext ; simp)).trans (Pi.comapComp _ _ _).symm
-  functor_unitIso_comp X := by aesop_cat
 #align category_theory.graded_object.comap_equiv CategoryTheory.GradedObject.comapEquiv
 
 -- See note [dsimp, simp].
chore: cleanup Discrete porting notes (#4780)

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

Diff
@@ -197,18 +197,13 @@ variable [HasCoproducts.{0} C]
 
 section
 
---attribute [local tidy] tactic.discrete_cases
+attribute [local aesop safe cases (rule_sets [CategoryTheory])] Discrete
 
 /-- The total object of a graded object is the coproduct of the graded components.
 -/
 noncomputable def total : GradedObject β C ⥤ C where
   obj X := ∐ fun i : β => X i
   map f := Limits.Sigma.map fun i => f i
-  map_id := fun X => by
-    dsimp
-    ext
-    simp only [ι_colimMap, Discrete.natTrans_app, Category.comp_id]
-    apply Category.id_comp
 #align category_theory.graded_object.total CategoryTheory.GradedObject.total
 
 end
chore: refactor of concrete categories (#3900)

I think the ports

didn't quite get things right, and also have some variation between them. This PR tries to straighten things out.

Major changes:

  • Have the coercion to type be via X.\a, and put attribute @[coe] on this.
  • Make sure the coercion from morphisms to functions means that simp lemmas about the underlying bundled morphisms apply directly.
    • This means we drop lemmas like
    lemma Hom.map_mul {X Y : MonCat} (f : X ⟶ Y) (x y : X) : ((forget MonCat).map f) (x * y) = f x * f y
    
    • But at the expense of adding lemmas like
    lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
    

Overall I'm pretty happy, and it allows me to unstick the long stuck https://github.com/leanprover-community/mathlib4/pull/3105.

This is not everything I want to do to refactor these files, but once I was satisfied that I can move forward with RingCat, I want to get this merged so we can unblock porting progress. I'll promise to come back to this soon! :-)

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

Diff
@@ -239,7 +239,7 @@ variable (β : Type)
 variable (C : Type (u + 1)) [LargeCategory C] [ConcreteCategory C] [HasCoproducts.{0} C]
   [HasZeroMorphisms C]
 
-instance : ConcreteCategory (GradedObject β C) where Forget := total β C ⋙ forget C
+instance : ConcreteCategory (GradedObject β C) where forget := total β C ⋙ forget C
 
 instance : HasForget₂ (GradedObject β C) C where forget₂ := total β C
 
feat: port CategoryTheory.GradedObject (#3342)

Dependencies 3 + 209

210 files ported (98.6%)
78902 lines ported (98.7%)
Show graph

The unported dependencies are