category_theory.preadditive.projectiveMathlib.CategoryTheory.Preadditive.Projective

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)

(last sync)

chore(category_theory/limits/preserves/finite): avoid instances with unbound universes (#18890)

There were some instances with unbounded universe variables, which Lean 4 couldn't cope with (reasonably!).

This PR backports some changes made in https://github.com/leanprover-community/mathlib4/pull/3615 to remove these bad instances.

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

Diff
@@ -203,7 +203,7 @@ lemma projective_of_map_projective (adj : F ⊣ G) [full F] [faithful F] (P : C)
   (hP : projective (F.obj P)) : projective P :=
 ⟨λ X Y f g, begin
   introI,
-  haveI := adj.left_adjoint_preserves_colimits,
+  haveI : preserves_colimits_of_size.{0 0} F := adj.left_adjoint_preserves_colimits,
   rcases @hP.1 (F.map f) (F.map g),
   use adj.unit.app _ ≫ G.map w ≫ (inv $ adj.unit.app _),
   refine faithful.map_injective F _,
@@ -217,7 +217,9 @@ def map_projective_presentation (adj : F ⊣ G) [G.preserves_epimorphisms] (X :
 { P := F.obj Y.P,
   projective := adj.map_projective _ Y.projective,
   f := F.map Y.f,
-  epi := by haveI := adj.left_adjoint_preserves_colimits; apply_instance }
+  epi := by
+    haveI : preserves_colimits_of_size.{0 0} F := adj.left_adjoint_preserves_colimits;
+    apply_instance }
 
 end adjunction
 namespace equivalence

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -262,8 +262,8 @@ theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : P
 -/
 
 #print CategoryTheory.Adjunction.projective_of_map_projective /-
-theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P : C)
-    (hP : Projective (F.obj P)) : Projective P :=
+theorem projective_of_map_projective (adj : F ⊣ G) [CategoryTheory.Functor.Full F]
+    [CategoryTheory.Functor.Faithful F] (P : C) (hP : Projective (F.obj P)) : Projective P :=
   ⟨fun X Y f g => by
     intro
     haveI : PreservesColimitsOfSize.{0, 0} F := adj.left_adjoint_preserves_colimits
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Markus Himmel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
 -/
-import Mathbin.Algebra.Homology.Exact
-import Mathbin.CategoryTheory.Limits.Shapes.Biproducts
-import Mathbin.CategoryTheory.Adjunction.Limits
-import Mathbin.CategoryTheory.Limits.Preserves.Finite
+import Algebra.Homology.Exact
+import CategoryTheory.Limits.Shapes.Biproducts
+import CategoryTheory.Adjunction.Limits
+import CategoryTheory.Limits.Preserves.Finite
 
 #align_import category_theory.preadditive.projective from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Markus Himmel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Homology.Exact
 import Mathbin.CategoryTheory.Limits.Shapes.Biproducts
 import Mathbin.CategoryTheory.Adjunction.Limits
 import Mathbin.CategoryTheory.Limits.Preserves.Finite
 
+#align_import category_theory.preadditive.projective from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
+
 /-!
 # Projective objects and categories with enough projectives
 
Diff
@@ -168,6 +168,7 @@ instance {β : Type v} (g : β → C) [HasZeroMorphisms C] [HasBiproduct g] [∀
     where Factors E X' f e epi :=
     ⟨biproduct.desc fun b => factor_thru (biproduct.ι g b ≫ f) e, by tidy⟩
 
+#print CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_obj /-
 theorem projective_iff_preservesEpimorphisms_coyoneda_obj (P : C) :
     Projective P ↔ (coyoneda.obj (op P)).PreservesEpimorphisms :=
   ⟨fun hP =>
@@ -179,6 +180,7 @@ theorem projective_iff_preservesEpimorphisms_coyoneda_obj (P : C) :
     ⟨fun E X f e he =>
       (epi_iff_surjective _).1 (inferInstance : epi ((coyoneda.obj (op P)).map e)) f⟩⟩
 #align category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_obj
+-/
 
 section EnoughProjectives
 
@@ -250,6 +252,7 @@ namespace Adjunction
 
 variable {D : Type _} [Category D] {F : C ⥤ D} {G : D ⥤ C}
 
+#print CategoryTheory.Adjunction.map_projective /-
 theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : Projective P) :
     Projective (F.obj P) :=
   ⟨fun X Y f g => by
@@ -259,7 +262,9 @@ theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : P
     rw [category.assoc, ← adjunction.counit_naturality, ← category.assoc, ← F.map_comp, h]
     simp⟩
 #align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projective
+-/
 
+#print CategoryTheory.Adjunction.projective_of_map_projective /-
 theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P : C)
     (hP : Projective (F.obj P)) : Projective P :=
   ⟨fun X Y f g => by
@@ -270,7 +275,9 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
     refine' faithful.map_injective F _
     simpa⟩
 #align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projective
+-/
 
+#print CategoryTheory.Adjunction.mapProjectivePresentation /-
 /-- Given an adjunction `F ⊣ G` such that `G` preserves epis, `F` maps a projective presentation of
 `X` to a projective presentation of `F(X)`. -/
 def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
@@ -283,6 +290,7 @@ def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
     haveI : PreservesColimitsOfSize.{0, 0} F := adj.left_adjoint_preserves_colimits <;>
       infer_instance
 #align category_theory.adjunction.map_projective_presentation CategoryTheory.Adjunction.mapProjectivePresentation
+-/
 
 end Adjunction
 
@@ -290,6 +298,7 @@ namespace Equivalence
 
 variable {D : Type _} [Category D] (F : C ≌ D)
 
+#print CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation /-
 /-- Given an equivalence of categories `F`, a projective presentation of `F(X)` induces a
 projective presentation of `X.` -/
 def projectivePresentationOfMapProjectivePresentation (X : C)
@@ -300,7 +309,9 @@ def projectivePresentationOfMapProjectivePresentation (X : C)
   f := F.inverse.map Y.f ≫ F.unitInv.app _
   Epi := epi_comp _ _
 #align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation
+-/
 
+#print CategoryTheory.Equivalence.enoughProjectives_iff /-
 theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProjectives D :=
   by
   constructor
