category_theory.oppositesMathlib.CategoryTheory.Opposites

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -312,22 +312,25 @@ protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ
 #align category_theory.functor.right_op CategoryTheory.Functor.rightOp
 -/
 
-instance {F : C ⥤ D} [Full F] : Full F.op where preimage X Y f := (F.preimage f.unop).op
+instance {F : C ⥤ D} [CategoryTheory.Functor.Full F] : CategoryTheory.Functor.Full F.op
+    where preimage X Y f := (F.preimage f.unop).op
 
-instance {F : C ⥤ D} [Faithful F] : Faithful F.op
+instance {F : C ⥤ D} [CategoryTheory.Functor.Faithful F] : CategoryTheory.Functor.Faithful F.op
     where map_injective' X Y f g h :=
     Quiver.Hom.unop_inj <| by simpa using map_injective F (Quiver.Hom.op_inj h)
 
 #print CategoryTheory.Functor.rightOp_faithful /-
 /-- If F is faithful then the right_op of F is also faithful. -/
-instance rightOp_faithful {F : Cᵒᵖ ⥤ D} [Faithful F] : Faithful F.rightOp
+instance rightOp_faithful {F : Cᵒᵖ ⥤ D} [CategoryTheory.Functor.Faithful F] :
+    CategoryTheory.Functor.Faithful F.rightOp
     where map_injective' X Y f g h := Quiver.Hom.op_inj (map_injective F (Quiver.Hom.op_inj h))
 #align category_theory.functor.right_op_faithful CategoryTheory.Functor.rightOp_faithful
 -/
 
 #print CategoryTheory.Functor.leftOp_faithful /-
 /-- If F is faithful then the left_op of F is also faithful. -/
-instance leftOp_faithful {F : C ⥤ Dᵒᵖ} [Faithful F] : Faithful F.leftOp
+instance leftOp_faithful {F : C ⥤ Dᵒᵖ} [CategoryTheory.Functor.Faithful F] :
+    CategoryTheory.Functor.Faithful F.leftOp
     where map_injective' X Y f g h := Quiver.Hom.unop_inj (map_injective F (Quiver.Hom.unop_inj h))
 #align category_theory.functor.left_op_faithful CategoryTheory.Functor.leftOp_faithful
 -/
Diff
@@ -130,32 +130,32 @@ section
 
 variable (C)
 
-#print CategoryTheory.opOp /-
+#print CategoryTheory.unopUnop /-
 /-- The functor from the double-opposite of a category to the underlying category. -/
 @[simps]
-def opOp : Cᵒᵖᵒᵖ ⥤ C where
+def unopUnop : Cᵒᵖᵒᵖ ⥤ C where
   obj X := unop (unop X)
   map X Y f := f.unop.unop
-#align category_theory.op_op CategoryTheory.opOp
+#align category_theory.op_op CategoryTheory.unopUnop
 -/
 
-#print CategoryTheory.unopUnop /-
+#print CategoryTheory.opOp /-
 /-- The functor from a category to its double-opposite.  -/
 @[simps]
-def unopUnop : C ⥤ Cᵒᵖᵒᵖ where
+def opOp : C ⥤ Cᵒᵖᵒᵖ where
   obj X := op (op X)
   map X Y f := f.op.op
-#align category_theory.unop_unop CategoryTheory.unopUnop
+#align category_theory.unop_unop CategoryTheory.opOp
 -/
 
 #print CategoryTheory.opOpEquivalence /-
 /-- The double opposite category is equivalent to the original. -/
 @[simps]
 def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C where
-  Functor := opOp C
-  inverse := unopUnop C
+  Functor := unopUnop C
+  inverse := opOp C
   unitIso := Iso.refl (𝟭 Cᵒᵖᵒᵖ)
-  counitIso := Iso.refl (unopUnop C ⋙ opOp C)
+  counitIso := Iso.refl (opOp C ⋙ unopUnop C)
 #align category_theory.op_op_equivalence CategoryTheory.opOpEquivalence
 -/
 
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison
 -/
-import Mathbin.CategoryTheory.Equivalence
+import CategoryTheory.Equivalence
 
 #align_import category_theory.opposites from "leanprover-community/mathlib"@"34ee86e6a59d911a8e4f89b68793ee7577ae79c7"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.opposites
-! leanprover-community/mathlib commit 34ee86e6a59d911a8e4f89b68793ee7577ae79c7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Equivalence
 
+#align_import category_theory.opposites from "leanprover-community/mathlib"@"34ee86e6a59d911a8e4f89b68793ee7577ae79c7"
+
 /-!
 # Opposite categories
 
Diff
@@ -41,15 +41,19 @@ section Quiver
 
 variable [Quiver.{v₁} C]
 
+#print Quiver.Hom.op_inj /-
 theorem Quiver.Hom.op_inj {X Y : C} :
     Function.Injective (Quiver.Hom.op : (X ⟶ Y) → (op Y ⟶ op X)) := fun _ _ H =>
   congr_arg Quiver.Hom.unop H
 #align quiver.hom.op_inj Quiver.Hom.op_inj
+-/
 
+#print Quiver.Hom.unop_inj /-
 theorem Quiver.Hom.unop_inj {X Y : Cᵒᵖ} :
     Function.Injective (Quiver.Hom.unop : (X ⟶ Y) → (unop Y ⟶ unop X)) := fun _ _ H =>
   congr_arg Quiver.Hom.op H
 #align quiver.hom.unop_inj Quiver.Hom.unop_inj
+-/
 
 #print Quiver.Hom.unop_op /-
 @[simp]
@@ -58,10 +62,12 @@ theorem Quiver.Hom.unop_op {X Y : C} (f : X ⟶ Y) : f.op.unop = f :=
 #align quiver.hom.unop_op Quiver.Hom.unop_op
 -/
 
+#print Quiver.Hom.op_unop /-
 @[simp]
 theorem Quiver.Hom.op_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) : f.unop.op = f :=
   rfl
 #align quiver.hom.op_unop Quiver.Hom.op_unop
+-/
 
 end Quiver
 
@@ -145,6 +151,7 @@ def unopUnop : C ⥤ Cᵒᵖᵒᵖ where
 #align category_theory.unop_unop CategoryTheory.unopUnop
 -/
 
+#print CategoryTheory.opOpEquivalence /-
 /-- The double opposite category is equivalent to the original. -/
 @[simps]
 def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C where
@@ -153,6 +160,7 @@ def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C where
   unitIso := Iso.refl (𝟭 Cᵒᵖᵒᵖ)
   counitIso := Iso.refl (unopUnop C ⋙ opOp C)
 #align category_theory.op_op_equivalence CategoryTheory.opOpEquivalence
+-/
 
 end
 
@@ -637,6 +645,7 @@ namespace Equivalence
 
 variable {D : Type u₂} [Category.{v₂} D]
 
+#print CategoryTheory.Equivalence.op /-
 /-- An equivalence between categories gives an equivalence between the opposite categories.
 -/
 @[simps]
@@ -647,7 +656,9 @@ def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ where
   counitIso := (NatIso.op e.counitIso).symm
   functor_unitIso_comp' X := by apply Quiver.Hom.unop_inj; dsimp; simp
 #align category_theory.equivalence.op CategoryTheory.Equivalence.op
+-/
 
+#print CategoryTheory.Equivalence.unop /-
 /-- An equivalence between opposite categories gives an equivalence between the original categories.
 -/
 @[simps]
@@ -658,6 +669,7 @@ def unop (e : Cᵒᵖ ≌ Dᵒᵖ) : C ≌ D where
   counitIso := (NatIso.unop e.counitIso).symm
   functor_unitIso_comp' X := by apply Quiver.Hom.op_inj; dsimp; simp
 #align category_theory.equivalence.unop CategoryTheory.Equivalence.unop
+-/
 
 end Equivalence
 
@@ -722,6 +734,7 @@ variable (C)
 
 variable (D : Type u₂) [Category.{v₂} D]
 
