category_theory.skeletalMathlib.CategoryTheory.Skeletal

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -54,7 +54,7 @@ in particular `F` is a (strong) equivalence and `D` is skeletal.
 -/
 structure IsSkeletonOf (F : D ⥤ C) where
   skel : Skeletal D
-  eqv : IsEquivalence F
+  eqv : CategoryTheory.Functor.IsEquivalence F
 #align category_theory.is_skeleton_of CategoryTheory.IsSkeletonOf
 -/
 
@@ -99,14 +99,15 @@ instance [Inhabited C] : Inhabited (Skeleton C) :=
 @[simps]
 noncomputable def fromSkeleton : Skeleton C ⥤ C :=
   inducedFunctor _
-deriving Full, Faithful
+deriving CategoryTheory.Functor.Full, CategoryTheory.Functor.Faithful
 #align category_theory.from_skeleton CategoryTheory.fromSkeleton
 -/
 
-instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
+instance : CategoryTheory.Functor.EssSurj (fromSkeleton C)
+    where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
 
-noncomputable instance : IsEquivalence (fromSkeleton C) :=
-  Equivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
+noncomputable instance : CategoryTheory.Functor.IsEquivalence (fromSkeleton C) :=
+  CategoryTheory.Functor.IsEquivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
 
 #print CategoryTheory.skeletonEquivalence /-
 /-- The equivalence between the skeleton and the category itself. -/
@@ -263,7 +264,7 @@ section
 variable [Quiver.IsThin C]
 
 #print CategoryTheory.ThinSkeleton.toThinSkeleton_faithful /-
-instance toThinSkeleton_faithful : Faithful (toThinSkeleton C) where
+instance toThinSkeleton_faithful : CategoryTheory.Functor.Faithful (toThinSkeleton C) where
 #align category_theory.thin_skeleton.to_thin_skeleton_faithful CategoryTheory.ThinSkeleton.toThinSkeleton_faithful
 -/
 
@@ -280,7 +281,8 @@ noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C
 -/
 
 #print CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence /-
-noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkeleton C)
+noncomputable instance fromThinSkeletonEquivalence :
+    CategoryTheory.Functor.IsEquivalence (fromThinSkeleton C)
     where
   inverse := toThinSkeleton C
   counitIso := NatIso.ofComponents (fun X => Nonempty.some (Quotient.mk_out X)) (by tidy)
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Bhavik Mehta. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta
 -/
-import Mathbin.CategoryTheory.Adjunction.Basic
-import Mathbin.CategoryTheory.Category.Preorder
-import Mathbin.CategoryTheory.IsomorphismClasses
-import Mathbin.CategoryTheory.Thin
+import CategoryTheory.Adjunction.Basic
+import CategoryTheory.Category.Preorder
+import CategoryTheory.IsomorphismClasses
+import CategoryTheory.Thin
 
 #align_import category_theory.skeletal from "leanprover-community/mathlib"@"3dadefa3f544b1db6214777fe47910739b54c66a"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Bhavik Mehta. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta
-
-! This file was ported from Lean 3 source module category_theory.skeletal
-! leanprover-community/mathlib commit 3dadefa3f544b1db6214777fe47910739b54c66a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Adjunction.Basic
 import Mathbin.CategoryTheory.Category.Preorder
 import Mathbin.CategoryTheory.IsomorphismClasses
 import Mathbin.CategoryTheory.Thin
 
+#align_import category_theory.skeletal from "leanprover-community/mathlib"@"3dadefa3f544b1db6214777fe47910739b54c66a"
+
 /-!
 # Skeleton of a category
 
Diff
@@ -111,10 +111,12 @@ instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Q
 noncomputable instance : IsEquivalence (fromSkeleton C) :=
   Equivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
 
+#print CategoryTheory.skeletonEquivalence /-
 /-- The equivalence between the skeleton and the category itself. -/
 noncomputable def skeletonEquivalence : Skeleton C ≌ C :=
   (fromSkeleton C).asEquivalence
 #align category_theory.skeleton_equivalence CategoryTheory.skeletonEquivalence
+-/
 
 #print CategoryTheory.skeleton_skeletal /-
 theorem skeleton_skeletal : Skeletal (Skeleton C) :=
@@ -138,6 +140,7 @@ section
 
 variable {C D}
 
+#print CategoryTheory.Equivalence.skeletonEquiv /-
 /-- Two categories which are categorically equivalent have skeletons with equivalent objects.
 -/
 noncomputable def Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skeleton D :=
@@ -147,6 +150,7 @@ noncomputable def Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skele
     left_inv := fun X => skeleton_skeletal C ⟨(f.unitIso.app X).symm⟩
     right_inv := fun Y => skeleton_skeletal D ⟨f.counitIso.app Y⟩ }
 #align category_theory.equivalence.skeleton_equiv CategoryTheory.Equivalence.skeletonEquiv
+-/
 
 end
 
@@ -292,10 +296,12 @@ noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkel
 #align category_theory.thin_skeleton.from_thin_skeleton_equivalence CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence
 -/
 
+#print CategoryTheory.ThinSkeleton.equivalence /-
 /-- The equivalence between the thin skeleton and the category itself. -/
 noncomputable def equivalence : ThinSkeleton C ≌ C :=
   (fromThinSkeleton C).asEquivalence
 #align category_theory.thin_skeleton.equivalence CategoryTheory.ThinSkeleton.equivalence
+-/
 
 variable {C}
 
@@ -390,6 +396,7 @@ section
 
 variable {C} {α : Type _} [PartialOrder α]
 
+#print CategoryTheory.Equivalence.thinSkeletonOrderIso /-
 /--
 When `e : C ≌ α` is a categorical equivalence from a thin category `C` to some partial order `α`,
 the `thin_skeleton C` is order isomorphic to `α`.