@@ -314,6 +325,7 @@ theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProj
       F.projective_presentation_of_map_projective_presentation X
         (Nonempty.some (H.presentation (F.functor.obj X)))
 #align category_theory.equivalence.enough_projectives_iff CategoryTheory.Equivalence.enoughProjectives_iff
+-/
 
 end Equivalence
 
Diff
@@ -223,7 +223,8 @@ variable [HasZeroMorphisms C] {X Y : C} (f : X ⟶ Y) [HasKernel f]
 an arbitrarily chosen projective object over `kernel f`.
 -/
 def syzygies : C :=
-  over (kernel f)deriving Projective
+  over (kernel f)
+deriving Projective
 #align category_theory.projective.syzygies CategoryTheory.Projective.syzygies
 -/
 
Diff
@@ -105,7 +105,7 @@ theorem factorThru_comp {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [
 
 section
 
-open ZeroObject
+open scoped ZeroObject
 
 #print CategoryTheory.Projective.zero_projective /-
 instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C)
Diff
@@ -168,12 +168,6 @@ instance {β : Type v} (g : β → C) [HasZeroMorphisms C] [HasBiproduct g] [∀
     where Factors E X' f e epi :=
     ⟨biproduct.desc fun b => factor_thru (biproduct.ι g b ≫ f) e, by tidy⟩
 
-/- warning: category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj -> CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_obj is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] (P : C), Iff (CategoryTheory.Projective.{u1, u2} C _inst_1 P) (CategoryTheory.Functor.PreservesEpimorphisms.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.obj.{u1, max u2 u1, u2, max u1 u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.coyoneda.{u1, u2} C _inst_1) (Opposite.op.{succ u2} C P)))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] (P : C), Iff (CategoryTheory.Projective.{u1, u2} C _inst_1 P) (CategoryTheory.Functor.PreservesEpimorphisms.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} (Prefunctor.obj.{succ u1, max (succ u2) (succ u1), u2, max u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1))) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u2 (succ u1)} (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u2 (succ u1)} (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}))) (CategoryTheory.Functor.toPrefunctor.{u1, max u2 u1, u2, max u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.coyoneda.{u1, u2} C _inst_1)) (Opposite.op.{succ u2} C P)))
-Case conversion may be inaccurate. Consider using '#align category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_objₓ'. -/
 theorem projective_iff_preservesEpimorphisms_coyoneda_obj (P : C) :
     Projective P ↔ (coyoneda.obj (op P)).PreservesEpimorphisms :=
   ⟨fun hP =>
@@ -255,12 +249,6 @@ namespace Adjunction
 
 variable {D : Type _} [Category D] {F : C ⥤ D} {G : D ⥤ C}
 
-/- warning: category_theory.adjunction.map_projective -> CategoryTheory.Adjunction.map_projective is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u4, u1, u3, u2} D _inst_2 C _inst_1 G] (P : C), (CategoryTheory.Projective.{u1, u2} C _inst_1 P) -> (CategoryTheory.Projective.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F P)))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u3, u1, u4, u2} D _inst_2 C _inst_1 G] (P : C), (CategoryTheory.Projective.{u1, u2} C _inst_1 P) -> (CategoryTheory.Projective.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) P)))
-Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projectiveₓ'. -/
 theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : Projective P) :
     Projective (F.obj P) :=
   ⟨fun X Y f g => by
@@ -271,12 +259,6 @@ theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : P
     simp⟩
 #align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projective
 
-/- warning: category_theory.adjunction.projective_of_map_projective -> CategoryTheory.Adjunction.projective_of_map_projective is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Full.{u1, u4, u2, u3} C _inst_1 D _inst_2 F] [_inst_4 : CategoryTheory.Faithful.{u1, u4, u2, u3} C _inst_1 D _inst_2 F] (P : C), (CategoryTheory.Projective.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F P)) -> (CategoryTheory.Projective.{u1, u2} C _inst_1 P))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Full.{u1, u3, u2, u4} C _inst_1 D _inst_2 F] [_inst_4 : CategoryTheory.Faithful.{u1, u3, u2, u4} C _inst_1 D _inst_2 F] (P : C), (CategoryTheory.Projective.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) P)) -> (CategoryTheory.Projective.{u1, u2} C _inst_1 P))
-Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projectiveₓ'. -/
 theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P : C)
     (hP : Projective (F.obj P)) : Projective P :=
   ⟨fun X Y f g => by
@@ -288,12 +270,6 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
     simpa⟩
 #align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projective
 
-/- warning: category_theory.adjunction.map_projective_presentation -> CategoryTheory.Adjunction.mapProjectivePresentation is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u4, u1, u3, u2} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F X)))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u3, u1, u4, u2} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) X)))
-Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.map_projective_presentation CategoryTheory.Adjunction.mapProjectivePresentationₓ'. -/
 /-- Given an adjunction `F ⊣ G` such that `G` preserves epis, `F` maps a projective presentation of
 `X` to a projective presentation of `F(X)`. -/
 def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
@@ -313,12 +289,6 @@ namespace Equivalence
 
 variable {D : Type _} [Category D] (F : C ≌ D)
 
-/- warning: category_theory.equivalence.projective_presentation_of_map_projective_presentation -> CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] (F : CategoryTheory.Equivalence.{u1, u4, u2, u3} C _inst_1 D _inst_2) (X : C), (CategoryTheory.ProjectivePresentation.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 (CategoryTheory.Equivalence.functor.{u1, u4, u2, u3} C _inst_1 D _inst_2 F) X)) -> (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X)
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] (F : CategoryTheory.Equivalence.{u1, u3, u2, u4} C D _inst_1 _inst_2) (X : C), (CategoryTheory.ProjectivePresentation.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 (CategoryTheory.Equivalence.functor.{u1, u3, u2, u4} C D _inst_1 _inst_2 F)) X)) -> (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X)
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentationₓ'. -/
 /-- Given an equivalence of categories `F`, a projective presentation of `F(X)` induces a
 projective presentation of `X.` -/
 def projectivePresentationOfMapProjectivePresentation (X : C)
@@ -330,12 +300,6 @@ def projectivePresentationOfMapProjectivePresentation (X : C)
   Epi := epi_comp _ _
 #align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation
 