+#print CategoryTheory.Functor.opUnopEquiv /-
 /-- The equivalence of functor categories induced by `op` and `unop`.
 -/
 @[simps]
@@ -739,7 +752,9 @@ def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
         tidy)
   counitIso := NatIso.ofComponents (fun F => F.unopOpIso) (by tidy)
 #align category_theory.functor.op_unop_equiv CategoryTheory.Functor.opUnopEquiv
+-/
 
+#print CategoryTheory.Functor.leftOpRightOpEquiv /-
 /-- The equivalence of functor categories induced by `left_op` and `right_op`.
 -/
 @[simps]
@@ -761,6 +776,7 @@ def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ
         tidy)
   counitIso := NatIso.ofComponents (fun F => F.leftOpRightOpIso) (by tidy)
 #align category_theory.functor.left_op_right_op_equiv CategoryTheory.Functor.leftOpRightOpEquiv
+-/
 
 end Functor
 
Diff
@@ -41,23 +41,11 @@ section Quiver
 
 variable [Quiver.{v₁} C]
 
-/- warning: quiver.hom.op_inj -> Quiver.Hom.op_inj is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : C} {Y : C}, Function.Injective.{u1, u1} (Quiver.Hom.{u1, u2} C _inst_1 X Y) (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C Y) (Opposite.op.{succ u2} C X)) (Quiver.Hom.op.{u2, u1} C _inst_1 X Y)
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : C} {Y : C}, Function.Injective.{u1, max 1 u1} (Quiver.Hom.{u1, u2} C _inst_1 X Y) (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C Y) (Opposite.op.{succ u2} C X)) (Quiver.Hom.op.{u2, u1} C _inst_1 X Y)
-Case conversion may be inaccurate. Consider using '#align quiver.hom.op_inj Quiver.Hom.op_injₓ'. -/
 theorem Quiver.Hom.op_inj {X Y : C} :
     Function.Injective (Quiver.Hom.op : (X ⟶ Y) → (op Y ⟶ op X)) := fun _ _ H =>
   congr_arg Quiver.Hom.unop H
 #align quiver.hom.op_inj Quiver.Hom.op_inj
 
-/- warning: quiver.hom.unop_inj -> Quiver.Hom.unop_inj is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C}, Function.Injective.{u1, u1} (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y) (Quiver.Hom.{u1, u2} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X)) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y)
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C}, Function.Injective.{max 1 u1, u1} (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y) (Quiver.Hom.{u1, u2} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X)) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y)
-Case conversion may be inaccurate. Consider using '#align quiver.hom.unop_inj Quiver.Hom.unop_injₓ'. -/
 theorem Quiver.Hom.unop_inj {X Y : Cᵒᵖ} :
     Function.Injective (Quiver.Hom.unop : (X ⟶ Y) → (unop Y ⟶ unop X)) := fun _ _ H =>
   congr_arg Quiver.Hom.op H
@@ -70,12 +58,6 @@ theorem Quiver.Hom.unop_op {X Y : C} (f : X ⟶ Y) : f.op.unop = f :=
 #align quiver.hom.unop_op Quiver.Hom.unop_op
 -/
 
-/- warning: quiver.hom.op_unop -> Quiver.Hom.op_unop is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C} (f : Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y), Eq.{u1} (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C X)) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C Y))) (Quiver.Hom.op.{u2, u1} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y f)) f
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C} (f : Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y), Eq.{max 1 u1} (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C X)) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C Y))) (Quiver.Hom.op.{u2, u1} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y f)) f
-Case conversion may be inaccurate. Consider using '#align quiver.hom.op_unop Quiver.Hom.op_unopₓ'. -/
 @[simp]
 theorem Quiver.Hom.op_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) : f.unop.op = f :=
   rfl
@@ -163,12 +145,6 @@ def unopUnop : C ⥤ Cᵒᵖᵒᵖ where
 #align category_theory.unop_unop CategoryTheory.unopUnop
 -/
 
-/- warning: category_theory.op_op_equivalence -> CategoryTheory.opOpEquivalence is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (Opposite.{succ u2} (Opposite.{succ u2} C)) (CategoryTheory.Category.opposite.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1)) C _inst_1
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (Opposite.{succ u2} (Opposite.{succ u2} C)) C (CategoryTheory.Category.opposite.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1)) _inst_1
-Case conversion may be inaccurate. Consider using '#align category_theory.op_op_equivalence CategoryTheory.opOpEquivalenceₓ'. -/
 /-- The double opposite category is equivalent to the original. -/
 @[simps]
 def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C where
@@ -661,12 +637,6 @@ namespace Equivalence
 
 variable {D : Type u₂} [Category.{v₂} D]
 
-/- warning: category_theory.equivalence.op -> CategoryTheory.Equivalence.op is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_2) -> (CategoryTheory.Equivalence.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_2) -> (CategoryTheory.Equivalence.{u1, u2, u3, u4} (Opposite.{succ u3} C) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.op CategoryTheory.Equivalence.opₓ'. -/
 /-- An equivalence between categories gives an equivalence between the opposite categories.
 -/
 @[simps]
@@ -678,12 +648,6 @@ def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ where
   functor_unitIso_comp' X := by apply Quiver.Hom.unop_inj; dsimp; simp
 #align category_theory.equivalence.op CategoryTheory.Equivalence.op
 
-/- warning: category_theory.equivalence.unop -> CategoryTheory.Equivalence.unop is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) -> (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_2)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} (Opposite.{succ u3} C) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) -> (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_2)
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.unop CategoryTheory.Equivalence.unopₓ'. -/
 /-- An equivalence between opposite categories gives an equivalence between the original categories.
 -/
 @[simps]
@@ -758,12 +722,6 @@ variable (C)
 
 variable (D : Type u₂) [Category.{v₂} D]
 
