Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  Basic.lean   Sprache: Lean

 

/-
Copyright (c) 2024 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/

module

public import Mathlib.CategoryTheory.Limits.Constructions.EventuallyConstant
public import Mathlib.CategoryTheory.Presentable.IsCardinalFiltered

import Mathlib.CategoryTheory.Limits.Types.CardinalFiltered

/-! # Presentable objects

A functor `F : C ⥤ D` is `κ`-accessible (`Functor.IsCardinalAccessible`)
if it commutes with colimits of shape `J` where `J` is any `κ`-filtered category
(that is essentially small relative to the universe `w` such that `κ : Cardinal.{w}`.).
We also introduce another typeclass `Functor.IsAccessible` saying that there exists
a regular cardinal `κ` such that `Functor.IsCardinalAccessible`.

An object `X` of a category is `κ`-presentable (`IsCardinalPresentable`)
if the functor `Hom(X, _)` (i.e. `coyoneda.obj (op X)`) is `κ`-accessible.
Similarly as for accessible functors, we define a type class `IsPresentable`.

## References
* [Adámek, J. and Rosický, J., *Locally presentable and accessible categories*][Adamek_Rosicky_1994]
-/


@[expose] public section

universe t w w' v₁ v₂ v₃ u₁ u₂ u₃

namespace CategoryTheory

open Limits Opposite

variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]

namespace Functor

section

variable (F G : C ⥤ D) (e : F ≅ G) (κ : Cardinal.{w}) [Fact κ.IsRegular]

/-- A functor `F : C ⥤ D` is `κ`-accessible (with `κ` a regular cardinal)
if it preserves colimits of shape `J` where `J` is any `κ`-filtered category.
In the mathematical literature, some assumptions are often made on the
categories `C` or `D` (e.g. the existence of `κ`-filtered colimits,
see `HasCardinalFilteredColimits` below), but here we do not
make such assumptions. -/

class IsCardinalAccessible : Prop where
  preservesColimitOfShape (J : Type w) [SmallCategory J] [IsCardinalFiltered J κ] :
    PreservesColimitsOfShape J F := by intros; infer_instance

lemma preservesColimitsOfShape_of_isCardinalAccessible [F.IsCardinalAccessible κ]
    (J : Type w) [SmallCategory J] [IsCardinalFiltered J κ] :
    PreservesColimitsOfShape J F :=
  IsCardinalAccessible.preservesColimitOfShape κ _

lemma preservesColimitsOfShape_of_isCardinalAccessible_of_essentiallySmall
    [F.IsCardinalAccessible κ]
    (J : Type u₃) [Category.{v₃} J] [EssentiallySmall.{w} J] [IsCardinalFiltered J κ] :
    PreservesColimitsOfShape J F := by
  have := IsCardinalFiltered.of_equivalence κ (equivSmallModel.{w} J)
  have := F.preservesColimitsOfShape_of_isCardinalAccessible κ (SmallModel.{w} J)
  exact preservesColimitsOfShape_of_equiv (equivSmallModel.{w} J).symm F