-/- warning: category_theory.equivalence.enough_projectives_iff -> CategoryTheory.Equivalence.enoughProjectives_iff is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D], (CategoryTheory.Equivalence.{u1, u4, u2, u3} C _inst_1 D _inst_2) -> (Iff (CategoryTheory.EnoughProjectives.{u1, u2} C _inst_1) (CategoryTheory.EnoughProjectives.{u4, u3} D _inst_2))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D], (CategoryTheory.Equivalence.{u1, u3, u2, u4} C D _inst_1 _inst_2) -> (Iff (CategoryTheory.EnoughProjectives.{u1, u2} C _inst_1) (CategoryTheory.EnoughProjectives.{u3, u4} D _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.enough_projectives_iff CategoryTheory.Equivalence.enoughProjectives_iffₓ'. -/
 theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProjectives D :=
   by
   constructor
Diff
@@ -109,9 +109,7 @@ open ZeroObject
 
 #print CategoryTheory.Projective.zero_projective /-
 instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C)
-    where Factors E X f e epi := by
-    use 0
-    ext
+    where Factors E X f e epi := by use 0; ext
 #align category_theory.projective.zero_projective CategoryTheory.Projective.zero_projective
 -/
 
@@ -136,9 +134,7 @@ theorem iso_iff {P Q : C} (i : P ≅ Q) : Projective P ↔ Projective Q :=
 /-- The axiom of choice says that every type is a projective object in `Type`. -/
 instance (X : Type u) : Projective X
     where Factors E X' f e epi :=
-    ⟨fun x => ((epi_iff_surjective _).mp epi (f x)).some,
-      by
-      ext x
+    ⟨fun x => ((epi_iff_surjective _).mp epi (f x)).some, by ext x;
       exact ((epi_iff_surjective _).mp epi (f x)).choose_spec⟩
 
 #print CategoryTheory.Projective.Type.enoughProjectives /-
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit 3974a774a707e2e06046a14c0eaef4654584fada
+! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.CategoryTheory.Limits.Preserves.Finite
 /-!
 # Projective objects and categories with enough projectives
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 An object `P` is called projective if every morphism out of `P` factors through every epimorphism.
 
 A category `C` has enough projectives if every object admits an epimorphism from some
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit f8d8465c3c392a93b9ed226956e26dee00975946
+! leanprover-community/mathlib commit 3974a774a707e2e06046a14c0eaef4654584fada
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -282,7 +282,7 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
     (hP : Projective (F.obj P)) : Projective P :=
   ⟨fun X Y f g => by
     intro
-    haveI := adj.left_adjoint_preserves_colimits
+    haveI : PreservesColimitsOfSize.{0, 0} F := adj.left_adjoint_preserves_colimits
     rcases(@hP).1 (F.map f) (F.map g) with ⟨⟩
     use adj.unit.app _ ≫ G.map w ≫ (inv <| adj.unit.app _)
     refine' faithful.map_injective F _
@@ -291,9 +291,9 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
 
 /- warning: category_theory.adjunction.map_projective_presentation -> CategoryTheory.Adjunction.mapProjectivePresentation is a dubious translation:
 lean 3 declaration is
-  forall {C : Type.{u}} [_inst_1 : CategoryTheory.Category.{v, u} C] {D : Type.{u_1}} [_inst_2 : CategoryTheory.Category.{u_2, u_1} D] {F : CategoryTheory.Functor.{v, u_2, u, u_1} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u_2, v, u_1, u} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{v, u_2, u, u_1} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u_2, v, u_1, u} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{v, u} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u_2, u_1} D _inst_2 (CategoryTheory.Functor.obj.{v, u_2, u, u_1} C _inst_1 D _inst_2 F X)))
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u4, u1, u3, u2} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F X)))
 but is expected to have type
-  forall {C : Type.{u}} [_inst_1 : CategoryTheory.Category.{v, u} C] {D : Type.{u'}} [_inst_2 : CategoryTheory.Category.{v', u'} D] {F : CategoryTheory.Functor.{v, v', u, u'} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{v', v, u', u} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{v, v', u, u'} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{v', v, u', u} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{v, u} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{v', u'} D _inst_2 (Prefunctor.obj.{succ v, succ v', u, u'} C (CategoryTheory.CategoryStruct.toQuiver.{v, u} C (CategoryTheory.Category.toCategoryStruct.{v, u} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{v', u'} D (CategoryTheory.Category.toCategoryStruct.{v', u'} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{v, v', u, u'} C _inst_1 D _inst_2 F) X)))
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u3, u1, u4, u2} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) X)))
 Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.map_projective_presentation CategoryTheory.Adjunction.mapProjectivePresentationₓ'. -/
 /-- Given an adjunction `F ⊣ G` such that `G` preserves epis, `F` maps a projective presentation of
 `X` to a projective presentation of `F(X)`. -/
@@ -303,7 +303,9 @@ def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
   p := F.obj Y.p
   Projective := adj.map_projective _ Y.Projective
   f := F.map Y.f
-  Epi := by haveI := adj.left_adjoint_preserves_colimits <;> infer_instance
+  Epi := by
+    haveI : PreservesColimitsOfSize.{0, 0} F := adj.left_adjoint_preserves_colimits <;>
+      infer_instance
 #align category_theory.adjunction.map_projective_presentation CategoryTheory.Adjunction.mapProjectivePresentation
 
 end Adjunction
Diff
@@ -43,15 +43,18 @@ namespace CategoryTheory
 
 variable {C : Type u} [Category.{v} C]
 
+#print CategoryTheory.Projective /-
 /--
 An object `P` is called projective if every morphism out of `P` factors through every epimorphism.
 -/
 class Projective (P : C) : Prop where
   Factors : ∀ {E X : C} (f : P ⟶ X) (e : E ⟶ X) [Epi e], ∃ f', f' ≫ e = f
 #align category_theory.projective CategoryTheory.Projective
+-/
 
 section
 
+#print CategoryTheory.ProjectivePresentation /-
 /-- A projective presentation of an object `X` consists of an epimorphism `f : P ⟶ X`
 from some projective object `P`.
 -/
@@ -62,46 +65,56 @@ structure ProjectivePresentation (X : C) where
   f : P ⟶ X
   Epi : Epi f := by infer_instance
 #align category_theory.projective_presentation CategoryTheory.ProjectivePresentation
+-/
 
 attribute [instance] projective_presentation.projective projective_presentation.epi
 
 variable (C)
 