-/- warning: category_theory.functor.op_unop_equiv -> CategoryTheory.Functor.opUnopEquiv is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max u1 u2 u3 u4, max u1 u2 u3 u4} (Opposite.{succ (max u1 u2 u3 u4)} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max u1 u2 u3 u4} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-but is expected to have type
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u3 u4) u1) u2, max (max (max u4 u3) u2) u1} (Opposite.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.functor.op_unop_equiv CategoryTheory.Functor.opUnopEquivₓ'. -/
 /-- The equivalence of functor categories induced by `op` and `unop`.
 -/
 @[simps]
@@ -782,12 +740,6 @@ def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
   counitIso := NatIso.ofComponents (fun F => F.unopOpIso) (by tidy)
 #align category_theory.functor.op_unop_equiv CategoryTheory.Functor.opUnopEquiv
 
-/- warning: category_theory.functor.left_op_right_op_equiv -> CategoryTheory.Functor.leftOpRightOpEquiv is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max u1 u2 u3 u4, max u1 u2 u3 u4} (Opposite.{succ (max u1 u2 u3 u4)} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max u1 u2 u3 u4} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-but is expected to have type
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u3 u4) u2) u1, max (max (max u4 u3) u2) u1} (Opposite.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.functor.left_op_right_op_equiv CategoryTheory.Functor.leftOpRightOpEquivₓ'. -/
 /-- The equivalence of functor categories induced by `left_op` and `right_op`.
 -/
 @[simps]
Diff
@@ -216,18 +216,14 @@ instance isIso_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : IsIso f.unop :=
 
 #print CategoryTheory.op_inv /-
 @[simp]
-theorem op_inv {X Y : C} (f : X ⟶ Y) [IsIso f] : (inv f).op = inv f.op :=
-  by
-  ext
+theorem op_inv {X Y : C} (f : X ⟶ Y) [IsIso f] : (inv f).op = inv f.op := by ext;
   rw [← op_comp, is_iso.inv_hom_id, op_id]
 #align category_theory.op_inv CategoryTheory.op_inv
 -/
 
 #print CategoryTheory.unop_inv /-
 @[simp]
-theorem unop_inv {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : (inv f).unop = inv f.unop :=
-  by
-  ext
+theorem unop_inv {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : (inv f).unop = inv f.unop := by ext;
   rw [← unop_comp, is_iso.inv_hom_id, unop_id]
 #align category_theory.unop_inv CategoryTheory.unop_inv
 -/
@@ -374,10 +370,7 @@ def rightOpLeftOpIso (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp ≅ F :=
 #print CategoryTheory.Functor.rightOp_leftOp_eq /-
 /-- Whenever possible, it is advisable to use the isomorphism `right_op_left_op_iso`
 instead of this equality of functors. -/
-theorem rightOp_leftOp_eq (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp = F :=
-  by
-  cases F
-  rfl
+theorem rightOp_leftOp_eq (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp = F := by cases F; rfl
 #align category_theory.functor.right_op_left_op_eq CategoryTheory.Functor.rightOp_leftOp_eq
 -/
 
@@ -682,10 +675,7 @@ def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ where
   inverse := e.inverse.op
   unitIso := (NatIso.op e.unitIso).symm
   counitIso := (NatIso.op e.counitIso).symm
-  functor_unitIso_comp' X := by
-    apply Quiver.Hom.unop_inj
-    dsimp
-    simp
+  functor_unitIso_comp' X := by apply Quiver.Hom.unop_inj; dsimp; simp
 #align category_theory.equivalence.op CategoryTheory.Equivalence.op
 
 /- warning: category_theory.equivalence.unop -> CategoryTheory.Equivalence.unop is a dubious translation:
@@ -702,10 +692,7 @@ def unop (e : Cᵒᵖ ≌ Dᵒᵖ) : C ≌ D where
   inverse := e.inverse.unop
   unitIso := (NatIso.unop e.unitIso).symm
   counitIso := (NatIso.unop e.counitIso).symm
-  functor_unitIso_comp' X := by
-    apply Quiver.Hom.op_inj
-    dsimp
-    simp
+  functor_unitIso_comp' X := by apply Quiver.Hom.op_inj; dsimp; simp
 #align category_theory.equivalence.unop CategoryTheory.Equivalence.unop
 
 end Equivalence
@@ -760,12 +747,8 @@ def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop)
     where
   toFun f := f.unop
   invFun g := g.op
-  left_inv _ := by
-    ext
-    rfl
-  right_inv _ := by
-    ext
-    rfl
+  left_inv _ := by ext; rfl
+  right_inv _ := by ext; rfl
 #align category_theory.iso_op_equiv CategoryTheory.isoOpEquiv
 -/
 
Diff
@@ -41,19 +41,27 @@ section Quiver
 
 variable [Quiver.{v₁} C]
 
-#print Quiver.Hom.op_inj /-
+/- warning: quiver.hom.op_inj -> Quiver.Hom.op_inj is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : C} {Y : C}, Function.Injective.{u1, u1} (Quiver.Hom.{u1, u2} C _inst_1 X Y) (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C Y) (Opposite.op.{succ u2} C X)) (Quiver.Hom.op.{u2, u1} C _inst_1 X Y)
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : C} {Y : C}, Function.Injective.{u1, max 1 u1} (Quiver.Hom.{u1, u2} C _inst_1 X Y) (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C Y) (Opposite.op.{succ u2} C X)) (Quiver.Hom.op.{u2, u1} C _inst_1 X Y)
+Case conversion may be inaccurate. Consider using '#align quiver.hom.op_inj Quiver.Hom.op_injₓ'. -/
 theorem Quiver.Hom.op_inj {X Y : C} :
     Function.Injective (Quiver.Hom.op : (X ⟶ Y) → (op Y ⟶ op X)) := fun _ _ H =>
   congr_arg Quiver.Hom.unop H
 #align quiver.hom.op_inj Quiver.Hom.op_inj
--/
 
-#print Quiver.Hom.unop_inj /-
+/- warning: quiver.hom.unop_inj -> Quiver.Hom.unop_inj is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C}, Function.Injective.{u1, u1} (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y) (Quiver.Hom.{u1, u2} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X)) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y)
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C}, Function.Injective.{max 1 u1, u1} (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y) (Quiver.Hom.{u1, u2} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X)) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y)
+Case conversion may be inaccurate. Consider using '#align quiver.hom.unop_inj Quiver.Hom.unop_injₓ'. -/
 theorem Quiver.Hom.unop_inj {X Y : Cᵒᵖ} :
     Function.Injective (Quiver.Hom.unop : (X ⟶ Y) → (unop Y ⟶ unop X)) := fun _ _ H =>
   congr_arg Quiver.Hom.op H
 #align quiver.hom.unop_inj Quiver.Hom.unop_inj
--/
 
 #print Quiver.Hom.unop_op /-
 @[simp]
@@ -62,12 +70,16 @@ theorem Quiver.Hom.unop_op {X Y : C} (f : X ⟶ Y) : f.op.unop = f :=
 #align quiver.hom.unop_op Quiver.Hom.unop_op
 -/
 
-#print Quiver.Hom.op_unop /-
+/- warning: quiver.hom.op_unop -> Quiver.Hom.op_unop is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C} (f : Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y), Eq.{u1} (Quiver.Hom.{u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C X)) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C Y))) (Quiver.Hom.op.{u2, u1} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y f)) f
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : Quiver.{u1, u2} C] {X : Opposite.{succ u2} C} {Y : Opposite.{succ u2} C} (f : Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) X Y), Eq.{max 1 u1} (Quiver.Hom.{max 1 u1, u2} (Opposite.{succ u2} C) (Quiver.opposite.{u2, u1} C _inst_1) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C X)) (Opposite.op.{succ u2} C (Opposite.unop.{succ u2} C Y))) (Quiver.Hom.op.{u2, u1} C _inst_1 (Opposite.unop.{succ u2} C Y) (Opposite.unop.{succ u2} C X) (Quiver.Hom.unop.{u2, u1} C _inst_1 X Y f)) f
+Case conversion may be inaccurate. Consider using '#align quiver.hom.op_unop Quiver.Hom.op_unopₓ'. -/
 @[simp]
 theorem Quiver.Hom.op_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) : f.unop.op = f :=
   rfl
 #align quiver.hom.op_unop Quiver.Hom.op_unop
--/
 
 end Quiver
 
@@ -767,7 +779,7 @@ variable (D : Type u₂) [Category.{v₂} D]
 lean 3 declaration is
   forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max u1 u2 u3 u4, max u1 u2 u3 u4} (Opposite.{succ (max u1 u2 u3 u4)} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max u1 u2 u3 u4} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
 but is expected to have type
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u4 u3) u2) u1, max (max (max u4 u3) u2) u1} (Opposite.{succ (max (max (max u4 u3) u2) u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
+  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u3 u4) u1) u2, max (max (max u4 u3) u2) u1} (Opposite.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
 Case conversion may be inaccurate. Consider using '#align category_theory.functor.op_unop_equiv CategoryTheory.Functor.opUnopEquivₓ'. -/
 /-- The equivalence of functor categories induced by `op` and `unop`.
 -/
@@ -791,7 +803,7 @@ def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
 lean 3 declaration is
   forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max u1 u2 u3 u4, max u1 u2 u3 u4} (Opposite.{succ (max u1 u2 u3 u4)} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max u1 u2 u3 u4} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
 but is expected to have type
