category_theory.abelian.oppositeMathlib.CategoryTheory.Abelian.Opposite

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)

(last sync)

chore(category_theory/abelian): backport removal of abelian.has_finite_biproducts instance (#18740)

This backports a proposed removal of the abelian.has_finite_biproducts global instance, instead enabling it locally in the files that need it.

The reason for removing it is that it triggers the dreaded https://github.com/leanprover/lean4/issues/2055 during the simpNF linter in https://github.com/leanprover-community/mathlib4/pull/2769, the mathlib4 port of category_theory.abelian.basic.

This backport verifies that we won't run into further problems downstream if we (hopefully temporarily) remove these instances in mathlib4.

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

Diff
@@ -25,6 +25,11 @@ variables (C : Type*) [category C] [abelian C]
 local attribute [instance]
   has_finite_limits_of_has_equalizers_and_finite_products
   has_finite_colimits_of_has_coequalizers_and_finite_coproducts
+  -- Porting note:
+  -- This should have been a global instance,
+  -- but triggers https://github.com/leanprover/lean4/issues/2055
+  -- when ported to mathlib4.
+  abelian.has_finite_biproducts
 
 instance : abelian Cᵒᵖ :=
 { normal_mono_of_mono := λ X Y f m, by exactI

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.CategoryTheory.Abelian.Basic
-import Mathbin.CategoryTheory.Preadditive.Opposite
-import Mathbin.CategoryTheory.Limits.Opposites
+import CategoryTheory.Abelian.Basic
+import CategoryTheory.Preadditive.Opposite
+import CategoryTheory.Limits.Opposites
 
 #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.abelian.opposite
-! leanprover-community/mathlib commit a5ff45a1c92c278b03b52459a620cfd9c49ebc80
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Abelian.Basic
 import Mathbin.CategoryTheory.Preadditive.Opposite
 import Mathbin.CategoryTheory.Limits.Opposites
 
+#align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80"
+
 /-!
 # The opposite of an abelian category is abelian.
 
Diff
@@ -28,8 +28,8 @@ open CategoryTheory.Limits
 
 variable (C : Type _) [Category C] [Abelian C]
 
-attribute [local instance]
-  has_finite_limits_of_has_equalizers_and_finite_products has_finite_colimits_of_has_coequalizers_and_finite_coproducts abelian.has_finite_biproducts
+attribute [local instance] has_finite_limits_of_has_equalizers_and_finite_products
+  has_finite_colimits_of_has_coequalizers_and_finite_coproducts abelian.has_finite_biproducts
 
 -- Porting note:
 -- This should have been a global instance,
Diff
@@ -52,11 +52,7 @@ variable {C} {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B)
 def kernelOpUnop : (kernel f.op).unop ≅ cokernel f
     where
   Hom := (kernel.lift f.op (cokernel.π f).op <| by simp [← op_comp]).unop
-  inv :=
-    cokernel.desc f (kernel.ι f.op).unop <|
-      by
-      rw [← f.unop_op, ← unop_comp, f.unop_op]
-      simp
+  inv := cokernel.desc f (kernel.ι f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op]; simp
   hom_inv_id' := by
     rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp]
     congr 1
@@ -77,11 +73,7 @@ def kernelOpUnop : (kernel f.op).unop ≅ cokernel f
 @[simps]
 def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f
     where
-  Hom :=
-    kernel.lift f (cokernel.π f.op).unop <|
-      by
-      rw [← f.unop_op, ← unop_comp, f.unop_op]
-      simp
+  Hom := kernel.lift f (cokernel.π f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op]; simp
   inv := (cokernel.desc f.op (kernel.ι f).op <| by simp [← op_comp]).unop
   hom_inv_id' := by
     rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp]
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.abelian.opposite
-! leanprover-community/mathlib commit 9d2f0748e6c50d7a2657c564b1ff2c695b39148d
+! leanprover-community/mathlib commit a5ff45a1c92c278b03b52459a620cfd9c49ebc80
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -29,8 +29,12 @@ open CategoryTheory.Limits
 variable (C : Type _) [Category C] [Abelian C]
 
 attribute [local instance]
-  has_finite_limits_of_has_equalizers_and_finite_products has_finite_colimits_of_has_coequalizers_and_finite_coproducts
+  has_finite_limits_of_has_equalizers_and_finite_products has_finite_colimits_of_has_coequalizers_and_finite_coproducts abelian.has_finite_biproducts
 