+#print CategoryTheory.EnoughProjectives /-
 /-- A category "has enough projectives" if for every object `X` there is a projective object `P` and
     an epimorphism `P ↠ X`. -/
 class EnoughProjectives : Prop where
   presentation : ∀ X : C, Nonempty (ProjectivePresentation X)
 #align category_theory.enough_projectives CategoryTheory.EnoughProjectives
+-/
 
 end
 
 namespace Projective
 
+#print CategoryTheory.Projective.factorThru /-
 /--
 An arbitrarily chosen factorisation of a morphism out of a projective object through an epimorphism.
 -/
 def factorThru {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [Epi e] : P ⟶ E :=
   (Projective.factors f e).some
 #align category_theory.projective.factor_thru CategoryTheory.Projective.factorThru
+-/
 
+#print CategoryTheory.Projective.factorThru_comp /-
 @[simp]
 theorem factorThru_comp {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [Epi e] :
     factorThru f e ≫ e = f :=
   (Projective.factors f e).choose_spec
 #align category_theory.projective.factor_thru_comp CategoryTheory.Projective.factorThru_comp
+-/
 
 section
 
 open ZeroObject
 
+#print CategoryTheory.Projective.zero_projective /-
 instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C)
     where Factors E X f e epi := by
     use 0
     ext
 #align category_theory.projective.zero_projective CategoryTheory.Projective.zero_projective
+-/
 
 end
 
+#print CategoryTheory.Projective.of_iso /-
 theorem of_iso {P Q : C} (i : P ≅ Q) (hP : Projective P) : Projective Q :=
   by
   fconstructor
@@ -109,10 +122,13 @@ theorem of_iso {P Q : C} (i : P ≅ Q) (hP : Projective P) : Projective Q :=
   obtain ⟨f', hf'⟩ := projective.factors (i.hom ≫ f) e
   exact ⟨i.inv ≫ f', by simp [hf']⟩
 #align category_theory.projective.of_iso CategoryTheory.Projective.of_iso
+-/
 
+#print CategoryTheory.Projective.iso_iff /-
 theorem iso_iff {P Q : C} (i : P ≅ Q) : Projective P ↔ Projective Q :=
   ⟨of_iso i, of_iso i.symm⟩
 #align category_theory.projective.iso_iff CategoryTheory.Projective.iso_iff
+-/
 
 /-- The axiom of choice says that every type is a projective object in `Type`. -/
 instance (X : Type u) : Projective X
@@ -122,11 +138,13 @@ instance (X : Type u) : Projective X
       ext x
       exact ((epi_iff_surjective _).mp epi (f x)).choose_spec⟩
 
+#print CategoryTheory.Projective.Type.enoughProjectives /-
 instance Type.enoughProjectives : EnoughProjectives (Type u)
     where presentation X :=
     ⟨{  p := X
         f := 𝟙 X }⟩
 #align category_theory.projective.Type.enough_projectives CategoryTheory.Projective.Type.enoughProjectives
+-/
 
 instance {P Q : C} [HasBinaryCoproduct P Q] [Projective P] [Projective Q] : Projective (P ⨿ Q)
     where Factors E X' f e epi :=
@@ -151,6 +169,12 @@ instance {β : Type v} (g : β → C) [HasZeroMorphisms C] [HasBiproduct g] [∀
     where Factors E X' f e epi :=
     ⟨biproduct.desc fun b => factor_thru (biproduct.ι g b ≫ f) e, by tidy⟩
 
+/- warning: category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj -> CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_obj is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] (P : C), Iff (CategoryTheory.Projective.{u1, u2} C _inst_1 P) (CategoryTheory.Functor.PreservesEpimorphisms.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.obj.{u1, max u2 u1, u2, max u1 u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.coyoneda.{u1, u2} C _inst_1) (Opposite.op.{succ u2} C P)))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] (P : C), Iff (CategoryTheory.Projective.{u1, u2} C _inst_1 P) (CategoryTheory.Functor.PreservesEpimorphisms.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} (Prefunctor.obj.{succ u1, max (succ u2) (succ u1), u2, max u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1))) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u2 (succ u1)} (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u2 (succ u1)} (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}))) (CategoryTheory.Functor.toPrefunctor.{u1, max u2 u1, u2, max u2 (succ u1)} (Opposite.{succ u2} C) (CategoryTheory.Category.opposite.{u1, u2} C _inst_1) (CategoryTheory.Functor.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.Functor.category.{u1, u1, u2, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (CategoryTheory.coyoneda.{u1, u2} C _inst_1)) (Opposite.op.{succ u2} C P)))
+Case conversion may be inaccurate. Consider using '#align category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_objₓ'. -/
 theorem projective_iff_preservesEpimorphisms_coyoneda_obj (P : C) :
     Projective P ↔ (coyoneda.obj (op P)).PreservesEpimorphisms :=
   ⟨fun hP =>
@@ -167,39 +191,50 @@ section EnoughProjectives
 
 variable [EnoughProjectives C]
 
+#print CategoryTheory.Projective.over /-
 /-- `projective.over X` provides an arbitrarily chosen projective object equipped with
 an epimorphism `projective.π : projective.over X ⟶ X`.
 -/
 def over (X : C) : C :=
   (EnoughProjectives.presentation X).some.p
 #align category_theory.projective.over CategoryTheory.Projective.over
+-/
 
+#print CategoryTheory.Projective.projective_over /-
 instance projective_over (X : C) : Projective (over X) :=
   (EnoughProjectives.presentation X).some.Projective
 #align category_theory.projective.projective_over CategoryTheory.Projective.projective_over
+-/
 
+#print CategoryTheory.Projective.π /-
 /-- The epimorphism `projective.π : projective.over X ⟶ X`
 from the arbitrarily chosen projective object over `X`.
 -/
 def π (X : C) : over X ⟶ X :=
   (EnoughProjectives.presentation X).some.f
 #align category_theory.projective.π CategoryTheory.Projective.π
+-/
 
+#print CategoryTheory.Projective.π_epi /-
 instance π_epi (X : C) : Epi (π X) :=
   (EnoughProjectives.presentation X).some.Epi
 #align category_theory.projective.π_epi CategoryTheory.Projective.π_epi
+-/
 
 section
 
 variable [HasZeroMorphisms C] {X Y : C} (f : X ⟶ Y) [HasKernel f]
 