-  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u4 u3) u2) u1, max (max (max u4 u3) u2) u1} (Opposite.{succ (max (max (max u4 u3) u2) u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
+  forall (C : Type.{u3}) [_inst_1 : CategoryTheory.Category.{u1, u3} C] (D : Type.{u4}) [_inst_2 : CategoryTheory.Category.{u2, u4} D], CategoryTheory.Equivalence.{max u3 u2, max u3 u2, max (max (max u3 u4) u2) u1, max (max (max u4 u3) u2) u1} (Opposite.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2)) (CategoryTheory.Category.opposite.{max u3 u2, max (max (max u3 u4) u1) u2} (CategoryTheory.Functor.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2) (CategoryTheory.Functor.category.{u1, u2, u3, u4} (Opposite.{succ u3} C) (CategoryTheory.Category.opposite.{u1, u3} C _inst_1) D _inst_2)) (CategoryTheory.Functor.category.{u1, u2, u3, u4} C _inst_1 (Opposite.{succ u4} D) (CategoryTheory.Category.opposite.{u2, u4} D _inst_2))
 Case conversion may be inaccurate. Consider using '#align category_theory.functor.left_op_right_op_equiv CategoryTheory.Functor.leftOpRightOpEquivₓ'. -/
 /-- The equivalence of functor categories induced by `left_op` and `right_op`.
 -/

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory): make Functor.Full a Prop (#12449)

Before this PR, Functor.Full contained the data of the preimage of maps by a full functor F. This PR makes Functor.Full a proposition. This is to prevent any diamond to appear.

The lemma Functor.image_preimage is also renamed Functor.map_preimage.

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

Diff
@@ -244,7 +244,8 @@ protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ where
   map f := (F.map f.op).op
 #align category_theory.functor.right_op CategoryTheory.Functor.rightOp
 
-instance {F : C ⥤ D} [Full F] : Full F.op where preimage := @fun X Y f => (F.preimage f.unop).op
+instance {F : C ⥤ D} [Full F] : Full F.op where
+  map_surjective f := ⟨(F.preimage f.unop).op, by simp⟩
 
 instance {F : C ⥤ D} [Faithful F] : Faithful F.op where
   map_injective h := Quiver.Hom.unop_inj <| by simpa using map_injective F (Quiver.Hom.op_inj h)
chore: add pp_dot to Functor.unop (#11823)
Diff
@@ -181,7 +181,7 @@ protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ where
 /-- Given a functor `F : Cᵒᵖ ⥤ Dᵒᵖ` we can take the "unopposite" functor `F : C ⥤ D`.
 In informal mathematics no distinction is made between these.
 -/
-@[simps]
+@[simps, pp_dot]
 protected def unop (F : Cᵒᵖ ⥤ Dᵒᵖ) : C ⥤ D where
   obj X := unop (F.obj (op X))
   map f := (F.map f.op).unop
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
@@ -479,7 +479,6 @@ end Iso
 namespace NatIso
 
 variable {D : Type u₂} [Category.{v₂} D]
-
 variable {F G : C ⥤ D}
 
 /-- The natural isomorphism between opposite functors `G.op ≅ F.op` induced by a natural
@@ -596,7 +595,6 @@ def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop) where
 namespace Functor
 
 variable (C)
-
 variable (D : Type u₂) [Category.{v₂} D]
 
 /-- The equivalence of functor categories induced by `op` and `unop`.
chore: cleanup some Yoneda lemma proofs (#10092)

While thinking about simp lemmas for opposite categories (for the sake of comonoid objects, for the sake of group objects, for the sake of reductive groups), noticed some of the Yoneda lemma proofs can be golfed.

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

Diff
@@ -498,8 +498,6 @@ between the opposite functors `F.op ≅ G.op`. -/
 protected def removeOp (α : F.op ≅ G.op) : G ≅ F where
   hom := NatTrans.removeOp α.hom
   inv := NatTrans.removeOp α.inv
-  hom_inv_id := by ext; dsimp; rw [← unop_comp]; rw [α.inv_hom_id_app]; rfl
-  inv_hom_id := by ext; dsimp; rw [← unop_comp]; rw [α.hom_inv_id_app]; rfl
 #align category_theory.nat_iso.remove_op CategoryTheory.NatIso.removeOp
 
 /-- The natural isomorphism between functors `G.unop ≅ F.unop` induced by a natural isomorphism
@@ -508,8 +506,6 @@ between the original functors `F ≅ G`. -/
 protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ≅ G) : G.unop ≅ F.unop where
   hom := NatTrans.unop α.hom
   inv := NatTrans.unop α.inv
-  hom_inv_id := by ext; dsimp; rw [← unop_comp]; rw [α.inv_hom_id_app]; rfl
-  inv_hom_id := by ext; dsimp; rw [← unop_comp]; rw [α.hom_inv_id_app]; rfl
 #align category_theory.nat_iso.unop CategoryTheory.NatIso.unop
 
 end NatIso
feat: the pretriangulated structure on the opposite category (#7336)
Diff
@@ -460,6 +460,20 @@ theorem unop_op {X Y : Cᵒᵖ} (f : X ≅ Y) : f.unop.op = f := by (ext; rfl)
 theorem op_unop {X Y : C} (f : X ≅ Y) : f.op.unop = f := by (ext; rfl)
 #align category_theory.iso.op_unop CategoryTheory.Iso.op_unop
 
+section
+
+variable {D : Type*} [Category D] {F G : C ⥤ Dᵒᵖ} (e : F ≅ G) (X : C)
+
+@[reassoc (attr := simp)]
+lemma unop_hom_inv_id_app : (e.hom.app X).unop ≫ (e.inv.app X).unop = 𝟙 _ := by
+  rw [← unop_comp, inv_hom_id_app, unop_id]
+
+@[reassoc (attr := simp)]
+lemma unop_inv_hom_id_app : (e.inv.app X).unop ≫ (e.hom.app X).unop = 𝟙 _ := by
+  rw [← unop_comp, hom_inv_id_app, unop_id]
+
+end
+
 end Iso
 
 namespace NatIso
refactor: purge aesop_cat_nonterminal (#7505)

aesop_cat_nonterminal is a non-terminal variant of aesop. It's not supposed to be used in production code since it's even worse than non-terminal simp. However, there were a few occurrences left (presumably from the port), which this PR removes.

The only nontrivial change is that I add mathlib's rfl tactic to the CategoryTheory Aesop rule set.

Diff
@@ -154,13 +154,13 @@ instance isIso_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : IsIso f.unop :=
 
 @[simp]
 theorem op_inv {X Y : C} (f : X ⟶ Y) [IsIso f] : (inv f).op = inv f.op := by
-  aesop_cat_nonterminal
+  apply IsIso.eq_inv_of_hom_inv_id
   rw [← op_comp, IsIso.inv_hom_id, op_id]
 #align category_theory.op_inv CategoryTheory.op_inv
 
 @[simp]
 theorem unop_inv {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : (inv f).unop = inv f.unop := by
-  aesop_cat_nonterminal
+  apply IsIso.eq_inv_of_hom_inv_id
   rw [← unop_comp, IsIso.inv_hom_id, unop_id]
 #align category_theory.unop_inv CategoryTheory.unop_inv
 
chore(CategoryTheory): swapping the names of opOp and unopUnop (#7344)

This PR swaps the names of opOp and unopUnop which are the functors of the equivalence of categories opOpEquivalence : Cᵒᵖᵒᵖ ≌ C. As Opposite.op is the map C → Cᵒᵖ, the functor C ⥤ Cᵒᵖᵒᵖ should be named opOp and the functor Cᵒᵖᵒᵖ ⥤ C should be named unopUnop. It was previously the opposite; this PR fixes this.

Diff
@@ -105,25 +105,25 @@ variable (C)
 
 /-- The functor from the double-opposite of a category to the underlying category. -/
 @[simps]
-def opOp : Cᵒᵖᵒᵖ ⥤ C where
+def unopUnop : Cᵒᵖᵒᵖ ⥤ C where
   obj X := unop (unop X)
   map f := f.unop.unop
-#align category_theory.op_op CategoryTheory.opOp
+#align category_theory.op_op CategoryTheory.unopUnop
 
 /-- The functor from a category to its double-opposite.  -/
 @[simps]
-def unopUnop : C ⥤ Cᵒᵖᵒᵖ where
+def opOp : C ⥤ Cᵒᵖᵒᵖ where
   obj X := op (op X)
   map f := f.op.op
-#align category_theory.unop_unop CategoryTheory.unopUnop
+#align category_theory.unop_unop CategoryTheory.opOp
 
 /-- The double opposite category is equivalent to the original. -/
 @[simps]
 def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C where
-  functor := opOp C
-  inverse := unopUnop C
+  functor := unopUnop C
+  inverse := opOp C
   unitIso := Iso.refl (𝟭 Cᵒᵖᵒᵖ)
-  counitIso := Iso.refl (unopUnop C ⋙ opOp C)
+  counitIso := Iso.refl (opOp C ⋙ unopUnop C)
 #align category_theory.op_op_equivalence CategoryTheory.opOpEquivalence
 
 end
feat: definition of the distinguished triangles in the opposite category (#7327)
Diff
@@ -69,7 +69,7 @@ instance Category.opposite : Category.{v₁} Cᵒᵖ where
   id X := (𝟙 (unop X)).op
 #align category_theory.category.opposite CategoryTheory.Category.opposite
 
-@[simp]
+@[simp, reassoc]
 theorem op_comp {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g).op = g.op ≫ f.op :=
   rfl
 #align category_theory.op_comp CategoryTheory.op_comp
@@ -79,7 +79,7 @@ theorem op_id {X : C} : (𝟙 X).op = 𝟙 (op X) :=
   rfl
 #align category_theory.op_id CategoryTheory.op_id
 
-@[simp]
+@[simp, reassoc]
 theorem unop_comp {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g).unop = g.unop ≫ f.unop :=
   rfl
 #align category_theory.unop_comp CategoryTheory.unop_comp
chore: tidy various files (#5999)
Diff
@@ -23,8 +23,6 @@ Unfortunately, because we do not have a definitional equality `op (op X) = X`,
 there are quite a few variations that are needed in practice.
 -/
 
-set_option autoImplicit false
-
 universe v₁ v₂ u₁ u₂
 
 -- morphism levels before object levels. See note [CategoryTheory universes].
@@ -43,8 +41,7 @@ theorem Quiver.Hom.op_inj {X Y : C} :
 
 theorem Quiver.Hom.unop_inj {X Y : Cᵒᵖ} :
     Function.Injective (Quiver.Hom.unop : (X ⟶ Y) → (Opposite.unop Y ⟶ Opposite.unop X)) :=
-    fun _ _ H =>
-  congr_arg Quiver.Hom.op H
+  fun _ _ H => congr_arg Quiver.Hom.op H
 #align quiver.hom.unop_inj Quiver.Hom.unop_inj
 
 @[simp]
@@ -67,9 +64,8 @@ variable [Category.{v₁} C]
 
 See <https://stacks.math.columbia.edu/tag/001M>.
 -/
-instance Category.opposite : Category.{v₁} Cᵒᵖ
-    where
-  comp := @fun _ _ _ f g => (g.unop ≫ f.unop).op
+instance Category.opposite : Category.{v₁} Cᵒᵖ where
+  comp f g := (g.unop ≫ f.unop).op
   id X := (𝟙 (unop X)).op
 #align category_theory.category.opposite CategoryTheory.Category.opposite
 
@@ -111,14 +107,14 @@ variable (C)
 @[simps]
 def opOp : Cᵒᵖᵒᵖ ⥤ C where
   obj X := unop (unop X)
-  map := @fun X Y f => f.unop.unop
+  map f := f.unop.unop
 #align category_theory.op_op CategoryTheory.opOp
 
 /-- The functor from a category to its double-opposite.  -/
 @[simps]
 def unopUnop : C ⥤ Cᵒᵖᵒᵖ where
   obj X := op (op X)
-  map := @fun X Y f => f.op.op
+  map f := f.op.op
 #align category_theory.unop_unop CategoryTheory.unopUnop
 
 /-- The double opposite category is equivalent to the original. -/
@@ -174,26 +170,21 @@ section
 
 variable {D : Type u₂} [Category.{v₂} D]
 
--- porting note: commenting out redundant binder annotation update
--- variable {C D}
-
 /-- The opposite of a functor, i.e. considering a functor `F : C ⥤ D` as a functor `Cᵒᵖ ⥤ Dᵒᵖ`.
 In informal mathematics no distinction is made between these. -/
 @[simps, pp_dot]
-protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ
-    where
+protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ where
   obj X := op (F.obj (unop X))
-  map := @fun X Y f => (F.map f.unop).op
+  map f := (F.map f.unop).op
 #align category_theory.functor.op CategoryTheory.Functor.op
 
 /-- Given a functor `F : Cᵒᵖ ⥤ Dᵒᵖ` we can take the "unopposite" functor `F : C ⥤ D`.
 In informal mathematics no distinction is made between these.
 -/
 @[simps]
-protected def unop (F : Cᵒᵖ ⥤ Dᵒᵖ) : C ⥤ D
-    where
+protected def unop (F : Cᵒᵖ ⥤ Dᵒᵖ) : C ⥤ D where
   obj X := unop (F.obj (op X))
-  map := @fun X Y f => (F.map f.op).unop
+  map f := (F.map f.op).unop
 #align category_theory.functor.unop CategoryTheory.Functor.unop
 
 /-- The isomorphism between `F.op.unop` and `F`. -/
@@ -215,7 +206,7 @@ variable (C D)
 @[simps]
 def opHom : (C ⥤ D)ᵒᵖ ⥤ Cᵒᵖ ⥤ Dᵒᵖ where
   obj F := (unop F).op
-  map := @fun F G α =>
+  map α :=
     { app := fun X => (α.unop.app (unop X)).op
       naturality := fun X Y f => Quiver.Hom.unop_inj (α.unop.naturality f.unop).symm }
 #align category_theory.functor.op_hom CategoryTheory.Functor.opHom
@@ -225,7 +216,7 @@ def opHom : (C ⥤ D)ᵒᵖ ⥤ Cᵒᵖ ⥤ Dᵒᵖ where
 @[simps]
 def opInv : (Cᵒᵖ ⥤ Dᵒᵖ) ⥤ (C ⥤ D)ᵒᵖ where
   obj F := op F.unop
-  map := @fun F G α =>
+  map α :=
     Quiver.Hom.op
       { app := fun X => (α.app (op X)).unop
         naturality := fun X Y f => Quiver.Hom.op_inj <| (α.naturality f.op).symm }
@@ -238,10 +229,9 @@ Another variant of the opposite of functor, turning a functor `C ⥤ Dᵒᵖ` in
 In informal mathematics no distinction is made.
 -/
 @[simps, pp_dot]
-protected def leftOp (F : C ⥤ Dᵒᵖ) : Cᵒᵖ ⥤ D
-    where
+protected def leftOp (F : C ⥤ Dᵒᵖ) : Cᵒᵖ ⥤ D where
   obj X := unop (F.obj (unop X))
-  map := @fun X Y f => (F.map f.unop).unop
+  map f := (F.map f.unop).unop
 #align category_theory.functor.left_op CategoryTheory.Functor.leftOp
 
 /--
@@ -249,28 +239,24 @@ Another variant of the opposite of functor, turning a functor `Cᵒᵖ ⥤ D` in
 In informal mathematics no distinction is made.
 -/
 @[simps, pp_dot]
-protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ
-    where
+protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ where
   obj X := op (F.obj (op X))
-  map := @fun X Y f => (F.map f.op).op
+  map f := (F.map f.op).op
 #align category_theory.functor.right_op CategoryTheory.Functor.rightOp
 
 instance {F : C ⥤ D} [Full F] : Full F.op where preimage := @fun X Y f => (F.preimage f.unop).op
 
-instance {F : C ⥤ D} [Faithful F] : Faithful F.op
-    where map_injective := @fun X Y f g h =>
-    Quiver.Hom.unop_inj <| by simpa using map_injective F (Quiver.Hom.op_inj h)
+instance {F : C ⥤ D} [Faithful F] : Faithful F.op where
+  map_injective h := Quiver.Hom.unop_inj <| by simpa using map_injective F (Quiver.Hom.op_inj h)
 
 /-- If F is faithful then the right_op of F is also faithful. -/
-instance rightOp_faithful {F : Cᵒᵖ ⥤ D} [Faithful F] : Faithful F.rightOp
-    where map_injective := @fun _ _ _ _ h =>
-        Quiver.Hom.op_inj (map_injective F (Quiver.Hom.op_inj h))
+instance rightOp_faithful {F : Cᵒᵖ ⥤ D} [Faithful F] : Faithful F.rightOp where
+  map_injective h := Quiver.Hom.op_inj (map_injective F (Quiver.Hom.op_inj h))
 #align category_theory.functor.right_op_faithful CategoryTheory.Functor.rightOp_faithful
 
 /-- If F is faithful then the left_op of F is also faithful. -/
-instance leftOp_faithful {F : C ⥤ Dᵒᵖ} [Faithful F] : Faithful F.leftOp
-    where map_injective := @fun _ _ _ _ h =>
-        Quiver.Hom.unop_inj (map_injective F (Quiver.Hom.unop_inj h))
+instance leftOp_faithful {F : C ⥤ Dᵒᵖ} [Faithful F] : Faithful F.leftOp where
+  map_injective h := Quiver.Hom.unop_inj (map_injective F (Quiver.Hom.unop_inj h))
 #align category_theory.functor.left_op_faithful CategoryTheory.Functor.leftOp_faithful
 
 /-- The isomorphism between `F.leftOp.rightOp` and `F`. -/
@@ -306,8 +292,7 @@ variable {F G : C ⥤ D}
 
 /-- The opposite of a natural transformation. -/
 @[simps]
-protected def op (α : F ⟶ G) : G.op ⟶ F.op
-    where
+protected def op (α : F ⟶ G) : G.op ⟶ F.op where
   app X := (α.app (unop X)).op
   naturality X Y f := Quiver.Hom.unop_inj (by simp)
 #align category_theory.nat_trans.op CategoryTheory.NatTrans.op
@@ -319,8 +304,7 @@ theorem op_id (F : C ⥤ D) : NatTrans.op (𝟙 F) = 𝟙 F.op :=
 
 /-- The "unopposite" of a natural transformation. -/
 @[simps]
-protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ⟶ G) : G.unop ⟶ F.unop
-    where
+protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ⟶ G) : G.unop ⟶ F.unop where
   app X := (α.app (op X)).unop
   naturality X Y f := Quiver.Hom.op_inj (by simp)
 #align category_theory.nat_trans.unop CategoryTheory.NatTrans.unop
@@ -334,8 +318,7 @@ theorem unop_id (F : Cᵒᵖ ⥤ Dᵒᵖ) : NatTrans.unop (𝟙 F) = 𝟙 F.unop
 we can take the "unopposite" of each component obtaining a natural transformation `G ⟶ F`.
 -/
 @[simps]
-protected def removeOp (α : F.op ⟶ G.op) : G ⟶ F
-    where
+protected def removeOp (α : F.op ⟶ G.op) : G ⟶ F where
   app X := (α.app (op X)).unop
   naturality X Y f :=
     Quiver.Hom.op_inj <| by simpa only [Functor.op_map] using (α.naturality f.op).symm
@@ -349,8 +332,7 @@ theorem removeOp_id (F : C ⥤ D) : NatTrans.removeOp (𝟙 F.op) = 𝟙 F :=
 /-- Given a natural transformation `α : F.unop ⟶ G.unop`, we can take the opposite of each
 component obtaining a natural transformation `G ⟶ F`. -/
 @[simps]
-protected def removeUnop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F.unop ⟶ G.unop) : G ⟶ F
-    where
+protected def removeUnop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F.unop ⟶ G.unop) : G ⟶ F where
   app X := (α.app (unop X)).op
   naturality X Y f :=
     Quiver.Hom.unop_inj <| by simpa only [Functor.unop_map] using (α.naturality f.unop).symm
@@ -368,11 +350,10 @@ section
 variable {F G H : C ⥤ Dᵒᵖ}
 
 /-- Given a natural transformation `α : F ⟶ G`, for `F G : C ⥤ Dᵒᵖ`,
-taking `unop` of each component gives a natural transformation `G.left_op ⟶ F.left_op`.
+taking `unop` of each component gives a natural transformation `G.leftOp ⟶ F.leftOp`.
 -/
 @[simps]
-protected def leftOp (α : F ⟶ G) : G.leftOp ⟶ F.leftOp
-    where
+protected def leftOp (α : F ⟶ G) : G.leftOp ⟶ F.leftOp where
   app X := (α.app (unop X)).unop
   naturality X Y f := Quiver.Hom.op_inj (by simp)
 #align category_theory.nat_trans.left_op CategoryTheory.NatTrans.leftOp
@@ -392,8 +373,7 @@ theorem leftOp_comp (α : F ⟶ G) (β : G ⟶ H) : NatTrans.leftOp (α ≫ β)
 taking `op` of each component gives a natural transformation `G ⟶ F`.
 -/
 @[simps]
-protected def removeLeftOp (α : F.leftOp ⟶ G.leftOp) : G ⟶ F
-    where
+protected def removeLeftOp (α : F.leftOp ⟶ G.leftOp) : G ⟶ F where
   app X := (α.app (op X)).op
   naturality X Y f :=
     Quiver.Hom.unop_inj <| by simpa only [Functor.leftOp_map] using (α.naturality f.op).symm
@@ -414,8 +394,7 @@ variable {F G H : Cᵒᵖ ⥤ D}
 taking `op` of each component gives a natural transformation `G.rightOp ⟶ F.rightOp`.
 -/
 @[simps]
-protected def rightOp (α : F ⟶ G) : G.rightOp ⟶ F.rightOp
-    where
+protected def rightOp (α : F ⟶ G) : G.rightOp ⟶ F.rightOp where
   app X := (α.app _).op
   naturality X Y f := Quiver.Hom.unop_inj (by simp)
 #align category_theory.nat_trans.right_op CategoryTheory.NatTrans.rightOp
@@ -435,8 +414,7 @@ theorem rightOp_comp (α : F ⟶ G) (β : G ⟶ H) : NatTrans.rightOp (α ≫ β
 taking `unop` of each component gives a natural transformation `G ⟶ F`.
 -/
 @[simps]
-protected def removeRightOp (α : F.rightOp ⟶ G.rightOp) : G ⟶ F
-    where
+protected def removeRightOp (α : F.rightOp ⟶ G.rightOp) : G ⟶ F where
   app X := (α.app X.unop).unop
   naturality X Y f :=
     Quiver.Hom.op_inj <| by simpa only [Functor.rightOp_map] using (α.naturality f.unop).symm
@@ -458,8 +436,7 @@ variable {X Y : C}
 /-- The opposite isomorphism.
 -/
 @[simps]
-protected def op (α : X ≅ Y) : op Y ≅ op X
-    where
+protected def op (α : X ≅ Y) : op Y ≅ op X where
   hom := α.hom.op
   inv := α.inv.op
   hom_inv_id := Quiver.Hom.unop_inj α.inv_hom_id
@@ -468,8 +445,7 @@ protected def op (α : X ≅ Y) : op Y ≅ op X
 
 /-- The isomorphism obtained from an isomorphism in the opposite category. -/
 @[simps]
-def unop {X Y : Cᵒᵖ} (f : X ≅ Y) : Y.unop ≅ X.unop
-    where
+def unop {X Y : Cᵒᵖ} (f : X ≅ Y) : Y.unop ≅ X.unop where
   hom := f.hom.unop
   inv := f.inv.unop
   hom_inv_id := by simp only [← unop_comp, f.inv_hom_id, unop_id]
@@ -495,8 +471,7 @@ variable {F G : C ⥤ D}
 /-- The natural isomorphism between opposite functors `G.op ≅ F.op` induced by a natural
 isomorphism between the original functors `F ≅ G`. -/
 @[simps]
-protected def op (α : F ≅ G) : G.op ≅ F.op
-    where
+protected def op (α : F ≅ G) : G.op ≅ F.op where
   hom := NatTrans.op α.hom
   inv := NatTrans.op α.inv
   hom_inv_id := by ext; dsimp; rw [← op_comp]; rw [α.inv_hom_id_app]; rfl
@@ -506,8 +481,7 @@ protected def op (α : F ≅ G) : G.op ≅ F.op
 /-- The natural isomorphism between functors `G ≅ F` induced by a natural isomorphism
 between the opposite functors `F.op ≅ G.op`. -/
 @[simps]
-protected def removeOp (α : F.op ≅ G.op) : G ≅ F
-    where
+protected def removeOp (α : F.op ≅ G.op) : G ≅ F where
   hom := NatTrans.removeOp α.hom
   inv := NatTrans.removeOp α.inv
   hom_inv_id := by ext; dsimp; rw [← unop_comp]; rw [α.inv_hom_id_app]; rfl
@@ -517,8 +491,7 @@ protected def removeOp (α : F.op ≅ G.op) : G ≅ F
 /-- The natural isomorphism between functors `G.unop ≅ F.unop` induced by a natural isomorphism
 between the original functors `F ≅ G`. -/
 @[simps]
-protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ≅ G) : G.unop ≅ F.unop
-    where
+protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ≅ G) : G.unop ≅ F.unop where
   hom := NatTrans.unop α.hom
   inv := NatTrans.unop α.inv
   hom_inv_id := by ext; dsimp; rw [← unop_comp]; rw [α.inv_hom_id_app]; rfl
@@ -576,8 +549,7 @@ def opEquiv''' (A B : C) : (Opposite.op A ⟶ Opposite.op B) ≃ (B ⟶ A) :=
 ```
 -/
 @[simps]
-def opEquiv (A B : Cᵒᵖ) : (A ⟶ B) ≃ (B.unop ⟶ A.unop)
-    where
+def opEquiv (A B : Cᵒᵖ) : (A ⟶ B) ≃ (B.unop ⟶ A.unop) where
   toFun f := f.unop
   invFun g := g.op
   left_inv _ := rfl
@@ -600,8 +572,7 @@ Note this is definitionally the same as the other three variants:
 * `(Opposite.op A ≅ Opposite.op B) ≃ (B ≅ A)`
 -/
 @[simps]
-def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop)
-    where
+def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop) where
   toFun f := f.unop
   invFun g := g.op
   left_inv _ := by
@@ -621,8 +592,7 @@ variable (D : Type u₂) [Category.{v₂} D]
 /-- The equivalence of functor categories induced by `op` and `unop`.
 -/
 @[simps]
-def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
-    where
+def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ where
   functor := opHom _ _
   inverse := opInv _ _
   unitIso :=
@@ -639,8 +609,7 @@ def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
 /-- The equivalence of functor categories induced by `leftOp` and `rightOp`.
 -/
 @[simps!]
-def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ
-    where
+def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ where
   functor :=
     { obj := fun F => F.unop.rightOp
       map := fun η => NatTrans.rightOp η.unop }
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.opposites
-! leanprover-community/mathlib commit dde670c9a3f503647fd5bfdf1037bad526d3397a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Equivalence
 
+#align_import category_theory.opposites from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a"
+
 /-!
 # Opposite categories
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -646,7 +646,7 @@ def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ
     where
   functor :=
     { obj := fun F => F.unop.rightOp
-      map := fun η => NatTrans.rightOp η.unop  }
+      map := fun η => NatTrans.rightOp η.unop }
   inverse :=
     { obj := fun F => op F.leftOp
       map := fun η => η.leftOp.op }
feat: pp_dot attribute to replace pp_extended_field_notation command (#5632)
Diff
@@ -181,17 +181,14 @@ variable {D : Type u₂} [Category.{v₂} D]
 -- variable {C D}
 
 /-- The opposite of a functor, i.e. considering a functor `F : C ⥤ D` as a functor `Cᵒᵖ ⥤ Dᵒᵖ`.
-In informal mathematics no distinction is made between these.
--/
-@[simps]
+In informal mathematics no distinction is made between these. -/
+@[simps, pp_dot]
 protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ
     where
   obj X := op (F.obj (unop X))
   map := @fun X Y f => (F.map f.unop).op
 #align category_theory.functor.op CategoryTheory.Functor.op
 
-pp_extended_field_notation op
-
 /-- Given a functor `F : Cᵒᵖ ⥤ Dᵒᵖ` we can take the "unopposite" functor `F : C ⥤ D`.
 In informal mathematics no distinction is made between these.
 -/
@@ -243,28 +240,24 @@ variable {C D}
 Another variant of the opposite of functor, turning a functor `C ⥤ Dᵒᵖ` into a functor `Cᵒᵖ ⥤ D`.
 In informal mathematics no distinction is made.
 -/
-@[simps]
+@[simps, pp_dot]
 protected def leftOp (F : C ⥤ Dᵒᵖ) : Cᵒᵖ ⥤ D
     where
   obj X := unop (F.obj (unop X))
   map := @fun X Y f => (F.map f.unop).unop
 #align category_theory.functor.left_op CategoryTheory.Functor.leftOp
 
-pp_extended_field_notation Functor.leftOp
-
 /--
 Another variant of the opposite of functor, turning a functor `Cᵒᵖ ⥤ D` into a functor `C ⥤ Dᵒᵖ`.
 In informal mathematics no distinction is made.
 -/
-@[simps]
+@[simps, pp_dot]
 protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ
     where
   obj X := op (F.obj (op X))
   map := @fun X Y f => (F.map f.op).op
 #align category_theory.functor.right_op CategoryTheory.Functor.rightOp
 
-pp_extended_field_notation Functor.rightOp
-
 instance {F : C ⥤ D} [Full F] : Full F.op where preimage := @fun X Y f => (F.preimage f.unop).op
 
 instance {F : C ⥤ D} [Faithful F] : Faithful F.op
chore: formatting issues (#4947)

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

Diff
@@ -576,13 +576,13 @@ adjunctions.
 Note that this (definitionally) gives variants
 ```
 def opEquiv' (A : C) (B : Cᵒᵖ) : (Opposite.op A ⟶ B) ≃ (B.unop ⟶ A) :=
-opEquiv _ _
+  opEquiv _ _
 
 def opEquiv'' (A : Cᵒᵖ) (B : C) : (A ⟶ Opposite.op B) ≃ (B ⟶ A.unop) :=
-opEquiv _ _
+  opEquiv _ _
 
 def opEquiv''' (A B : C) : (Opposite.op A ⟶ Opposite.op B) ≃ (B ⟶ A) :=
-opEquiv _ _
+  opEquiv _ _
 ```
 -/
 @[simps]
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
@@ -205,13 +205,13 @@ protected def unop (F : Cᵒᵖ ⥤ Dᵒᵖ) : C ⥤ D
 /-- The isomorphism between `F.op.unop` and `F`. -/
 @[simps!]
 def opUnopIso (F : C ⥤ D) : F.op.unop ≅ F :=
-  NatIso.ofComponents (fun X => Iso.refl _) (by aesop_cat)
+  NatIso.ofComponents fun X => Iso.refl _
 #align category_theory.functor.op_unop_iso CategoryTheory.Functor.opUnopIso
 
 /-- The isomorphism between `F.unop.op` and `F`. -/
 @[simps!]
 def unopOpIso (F : Cᵒᵖ ⥤ Dᵒᵖ) : F.unop.op ≅ F :=
-  NatIso.ofComponents (fun X => Iso.refl _) (by aesop_cat)
+  NatIso.ofComponents fun X => Iso.refl _
 #align category_theory.functor.unop_op_iso CategoryTheory.Functor.unopOpIso
 
 variable (C D)
@@ -286,13 +286,13 @@ instance leftOp_faithful {F : C ⥤ Dᵒᵖ} [Faithful F] : Faithful F.leftOp
 /-- The isomorphism between `F.leftOp.rightOp` and `F`. -/
 @[simps!]
 def leftOpRightOpIso (F : C ⥤ Dᵒᵖ) : F.leftOp.rightOp ≅ F :=
-  NatIso.ofComponents (fun X => Iso.refl _) (by aesop_cat)
+  NatIso.ofComponents fun X => Iso.refl _
 #align category_theory.functor.left_op_right_op_iso CategoryTheory.Functor.leftOpRightOpIso
 
 /-- The isomorphism between `F.rightOp.leftOp` and `F`. -/
 @[simps!]
 def rightOpLeftOpIso (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp ≅ F :=
-  NatIso.ofComponents (fun X => Iso.refl _) (by aesop_cat)
+  NatIso.ofComponents fun X => Iso.refl _
 #align category_theory.functor.right_op_left_op_iso CategoryTheory.Functor.rightOpLeftOpIso
 
 /-- Whenever possible, it is advisable to use the isomorphism `rightOpLeftOpIso`
@@ -643,7 +643,7 @@ def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ
         rw [show f = f.unop.op by simp, ← op_comp, ← op_comp]
         congr 1
         aesop_cat)
-  counitIso := NatIso.ofComponents (fun F => F.unopOpIso) (by aesop_cat)
+  counitIso := NatIso.ofComponents fun F => F.unopOpIso
 #align category_theory.functor.op_unop_equiv CategoryTheory.Functor.opUnopEquiv
 
 /-- The equivalence of functor categories induced by `leftOp` and `rightOp`.
@@ -665,7 +665,7 @@ def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ
         rw [show η = η.unop.op by simp, ← op_comp, ← op_comp]
         congr 1
         aesop_cat)
-  counitIso := NatIso.ofComponents (fun F => F.leftOpRightOpIso) (by aesop_cat)
+  counitIso := NatIso.ofComponents fun F => F.leftOpRightOpIso
 #align category_theory.functor.left_op_right_op_equiv CategoryTheory.Functor.leftOpRightOpEquiv
 
 end Functor
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -575,13 +575,13 @@ end Equivalence
 adjunctions.
 Note that this (definitionally) gives variants
 ```
-def opEquiv' (A : C) (B : Cᵒᵖ) : (opposite.op A ⟶ B) ≃ (B.unop ⟶ A) :=
+def opEquiv' (A : C) (B : Cᵒᵖ) : (Opposite.op A ⟶ B) ≃ (B.unop ⟶ A) :=
 opEquiv _ _
 
-def opEquiv'' (A : Cᵒᵖ) (B : C) : (A ⟶ opposite.op B) ≃ (B ⟶ A.unop) :=
+def opEquiv'' (A : Cᵒᵖ) (B : C) : (A ⟶ Opposite.op B) ≃ (B ⟶ A.unop) :=
 opEquiv _ _
 
-def opEquiv''' (A B : C) : (opposite.op A ⟶ opposite.op B) ≃ (B ⟶ A) :=
+def opEquiv''' (A B : C) : (Opposite.op A ⟶ Opposite.op B) ≃ (B ⟶ A) :=
 opEquiv _ _
 ```
 -/
@@ -605,9 +605,9 @@ instance decidableEqOfUnop (A B : Cᵒᵖ) [DecidableEq (unop B ⟶ unop A)] : D
 /-- The equivalence between isomorphisms of the form `A ≅ B` and `B.unop ≅ A.unop`.
 
 Note this is definitionally the same as the other three variants:
-* `(opposite.op A ≅ B) ≃ (B.unop ≅ A)`
-* `(A ≅ opposite.op B) ≃ (B ≅ A.unop)`
-* `(opposite.op A ≅ opposite.op B) ≃ (B ≅ A)`
+* `(Opposite.op A ≅ B) ≃ (B.unop ≅ A)`
+* `(A ≅ Opposite.op B) ≃ (B ≅ A.unop)`
+* `(Opposite.op A ≅ Opposite.op B) ≃ (B ≅ A)`
 -/
 @[simps]
 def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop)
feat: add unexpanders for preimage and op (#3959)
Diff
@@ -190,6 +190,8 @@ protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ
   map := @fun X Y f => (F.map f.unop).op
 #align category_theory.functor.op CategoryTheory.Functor.op
 
+pp_extended_field_notation op
+
 /-- Given a functor `F : Cᵒᵖ ⥤ Dᵒᵖ` we can take the "unopposite" functor `F : C ⥤ D`.
 In informal mathematics no distinction is made between these.
 -/
feat: add some pp_extended_field_notations (#3592)

Add some pp_extended_field_notation, for opt-in cases with additional arguments.

Co-authored-by: Kyle Miller <kmill31415@gmail.com>

Diff
@@ -248,6 +248,8 @@ protected def leftOp (F : C ⥤ Dᵒᵖ) : Cᵒᵖ ⥤ D
   map := @fun X Y f => (F.map f.unop).unop
 #align category_theory.functor.left_op CategoryTheory.Functor.leftOp
 
+pp_extended_field_notation Functor.leftOp
+
 /--
 Another variant of the opposite of functor, turning a functor `Cᵒᵖ ⥤ D` into a functor `C ⥤ Dᵒᵖ`.
 In informal mathematics no distinction is made.
@@ -259,6 +261,8 @@ protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ
   map := @fun X Y f => (F.map f.op).op
 #align category_theory.functor.right_op CategoryTheory.Functor.rightOp
 
+pp_extended_field_notation Functor.rightOp
+
 instance {F : C ⥤ D} [Full F] : Full F.op where preimage := @fun X Y f => (F.preimage f.unop).op
 
 instance {F : C ⥤ D} [Faithful F] : Faithful F.op
fix: do not use nonterminal Aesop for auto-params (#2527)

This commit makes aesop_cat and aesop_graph terminal (i.e. they either solve the goal or fail). This appears to solve issues where non-terminal tactics, when used as auto-params, introduce unknown universe variables. See

https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Goal.20state.20not.20updating.2C.20bugs.2C.20etc.2E

Since there are some intended nonterminal uses of aesop_cat, we introduce aesop_cat_nonterminal as the nonterminal equivalent of aesop_cat.

Diff
@@ -161,13 +161,13 @@ instance isIso_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : IsIso f.unop :=
 
 @[simp]
 theorem op_inv {X Y : C} (f : X ⟶ Y) [IsIso f] : (inv f).op = inv f.op := by
-  aesop_cat
+  aesop_cat_nonterminal
   rw [← op_comp, IsIso.inv_hom_id, op_id]
 #align category_theory.op_inv CategoryTheory.op_inv
 
 @[simp]
 theorem unop_inv {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : (inv f).unop = inv f.unop := by
-  aesop_cat
+  aesop_cat_nonterminal
   rw [← unop_comp, IsIso.inv_hom_id, unop_id]
 #align category_theory.unop_inv CategoryTheory.unop_inv
 
fix: category_theory -> CategoryTheory in note (#2357)

This changes the name of a library_note from "category_theory universes" to "CategoryTheory universes" to be more in line with the new naming conventions.

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -30,7 +30,7 @@ set_option autoImplicit false
 
 universe v₁ v₂ u₁ u₂
 
--- morphism levels before object levels. See note [category_theory universes].
+-- morphism levels before object levels. See note [CategoryTheory universes].
 open Opposite
 
 variable {C : Type u₁}
fix: rename functor_unit_iso_comp to functor_unitIso_comp (#2314)
Diff
@@ -543,7 +543,7 @@ def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ where
   inverse := e.inverse.op
   unitIso := (NatIso.op e.unitIso).symm
   counitIso := (NatIso.op e.counitIso).symm
-  functor_unit_iso_comp X := by
+  functor_unitIso_comp X := by
     apply Quiver.Hom.unop_inj
     dsimp
     simp
@@ -557,7 +557,7 @@ def unop (e : Cᵒᵖ ≌ Dᵒᵖ) : C ≌ D where
   inverse := e.inverse.unop
   unitIso := (NatIso.unop e.unitIso).symm
   counitIso := (NatIso.unop e.counitIso).symm
-  functor_unit_iso_comp X := by
+  functor_unitIso_comp X := by
     apply Quiver.Hom.op_inj
     dsimp
     simp
feat: port CategoryTheory.Opposites (#2195)
  • depends on: #1287 - [x] depends on tactic tidy?

Co-authored-by: Henrik Böving <hargonix@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>

Dependencies 10

11 files ported (100.0%)
3034 lines ported (100.0%)

All dependencies are ported!