@@ -398,6 +405,7 @@ noncomputable def Equivalence.thinSkeletonOrderIso [Quiver.IsThin C] (e : C ≌
     ThinSkeleton C ≃o α :=
   ((ThinSkeleton.equivalence C).trans e).toOrderIso
 #align category_theory.equivalence.thin_skeleton_order_iso CategoryTheory.Equivalence.thinSkeletonOrderIso
+-/
 
 end
 
Diff
@@ -89,7 +89,8 @@ variable (C D)
 its category structure.
 -/
 def Skeleton : Type u₁ :=
-  InducedCategory C Quotient.out deriving Category
+  InducedCategory C Quotient.out
+deriving Category
 #align category_theory.skeleton CategoryTheory.Skeleton
 -/
 
@@ -100,7 +101,8 @@ instance [Inhabited C] : Inhabited (Skeleton C) :=
 /-- The functor from the skeleton of `C` to `C`. -/
 @[simps]
 noncomputable def fromSkeleton : Skeleton C ⥤ C :=
-  inducedFunctor _ deriving Full, Faithful
+  inducedFunctor _
+deriving Full, Faithful
 #align category_theory.from_skeleton CategoryTheory.fromSkeleton
 -/
 
Diff
@@ -109,12 +109,6 @@ instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Q
 noncomputable instance : IsEquivalence (fromSkeleton C) :=
   Equivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
 
-/- warning: category_theory.skeleton_equivalence -> CategoryTheory.skeletonEquivalence is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (CategoryTheory.Skeleton.{u1, u2} C _inst_1) (CategoryTheory.Skeleton.category.{u2, u1} C _inst_1) C _inst_1
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (CategoryTheory.Skeleton.{u1, u2} C _inst_1) C (CategoryTheory.instCategorySkeleton.{u1, u2} C _inst_1) _inst_1
-Case conversion may be inaccurate. Consider using '#align category_theory.skeleton_equivalence CategoryTheory.skeletonEquivalenceₓ'. -/
 /-- The equivalence between the skeleton and the category itself. -/
 noncomputable def skeletonEquivalence : Skeleton C ≌ C :=
   (fromSkeleton C).asEquivalence
@@ -142,12 +136,6 @@ section
 
 variable {C D}
 
-/- warning: category_theory.equivalence.skeleton_equiv -> CategoryTheory.Equivalence.skeletonEquiv is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_2) -> (Equiv.{succ u3, succ u4} (CategoryTheory.Skeleton.{u1, u3} C _inst_1) (CategoryTheory.Skeleton.{u2, u4} D _inst_2))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_2) -> (Equiv.{succ u3, succ u4} (CategoryTheory.Skeleton.{u1, u3} C _inst_1) (CategoryTheory.Skeleton.{u2, u4} D _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.skeleton_equiv CategoryTheory.Equivalence.skeletonEquivₓ'. -/
 /-- Two categories which are categorically equivalent have skeletons with equivalent objects.
 -/
 noncomputable def Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skeleton D :=
@@ -302,12 +290,6 @@ noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkel
 #align category_theory.thin_skeleton.from_thin_skeleton_equivalence CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence
 -/
 
-/- warning: category_theory.thin_skeleton.equivalence -> CategoryTheory.ThinSkeleton.equivalence is a dubious translation:
-lean 3 declaration is
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_4 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], CategoryTheory.Equivalence.{u2, u1, u2, u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (Preorder.smallCategory.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) C _inst_1
-but is expected to have type
-  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_4 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], CategoryTheory.Equivalence.{u2, u1, u2, u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) C (Preorder.smallCategory.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) _inst_1
-Case conversion may be inaccurate. Consider using '#align category_theory.thin_skeleton.equivalence CategoryTheory.ThinSkeleton.equivalenceₓ'. -/
 /-- The equivalence between the thin skeleton and the category itself. -/
 noncomputable def equivalence : ThinSkeleton C ≌ C :=
   (fromThinSkeleton C).asEquivalence
@@ -406,12 +388,6 @@ section
 
 variable {C} {α : Type _} [PartialOrder α]
 
-/- warning: category_theory.equivalence.thin_skeleton_order_iso -> CategoryTheory.Equivalence.thinSkeletonOrderIso is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C _inst_1 α (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toHasLe.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toHasLe.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
-but is expected to have type
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C α _inst_1 (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toLE.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toLE.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
-Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.thin_skeleton_order_iso CategoryTheory.Equivalence.thinSkeletonOrderIsoₓ'. -/
 /--
 When `e : C ≌ α` is a categorical equivalence from a thin category `C` to some partial order `α`,
 the `thin_skeleton C` is order isomorphic to `α`.
Diff
@@ -213,10 +213,7 @@ namespace ThinSkeleton
 
 #print CategoryTheory.ThinSkeleton.thin /-
 /-- The thin skeleton is thin. -/
-instance thin : Quiver.IsThin (ThinSkeleton C) := fun _ _ =>
-  ⟨by
-    rintro ⟨⟨f₁⟩⟩ ⟨⟨f₂⟩⟩
-    rfl⟩
+instance thin : Quiver.IsThin (ThinSkeleton C) := fun _ _ => ⟨by rintro ⟨⟨f₁⟩⟩ ⟨⟨f₂⟩⟩; rfl⟩
 #align category_theory.thin_skeleton.thin CategoryTheory.ThinSkeleton.thin
 -/
 
Diff
@@ -411,7 +411,7 @@ variable {C} {α : Type _} [PartialOrder α]
 
 /- warning: category_theory.equivalence.thin_skeleton_order_iso -> CategoryTheory.Equivalence.thinSkeletonOrderIso is a dubious translation:
 lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C _inst_1 α (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toLE.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toLE.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C _inst_1 α (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toHasLe.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toHasLe.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
 but is expected to have type
   forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C α _inst_1 (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toLE.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toLE.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
 Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.thin_skeleton_order_iso CategoryTheory.Equivalence.thinSkeletonOrderIsoₓ'. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta
 
 ! This file was ported from Lean 3 source module category_theory.skeletal
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 3dadefa3f544b1db6214777fe47910739b54c66a
 ! 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.Thin
 /-!
 # Skeleton of a category
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Define skeletal categories as categories in which any two isomorphic objects are equal.
 
 Construct the skeleton of an arbitrary category by taking isomorphism classes, and show it is a
Diff
@@ -41,11 +41,14 @@ variable (D : Type u₂) [Category.{v₂} D]
 
 variable {E : Type u₃} [Category.{v₃} E]
 
+#print CategoryTheory.Skeletal /-
 /-- A category is skeletal if isomorphic objects are equal. -/
 def Skeletal : Prop :=
   ∀ ⦃X Y : C⦄, IsIsomorphic X Y → X = Y
 #align category_theory.skeletal CategoryTheory.Skeletal
+-/
 
+#print CategoryTheory.IsSkeletonOf /-
 /-- `is_skeleton_of C D F` says that `F : D ⥤ C` exhibits `D` as a skeletal full subcategory of `C`,
 in particular `F` is a (strong) equivalence and `D` is skeletal.
 -/
@@ -53,70 +56,95 @@ structure IsSkeletonOf (F : D ⥤ C) where
   skel : Skeletal D
   eqv : IsEquivalence F
 #align category_theory.is_skeleton_of CategoryTheory.IsSkeletonOf
+-/
 
 attribute [local instance] is_isomorphic_setoid
 
 variable {C D}
 
+#print CategoryTheory.Functor.eq_of_iso /-
 /-- If `C` is thin and skeletal, then any naturally isomorphic functors to `C` are equal. -/
 theorem Functor.eq_of_iso {F₁ F₂ : D ⥤ C} [Quiver.IsThin C] (hC : Skeletal C) (hF : F₁ ≅ F₂) :
     F₁ = F₂ :=
   Functor.ext (fun X => hC ⟨hF.app X⟩) fun _ _ _ => Subsingleton.elim _ _
 #align category_theory.functor.eq_of_iso CategoryTheory.Functor.eq_of_iso
+-/
 
+#print CategoryTheory.functor_skeletal /-
 /-- If `C` is thin and skeletal, `D ⥤ C` is skeletal.
 `category_theory.functor_thin` shows it is thin also.
 -/
 theorem functor_skeletal [Quiver.IsThin C] (hC : Skeletal C) : Skeletal (D ⥤ C) := fun F₁ F₂ h =>
   h.elim (Functor.eq_of_iso hC)
 #align category_theory.functor_skeletal CategoryTheory.functor_skeletal
+-/
 
 variable (C D)
 
+#print CategoryTheory.Skeleton /-
 /-- Construct the skeleton category as the induced category on the isomorphism classes, and derive
 its category structure.
 -/
 def Skeleton : Type u₁ :=
   InducedCategory C Quotient.out deriving Category
 #align category_theory.skeleton CategoryTheory.Skeleton
+-/
 
 instance [Inhabited C] : Inhabited (Skeleton C) :=
   ⟨⟦default⟧⟩
 
+#print CategoryTheory.fromSkeleton /-
 /-- The functor from the skeleton of `C` to `C`. -/
 @[simps]
 noncomputable def fromSkeleton : Skeleton C ⥤ C :=
   inducedFunctor _ deriving Full, Faithful
 #align category_theory.from_skeleton CategoryTheory.fromSkeleton
+-/
 
 instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
 
 noncomputable instance : IsEquivalence (fromSkeleton C) :=
   Equivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
 
+/- warning: category_theory.skeleton_equivalence -> CategoryTheory.skeletonEquivalence is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (CategoryTheory.Skeleton.{u1, u2} C _inst_1) (CategoryTheory.Skeleton.category.{u2, u1} C _inst_1) C _inst_1
+but is expected to have type
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C], CategoryTheory.Equivalence.{u1, u1, u2, u2} (CategoryTheory.Skeleton.{u1, u2} C _inst_1) C (CategoryTheory.instCategorySkeleton.{u1, u2} C _inst_1) _inst_1
+Case conversion may be inaccurate. Consider using '#align category_theory.skeleton_equivalence CategoryTheory.skeletonEquivalenceₓ'. -/
 /-- The equivalence between the skeleton and the category itself. -/
 noncomputable def skeletonEquivalence : Skeleton C ≌ C :=
   (fromSkeleton C).asEquivalence
 #align category_theory.skeleton_equivalence CategoryTheory.skeletonEquivalence
 
+#print CategoryTheory.skeleton_skeletal /-
 theorem skeleton_skeletal : Skeletal (Skeleton C) :=
   by
   rintro X Y ⟨h⟩
   have : X.out ≈ Y.out := ⟨(from_skeleton C).mapIso h⟩
   simpa using Quotient.sound this
 #align category_theory.skeleton_skeletal CategoryTheory.skeleton_skeletal
+-/
 
+#print CategoryTheory.skeletonIsSkeleton /-
 /-- The `skeleton` of `C` given by choice is a skeleton of `C`. -/
 noncomputable def skeletonIsSkeleton : IsSkeletonOf C (Skeleton C) (fromSkeleton C)
     where
   skel := skeleton_skeletal C
   eqv := fromSkeleton.isEquivalence C
 #align category_theory.skeleton_is_skeleton CategoryTheory.skeletonIsSkeleton
+-/
 
 section
 
 variable {C D}
 
+/- warning: category_theory.equivalence.skeleton_equiv -> CategoryTheory.Equivalence.skeletonEquiv is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_2) -> (Equiv.{succ u3, succ u4} (CategoryTheory.Skeleton.{u1, u3} C _inst_1) (CategoryTheory.Skeleton.{u2, u4} D _inst_2))
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_2) -> (Equiv.{succ u3, succ u4} (CategoryTheory.Skeleton.{u1, u3} C _inst_1) (CategoryTheory.Skeleton.{u2, u4} D _inst_2))
+Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.skeleton_equiv CategoryTheory.Equivalence.skeletonEquivₓ'. -/
 /-- Two categories which are categorically equivalent have skeletons with equivalent objects.
 -/
 noncomputable def Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skeleton D :=
@@ -129,6 +157,7 @@ noncomputable def Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skele
 
 end
 
+#print CategoryTheory.ThinSkeleton /-
 /-- Construct the skeleton category by taking the quotient of objects. This construction gives a
 preorder with nice definitional properties, but is only really appropriate for thin categories.
 If your original category is not thin, you probably want to be using `skeleton` instead of this.
@@ -136,11 +165,15 @@ If your original category is not thin, you probably want to be using `skeleton`
 def ThinSkeleton : Type u₁ :=
   Quotient (isIsomorphicSetoid C)
 #align category_theory.thin_skeleton CategoryTheory.ThinSkeleton
+-/
 
+#print CategoryTheory.inhabitedThinSkeleton /-
 instance inhabitedThinSkeleton [Inhabited C] : Inhabited (ThinSkeleton C) :=
   ⟨Quotient.mk' default⟩
 #align category_theory.inhabited_thin_skeleton CategoryTheory.inhabitedThinSkeleton
+-/
 
+#print CategoryTheory.ThinSkeleton.preorder /-
 instance ThinSkeleton.preorder : Preorder (ThinSkeleton C)
     where
   le :=
@@ -155,7 +188,9 @@ instance ThinSkeleton.preorder : Preorder (ThinSkeleton C)
     exact ⟨𝟙 _⟩
   le_trans a b c := Quotient.induction_on₃ a b c fun A B C => Nonempty.map2 (· ≫ ·)
 #align category_theory.thin_skeleton.preorder CategoryTheory.ThinSkeleton.preorder
+-/
 
+#print CategoryTheory.toThinSkeleton /-
 /-- The functor from a category to its thin skeleton. -/
 @[simps]
 def toThinSkeleton : C ⥤ ThinSkeleton C
@@ -163,6 +198,7 @@ def toThinSkeleton : C ⥤ ThinSkeleton C
   obj := Quotient.mk'
   map X Y f := homOfLE (Nonempty.intro f)
 #align category_theory.to_thin_skeleton CategoryTheory.toThinSkeleton
+-/
 
 /-!
 The constructions here are intended to be used when the category `C` is thin, even though
@@ -172,15 +208,18 @@ some of the statements can be shown without this assumption.
 
 namespace ThinSkeleton
 
+#print CategoryTheory.ThinSkeleton.thin /-
 /-- The thin skeleton is thin. -/
 instance thin : Quiver.IsThin (ThinSkeleton C) := fun _ _ =>
   ⟨by
     rintro ⟨⟨f₁⟩⟩ ⟨⟨f₂⟩⟩
     rfl⟩
 #align category_theory.thin_skeleton.thin CategoryTheory.ThinSkeleton.thin
+-/
 
 variable {C} {D}
 
+#print CategoryTheory.ThinSkeleton.map /-
 /-- A functor `C ⥤ D` computably lowers to a functor `thin_skeleton C ⥤ thin_skeleton D`. -/
 @[simps]
 def map (F : C ⥤ D) : ThinSkeleton C ⥤ ThinSkeleton D
@@ -188,16 +227,22 @@ def map (F : C ⥤ D) : ThinSkeleton C ⥤ ThinSkeleton D
   obj := Quotient.map F.obj fun X₁ X₂ ⟨hX⟩ => ⟨F.mapIso hX⟩
   map X Y := Quotient.recOnSubsingleton₂ X Y fun x y k => homOfLE (k.le.elim fun t => ⟨F.map t⟩)
 #align category_theory.thin_skeleton.map CategoryTheory.ThinSkeleton.map
+-/
 
+#print CategoryTheory.ThinSkeleton.comp_toThinSkeleton /-
 theorem comp_toThinSkeleton (F : C ⥤ D) : F ⋙ toThinSkeleton D = toThinSkeleton C ⋙ map F :=
   rfl
 #align category_theory.thin_skeleton.comp_to_thin_skeleton CategoryTheory.ThinSkeleton.comp_toThinSkeleton
+-/
 
+#print CategoryTheory.ThinSkeleton.mapNatTrans /-
 /-- Given a natural transformation `F₁ ⟶ F₂`, induce a natural transformation `map F₁ ⟶ map F₂`.-/
 def mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F₂
     where app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩
 #align category_theory.thin_skeleton.map_nat_trans CategoryTheory.ThinSkeleton.mapNatTrans
+-/
 
+#print CategoryTheory.ThinSkeleton.map₂ /-
 -- TODO: state the lemmas about what happens when you compose with `to_thin_skeleton`
 /-- A functor `C ⥤ D ⥤ E` computably lowers to a functor
 `thin_skeleton C ⥤ thin_skeleton D ⥤ thin_skeleton E` -/
@@ -218,6 +263,7 @@ def map₂ (F : C ⥤ D ⥤ E) : ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkele
         app := fun y =>
           Quotient.recOnSubsingleton y fun Y => homOfLE (f.le.elim fun f' => ⟨(F.map f').app Y⟩) }
 #align category_theory.thin_skeleton.map₂ CategoryTheory.ThinSkeleton.map₂
+-/
 
 variable (C)
 
@@ -225,9 +271,12 @@ section
 
 variable [Quiver.IsThin C]
 
+#print CategoryTheory.ThinSkeleton.toThinSkeleton_faithful /-
 instance toThinSkeleton_faithful : Faithful (toThinSkeleton C) where
 #align category_theory.thin_skeleton.to_thin_skeleton_faithful CategoryTheory.ThinSkeleton.toThinSkeleton_faithful
+-/
 
+#print CategoryTheory.ThinSkeleton.fromThinSkeleton /-
 /-- Use `quotient.out` to create a functor out of the thin skeleton. -/
 @[simps]
 noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C
@@ -237,7 +286,9 @@ noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C
     Quotient.recOnSubsingleton₂ x y fun X Y f =>
       (Nonempty.some (Quotient.mk_out X)).Hom ≫ f.le.some ≫ (Nonempty.some (Quotient.mk_out Y)).inv
 #align category_theory.thin_skeleton.from_thin_skeleton CategoryTheory.ThinSkeleton.fromThinSkeleton
+-/
 
+#print CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence /-
 noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkeleton C)
     where
   inverse := toThinSkeleton C