+#print CategoryTheory.Projective.syzygies /-
 /-- When `C` has enough projectives, the object `projective.syzygies f` is
 an arbitrarily chosen projective object over `kernel f`.
 -/
 def syzygies : C :=
   over (kernel f)deriving Projective
 #align category_theory.projective.syzygies CategoryTheory.Projective.syzygies
+-/
 
+#print CategoryTheory.Projective.d /-
 /-- When `C` has enough projectives,
 `projective.d f : projective.syzygies f ⟶ X` is the composition
 `π (kernel f) ≫ kernel.ι f`.
@@ -209,6 +244,7 @@ def syzygies : C :=
 abbrev d : syzygies f ⟶ X :=
   π (kernel f) ≫ kernel.ι f
 #align category_theory.projective.d CategoryTheory.Projective.d
+-/
 
 end
 
@@ -220,6 +256,12 @@ namespace Adjunction
 
 variable {D : Type _} [Category D] {F : C ⥤ D} {G : D ⥤ C}
 
+/- warning: category_theory.adjunction.map_projective -> CategoryTheory.Adjunction.map_projective is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u4, u1, u3, u2} D _inst_2 C _inst_1 G] (P : C), (CategoryTheory.Projective.{u1, u2} C _inst_1 P) -> (CategoryTheory.Projective.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F P)))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u3, u1, u4, u2} D _inst_2 C _inst_1 G] (P : C), (CategoryTheory.Projective.{u1, u2} C _inst_1 P) -> (CategoryTheory.Projective.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) P)))
+Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projectiveₓ'. -/
 theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : Projective P) :
     Projective (F.obj P) :=
   ⟨fun X Y f g => by
@@ -230,6 +272,12 @@ theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : P
     simp⟩
 #align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projective
 
+/- warning: category_theory.adjunction.projective_of_map_projective -> CategoryTheory.Adjunction.projective_of_map_projective is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] {F : CategoryTheory.Functor.{u1, u4, u2, u3} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u4, u1, u3, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u4, u2, u3} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Full.{u1, u4, u2, u3} C _inst_1 D _inst_2 F] [_inst_4 : CategoryTheory.Faithful.{u1, u4, u2, u3} C _inst_1 D _inst_2 F] (P : C), (CategoryTheory.Projective.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 F P)) -> (CategoryTheory.Projective.{u1, u2} C _inst_1 P))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] {F : CategoryTheory.Functor.{u1, u3, u2, u4} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u3, u1, u4, u2} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{u1, u3, u2, u4} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Full.{u1, u3, u2, u4} C _inst_1 D _inst_2 F] [_inst_4 : CategoryTheory.Faithful.{u1, u3, u2, u4} C _inst_1 D _inst_2 F] (P : C), (CategoryTheory.Projective.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 F) P)) -> (CategoryTheory.Projective.{u1, u2} C _inst_1 P))
+Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projectiveₓ'. -/
 theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P : C)
     (hP : Projective (F.obj P)) : Projective P :=
   ⟨fun X Y f g => by
@@ -241,6 +289,12 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
     simpa⟩
 #align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projective
 
+/- warning: category_theory.adjunction.map_projective_presentation -> CategoryTheory.Adjunction.mapProjectivePresentation is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u}} [_inst_1 : CategoryTheory.Category.{v, u} C] {D : Type.{u_1}} [_inst_2 : CategoryTheory.Category.{u_2, u_1} D] {F : CategoryTheory.Functor.{v, u_2, u, u_1} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{u_2, v, u_1, u} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{v, u_2, u, u_1} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{u_2, v, u_1, u} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{v, u} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{u_2, u_1} D _inst_2 (CategoryTheory.Functor.obj.{v, u_2, u, u_1} C _inst_1 D _inst_2 F X)))
+but is expected to have type
+  forall {C : Type.{u}} [_inst_1 : CategoryTheory.Category.{v, u} C] {D : Type.{u'}} [_inst_2 : CategoryTheory.Category.{v', u'} D] {F : CategoryTheory.Functor.{v, v', u, u'} C _inst_1 D _inst_2} {G : CategoryTheory.Functor.{v', v, u', u} D _inst_2 C _inst_1}, (CategoryTheory.Adjunction.{v, v', u, u'} C _inst_1 D _inst_2 F G) -> (forall [_inst_3 : CategoryTheory.Functor.PreservesEpimorphisms.{v', v, u', u} D _inst_2 C _inst_1 G] (X : C), (CategoryTheory.ProjectivePresentation.{v, u} C _inst_1 X) -> (CategoryTheory.ProjectivePresentation.{v', u'} D _inst_2 (Prefunctor.obj.{succ v, succ v', u, u'} C (CategoryTheory.CategoryStruct.toQuiver.{v, u} C (CategoryTheory.Category.toCategoryStruct.{v, u} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{v', u'} D (CategoryTheory.Category.toCategoryStruct.{v', u'} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{v, v', u, u'} C _inst_1 D _inst_2 F) X)))
+Case conversion may be inaccurate. Consider using '#align category_theory.adjunction.map_projective_presentation CategoryTheory.Adjunction.mapProjectivePresentationₓ'. -/
 /-- Given an adjunction `F ⊣ G` such that `G` preserves epis, `F` maps a projective presentation of
 `X` to a projective presentation of `F(X)`. -/
 def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
@@ -258,6 +312,12 @@ namespace Equivalence
 
 variable {D : Type _} [Category D] (F : C ≌ D)
 
+/- warning: category_theory.equivalence.projective_presentation_of_map_projective_presentation -> CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D] (F : CategoryTheory.Equivalence.{u1, u4, u2, u3} C _inst_1 D _inst_2) (X : C), (CategoryTheory.ProjectivePresentation.{u4, u3} D _inst_2 (CategoryTheory.Functor.obj.{u1, u4, u2, u3} C _inst_1 D _inst_2 (CategoryTheory.Equivalence.functor.{u1, u4, u2, u3} C _inst_1 D _inst_2 F) X)) -> (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X)
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D] (F : CategoryTheory.Equivalence.{u1, u3, u2, u4} C D _inst_1 _inst_2) (X : C), (CategoryTheory.ProjectivePresentation.{u3, u4} D _inst_2 (Prefunctor.obj.{succ u1, succ u3, u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u4} D (CategoryTheory.Category.toCategoryStruct.{u3, u4} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u3, u2, u4} C _inst_1 D _inst_2 (CategoryTheory.Equivalence.functor.{u1, u3, u2, u4} C D _inst_1 _inst_2 F)) X)) -> (CategoryTheory.ProjectivePresentation.{u1, u2} C _inst_1 X)
+Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentationₓ'. -/
 /-- Given an equivalence of categories `F`, a projective presentation of `F(X)` induces a
 projective presentation of `X.` -/
 def projectivePresentationOfMapProjectivePresentation (X : C)