+-- Porting note:
+-- This should have been a global instance,
+-- but triggers https://github.com/leanprover/lean4/issues/2055
+-- when ported to mathlib4.
 instance : Abelian Cᵒᵖ
     where
   normalMonoOfMono X Y f m := normal_mono_of_normal_epi_unop _ (normal_epi_of_epi f.unop)
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.abelian.opposite
-! leanprover-community/mathlib commit 8c75ef3517d4106e89fe524e6281d0b0545f47fc
+! leanprover-community/mathlib commit 9d2f0748e6c50d7a2657c564b1ff2c695b39148d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.CategoryTheory.Limits.Opposites
 
 /-!
 # The opposite of an abelian category is abelian.
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
 -/
 
 
Diff
@@ -37,6 +37,7 @@ section
 
 variable {C} {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B)
 
+#print CategoryTheory.kernelOpUnop /-
 -- TODO: Generalize (this will work whenever f has a cokernel)
 -- (The abelian case is probably sufficient for most applications.)
 /-- The kernel of `f.op` is the opposite of `cokernel f`. -/
@@ -60,7 +61,9 @@ def kernelOpUnop : (kernel f.op).unop ≅ cokernel f
     ext
     simp [← unop_comp]
 #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop
+-/
 
+#print CategoryTheory.cokernelOpUnop /-
 -- TODO: Generalize (this will work whenever f has a kernel)
 -- (The abelian case is probably sufficient for most applications.)
 /-- The cokernel of `f.op` is the opposite of `kernel f`. -/
@@ -84,88 +87,118 @@ def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f
     ext
     simp [← unop_comp]
 #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop
+-/
 
+#print CategoryTheory.kernelUnopOp /-
 /-- The kernel of `g.unop` is the opposite of `cokernel g`. -/
 @[simps]
 def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g :=
   (cokernelOpUnop g.unop).op
 #align category_theory.kernel_unop_op CategoryTheory.kernelUnopOp
+-/
 
+#print CategoryTheory.cokernelUnopOp /-
 /-- The cokernel of `g.unop` is the opposite of `kernel g`. -/
 @[simps]
 def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g :=
   (kernelOpUnop g.unop).op
 #align category_theory.cokernel_unop_op CategoryTheory.cokernelUnopOp
+-/
 
-theorem Cokernel.π_op :
+#print CategoryTheory.cokernel.π_op /-
+theorem cokernel.π_op :
     (cokernel.π f.op).unop =
       (cokernelOpUnop f).Hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm :=
   by simp [cokernel_op_unop]
-#align category_theory.cokernel.π_op CategoryTheory.Cokernel.π_op
+#align category_theory.cokernel.π_op CategoryTheory.cokernel.π_op
+-/
 
-theorem Kernel.ι_op :
+#print CategoryTheory.kernel.ι_op /-
+theorem kernel.ι_op :
     (kernel.ι f.op).unop = eqToHom (Opposite.unop_op _) ≫ cokernel.π f ≫ (kernelOpUnop f).inv := by
   simp [kernel_op_unop]
-#align category_theory.kernel.ι_op CategoryTheory.Kernel.ι_op
+#align category_theory.kernel.ι_op CategoryTheory.kernel.ι_op
+-/
 
+#print CategoryTheory.kernelOpOp /-
 /-- The kernel of `f.op` is the opposite of `cokernel f`. -/
 @[simps]
 def kernelOpOp : kernel f.op ≅ Opposite.op (cokernel f) :=
   (kernelOpUnop f).op.symm
 #align category_theory.kernel_op_op CategoryTheory.kernelOpOp
+-/
 
+#print CategoryTheory.cokernelOpOp /-
 /-- The cokernel of `f.op` is the opposite of `kernel f`. -/
 @[simps]
 def cokernelOpOp : cokernel f.op ≅ Opposite.op (kernel f) :=
   (cokernelOpUnop f).op.symm
 #align category_theory.cokernel_op_op CategoryTheory.cokernelOpOp
+-/
 
+#print CategoryTheory.kernelUnopUnop /-
 /-- The kernel of `g.unop` is the opposite of `cokernel g`. -/
 @[simps]
 def kernelUnopUnop : kernel g.unop ≅ (cokernel g).unop :=
   (kernelUnopOp g).unop.symm
 #align category_theory.kernel_unop_unop CategoryTheory.kernelUnopUnop
