File: Mathlib/CategoryTheory/EssentiallySmall.lean

full_name: CategoryTheory.EssentiallySmall
code: /-- A category is `EssentiallySmall.{w}` if there exists
an equivalence to some `S : Type w` with `[SmallCategory S]`. -/
@[pp_with_univ]
class EssentiallySmall (C : Type u) [Category.{v} C] : Prop where
  /-- An essentially small category is equivalent to some small category. -/
  equiv_smallCategory : ∃ (S : Type w) (_ : SmallCategory S), Nonempty (C ≌ S)
goal: Prop

full_name: CategoryTheory.EssentiallySmall.equiv_smallCategory
code: /-- A category is `EssentiallySmall.{w}` if there exists
an equivalence to some `S : Type w` with `[SmallCategory S]`. -/
@[pp_with_univ]
class EssentiallySmall (C : Type u) [Category.{v} C] : Prop where
  /-- An essentially small category is equivalent to some small category. -/
  equiv_smallCategory : ∃ (S : Type w) (_ : SmallCategory S), Nonempty (C ≌ S)
goal: ∃ S x, Nonempty (C ≌ S)

full_name: CategoryTheory.EssentiallySmall.mk'
code: /-- Constructor for `EssentiallySmall C` from an explicit small category witness. -/
theorem EssentiallySmall.mk' {C : Type u} [Category.{v} C] {S : Type w} [SmallCategory S]
    (e : C ≌ S) : EssentiallySmall.{w} C 
goal: CategoryTheory.EssentiallySmall.{w, v, u} C