@@ -269,6 +329,12 @@ def projectivePresentationOfMapProjectivePresentation (X : C)
   Epi := epi_comp _ _
 #align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation
 
+/- warning: category_theory.equivalence.enough_projectives_iff -> CategoryTheory.Equivalence.enoughProjectives_iff is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u3}} [_inst_2 : CategoryTheory.Category.{u4, u3} D], (CategoryTheory.Equivalence.{u1, u4, u2, u3} C _inst_1 D _inst_2) -> (Iff (CategoryTheory.EnoughProjectives.{u1, u2} C _inst_1) (CategoryTheory.EnoughProjectives.{u4, u3} D _inst_2))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u3, u4} D], (CategoryTheory.Equivalence.{u1, u3, u2, u4} C D _inst_1 _inst_2) -> (Iff (CategoryTheory.EnoughProjectives.{u1, u2} C _inst_1) (CategoryTheory.EnoughProjectives.{u3, u4} D _inst_2))
+Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.enough_projectives_iff CategoryTheory.Equivalence.enoughProjectives_iffₓ'. -/
 theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProjectives D :=
   by
   constructor
@@ -291,6 +357,7 @@ section
 
 variable [HasZeroMorphisms C] [HasEqualizers C] [HasImages C]
 
+#print CategoryTheory.Exact.lift /-
 /-- Given a projective object `P` mapping via `h` into
 the middle object `R` of a pair of exact morphisms `f : Q ⟶ R` and `g : R ⟶ S`,
 such that `h ≫ g = 0`, there is a lift of `h` to `Q`.
@@ -300,7 +367,9 @@ def Exact.lift {P Q R S : C} [Projective P] (h : P ⟶ R) (f : Q ⟶ R) (g : R 
   factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g hfg.w))
     (factorThruImageSubobject f)
 #align category_theory.exact.lift CategoryTheory.Exact.lift
+-/
 
+#print CategoryTheory.Exact.lift_comp /-
 @[simp]
 theorem Exact.lift_comp {P Q R S : C} [Projective P] (h : P ⟶ R) (f : Q ⟶ R) (g : R ⟶ S)
     (hfg : Exact f g) (w : h ≫ g = 0) : Exact.lift h f g hfg w ≫ f = h :=
@@ -313,6 +382,7 @@ theorem Exact.lift_comp {P Q R S : C} [Projective P] (h : P ⟶ R) (f : Q ⟶ R)
   rw [← category.assoc, factor_thru_comp, ← imageToKernel_arrow, ← category.assoc,
     CategoryTheory.Projective.factorThru_comp, factor_thru_kernel_subobject_comp_arrow]
 #align category_theory.exact.lift_comp CategoryTheory.Exact.lift_comp
+-/
 
 end
 
Diff
@@ -4,17 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit 09f981f72d43749f1fa072deade828d9c1e185bb
+! leanprover-community/mathlib commit f8d8465c3c392a93b9ed226956e26dee00975946
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Homology.Exact
-import Mathbin.CategoryTheory.Types
 import Mathbin.CategoryTheory.Limits.Shapes.Biproducts
 import Mathbin.CategoryTheory.Adjunction.Limits
-import Mathbin.CategoryTheory.Preadditive.Yoneda.Basic
-import Mathbin.Algebra.Category.Group.EpiMono
-import Mathbin.Algebra.Category.Module.EpiMono
+import Mathbin.CategoryTheory.Limits.Preserves.Finite
 
 /-!
 # Projective objects and categories with enough projectives
@@ -60,7 +57,7 @@ from some projective object `P`.
 -/
 @[nolint has_nonempty_instance]
 structure ProjectivePresentation (X : C) where
-  P : C
+  p : C
   Projective : Projective P := by infer_instance
   f : P ⟶ X
   Epi : Epi f := by infer_instance
@@ -127,7 +124,7 @@ instance (X : Type u) : Projective X
 
 instance Type.enoughProjectives : EnoughProjectives (Type u)
     where presentation X :=