+-/
 
-theorem Kernel.ι_unop :
+#print CategoryTheory.kernel.ι_unop /-
+theorem kernel.ι_unop :
     (kernel.ι g.unop).op = eqToHom (Opposite.op_unop _) ≫ cokernel.π g ≫ (kernelUnopOp g).inv := by
   simp
-#align category_theory.kernel.ι_unop CategoryTheory.Kernel.ι_unop
+#align category_theory.kernel.ι_unop CategoryTheory.kernel.ι_unop
+-/
 
-theorem Cokernel.π_unop :
+#print CategoryTheory.cokernel.π_unop /-
+theorem cokernel.π_unop :
     (cokernel.π g.unop).op =
       (cokernelUnopOp g).Hom ≫ kernel.ι g ≫ eqToHom (Opposite.op_unop _).symm :=
   by simp
-#align category_theory.cokernel.π_unop CategoryTheory.Cokernel.π_unop
+#align category_theory.cokernel.π_unop CategoryTheory.cokernel.π_unop
+-/
 
+#print CategoryTheory.cokernelUnopUnop /-
 /-- The cokernel of `g.unop` is the opposite of `kernel g`. -/
 @[simps]
 def cokernelUnopUnop : cokernel g.unop ≅ (kernel g).unop :=
   (cokernelUnopOp g).unop.symm
 #align category_theory.cokernel_unop_unop CategoryTheory.cokernelUnopUnop
+-/
 
+#print CategoryTheory.imageUnopOp /-
 /-- The opposite of the image of `g.unop` is the image of `g.` -/
 def imageUnopOp : Opposite.op (image g.unop) ≅ image g :=
   (Abelian.imageIsoImage _).op ≪≫
     (cokernelOpOp _).symm ≪≫
-      cokernelIsoOfEq (Cokernel.π_unop _) ≪≫
+      cokernelIsoOfEq (cokernel.π_unop _) ≪≫
         cokernelEpiComp _ _ ≪≫ cokernelCompIsIso _ _ ≪≫ Abelian.coimageIsoImage' _
 #align category_theory.image_unop_op CategoryTheory.imageUnopOp
+-/
 
+#print CategoryTheory.imageOpOp /-
 /-- The opposite of the image of `f` is the image of `f.op`. -/
 def imageOpOp : Opposite.op (image f) ≅ image f.op :=
   imageUnopOp f.op
 #align category_theory.image_op_op CategoryTheory.imageOpOp
+-/
 
+#print CategoryTheory.imageOpUnop /-
 /-- The image of `f.op` is the opposite of the image of `f`. -/
 def imageOpUnop : (image f.op).unop ≅ image f :=
   (imageUnopOp f.op).unop
 #align category_theory.image_op_unop CategoryTheory.imageOpUnop
+-/
 
+#print CategoryTheory.imageUnopUnop /-
 /-- The image of `g` is the opposite of the image of `g.unop.` -/
 def imageUnopUnop : (image g).unop ≅ image g.unop :=
   (imageUnopOp g).unop
 #align category_theory.image_unop_unop CategoryTheory.imageUnopUnop
+-/
 
+#print CategoryTheory.image_ι_op_comp_imageUnopOp_hom /-
 theorem image_ι_op_comp_imageUnopOp_hom :
     (image.ι g.unop).op ≫ (imageUnopOp g).Hom = factorThruImage g :=
   by
@@ -177,22 +210,29 @@ theorem image_ι_op_comp_imageUnopOp_hom :
   simp only [category.assoc, abelian.image_iso_image_hom_comp_image_ι, kernel.lift_ι,
     Quiver.Hom.op_unop, cokernel.π_desc]
 #align category_theory.image_ι_op_comp_image_unop_op_hom CategoryTheory.image_ι_op_comp_imageUnopOp_hom
+-/
 
+#print CategoryTheory.imageUnopOp_hom_comp_image_ι /-
 theorem imageUnopOp_hom_comp_image_ι :
     (imageUnopOp g).Hom ≫ image.ι g = (factorThruImage g.unop).op := by
   simp only [← cancel_epi (image.ι g.unop).op, ← category.assoc, image_ι_op_comp_image_unop_op_hom,
     ← op_comp, image.fac, Quiver.Hom.op_unop]
 #align category_theory.image_unop_op_hom_comp_image_ι CategoryTheory.imageUnopOp_hom_comp_image_ι