full_name: CategoryTheory.SmallModel
code: /-- An arbitrarily chosen small model for an essentially small category.
-/
-- Porting note(#5171) removed @[nolint has_nonempty_instance]
@[pp_with_univ]
def SmallModel (C : Type u) [Category.{v} C] [EssentiallySmall.{w} C] : Type w 
goal: Type w

full_name: CategoryTheory.smallCategorySmallModel
code: noncomputable instance smallCategorySmallModel (C : Type u) [Category.{v} C]
    [EssentiallySmall.{w} C] : SmallCategory (SmallModel C) 
goal: CategoryTheory.SmallCategory (CategoryTheory.SmallModel.{w, v, u} C)

full_name: CategoryTheory.equivSmallModel
code: /-- The (noncomputable) categorical equivalence between
an essentially small category and its small model.
-/
noncomputable def equivSmallModel (C : Type u) [Category.{v} C] [EssentiallySmall.{w} C] :
    C ≌ SmallModel C 
goal: C ≌ CategoryTheory.SmallModel.{w, v, u} C

full_name: CategoryTheory.essentiallySmall_congr
code: theorem essentiallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (e : C ≌ D) : EssentiallySmall.{w} C ↔ EssentiallySmall.{w} D 
goal: CategoryTheory.EssentiallySmall.{w, v, u} C ↔ CategoryTheory.EssentiallySmall.{w, v', u'} D

full_name: CategoryTheory.Discrete.essentiallySmallOfSmall
code: theorem Discrete.essentiallySmallOfSmall {α : Type u} [Small.{w} α] :
    EssentiallySmall.{w} (Discrete α) 
goal: CategoryTheory.EssentiallySmall.{w, u, u} (CategoryTheory.Discrete α)

full_name: CategoryTheory.essentiallySmallSelf
code: theorem essentiallySmallSelf : EssentiallySmall.{max w v u} C 
goal: CategoryTheory.EssentiallySmall.{max w v u, v, u} C

full_name: CategoryTheory.LocallySmall
code: /-- A category is `w`-locally small if every hom set is `w`-small.

See `ShrinkHoms C` for a category instance where every hom set has been replaced by a small model.
-/
@[pp_with_univ]
class LocallySmall (C : Type u) [Category.{v} C] : Prop where
  /-- A locally small category has small hom-types. -/
  hom_small : ∀ X Y : C, Small.{w} (X ⟶ Y) := by infer_instance
goal: Prop

full_name: CategoryTheory.LocallySmall.hom_small
code: /-- A category is `w`-locally small if every hom set is `w`-small.

See `ShrinkHoms C` for a category instance where every hom set has been replaced by a small model.
-/
@[pp_with_univ]
class LocallySmall (C : Type u) [Category.{v} C] : Prop where
  /-- A locally small category has small hom-types. -/
  hom_small : ∀ X Y : C, Small.{w} (X ⟶ Y) := by infer_instance
goal: Small.{w, v} (X ⟶ Y)

full_name: CategoryTheory.instSmallHomOfLocallySmall
code: instance (C : Type u) [Category.{v} C] [LocallySmall.{w} C] (X Y : C) : Small.{w, v} (X ⟶ Y) 
goal: Small.{w, v} (X ⟶ Y)

full_name: CategoryTheory.locallySmall_of_faithful
code: theorem locallySmall_of_faithful {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (F : C ⥤ D) [F.Faithful] [LocallySmall.{w} D] : LocallySmall.{w} C 
goal: CategoryTheory.LocallySmall.{w, v, u} C

full_name: CategoryTheory.locallySmall_congr
code: theorem locallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (e : C ≌ D) : LocallySmall.{w} C ↔ LocallySmall.{w} D 
goal: CategoryTheory.LocallySmall.{w, v, u} C ↔ CategoryTheory.LocallySmall.{w, v', u'} D

full_name: CategoryTheory.locallySmall_self
code: instance (priority := 100) locallySmall_self (C : Type u) [Category.{v} C] :
    LocallySmall.{v} C 
goal: CategoryTheory.LocallySmall.{v, v, u} C

full_name: CategoryTheory.locallySmall_of_univLE
code: instance (priority := 100) locallySmall_of_univLE (C : Type u) [Category.{v} C] [UnivLE.{v, w}] :
    LocallySmall.{w} C 
goal: CategoryTheory.LocallySmall.{w, v, u} C

full_name: CategoryTheory.locallySmall_max
code: theorem locallySmall_max {C : Type u} [Category.{v} C] : LocallySmall.{max v w} C 
goal: CategoryTheory.LocallySmall.{max v w, v, u} C

full_name: CategoryTheory.locallySmall_of_essentiallySmall
code: instance (priority := 100) locallySmall_of_essentiallySmall (C : Type u) [Category.{v} C]
    [EssentiallySmall.{w} C] : LocallySmall.{w} C 
goal: CategoryTheory.LocallySmall.{w, v, u} C

full_name: CategoryTheory.ShrinkHoms
code: /-- We define a type alias `ShrinkHoms C` for `C`. When we have `LocallySmall.{w} C`,
we'll put a `Category.{w}` instance on `ShrinkHoms C`.
-/
-- Porting note(#5171): removed @[nolint has_nonempty_instance]
@[pp_with_univ]
def ShrinkHoms (C : Type u) 
goal: Type u

full_name: CategoryTheory.ShrinkHoms.toShrinkHoms
code: /-- Help the typechecker by explicitly translating from `C` to `ShrinkHoms C`. -/
def toShrinkHoms {C' : Type*} (X : C') : ShrinkHoms C' 
goal: CategoryTheory.ShrinkHoms.{u_2} C'

full_name: CategoryTheory.ShrinkHoms.fromShrinkHoms
code: /-- Help the typechecker by explicitly translating from `ShrinkHoms C` to `C`. -/
def fromShrinkHoms {C' : Type*} (X : ShrinkHoms C') : C' 
goal: C'

full_name: CategoryTheory.ShrinkHoms.to_from
code: @[simp]
theorem to_from (X : C') : fromShrinkHoms (toShrinkHoms X) = X 
goal: (CategoryTheory.ShrinkHoms.toShrinkHoms X).fromShrinkHoms = X

full_name: CategoryTheory.ShrinkHoms.from_to
code: @[simp]
theorem from_to (X : ShrinkHoms C') : toShrinkHoms (fromShrinkHoms X) = X 
goal: CategoryTheory.ShrinkHoms.toShrinkHoms X.fromShrinkHoms = X

full_name: CategoryTheory.ShrinkHoms.instCategory
code: @[simps]
noncomputable instance : Category.{w} (ShrinkHoms C) 
goal: CategoryTheory.Category.{w, u} (CategoryTheory.ShrinkHoms.{u} C)

full_name: CategoryTheory.ShrinkHoms.instCategory_comp
code: @[simps]
noncomputable instance : Category.{w} (ShrinkHoms C) 
goal: ∀ {X Y Z : CategoryTheory.ShrinkHoms.{u} C} (f : X ⟶ Y) (g : Y ⟶ Z),
  f ≫ g =
    (equivShrink (X.fromShrinkHoms ⟶ Z.fromShrinkHoms))
      ((equivShrink (X.fromShrinkHoms ⟶ Y.fromShrinkHoms)).symm f ≫
        (equivShrink (Y.fromShrinkHoms ⟶ Z.fromShrinkHoms)).symm g)

full_name: CategoryTheory.ShrinkHoms.instCategory_id
code: @[simps]
noncomputable instance : Category.{w} (ShrinkHoms C) 
goal: 𝟙 X = (equivShrink (X.fromShrinkHoms ⟶ X.fromShrinkHoms)) (𝟙 X.fromShrinkHoms)

full_name: CategoryTheory.ShrinkHoms.functor
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def functor : C ⥤ ShrinkHoms C 
goal: C ⥤ CategoryTheory.ShrinkHoms.{u} C

full_name: CategoryTheory.ShrinkHoms.functor_obj
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def functor : C ⥤ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.functor C).obj X = CategoryTheory.ShrinkHoms.toShrinkHoms X

full_name: CategoryTheory.ShrinkHoms.functor_map
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def functor : C ⥤ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.functor C).map f = (equivShrink (X ⟶ Y)) f

full_name: CategoryTheory.ShrinkHoms.inverse
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def inverse : ShrinkHoms C ⥤ C 
goal: CategoryTheory.ShrinkHoms.{u} C ⥤ C

full_name: CategoryTheory.ShrinkHoms.inverse_obj
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def inverse : ShrinkHoms C ⥤ C 
goal: (CategoryTheory.ShrinkHoms.inverse C).obj X = X.fromShrinkHoms

full_name: CategoryTheory.ShrinkHoms.inverse_map
code: /-- Implementation of `ShrinkHoms.equivalence`. -/
@[simps]
noncomputable def inverse : ShrinkHoms C ⥤ C 
goal: (CategoryTheory.ShrinkHoms.inverse C).map f = (equivShrink (X.fromShrinkHoms ⟶ Y.fromShrinkHoms)).symm f

full_name: CategoryTheory.ShrinkHoms.equivalence_unitIso_hom_app
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).unitIso.hom.app X = 𝟙 X

full_name: CategoryTheory.ShrinkHoms.equivalence_counitIso_hom_app
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).counitIso.hom.app X =
  (equivShrink (X.fromShrinkHoms ⟶ X.fromShrinkHoms)) (𝟙 X.fromShrinkHoms)

full_name: CategoryTheory.ShrinkHoms.equivalence_counitIso_inv_app
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).counitIso.inv.app X =
  (equivShrink (X.fromShrinkHoms ⟶ X.fromShrinkHoms)) (𝟙 X.fromShrinkHoms)