@@ -249,7 +300,14 @@ noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkel
           eqToIso (Quotient.sound ⟨(Nonempty.some (Quotient.mk_out X)).symm⟩))
       (by tidy)
 #align category_theory.thin_skeleton.from_thin_skeleton_equivalence CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence
+-/
 
+/- warning: category_theory.thin_skeleton.equivalence -> CategoryTheory.ThinSkeleton.equivalence is a dubious translation:
+lean 3 declaration is
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_4 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], CategoryTheory.Equivalence.{u2, u1, u2, u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (Preorder.smallCategory.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) C _inst_1
+but is expected to have type
+  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_4 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], CategoryTheory.Equivalence.{u2, u1, u2, u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) C (Preorder.smallCategory.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) _inst_1
+Case conversion may be inaccurate. Consider using '#align category_theory.thin_skeleton.equivalence CategoryTheory.ThinSkeleton.equivalenceₓ'. -/
 /-- The equivalence between the thin skeleton and the category itself. -/
 noncomputable def equivalence : ThinSkeleton C ≌ C :=
   (fromThinSkeleton C).asEquivalence
@@ -257,10 +315,13 @@ noncomputable def equivalence : ThinSkeleton C ≌ C :=
 
 variable {C}
 
+#print CategoryTheory.ThinSkeleton.equiv_of_both_ways /-
 theorem equiv_of_both_ways {X Y : C} (f : X ⟶ Y) (g : Y ⟶ X) : X ≈ Y :=
   ⟨iso_of_both_ways f g⟩
 #align category_theory.thin_skeleton.equiv_of_both_ways CategoryTheory.ThinSkeleton.equiv_of_both_ways