+-/
 
+#print CategoryTheory.factorThruImage_comp_imageUnopOp_inv /-
 theorem factorThruImage_comp_imageUnopOp_inv :
     factorThruImage g ≫ (imageUnopOp g).inv = (image.ι g.unop).op := by
   rw [iso.comp_inv_eq, image_ι_op_comp_image_unop_op_hom]
 #align category_theory.factor_thru_image_comp_image_unop_op_inv CategoryTheory.factorThruImage_comp_imageUnopOp_inv
+-/
 
+#print CategoryTheory.imageUnopOp_inv_comp_op_factorThruImage /-
 theorem imageUnopOp_inv_comp_op_factorThruImage :
     (imageUnopOp g).inv ≫ (factorThruImage g.unop).op = image.ι g := by
   rw [iso.inv_comp_eq, image_unop_op_hom_comp_image_ι]
 #align category_theory.image_unop_op_inv_comp_op_factor_thru_image CategoryTheory.imageUnopOp_inv_comp_op_factorThruImage
+-/
 
 end
 

Changes in mathlib4

mathlib3
mathlib4
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
@@ -22,14 +22,14 @@ open CategoryTheory.Limits
 
 variable (C : Type*) [Category C] [Abelian C]
 
--- porting note: these local instances do not seem to be necessary
+-- Porting note: these local instances do not seem to be necessary
 --attribute [local instance]
 --  hasFiniteLimits_of_hasEqualizers_and_finite_products
 --  hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts
 --  Abelian.hasFiniteBiproducts
 
 instance : Abelian Cᵒᵖ := by
-  -- porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have
+  -- Porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have
   -- been set to 90 in `Abelian.Basic` in order to prevent a timeout here
   exact {
     normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop)
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
@@ -20,7 +20,7 @@ namespace CategoryTheory
 
 open CategoryTheory.Limits
 
-variable (C : Type _) [Category C] [Abelian C]
+variable (C : Type*) [Category C] [Abelian C]
 
 -- porting note: these local instances do not seem to be necessary
 --attribute [local instance]
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,16 +2,13 @@
 Copyright (c) 2021 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.abelian.opposite
-! leanprover-community/mathlib commit a5ff45a1c92c278b03b52459a620cfd9c49ebc80
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Abelian.Basic
 import Mathlib.CategoryTheory.Preadditive.Opposite
 import Mathlib.CategoryTheory.Limits.Opposites
 
+#align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80"
+
 /-!
 # The opposite of an abelian category is abelian.
 -/
feat: more consistent use of ext, and updating porting notes. (#5242)

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

Diff
@@ -56,12 +56,10 @@ def kernelOpUnop : (kernel f.op).unop ≅ cokernel f where
   hom_inv_id := by
     rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp]
     congr 1
-    dsimp
-    apply equalizer.hom_ext
+    ext
     simp [← op_comp]
   inv_hom_id := by
-    dsimp
-    apply coequalizer.hom_ext
+    ext
     simp [← unop_comp]
 #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop
 
@@ -78,12 +76,10 @@ def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f where
   hom_inv_id := by
     rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp]
     congr 1
-    dsimp
-    apply coequalizer.hom_ext
+    ext
     simp [← op_comp]
   inv_hom_id := by
-    dsimp
-    apply equalizer.hom_ext
+    ext
     simp [← unop_comp]
 #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop
 
chore: forward-port backports (#3752)

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

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.abelian.opposite
-! leanprover-community/mathlib commit 8c75ef3517d4106e89fe524e6281d0b0545f47fc
+! leanprover-community/mathlib commit a5ff45a1c92c278b03b52459a620cfd9c49ebc80
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -29,6 +29,7 @@ variable (C : Type _) [Category C] [Abelian C]
 --attribute [local instance]
 --  hasFiniteLimits_of_hasEqualizers_and_finite_products
 --  hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts
+--  Abelian.hasFiniteBiproducts
 
 instance : Abelian Cᵒᵖ := by
   -- porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have
feat: port CategoryTheory.Abelian.Opposite (#3595)

Dependencies 8 + 455

456 files ported (98.3%)
182213 lines ported (98.3%)
Show graph

The unported dependencies are