full_name: CategoryTheory.ShrinkHoms.equivalence_inverse_obj
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).inverse.obj X = X.fromShrinkHoms

full_name: CategoryTheory.ShrinkHoms.equivalence
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: C ≌ CategoryTheory.ShrinkHoms.{u} C

full_name: CategoryTheory.ShrinkHoms.equivalence_functor_obj
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).functor.obj X = CategoryTheory.ShrinkHoms.toShrinkHoms X

full_name: CategoryTheory.ShrinkHoms.equivalence_functor_map
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).functor.map f = (equivShrink (X ⟶ Y)) f

full_name: CategoryTheory.ShrinkHoms.equivalence_inverse_map
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).inverse.map f = (equivShrink (X.fromShrinkHoms ⟶ Y.fromShrinkHoms)).symm f

full_name: CategoryTheory.ShrinkHoms.equivalence_unitIso_inv_app
code: /-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C 
goal: (CategoryTheory.ShrinkHoms.equivalence C).unitIso.inv.app X = 𝟙 X

full_name: CategoryTheory.Shrink.instCategoryShrink
code: noncomputable instance [Small.{w} C] : Category.{v} (Shrink.{w} C) 
goal: CategoryTheory.Category.{v, w} (Shrink.{w, u} C)

full_name: CategoryTheory.Shrink.equivalence
code: /-- The categorical equivalence between `C` and `Shrink C`, when `C` is small. -/
noncomputable def equivalence [Small.{w} C] : C ≌ Shrink.{w} C 
goal: C ≌ Shrink.{w, u} C