variable {κ} in
lemma isCardinalAccessible_of_le
    [F.IsCardinalAccessible κ] {κ' : Cardinal.{w}} [Fact κ'.IsRegular] (h : κ ≤ κ') :
    F.IsCardinalAccessible κ' where
  preservesColimitOfShape {J _ _} := by
    have := IsCardinalFiltered.of_le J h
    exact F.preservesColimitsOfShape_of_isCardinalAccessible κ J

include e in
variable {F G} in
lemma isCardinalAccessible_of_natIso [F.IsCardinalAccessible κ] : G.IsCardinalAccessible κ where
  preservesColimitOfShape J _ hκ := by
    have := F.preservesColimitsOfShape_of_isCardinalAccessible κ J
    exact preservesColimitsOfShape_of_natIso e

instance : IsCardinalAccessible (�� C) κ where

instance {E : Type u₃} [Category.{v₃} E] (F : C ⥤ D) (G : D ⥤ E)
    [F.IsCardinalAccessible κ] [G.IsCardinalAccessible κ] :
    (F ⋙ G).IsCardinalAccessible κ := by
  have := F.preservesColimitsOfShape_of_isCardinalAccessible κ
  have := G.preservesColimitsOfShape_of_isCardinalAccessible κ
  exact { }

instance [PreservesColimitsOfSize.{w, w} F] : F.IsCardinalAccessible κ where

instance (A : C) : IsCardinalAccessible ((Functor.const C).obj A) κ where
  preservesColimitOfShape J _ _ :=
    { preservesColimit {F} :=
        { preserves {c} hc := ⟨by
            have h := isFiltered_of_isCardinalFiltered J κ
            have (j : J) : IsIso ((((const C).obj A).mapCocone c).ι.app j) := by
              dsimp
              infer_instance
            exact Functor.IsEventuallyConstantFrom.isColimitOfIsIso
              (i₀ := h.nonempty.some) (fun _ _ ↦ by dsimp; infer_instance) _⟩ } }

end

section

/-- A functor is accessible relative to a universe `w` if
it is `κ`-accessible for some regular `κ : Cardinal.{w}`. -/

@[pp_with_univ]
class IsAccessible (F : C ⥤ D) : Prop where
  exists_cardinal (F) : ∃ (κ : Cardinal.{w}) (_ : Fact κ.IsRegular), IsCardinalAccessible F κ

variable (F : C ⥤ D)

lemma isAccessible_of_isCardinalAccessible (κ : Cardinal.{w}) [Fact κ.IsRegular]
    [IsCardinalAccessible F κ] : IsAccessible.{w} F where
  exists_cardinal := ⟨κ, inferInstance, inferInstance⟩

instance : IsAccessible.{w} (�� C) :=
  ⟨.aleph0, Cardinal.fact_isRegular_aleph0, inferInstance⟩

instance {E : Type u₃} [Category.{v₃} E] (F : C ⥤ D) (G : D ⥤ E) [IsAccessible.{w} F]
    [IsAccessible.{w} G] : IsAccessible.{w} (F ⋙ G) := by
  obtain ⟨κF, _, _⟩ := IsAccessible.exists_cardinal (F := F)
  obtain ⟨κG, _, _⟩ := IsAccessible.exists_cardinal (F := G)
  have : Fact (κF ⊔ κG).IsRegular := ⟨iteInduction (fun _ ↦ Fact.out) (fun _ ↦ Fact.out)⟩
  have := isCardinalAccessible_of_le F (by simp : κF ≤ κF ⊔ κG)
  have := isCardinalAccessible_of_le G (by simp : κG ≤ κF ⊔ κG)
  exact isAccessible_of_isCardinalAccessible (F ⋙ G) (κF ⊔ κG)

instance (A : C) : IsAccessible.{w} ((Functor.const C).obj A) := by
  have : Fact Cardinal.aleph0.IsRegular := Cardinal.fact_isRegular_aleph0
  exact ⟨Cardinal.aleph0, inferInstance, inferInstance⟩

end

end Functor

section

variable (X : C) (Y : C) (e : X ≅ Y) (κ : Cardinal.{w}) [Fact κ.IsRegular]

/-- An object `X` in a category is `κ`-presentable (for `κ` a regular cardinal)
when the functor `Hom(X, _)` preserves colimits indexed by
`κ`-filtered categories. -/

abbrev IsCardinalPresentable : Prop := (coyoneda.obj (op X)).IsCardinalAccessible κ

variable (C) in
/-- The property of objects that are `κ`-presentable. -/
abbrev isCardinalPresentable : ObjectProperty C := fun X ↦ IsCardinalPresentable X κ

instance (X : (isCardinalPresentable C κ).FullSubcategory) :
    IsCardinalPresentable X.obj κ :=
  X.property

instance (X : (isCardinalPresentable C κ).FullSubcategory) :
    IsCardinalPresentable ((isCardinalPresentable C κ).ι.obj X) κ := by
  dsimp
  infer_instance

lemma isCardinalPresentable_iff_isCardinalAccessible_coyoneda_obj :
    IsCardinalPresentable X κ ↔ (coyoneda.obj (op X)).IsCardinalAccessible κ := Iff.rfl

lemma isCardinalPresentable_iff (X : C) :
    isCardinalPresentable C κ X ↔ IsCardinalPresentable X κ := Iff.rfl

lemma preservesColimitsOfShape_of_isCardinalPresentable [IsCardinalPresentable X κ]
    (J : Type w) [SmallCategory.{w} J] [IsCardinalFiltered J κ] :
    PreservesColimitsOfShape J (coyoneda.obj (op X)) :=
  (coyoneda.obj (op X)).preservesColimitsOfShape_of_isCardinalAccessible κ J

lemma preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall
    [IsCardinalPresentable X κ]
    (J : Type u₃) [Category.{v₃} J] [EssentiallySmall.{w} J] [IsCardinalFiltered J κ] :
    PreservesColimitsOfShape J (coyoneda.obj (op X)) :=
  (coyoneda.obj (op X)).preservesColimitsOfShape_of_isCardinalAccessible_of_essentiallySmall κ J

variable {κ} in
lemma isCardinalPresentable_of_le [IsCardinalPresentable X κ]
    {κ' : Cardinal.{w}} [Fact κ'.IsRegular] (h : κ ≤ κ') :
    IsCardinalPresentable X κ' :=
  (coyoneda.obj (op X)).isCardinalAccessible_of_le h

variable (C) {κ} in
lemma isCardinalPresentable_monotone {κ' : Cardinal.{w}} [Fact κ'.IsRegular] (h : κ ≤ κ') :
    isCardinalPresentable C κ ≤ isCardinalPresentable C κ' := by
  intro X hX
  rw [isCardinalPresentable_iff] at hX ⊢
  exact isCardinalPresentable_of_le _ h

include e in
variable {X Y} in
lemma isCardinalPresentable_of_iso [IsCardinalPresentable X κ] : IsCardinalPresentable Y κ :=
  Functor.isCardinalAccessible_of_natIso (coyoneda.mapIso e.symm.op) κ

instance : (isCardinalPresentable C κ).IsClosedUnderIsomorphisms where
  of_iso e hX := by
    rw [isCardinalPresentable_iff] at hX ⊢
    exact isCardinalPresentable_of_iso e _

lemma isCardinalPresentable_of_equivalence
    {C' : Type u₃} [Category.{v₃} C'] [IsCardinalPresentable X κ] (e : C ≌ C') :
    IsCardinalPresentable (e.functor.obj X) κ := by
  refine ⟨fun J _ _ ↦ ⟨fun {Y} ↦ ?_⟩⟩
  have := preservesColimitsOfShape_of_isCardinalPresentable X κ J
  suffices PreservesColimit Y (coyoneda.obj (op (e.functor.obj X)) ⋙ uliftFunctor.{v₁}) from
    ⟨fun {c} hc ↦ ⟨isColimitOfReflects uliftFunctor.{v₁}
        (isColimitOfPreserves (coyoneda.obj (op (e.functor.obj X)) ⋙ uliftFunctor.{v₁}) hc)⟩⟩
  have iso : coyoneda.obj (op (e.functor.obj X)) ⋙ uliftFunctor.{v₁} ≅
    e.inverse ⋙ coyoneda.obj (op X) ⋙ uliftFunctor.{v₃} :=
    NatIso.ofComponents (fun Z ↦
      (Equiv.ulift.trans ((e.toAdjunction.homEquiv X Z).trans Equiv.ulift.symm)).toIso) (by
        intro _ _ f
        ext ⟨g⟩
        simp [Adjunction.homEquiv_unit])
  exact preservesColimit_of_natIso Y iso.symm

instance isCardinalPresentable_of_isEquivalence
    {C' : Type u₃} [Category.{v₃} C'] [IsCardinalPresentable X κ] (F : C ⥤ C')
    [F.IsEquivalence] :
    IsCardinalPresentable (F.obj X) κ :=
  isCardinalPresentable_of_equivalence X κ F.asEquivalence

@[simp]
lemma isCardinalPresentable_iff_of_isEquivalence
    {C' : Type u₃} [Category.{v₃} C'] (F : C ⥤ C')
    [F.IsEquivalence] :
    IsCardinalPresentable (F.obj X) κ ↔ IsCardinalPresentable X κ := by
  constructor
  · intro
    exact isCardinalPresentable_of_iso
      (show F.inv.obj (F.obj X) ≅ X from F.asEquivalence.unitIso.symm.app X :) κ
  · intro
    infer_instance

variable {X κ} in
open IsFiltered in
lemma IsCardinalPresentable.mk
    (hX : ∀ (J : Type w) [SmallCategory J] [IsCardinalFiltered J κ]
      (F : J ⥤ C) (c : Cocone F) (_ : IsColimit c),
      (∀ (g : X ⟶ c.pt), ∃ (j : J) (f : X ⟶ F.obj j), f ≫ c.ι.app j = g) ∧
      (∀ (j : J) (f₁ f₂ : X ⟶ F.obj j) (_ : f₁ ≫ c.ι.app j = f₂ ≫ c.ι.app j),
        ∃ (j' : J) (a : j ⟶ j'), f₁ ≫ F.map a = f₂ ≫ F.map a)) :
    IsCardinalPresentable X κ where
  preservesColimitOfShape J _ _ :=
    ⟨fun {F} ↦ ⟨fun {c} hc ↦ by
      have := isFiltered_of_isCardinalFiltered J κ
      rw [Types.isColimit_iff_coconeTypesIsColimit]
      refine ⟨fun f₁ f₂ hf ↦ ?_, fun g ↦ ?_⟩
      · obtain ⟨j₁, f₁, rfl⟩ := Functor.ιColimitType_jointly_surjective _ f₁
        obtain ⟨j₂, f₂, rfl⟩ := Functor.ιColimitType_jointly_surjective _ f₂
        dsimp at f₁ f₂ hf
        obtain ⟨j', a, ha⟩ := (hX J F c hc).2 _ (f₁ ≫ F.map (leftToMax j₁ j₂))
          (f₂ ≫ F.map (rightToMax j₁ j₂)) (by simpa)
        simp only [Category.assoc] at ha
        exact Functor.ιColimitType_eq_of_map_eq_map _ _ _
          (leftToMax j₁ j₂ ≫ a) (rightToMax j₁ j₂ ≫ a) (by simpa)
      · obtain ⟨j, f, rfl⟩ := (hX J F c hc).1 g
        exact ⟨Functor.ιColimitType _ j f, rfl⟩⟩⟩

section

variable {J : Type*} [Category* J] {D : J ⥤ C}

lemma Limits.exists_hom_of_preservesColimit_coyoneda {c : Cocone D} (hc : IsColimit c) {X : C}
    [PreservesColimit D (coyoneda.obj (.op X))] (f : X ⟶ c.pt) :
    ∃ (j : J) (p : X ⟶ D.obj j), p ≫ c.ι.app j = f :=
  Types.jointly_surjective_of_isColimit (isColimitOfPreserves (coyoneda.obj (.op X)) hc) f

lemma Limits.exists_hom₂_of_preservesColimit_coyoneda
    [IsFiltered J] {c : Cocone D} (hc : IsColimit c) {X : C}
    [PreservesColimit D (coyoneda.obj (.op X))] (f g : X ⟶ c.pt) :
    ∃ (j : J) (p q : X ⟶ D.obj j), p ≫ c.ι.app j = f ∧ q ≫ c.ι.app j = g :=
  Types.FilteredColimit.jointly_surjective_of_isColimit₂
    (isColimitOfPreserves (coyoneda.obj (.op X)) hc) f g

lemma Limits.exists_hom_of_preservesColimit_coyoneda_of_hasCardinalLT
    [IsCardinalFiltered J κ] {c : Cocone D} (hc : IsColimit c) {X : C}
    [PreservesColimit D (coyoneda.obj (.op X))] {ι : Type*} (hi : HasCardinalLT ι κ)
    (f : ι → (X ⟶ c.pt)) :
    ∃ (j : J) (p : ι → (X ⟶ D.obj j)), ∀ (i : ι), p i ≫ c.ι.app j = f i :=
  Types.FilteredColimit.jointly_surjective_of_isColimit_of_hasCardinalLT.{w} κ
    (isColimitOfPreserves (coyoneda.obj (.op X)) hc) hi f

lemma Limits.exists_eq_of_preservesColimit_coyoneda [IsFiltered J] {c : Cocone D}
    (hc : IsColimit c) {X : C} [PreservesColimit D (coyoneda.obj (.op X))]
    {i j : J} (f : X ⟶ D.obj i) (g : X ⟶ D.obj j) (h : f ≫ c.ι.app i = g ≫ c.ι.app j) :
    ∃ (k : J) (u : i ⟶ k) (v : j ⟶ k), f ≫ D.map u = g ≫ D.map v :=
  (Types.FilteredColimit.isColimit_eq_iff _ (isColimitOfPreserves (coyoneda.obj (.op X)) hc)).mp h

lemma Limits.exists_eq_of_preservesColimit_coyoneda_self [IsFiltered J] {c : Cocone D}
    (hc : IsColimit c) {X : C} [PreservesColimit D (coyoneda.obj (.op X))]
    {i : J} (f g : X ⟶ D.obj i) (h : f ≫ c.ι.app i = g ≫ c.ι.app i) :
    ∃ (j : J) (a : i ⟶ j), f ≫ D.map a = g ≫ D.map a :=
  (Types.FilteredColimit.isColimit_eq_iff'
    (isColimitOfPreserves (coyoneda.obj (.op X)) hc) f g).mp h

lemma Limits.exists_eq_of_preservesColimit_coyoneda_self_of_hasCardinalLT [IsCardinalFiltered J κ]
    {c : Cocone D} (hc : IsColimit c) {X : C} [PreservesColimit D (coyoneda.obj (.op X))]
    {i : J} {ι : Type*} (hi : HasCardinalLT ι κ)
    (f : ι → (X ⟶ D.obj i)) (h : ∀ (k k' : ι), f k ≫ c.ι.app i = f k' ≫ c.ι.app i) :
    ∃ (j : J) (a : i ⟶ j), ∀ (k k' : ι), f k ≫ D.map a = f k' ≫ D.map a :=
  (Types.FilteredColimit.isColimit_eq_iff'_of_hasCardinalLT κ
    (isColimitOfPreserves (coyoneda.obj (.op X)) hc) hi f).mp h

lemma Limits.exists_hom_of_preservesColimit_yoneda {c : Cone D} (hc : IsLimit c) {X : C}
    [PreservesColimit D.op (yoneda.obj X)] (f : c.pt ⟶ X) :
    ∃ (j : J) (p : D.obj j ⟶ X), c.π.app j ≫ p = f := by
  obtain ⟨j, p, hp⟩ := Types.jointly_surjective_of_isColimit
    (isColimitOfPreserves (yoneda.obj X) hc.op) f
  exact ⟨j.unop, p, hp⟩

lemma Limits.exists_eq_of_preservesColimit_yoneda [IsCofiltered J] {c : Cone D} (hc : IsLimit c)
    {X : C} [PreservesColimit D.op (yoneda.obj X)]
    {i j : J} (f : D.obj i ⟶ X) (g : D.obj j ⟶ X) (h : c.π.app i ≫ f = c.π.app j ≫ g) :
    ∃ (k : J) (u : k ⟶ i) (v : k ⟶ j), D.map u ≫ f = D.map v ≫ g := by
  obtain ⟨k, u, v, huv⟩ :=
    (Types.FilteredColimit.isColimit_eq_iff _ (isColimitOfPreserves (yoneda.obj X) hc.op)).mp h
  exact ⟨k.unop, u.unop, v.unop, huv⟩

lemma Limits.exists_eq_of_preservesColimit_yoneda_self [IsCofiltered J] {c : Cone D}
    (hc : IsLimit c) {X : C} [PreservesColimit D.op (yoneda.obj X)]
    {i : J} (f g : D.obj i ⟶ X) (h : c.π.app i ≫ f = c.π.app i ≫ g) :
    ∃ (j : J) (a : j ⟶ i), D.map a ≫ f = D.map a ≫ g := by
  obtain ⟨j, a, ha⟩ := (Types.FilteredColimit.isColimit_eq_iff'
    (isColimitOfPreserves (yoneda.obj X) hc.op) f g).mp h
  exact ⟨j.unop, a.unop, ha⟩

variable {X} in
lemma IsCardinalPresentable.exists_hom_of_isColimit [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) (f : X ⟶ c.pt) :
    ∃ (j : J) (f' : X ⟶ F.obj j), f' ≫ c.ι.app j = f := by
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  exact exists_hom_of_preservesColimit_coyoneda hc f

variable {X} in
/-- A variant of `IsCardinalPresentable.exists_hom_of_isColimit` where one also imposes
the index found to be over a given index `j₀`. -/

lemma IsCardinalPresentable.exists_hom_above_of_isColimit [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) (f : X ⟶ c.pt) (j₀ : J) :
    ∃ (j : J) (_ : j₀ ⟶ j) (f' : X ⟶ F.obj j), f' ≫ c.ι.app j = f := by
  obtain ⟨j₁, f₁, hf₁⟩ := exists_hom_of_isColimit κ hc f
  have := isFiltered_of_isCardinalFiltered J κ
  exact ⟨IsFiltered.max j₀ j₁, IsFiltered.leftToMax .., f₁ ≫ F.map (IsFiltered.rightToMax ..),
    by simpa⟩

variable {X}

lemma IsCardinalPresentable.exists_hom₂_of_isColimit [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) (f g : X ⟶ c.pt) :
    ∃ (j : J) (f' g' : X ⟶ F.obj j), f' ≫ c.ι.app j = f ∧ g' ≫ c.ι.app j = g := by
  have := isFiltered_of_isCardinalFiltered J κ
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  exact exists_hom₂_of_preservesColimit_coyoneda hc f g

lemma IsCardinalPresentable.exists_hom_of_isColimit_of_hasCardinalLT [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) {ι : Type*} (hι : HasCardinalLT ι κ)
    (f : ι → (X ⟶ c.pt)) :
    ∃ (j : J) (f' : ι → (X ⟶ F.obj j)), ∀ (i : ι), f' i ≫ c.ι.app j = f i :=
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  exists_hom_of_preservesColimit_coyoneda_of_hasCardinalLT κ hc hι f

lemma IsCardinalPresentable.exists_eq_of_isColimit [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) {i₁ i₂ : J} (f₁ : X ⟶ F.obj i₁)
    (f₂ : X ⟶ F.obj i₂) (hf : f₁ ≫ c.ι.app i₁ = f₂ ≫ c.ι.app i₂) :
    ∃ (j : J) (u : i₁ ⟶ j) (v : i₂ ⟶ j), f₁ ≫ F.map u = f₂ ≫ F.map v := by
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  have := isFiltered_of_isCardinalFiltered J κ
  exact exists_eq_of_preservesColimit_coyoneda hc f₁ f₂ hf

lemma IsCardinalPresentable.exists_eq_of_isColimit' [IsCardinalPresentable X κ]
    [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) {i : J} (f₁ f₂ : X ⟶ F.obj i)
    (hf : f₁ ≫ c.ι.app i = f₂ ≫ c.ι.app i) :
    ∃ (j : J) (u : i ⟶ j), f₁ ≫ F.map u = f₂ ≫ F.map u := by
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  have := isFiltered_of_isCardinalFiltered J κ
  exact exists_eq_of_preservesColimit_coyoneda_self hc f₁ f₂ hf

lemma IsCardinalPresentable.exists_eq_of_isColimit'_of_hasCardinalLT
    [IsCardinalPresentable X κ] [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c) {i : J} {ι : Type*} (hι : HasCardinalLT ι κ)
    (f : ι → (X ⟶ F.obj i))
    (hf : ∀ (i₀ i₁ : ι), f i₀ ≫ c.ι.app i = f i₁ ≫ c.ι.app i) :
    ∃ (j : J) (u : i ⟶ j), ∀ (i₀ i₁ : ι), f i₀ ≫ F.map u = f i₁ ≫ F.map u :=
  have := preservesColimitsOfShape_of_isCardinalPresentable_of_essentiallySmall X κ J
  exists_eq_of_preservesColimit_coyoneda_self_of_hasCardinalLT _ hc hι f hf

/-- In a category `C`, given a diagram `F : J ⥤ C` where `J` is κ-filtered
and a commutative square
```
 X₀ ------> X₁
 |          |
 | g        | q
 v          v
F(j₀) --> colim F
```
where X₁ is κ-presentable, there exists an index j₁ and a commutative diagram
```
  X₀ -------------> X₁
  |                 |  \
  |                 |   v
  | g            q' |   colimF
  |                 |   ^
  v                 v  /
F(j₀) ----------> F(j₁)
```
-/

lemma IsCardinalPresentable.exists_of_square
    [IsCardinalFiltered J κ] [EssentiallySmall.{w} J] {F : J ⥤ C} {c : Limits.Cocone F}
    (hc : IsColimit c) {X₀ X₁ : C} [IsCardinalPresentable X₀ κ] [IsCardinalPresentable X₁ κ]
    (f₀₁ : X₀ ⟶ X₁) (q : X₁ ⟶ c.pt) {j₀ : J} (g : X₀ ⟶ F.obj j₀)
    (h : f₀₁ ≫ q = g ≫ c.ι.app j₀) :
    ∃ (j₁ : J) (u : j₀ ⟶ j₁) (q' : X₁ ⟶ F.obj j₁),
      (f₀₁ ≫ q' = g ≫ F.map u) ∧ (q = q' ≫ c.ι.app j₁) := by
  obtain ⟨j₁₀, u', v', hu'⟩ := IsCardinalPresentable.exists_hom_above_of_isColimit κ hc
    q j₀
  obtain ⟨j₁, u, w⟩ := IsCardinalPresentable.exists_eq_of_isColimit' κ hc (f₀₁ ≫ v')
    (g ≫ F.map u') (by simpa [hu'])
  exact ⟨j₁, u' ≫ u, v' ≫ F.map u, by grind, by simp [hu']⟩

/-- Given a commutative square where both objects on the top are `κ`-presentable
and the bottom map is a colimit of a natural transformation `f : X ⟶ Y` between
functors in `J ⥤ C` where `J` is `κ`-filtered, the commutative square can be
refined by replacing the colimit map in the bottom by a morphism
`f.app j : X.obj j ⟶ Y.obj j` for a big enough `j`. -/

lemma IsCardinalPresentable.exists_commSq_of_isColimit
    {J : Type*} [Category* J] [EssentiallySmall.{w} J] [IsCardinalFiltered J κ]
    {X Y : J ⥤ C} (f : X ⟶ Y) {c₁ : Cocone X} {c₂ : Cocone Y}
    (hc₁ : IsColimit c₁) (hc₂ : IsColimit c₂)
    (f' : c₁.pt ⟶ c₂.pt) (hf' : ∀ (j : J), c₁.ι.app j ≫ f' = f.app j ≫ c₂.ι.app j)
    ⦃X' Y' : C⦄ ⦃t : X' ⟶ Y'⦄ ⦃l : X' ⟶ c₁.pt⦄ ⦃r : Y' ⟶ c₂.pt⦄
    [IsCardinalPresentable X' κ] [IsCardinalPresentable Y' κ]
    (sq : CommSq t l r f') :
    ∃ (j : J) (l' : X' ⟶ X.obj j) (r' : Y' ⟶ Y.obj j),
      l' ≫ c₁.ι.app j = l ∧ r' ≫ c₂.ι.app j = r ∧ CommSq t l' r' (f.app j) := by
  have := isFiltered_of_isCardinalFiltered J κ
  obtain ⟨j₁, l', hl'⟩ := IsCardinalPresentable.exists_hom_of_isColimit κ hc₁ l
  obtain ⟨j₂, r', hr'⟩ := IsCardinalPresentable.exists_hom_of_isColimit κ hc₂ r
  obtain ⟨j₃, a, b, _⟩ := IsFilteredOrEmpty.cocone_objs j₁ j₂
  obtain ⟨j₄, c, hc⟩ := IsCardinalPresentable.exists_eq_of_isColimit' κ
    hc₂ (t ≫ r' ≫ Y.map b) (l' ≫ X.map a ≫ f.app j₃) (by
      simp [dsimp% hr', sq.w, ← dsimp% hf', reassoc_of% dsimp% hl'])
  exact ⟨j₄, l' ≫ X.map a ≫ X.map c, r' ≫ Y.map b ≫ Y.map c, by cat_disch⟩

end

lemma isCardinalPresentable_iff_isCardinalAccessible_uliftCoyoneda_obj :
    IsCardinalPresentable X κ ↔ (uliftCoyoneda.{t}.obj (op X)).IsCardinalAccessible κ := by
  change _ ↔ (coyoneda.obj (op X) ⋙ uliftFunctor.{t}).IsCardinalAccessible κ
  refine ⟨fun _ ↦ inferInstance, fun _ ↦ ⟨fun J _ _ ↦ ?_⟩⟩
  have := Functor.preservesColimitsOfShape_of_isCardinalAccessible
    (coyoneda.obj (op X) ⋙ uliftFunctor.{t}) κ J
  exact preservesColimitsOfShape_of_reflects_of_preserves _ uliftFunctor.{t, v₁}

instance [IsCardinalPresentable X κ] :
    (uliftCoyoneda.{t}.obj (op X)).IsCardinalAccessible κ :=
  (isCardinalPresentable_iff_isCardinalAccessible_uliftCoyoneda_obj.{t} X κ).1 inferInstance

end

section

variable (X : C)

/-- An object of a category is presentable relative to a universe `w`
if it is `κ`-presentable for some regular `κ : Cardinal.{w}`. -/

@[pp_with_univ]
abbrev IsPresentable (X : C) : Prop :=
  Functor.IsAccessible.{w} (coyoneda.obj (op X))

lemma isPresentable_of_isCardinalPresentable (κ : Cardinal.{w}) [Fact κ.IsRegular]
    [IsCardinalPresentable X κ] : IsPresentable.{w} X where
  exists_cardinal := ⟨κ, inferInstance, inferInstance⟩

end

section

/-- A category has `κ`-filtered colimits if it has colimits of shape `J`
for any `κ`-filtered category `J`. -/

class HasCardinalFilteredColimits (C : Type u₁) [Category.{v₁} C]
    (κ : Cardinal.{w}) [Fact κ.IsRegular] : Prop where
  hasColimitsOfShape' (C) (J : Type w) [SmallCategory J] [IsCardinalFiltered J κ] :
    HasColimitsOfShape J C := by intros; infer_instance

instance (κ : Cardinal.{w}) [Fact κ.IsRegular] [HasColimitsOfSize.{w, w} C] :
    HasCardinalFilteredColimits.{w} C κ where

variable (C) in
lemma HasCardinalFilteredColimits.hasColimitsOfShape
    (κ : Cardinal.{w}) [Fact κ.IsRegular] [HasCardinalFilteredColimits C κ]
    (J : Type u₃) [Category.{v₃} J] [EssentiallySmall.{w} J] [IsCardinalFiltered J κ] :
    HasColimitsOfShape J C := by
  have := IsCardinalFiltered.of_equivalence κ (equivSmallModel.{w} J)
  have := HasCardinalFilteredColimits.hasColimitsOfShape' C κ (SmallModel.{w} J)
  exact hasColimitsOfShape_of_equivalence (equivSmallModel.{w} J).symm

variable {κ} in
lemma HasCardinalFilteredColimits.of_le {κ : Cardinal.{w}} [Fact κ.IsRegular]
    [HasCardinalFilteredColimits C κ] {κ' : Cardinal.{w}} [Fact κ'.IsRegular] (h : κ ≤ κ') :
    HasCardinalFilteredColimits C κ' where
  hasColimitsOfShape' J _ _ := by
    have := IsCardinalFiltered.of_le J h
    exact HasCardinalFilteredColimits.hasColimitsOfShape C κ J

end

end CategoryTheory

Messung
CHZG
9310010097

¤ Dauer der Verarbeitung: 0.5 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,119
#Domains=863,732