+-/
 
+#print CategoryTheory.ThinSkeleton.thinSkeletonPartialOrder /-
 instance thinSkeletonPartialOrder : PartialOrder (ThinSkeleton C) :=
   { CategoryTheory.ThinSkeleton.preorder C with
     le_antisymm :=
@@ -269,43 +330,57 @@ instance thinSkeletonPartialOrder : PartialOrder (ThinSkeleton C) :=
           rintro _ _ ⟨f⟩ ⟨g⟩
           apply Quotient.sound (equiv_of_both_ways f g)) }
 #align category_theory.thin_skeleton.thin_skeleton_partial_order CategoryTheory.ThinSkeleton.thinSkeletonPartialOrder
+-/
 
+#print CategoryTheory.ThinSkeleton.skeletal /-
 theorem skeletal : Skeletal (ThinSkeleton C) := fun X Y =>
   Quotient.induction_on₂ X Y fun x y h => h.elim fun i => i.1.le.antisymm i.2.le
 #align category_theory.thin_skeleton.skeletal CategoryTheory.ThinSkeleton.skeletal
+-/
 
+#print CategoryTheory.ThinSkeleton.map_comp_eq /-
 theorem map_comp_eq (F : E ⥤ D) (G : D ⥤ C) : map (F ⋙ G) = map F ⋙ map G :=
   Functor.eq_of_iso skeletal <|
     NatIso.ofComponents (fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _) (by tidy)
 #align category_theory.thin_skeleton.map_comp_eq CategoryTheory.ThinSkeleton.map_comp_eq