full_name: CategoryTheory.essentiallySmall_iff
code: /-- A category is essentially small if and only if
the underlying type of its skeleton (i.e. the "set" of isomorphism classes) is small,
and it is locally small.
-/
theorem essentiallySmall_iff (C : Type u) [Category.{v} C] :
    EssentiallySmall.{w} C ↔ Small.{w} (Skeleton C) ∧ LocallySmall.{w} C 
goal: CategoryTheory.EssentiallySmall.{w, v, u} C ↔
  Small.{w, u} (CategoryTheory.Skeleton C) ∧ CategoryTheory.LocallySmall.{w, v, u} C

full_name: CategoryTheory.essentiallySmall_of_small_of_locallySmall
code: theorem essentiallySmall_of_small_of_locallySmall [Small.{w} C] [LocallySmall.{w} C] :
    EssentiallySmall.{w} C 
goal: CategoryTheory.EssentiallySmall.{w, v, u} C

full_name: CategoryTheory.locallySmall_fullSubcategory
code: instance locallySmall_fullSubcategory [LocallySmall.{w} C] (P : C → Prop) :
    LocallySmall.{w} (FullSubcategory P) 
goal: CategoryTheory.LocallySmall.{w, v, u} (CategoryTheory.FullSubcategory P)

full_name: CategoryTheory.essentiallySmall_fullSubcategory_mem
code: instance essentiallySmall_fullSubcategory_mem (s : Set C) [Small.{w} s] [LocallySmall.{w} C] :
    EssentiallySmall.{w} (FullSubcategory (· ∈ s)) 
goal: CategoryTheory.EssentiallySmall.{w, v, u} (CategoryTheory.FullSubcategory fun x => x ∈ s)

full_name: CategoryTheory.locallySmall_of_thin
code: /-- Any thin category is locally small.
-/
instance (priority := 100) locallySmall_of_thin {C : Type u} [Category.{v} C] [Quiver.IsThin C] :
    LocallySmall.{w} C 
goal: CategoryTheory.LocallySmall.{w, v, u} C

full_name: CategoryTheory.essentiallySmall_iff_of_thin
code: /--
A thin category is essentially small if and only if the underlying type of its skeleton is small.
-/
theorem essentiallySmall_iff_of_thin {C : Type u} [Category.{v} C] [Quiver.IsThin C] :
    EssentiallySmall.{w} C ↔ Small.{w} (Skeleton C) 
goal: CategoryTheory.EssentiallySmall.{w, v, u} C ↔ Small.{w, u} (CategoryTheory.Skeleton C)

full_name: CategoryTheory.instSmallDiscrete
code: instance [Small.{w} C] : Small.{w} (Discrete C) 
goal: Small.{w, u} (CategoryTheory.Discrete C)