-    ⟨{  P := X
+    ⟨{  p := X
         f := 𝟙 X }⟩
 #align category_theory.projective.Type.enough_projectives CategoryTheory.Projective.Type.enoughProjectives
 
@@ -166,38 +163,6 @@ theorem projective_iff_preservesEpimorphisms_coyoneda_obj (P : C) :
       (epi_iff_surjective _).1 (inferInstance : epi ((coyoneda.obj (op P)).map e)) f⟩⟩
 #align category_theory.projective.projective_iff_preserves_epimorphisms_coyoneda_obj CategoryTheory.Projective.projective_iff_preservesEpimorphisms_coyoneda_obj
 
-section Preadditive
-
-variable [Preadditive C]
-
-theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
-    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms :=
-  by
-  rw [projective_iff_preserves_epimorphisms_coyoneda_obj]
-  refine' ⟨fun h : (preadditive_coyoneda.obj (op P) ⋙ forget _).PreservesEpimorphisms => _, _⟩
-  ·
-    exact
-      functor.preserves_epimorphisms_of_preserves_of_reflects (preadditive_coyoneda.obj (op P))
-        (forget _)
-  · intro
-    exact (inferInstance : (preadditive_coyoneda.obj (op P) ⋙ forget _).PreservesEpimorphisms)
-#align category_theory.projective.projective_iff_preserves_epimorphisms_preadditive_coyoneda_obj CategoryTheory.Projective.projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj
-
-theorem projective_iff_preservesEpimorphisms_preadditive_coyoneda_obj' (P : C) :
-    Projective P ↔ (preadditiveCoyonedaObj (op P)).PreservesEpimorphisms :=
-  by
-  rw [projective_iff_preserves_epimorphisms_coyoneda_obj]
-  refine' ⟨fun h : (preadditive_coyoneda_obj (op P) ⋙ forget _).PreservesEpimorphisms => _, _⟩
-  ·
-    exact
-      functor.preserves_epimorphisms_of_preserves_of_reflects (preadditive_coyoneda_obj (op P))
-        (forget _)
-  · intro
-    exact (inferInstance : (preadditive_coyoneda_obj (op P) ⋙ forget _).PreservesEpimorphisms)
-#align category_theory.projective.projective_iff_preserves_epimorphisms_preadditive_coyoneda_obj' CategoryTheory.Projective.projective_iff_preservesEpimorphisms_preadditive_coyoneda_obj'
-
-end Preadditive
-
 section EnoughProjectives
 
 variable [EnoughProjectives C]
@@ -206,7 +171,7 @@ variable [EnoughProjectives C]
 an epimorphism `projective.π : projective.over X ⟶ X`.
 -/
 def over (X : C) : C :=
-  (EnoughProjectives.presentation X).some.P
+  (EnoughProjectives.presentation X).some.p
 #align category_theory.projective.over CategoryTheory.Projective.over
 
 instance projective_over (X : C) : Projective (over X) :=
@@ -281,7 +246,7 @@ theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P :
 def mapProjectivePresentation (adj : F ⊣ G) [G.PreservesEpimorphisms] (X : C)
     (Y : ProjectivePresentation X) : ProjectivePresentation (F.obj X)
     where
-  P := F.obj Y.P
+  p := F.obj Y.p
   Projective := adj.map_projective _ Y.Projective
   f := F.map Y.f
   Epi := by haveI := adj.left_adjoint_preserves_colimits <;> infer_instance
@@ -298,8 +263,8 @@ projective presentation of `X.` -/
 def projectivePresentationOfMapProjectivePresentation (X : C)
     (Y : ProjectivePresentation (F.Functor.obj X)) : ProjectivePresentation X
     where
-  P := F.inverse.obj Y.P
-  Projective := Adjunction.map_projective F.symm.toAdjunction Y.P Y.Projective
+  p := F.inverse.obj Y.p
+  Projective := Adjunction.map_projective F.symm.toAdjunction Y.p Y.Projective
   f := F.inverse.map Y.f ≫ F.unitInv.app _
   Epi := epi_comp _ _
 #align category_theory.equivalence.projective_presentation_of_map_projective_presentation CategoryTheory.Equivalence.projectivePresentationOfMapProjectivePresentation
Diff
@@ -4,14 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit 956af7c76589f444f2e1313911bad16366ea476d
+! leanprover-community/mathlib commit 09f981f72d43749f1fa072deade828d9c1e185bb
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Homology.Exact
 import Mathbin.CategoryTheory.Types
 import Mathbin.CategoryTheory.Limits.Shapes.Biproducts
-import Mathbin.CategoryTheory.Preadditive.Yoneda
+import Mathbin.CategoryTheory.Adjunction.Limits
+import Mathbin.CategoryTheory.Preadditive.Yoneda.Basic
 import Mathbin.Algebra.Category.Group.EpiMono
 import Mathbin.Algebra.Category.Module.EpiMono
 

Changes in mathlib4

mathlib3
mathlib4
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -54,7 +54,7 @@ section
 /-- A projective presentation of an object `X` consists of an epimorphism `f : P ⟶ X`
 from some projective object `P`.
 -/
--- Porting note: was @[nolint has_nonempty_instance]
+-- Porting note(#5171): was @[nolint has_nonempty_instance]
 structure ProjectivePresentation (X : C) where
   p : C
   [projective : Projective p]
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

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

Diff
@@ -214,14 +214,13 @@ theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : P
     simp
 #align category_theory.adjunction.map_projective CategoryTheory.Adjunction.map_projective
 
-theorem projective_of_map_projective (adj : F ⊣ G) [Full F] [Faithful F] (P : C)
+theorem projective_of_map_projective (adj : F ⊣ G) [F.Full] [F.Faithful] (P : C)
     (hP : Projective (F.obj P)) : Projective P where
   factors f g _ := by
     haveI := Adjunction.leftAdjointPreservesColimits.{0, 0} adj
     rcases (@hP).1 (F.map f) (F.map g) with ⟨f', hf'⟩
     use adj.unit.app _ ≫ G.map f' ≫ (inv <| adj.unit.app _)
-    refine' Faithful.map_injective (F := F) _
-    simpa
+    exact F.map_injective (by simpa)
 #align category_theory.adjunction.projective_of_map_projective CategoryTheory.Adjunction.projective_of_map_projective
 
 /-- Given an adjunction `F ⊣ G` such that `G` preserves epis, `F` maps a projective presentation of
refactor(Algebra/Homology): use the new homology API (#8706)

This PR refactors the construction of left derived functors using the new homology API: this also affects the dependencies (Ext functors, group cohomology, local cohomology). As a result, the old homology API is no longer used in any significant way in mathlib. Then, with this PR, the homology refactor is essentially complete.

The organization of the files was made more coherent: the definition of a projective resolution is in Preadditive.ProjectiveResolution, the existence of resolutions when there are enough projectives is shown in Abelian.ProjectiveResolution, and the left derived functor is constructed in Abelian.LeftDerived; the dual results are in Preadditive.InjectiveResolution, Abelian.InjectiveResolution and Abelian.RightDerived.

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

Diff
@@ -83,7 +83,7 @@ def factorThru {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [Epi e] :
   (Projective.factors f e).choose
 #align category_theory.projective.factor_thru CategoryTheory.Projective.factorThru
 
-@[simp]
+@[reassoc (attr := simp)]
 theorem factorThru_comp {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [Epi e] :
     factorThru f e ≫ e = f :=
   (Projective.factors f e).choose_spec
fix: remove unused arguments (#8380)

These are split from #8226 (and subsequent changes in #8366), and arise from the fact the latest Lean is better at detecting these due to better abstraction.

I can't comment on whether any of these should be concerning, but putting them in a small commit makes it easier for someone to find and review them later.

Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -93,7 +93,7 @@ section
 
 open ZeroObject
 
-instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C) :=
+instance zero_projective [HasZeroObject C] : Projective (0 : C) :=
   (isZero_zero C).projective
 #align category_theory.projective.zero_projective CategoryTheory.Projective.zero_projective
 
refactor(Algebra/Homology): remove single₀ (#8208)

This PR removes the special definitions of single₀ for chain and cochain complexes, so as to avoid duplication of code with HomologicalComplex.single which is the functor constructing the complex that is supported by a single arbitrary degree. single₀ was supposed to have better definitional properties, but it turns out that in Lean4, it is no longer true (at least for the action of this functor on objects). The computation of the homology of these single complexes is generalized for HomologicalComplex.single using the new homology API: this result is moved to a separate file Algebra.Homology.SingleHomology.

Diff
@@ -46,6 +46,9 @@ class Projective (P : C) : Prop where
   factors : ∀ {E X : C} (f : P ⟶ X) (e : E ⟶ X) [Epi e], ∃ f', f' ≫ e = f
 #align category_theory.projective CategoryTheory.Projective
 
+lemma Limits.IsZero.projective {X : C} (h : IsZero X) : Projective X where
+  factors _ _ _ := ⟨h.to_ _, h.eq_of_src _ _⟩
+
 section
 
 /-- A projective presentation of an object `X` consists of an epimorphism `f : P ⟶ X`
@@ -90,8 +93,8 @@ section
 
 open ZeroObject
 
-instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C) where
-  factors f e _ := ⟨0, by ext⟩
+instance zero_projective [HasZeroObject C] [HasZeroMorphisms C] : Projective (0 : C) :=
+  (isZero_zero C).projective
 #align category_theory.projective.zero_projective CategoryTheory.Projective.zero_projective
 
 end
chore: fix some cases in names (#7469)

And fix some names in comments where this revealed issues

Diff
@@ -23,7 +23,7 @@ projective object.
 epimorphism.
 
 Given a morphism `f : X ⟶ Y`, `CategoryTheory.Projective.left f` is a projective object over
-`CategoryTheory.Limits.kernel f`, and `projective.d f : projective.left f ⟶ X` is the morphism
+`CategoryTheory.Limits.kernel f`, and `Projective.d f : Projective.left f ⟶ X` is the morphism
 `π (kernel f) ≫ kernel.ι f`.
 
 -/
@@ -174,7 +174,7 @@ section
 
 variable [HasZeroMorphisms C] {X Y : C} (f : X ⟶ Y) [HasKernel f]
 
-/-- When `C` has enough projectives, the object `projective.syzygies f` is
+/-- When `C` has enough projectives, the object `Projective.syzygies f` is
 an arbitrarily chosen projective object over `kernel f`.
 -/
 def syzygies : C := over (kernel f)
@@ -183,7 +183,7 @@ def syzygies : C := over (kernel f)
 instance : Projective (syzygies f) := inferInstanceAs (Projective (over _))
 
 /-- When `C` has enough projectives,
-`projective.d f : projective.syzygies f ⟶ X` is the composition
+`Projective.d f : Projective.syzygies f ⟶ X` is the composition
 `π (kernel f) ≫ kernel.ι f`.
 
 (When `C` is abelian, we have `exact (projective.d f) f`.)
chore(GroupCat/Injective): golf (#7204)

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -237,6 +237,9 @@ namespace Equivalence
 
 variable {D : Type u'} [Category.{v'} D] (F : C ≌ D)
 
+theorem map_projective_iff (P : C) : Projective (F.functor.obj P) ↔ Projective P :=
+  ⟨F.toAdjunction.projective_of_map_projective P, F.toAdjunction.map_projective P⟩
+
 /-- Given an equivalence of categories `F`, a projective presentation of `F(X)` induces a
 projective presentation of `X.` -/
 def projectivePresentationOfMapProjectivePresentation (X : C)
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Markus Himmel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Markus Himmel, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit 3974a774a707e2e06046a14c0eaef4654584fada
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Homology.Exact
 import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
 import Mathlib.CategoryTheory.Adjunction.Limits
 import Mathlib.CategoryTheory.Limits.Preserves.Finite
 
+#align_import category_theory.preadditive.projective from "leanprover-community/mathlib"@"3974a774a707e2e06046a14c0eaef4654584fada"
+
 /-!
 # Projective objects and categories with enough projectives
 
chore: fix backtick in docs (#5077)

I wrote a script to find lines that contain an odd number of backticks

Diff
@@ -26,8 +26,8 @@ projective object.
 epimorphism.
 
 Given a morphism `f : X ⟶ Y`, `CategoryTheory.Projective.left f` is a projective object over
-`CategoryTheory.Limits.kernel f`, and `projective.d f : projective.left f ⟶ X` is the morphism `π
-(kernel f) ≫ kernel.ι f`.
+`CategoryTheory.Limits.kernel f`, and `projective.d f : projective.left f ⟶ X` is the morphism
+`π (kernel f) ≫ kernel.ι f`.
 
 -/
 
chore: cleanup Discrete porting notes (#4780)

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

Diff
@@ -123,17 +123,9 @@ instance {P Q : C} [HasBinaryCoproduct P Q] [Projective P] [Projective Q] : Proj
   factors f e epi := ⟨coprod.desc (factorThru (coprod.inl ≫ f) e) (factorThru (coprod.inr ≫ f) e),
     by aesop_cat⟩
 
-section
-
--- porting note: `coprod.hom_ext` and `Sigma.hom_ext` have been added in
---   Limits.Shapes.BinaryProducts and Limits.Shapes.Products
--- attribute [local tidy] tactic.discrete_cases
-
 instance {β : Type v} (g : β → C) [HasCoproduct g] [∀ b, Projective (g b)] : Projective (∐ g) where
   factors f e epi := ⟨Sigma.desc fun b => factorThru (Sigma.ι g b ≫ f) e, by aesop_cat⟩
 
-end
-
 instance {P Q : C} [HasZeroMorphisms C] [HasBinaryBiproduct P Q] [Projective P] [Projective Q] :
     Projective (P ⊞ Q) where
   factors f e epi := ⟨biprod.desc (factorThru (biprod.inl ≫ f) e) (factorThru (biprod.inr ≫ f) e),
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: Markus Himmel, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.preadditive.projective
-! leanprover-community/mathlib commit f8d8465c3c392a93b9ed226956e26dee00975946
+! leanprover-community/mathlib commit 3974a774a707e2e06046a14c0eaef4654584fada
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
feat: port CategoryTheory.Preadditive.Projective (#3615)

Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Dependencies 3 + 306

307 files ported (99.0%)
123534 lines ported (99.2%)
Show graph

The unported dependencies are