+-/
 
+#print CategoryTheory.ThinSkeleton.map_id_eq /-
 theorem map_id_eq : map (𝟭 C) = 𝟭 (ThinSkeleton C) :=
   Functor.eq_of_iso skeletal <|
     NatIso.ofComponents (fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _) (by tidy)
 #align category_theory.thin_skeleton.map_id_eq CategoryTheory.ThinSkeleton.map_id_eq
+-/
 
+#print CategoryTheory.ThinSkeleton.map_iso_eq /-
 theorem map_iso_eq {F₁ F₂ : D ⥤ C} (h : F₁ ≅ F₂) : map F₁ = map F₂ :=
   Functor.eq_of_iso skeletal
     { Hom := mapNatTrans h.Hom
       inv := mapNatTrans h.inv }
 #align category_theory.thin_skeleton.map_iso_eq CategoryTheory.ThinSkeleton.map_iso_eq
+-/
 
+#print CategoryTheory.ThinSkeleton.thinSkeletonIsSkeleton /-
 /-- `from_thin_skeleton C` exhibits the thin skeleton as a skeleton. -/
 noncomputable def thinSkeletonIsSkeleton : IsSkeletonOf C (ThinSkeleton C) (fromThinSkeleton C)
     where
   skel := skeletal
   eqv := ThinSkeleton.fromThinSkeletonEquivalence C
 #align category_theory.thin_skeleton.thin_skeleton_is_skeleton CategoryTheory.ThinSkeleton.thinSkeletonIsSkeleton
+-/
 
+#print CategoryTheory.ThinSkeleton.isSkeletonOfInhabited /-
 noncomputable instance isSkeletonOfInhabited :
     Inhabited (IsSkeletonOf C (ThinSkeleton C) (fromThinSkeleton C)) :=
   ⟨thinSkeletonIsSkeleton⟩
 #align category_theory.thin_skeleton.is_skeleton_of_inhabited CategoryTheory.ThinSkeleton.isSkeletonOfInhabited
+-/
 
 end
 
 variable {C}
 
+#print CategoryTheory.ThinSkeleton.lowerAdjunction /-
 /-- An adjunction between thin categories gives an adjunction between their thin skeletons. -/
 def lowerAdjunction (R : D ⥤ C) (L : C ⥤ D) (h : L ⊣ R) : ThinSkeleton.map L ⊣ ThinSkeleton.map R :=
   Adjunction.mkOfUnitCounit
@@ -321,6 +396,7 @@ def lowerAdjunction (R : D ⥤ C) (L : C ⥤ D) (h : L ⊣ R) : ThinSkeleton.map
             letI := is_isomorphic_setoid D
             refine' Quotient.recOnSubsingleton X fun x => hom_of_le ⟨h.counit.app x⟩ } }
 #align category_theory.thin_skeleton.lower_adjunction CategoryTheory.ThinSkeleton.lowerAdjunction
+-/
 
 end ThinSkeleton
 
@@ -330,6 +406,12 @@ section
 
 variable {C} {α : Type _} [PartialOrder α]
 
+/- warning: category_theory.equivalence.thin_skeleton_order_iso -> CategoryTheory.Equivalence.thinSkeletonOrderIso is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C _inst_1 α (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toLE.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toLE.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
+but is expected to have type
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] {α : Type.{u3}} [_inst_4 : PartialOrder.{u3} α] [_inst_5 : Quiver.IsThin.{u2, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1))], (CategoryTheory.Equivalence.{u1, u3, u2, u3} C α _inst_1 (Preorder.smallCategory.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4))) -> (OrderIso.{u2, u3} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) α (Preorder.toLE.{u2} (CategoryTheory.ThinSkeleton.{u1, u2} C _inst_1) (CategoryTheory.ThinSkeleton.preorder.{u1, u2} C _inst_1)) (Preorder.toLE.{u3} α (PartialOrder.toPreorder.{u3} α _inst_4)))
+Case conversion may be inaccurate. Consider using '#align category_theory.equivalence.thin_skeleton_order_iso CategoryTheory.Equivalence.thinSkeletonOrderIsoₓ'. -/
 /--
 When `e : C ≌ α` is a categorical equivalence from a thin category `C` to some partial order `α`,
 the `thin_skeleton C` is order isomorphic to `α`.

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

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

Diff
@@ -48,7 +48,7 @@ structure IsSkeletonOf (F : D ⥤ C) where
   /-- The category `D` has isomorphic objects equal -/
   skel : Skeletal D
   /-- The functor `F` is an equivalence -/
-  eqv : IsEquivalence F
+  eqv : F.IsEquivalence
 #align category_theory.is_skeleton_of CategoryTheory.IsSkeletonOf
 
 attribute [local instance] isIsomorphicSetoid
@@ -90,16 +90,16 @@ noncomputable def fromSkeleton : Skeleton C ⥤ C :=
 #align category_theory.from_skeleton CategoryTheory.fromSkeleton
 
 -- Porting note: previously `fromSkeleton` used `deriving Faithful, Full`
-noncomputable instance : Full <| fromSkeleton C := by
+noncomputable instance : (fromSkeleton C).Full := by
   apply InducedCategory.full
-noncomputable instance : Faithful <| fromSkeleton C := by
+noncomputable instance : (fromSkeleton C).Faithful := by
   apply InducedCategory.faithful
 
-instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
+instance : (fromSkeleton C).EssSurj where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
 
 -- Porting note: named this instance
-noncomputable instance fromSkeleton.isEquivalence : IsEquivalence (fromSkeleton C) :=
-  Equivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
+noncomputable instance fromSkeleton.isEquivalence : (fromSkeleton C).IsEquivalence :=
+  Functor.IsEquivalence.ofFullyFaithfullyEssSurj (fromSkeleton C)
 
 /-- The equivalence between the skeleton and the category itself. -/
 noncomputable def skeletonEquivalence : Skeleton C ≌ C :=
@@ -254,7 +254,7 @@ section
 
 variable [Quiver.IsThin C]
 
-instance toThinSkeleton_faithful : Faithful (toThinSkeleton C) where
+instance toThinSkeleton_faithful : (toThinSkeleton C).Faithful where
 #align category_theory.thin_skeleton.to_thin_skeleton_faithful CategoryTheory.ThinSkeleton.toThinSkeleton_faithful
 
 /-- Use `Quotient.out` to create a functor out of the thin skeleton. -/
@@ -266,7 +266,7 @@ noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C where
       (Nonempty.some (Quotient.mk_out X)).hom ≫ f.le.some ≫ (Nonempty.some (Quotient.mk_out Y)).inv
 #align category_theory.thin_skeleton.from_thin_skeleton CategoryTheory.ThinSkeleton.fromThinSkeleton
 
-noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkeleton C) where
+noncomputable instance fromThinSkeletonEquivalence : (fromThinSkeleton C).IsEquivalence where
   inverse := toThinSkeleton C
   counitIso := NatIso.ofComponents fun X => Nonempty.some (Quotient.mk_out X)
   unitIso := NatIso.ofComponents fun x => Quotient.recOnSubsingleton x fun X =>
style: replace '.-/' by '. -/' (#11938)

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

Diff
@@ -198,7 +198,7 @@ theorem comp_toThinSkeleton (F : C ⥤ D) : F ⋙ toThinSkeleton D = toThinSkele
   rfl
 #align category_theory.thin_skeleton.comp_to_thin_skeleton CategoryTheory.ThinSkeleton.comp_toThinSkeleton
 
-/-- Given a natural transformation `F₁ ⟶ F₂`, induce a natural transformation `map F₁ ⟶ map F₂`.-/
+/-- Given a natural transformation `F₁ ⟶ F₂`, induce a natural transformation `map F₁ ⟶ map F₂`. -/
 def mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F₂ where
   app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩
 #align category_theory.thin_skeleton.map_nat_trans CategoryTheory.ThinSkeleton.mapNatTrans
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


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

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

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

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -33,9 +33,7 @@ namespace CategoryTheory
 open Category
 
 variable (C : Type u₁) [Category.{v₁} C]
-
 variable (D : Type u₂) [Category.{v₂} D]
-
 variable {E : Type u₃} [Category.{v₃} E]
 
 /-- A category is skeletal if isomorphic objects are equal. -/
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -338,13 +338,13 @@ def lowerAdjunction (R : D ⥤ C) (L : C ⥤ D) (h : L ⊣ R) : ThinSkeleton.map
         {
           app := fun X => by
             letI := isIsomorphicSetoid C
-            refine' Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.unit.app x⟩ }
+            exact Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.unit.app x⟩ }
       -- TODO: make quotient.rec_on_subsingleton' so the letI isn't needed
       counit :=
         {
           app := fun X => by
             letI := isIsomorphicSetoid D
-            refine' Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.counit.app x⟩ } }
+            exact Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.counit.app x⟩ } }
 #align category_theory.thin_skeleton.lower_adjunction CategoryTheory.ThinSkeleton.lowerAdjunction
 
 end ThinSkeleton
style: fix wrapping of where (#7149)
Diff
@@ -201,8 +201,8 @@ theorem comp_toThinSkeleton (F : C ⥤ D) : F ⋙ toThinSkeleton D = toThinSkele
 #align category_theory.thin_skeleton.comp_to_thin_skeleton CategoryTheory.ThinSkeleton.comp_toThinSkeleton
 
 /-- Given a natural transformation `F₁ ⟶ F₂`, induce a natural transformation `map F₁ ⟶ map F₂`.-/
-def mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F₂
-    where app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩
+def mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F₂ where
+  app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩
 #align category_theory.thin_skeleton.map_nat_trans CategoryTheory.ThinSkeleton.mapNatTrans
 
 /- Porting note: `map₂ObjMap`, `map₂Functor`, and `map₂NatTrans` were all extracted
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
@@ -353,7 +353,7 @@ open ThinSkeleton
 
 section
 
-variable {C} {α : Type _} [PartialOrder α]
+variable {C} {α : Type*} [PartialOrder α]
 
 /--
 When `e : C ≌ α` is a categorical equivalence from a thin category `C` to some partial order `α`,
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 Bhavik Mehta. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta
-
-! This file was ported from Lean 3 source module category_theory.skeletal
-! leanprover-community/mathlib commit 28aa996fc6fb4317f0083c4e6daf79878d81be33
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Adjunction.Basic
 import Mathlib.CategoryTheory.Category.Preorder
 import Mathlib.CategoryTheory.IsomorphismClasses
 import Mathlib.CategoryTheory.Thin
 
+#align_import category_theory.skeletal from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
+
 /-!
 # Skeleton of a category
 
chore: cleanup whitespace (#5988)

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

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

Diff
@@ -231,16 +231,16 @@ def map₂Functor (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D ⥤ Th
   fun x =>
     { obj := fun y => map₂ObjMap F x y
       map := fun {y₁} {y₂} => @Quotient.recOnSubsingleton C (isIsomorphicSetoid C)
-        (fun x => (y₁ ⟶  y₂) → (map₂ObjMap F x y₁ ⟶  map₂ObjMap F x y₂)) _ x fun X
+        (fun x => (y₁ ⟶ y₂) → (map₂ObjMap F x y₁ ⟶ map₂ObjMap F x y₂)) _ x fun X
           => Quotient.recOnSubsingleton₂ y₁ y₂ fun Y₁ Y₂ hY =>
             homOfLE (hY.le.elim fun g => ⟨(F.obj X).map g⟩) }
 
-/-- This provides natural transformations `map₂Functor F x₁ ⟶  map₂Functor F x₂` given
-`x₁ ⟶  x₂` -/
-def map₂NatTrans (F : C ⥤ D ⥤ E) : {x₁ x₂ : ThinSkeleton C} → (x₁ ⟶  x₂) →
-    (map₂Functor F x₁ ⟶  map₂Functor F x₂) := fun {x₁} {x₂} =>
+/-- This provides natural transformations `map₂Functor F x₁ ⟶ map₂Functor F x₂` given
+`x₁ ⟶ x₂` -/
+def map₂NatTrans (F : C ⥤ D ⥤ E) : {x₁ x₂ : ThinSkeleton C} → (x₁ ⟶ x₂) →
+    (map₂Functor F x₁ ⟶ map₂Functor F x₂) := fun {x₁} {x₂} =>
   @Quotient.recOnSubsingleton₂ C C (isIsomorphicSetoid C) (isIsomorphicSetoid C)
-    (fun x x' : ThinSkeleton C => (x ⟶  x') → (map₂Functor F x ⟶  map₂Functor F x')) _ x₁ x₂
+    (fun x x' : ThinSkeleton C => (x ⟶ x') → (map₂Functor F x ⟶ map₂Functor F x')) _ x₁ x₂
     (fun X₁ X₂ f => { app := fun y =>
       Quotient.recOnSubsingleton y fun Y => homOfLE (f.le.elim fun f' => ⟨(F.map f').app Y⟩) })
 
chore: review of automation in category theory (#4793)

Clean up of automation in the category theory library. Leaving out unnecessary proof steps, or fields done by aesop_cat, and making more use of available autoparameters.

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

Diff
@@ -273,9 +273,9 @@ noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C where
 
 noncomputable instance fromThinSkeletonEquivalence : IsEquivalence (fromThinSkeleton C) where
   inverse := toThinSkeleton C
-  counitIso := NatIso.ofComponents (fun X => Nonempty.some (Quotient.mk_out X)) (by aesop_cat)
-  unitIso := NatIso.ofComponents (fun x => Quotient.recOnSubsingleton x fun X =>
-          eqToIso (Quotient.sound ⟨(Nonempty.some (Quotient.mk_out X)).symm⟩)) (fun _ => rfl)
+  counitIso := NatIso.ofComponents fun X => Nonempty.some (Quotient.mk_out X)
+  unitIso := NatIso.ofComponents fun x => Quotient.recOnSubsingleton x fun X =>
+    eqToIso (Quotient.sound ⟨(Nonempty.some (Quotient.mk_out X)).symm⟩)
 #align category_theory.thin_skeleton.from_thin_skeleton_equivalence CategoryTheory.ThinSkeleton.fromThinSkeletonEquivalence
 
 /-- The equivalence between the thin skeleton and the category itself. -/
@@ -304,12 +304,12 @@ theorem skeletal : Skeletal (ThinSkeleton C) := fun X Y =>
 
 theorem map_comp_eq (F : E ⥤ D) (G : D ⥤ C) : map (F ⋙ G) = map F ⋙ map G :=
   Functor.eq_of_iso skeletal <|
-    NatIso.ofComponents (fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _) (by aesop_cat)
+    NatIso.ofComponents fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _
 #align category_theory.thin_skeleton.map_comp_eq CategoryTheory.ThinSkeleton.map_comp_eq
 
 theorem map_id_eq : map (𝟭 C) = 𝟭 (ThinSkeleton C) :=
   Functor.eq_of_iso skeletal <|
-    NatIso.ofComponents (fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _) (by aesop_cat)
+    NatIso.ofComponents fun X => Quotient.recOnSubsingleton X fun x => Iso.refl _
 #align category_theory.thin_skeleton.map_id_eq CategoryTheory.ThinSkeleton.map_id_eq
 
 theorem map_iso_eq {F₁ F₂ : D ⥤ C} (h : F₁ ≅ F₂) : map F₁ = map F₂ :=
chore: strip trailing spaces in lean files (#2828)

vscode is already configured by .vscode/settings.json to trim these on save. It's not clear how they've managed to stick around.

By doing this all in one PR now, it avoids getting random whitespace diffs in PRs later.

This was done with a regex search in vscode,

image

Diff
@@ -78,26 +78,26 @@ variable (C D)
 /-- Construct the skeleton category as the induced category on the isomorphism classes, and derive
 its category structure.
 -/
-def Skeleton : Type u₁ := InducedCategory C Quotient.out 
+def Skeleton : Type u₁ := InducedCategory C Quotient.out
 #align category_theory.skeleton CategoryTheory.Skeleton
 
 instance [Inhabited C] : Inhabited (Skeleton C) :=
   ⟨⟦default⟧⟩
 
--- Porting note: previously `Skeleton` used `deriving Category` 
-noncomputable instance : Category (Skeleton C) := by 
-  apply InducedCategory.category 
+-- Porting note: previously `Skeleton` used `deriving Category`
+noncomputable instance : Category (Skeleton C) := by
+  apply InducedCategory.category
 
 /-- The functor from the skeleton of `C` to `C`. -/
 @[simps!]
 noncomputable def fromSkeleton : Skeleton C ⥤ C :=
-  inducedFunctor _ 
+  inducedFunctor _
 #align category_theory.from_skeleton CategoryTheory.fromSkeleton
 
--- Porting note: previously `fromSkeleton` used `deriving Faithful, Full` 
-noncomputable instance : Full <| fromSkeleton C := by 
+-- Porting note: previously `fromSkeleton` used `deriving Faithful, Full`
+noncomputable instance : Full <| fromSkeleton C := by
   apply InducedCategory.full
-noncomputable instance : Faithful <| fromSkeleton C := by 
+noncomputable instance : Faithful <| fromSkeleton C := by
   apply InducedCategory.faithful
 
 instance : EssSurj (fromSkeleton C) where mem_essImage X := ⟨Quotient.mk' X, Quotient.mk_out X⟩
@@ -154,20 +154,20 @@ instance inhabitedThinSkeleton [Inhabited C] : Inhabited (ThinSkeleton C) :=
 instance ThinSkeleton.preorder : Preorder (ThinSkeleton C)
     where
   le :=
-    @Quotient.lift₂ C C _ (isIsomorphicSetoid C) (isIsomorphicSetoid C) 
+    @Quotient.lift₂ C C _ (isIsomorphicSetoid C) (isIsomorphicSetoid C)
       (fun X Y => Nonempty (X ⟶ Y))
         (by
           rintro _ _ _ _ ⟨i₁⟩ ⟨i₂⟩
           exact
             propext
-              ⟨Nonempty.map fun f => i₁.inv ≫ f ≫ i₂.hom, 
+              ⟨Nonempty.map fun f => i₁.inv ≫ f ≫ i₂.hom,
                 Nonempty.map fun f => i₁.hom ≫ f ≫ i₂.inv⟩)
   le_refl := by
     refine' Quotient.ind fun a => _
     exact ⟨𝟙 _⟩
   le_trans a b c := Quotient.inductionOn₃ a b c fun A B C => Nonempty.map2 (· ≫ ·)
 #align category_theory.thin_skeleton.preorder CategoryTheory.ThinSkeleton.preorder
- 
+
 /-- The functor from a category to its thin skeleton. -/
 @[simps]
 def toThinSkeleton : C ⥤ ThinSkeleton C where
@@ -208,49 +208,49 @@ def mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F
     where app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩
 #align category_theory.thin_skeleton.map_nat_trans CategoryTheory.ThinSkeleton.mapNatTrans
 
-/- Porting note: `map₂ObjMap`, `map₂Functor`, and `map₂NatTrans` were all extracted 
-from the original `map₂` proof. Lean needed an extensive amount explicit type 
-annotations to figure things out. This also translated into repeated deterministic 
-timeouts. The extracted defs allow for explicit motives for the multiple 
+/- Porting note: `map₂ObjMap`, `map₂Functor`, and `map₂NatTrans` were all extracted
+from the original `map₂` proof. Lean needed an extensive amount explicit type
+annotations to figure things out. This also translated into repeated deterministic
+timeouts. The extracted defs allow for explicit motives for the multiple
 descents to the quotients.
 
-It would be better to prove that 
-`ThinSkeleton (C × D) ≌ ThinSkeleton C × ThinSkeleton D` 
-which is more immediate from comparing the preorders. Then one could get 
+It would be better to prove that
+`ThinSkeleton (C × D) ≌ ThinSkeleton C × ThinSkeleton D`
+which is more immediate from comparing the preorders. Then one could get
 `map₂` by currying.
 -/
 /-- Given a bifunctor, we descend to a function on objects of `ThinSkeleton` -/
-def map₂ObjMap (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D → ThinSkeleton E := 
+def map₂ObjMap (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D → ThinSkeleton E :=
   fun x y =>
-    @Quotient.map₂ C D (isIsomorphicSetoid C) (isIsomorphicSetoid D) E (isIsomorphicSetoid E) 
+    @Quotient.map₂ C D (isIsomorphicSetoid C) (isIsomorphicSetoid D) E (isIsomorphicSetoid E)
       (fun X Y => (F.obj X).obj Y)
           (fun X₁ _ ⟨hX⟩ _ Y₂ ⟨hY⟩ => ⟨(F.obj X₁).mapIso hY ≪≫ (F.mapIso hX).app Y₂⟩) x y
 
 /-- For each `x : ThinSkeleton C`, we promote `map₂ObjMap F x` to a functor -/
-def map₂Functor (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D ⥤ ThinSkeleton E := 
-  fun x => 
+def map₂Functor (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D ⥤ ThinSkeleton E :=
+  fun x =>
     { obj := fun y => map₂ObjMap F x y
-      map := fun {y₁} {y₂} => @Quotient.recOnSubsingleton C (isIsomorphicSetoid C) 
-        (fun x => (y₁ ⟶  y₂) → (map₂ObjMap F x y₁ ⟶  map₂ObjMap F x y₂)) _ x fun X 
+      map := fun {y₁} {y₂} => @Quotient.recOnSubsingleton C (isIsomorphicSetoid C)
+        (fun x => (y₁ ⟶  y₂) → (map₂ObjMap F x y₁ ⟶  map₂ObjMap F x y₂)) _ x fun X
           => Quotient.recOnSubsingleton₂ y₁ y₂ fun Y₁ Y₂ hY =>
             homOfLE (hY.le.elim fun g => ⟨(F.obj X).map g⟩) }
 
-/-- This provides natural transformations `map₂Functor F x₁ ⟶  map₂Functor F x₂` given 
+/-- This provides natural transformations `map₂Functor F x₁ ⟶  map₂Functor F x₂` given
 `x₁ ⟶  x₂` -/
-def map₂NatTrans (F : C ⥤ D ⥤ E) : {x₁ x₂ : ThinSkeleton C} → (x₁ ⟶  x₂) →  
-    (map₂Functor F x₁ ⟶  map₂Functor F x₂) := fun {x₁} {x₂} => 
-  @Quotient.recOnSubsingleton₂ C C (isIsomorphicSetoid C) (isIsomorphicSetoid C) 
-    (fun x x' : ThinSkeleton C => (x ⟶  x') → (map₂Functor F x ⟶  map₂Functor F x')) _ x₁ x₂ 
-    (fun X₁ X₂ f => { app := fun y =>   
-      Quotient.recOnSubsingleton y fun Y => homOfLE (f.le.elim fun f' => ⟨(F.map f').app Y⟩) }) 
+def map₂NatTrans (F : C ⥤ D ⥤ E) : {x₁ x₂ : ThinSkeleton C} → (x₁ ⟶  x₂) →
+    (map₂Functor F x₁ ⟶  map₂Functor F x₂) := fun {x₁} {x₂} =>
+  @Quotient.recOnSubsingleton₂ C C (isIsomorphicSetoid C) (isIsomorphicSetoid C)
+    (fun x x' : ThinSkeleton C => (x ⟶  x') → (map₂Functor F x ⟶  map₂Functor F x')) _ x₁ x₂
+    (fun X₁ X₂ f => { app := fun y =>
+      Quotient.recOnSubsingleton y fun Y => homOfLE (f.le.elim fun f' => ⟨(F.map f').app Y⟩) })
 
 -- TODO: state the lemmas about what happens when you compose with `toThinSkeleton`
 /-- A functor `C ⥤ D ⥤ E` computably lowers to a functor
 `ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E` -/
 @[simps]
-def map₂ (F : C ⥤ D ⥤ E) : ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E where 
+def map₂ (F : C ⥤ D ⥤ E) : ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E where
   obj := map₂Functor F
-  map := map₂NatTrans F 
+  map := map₂NatTrans F
 #align category_theory.thin_skeleton.map₂ CategoryTheory.ThinSkeleton.map₂
 
 variable (C)
@@ -370,4 +370,3 @@ noncomputable def Equivalence.thinSkeletonOrderIso [Quiver.IsThin C] (e : C ≌
 end
 
 end CategoryTheory
-
feat: port CategoryTheory.Skeletal (#2432)

Co-authored-by: Matthew Robert Ballard <100034030+mattrobball@users.noreply.github.com>

Dependencies 70

71 files ported (100.0%)
24034 lines ported (100.0%)

All dependencies are ported!