Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
0757d2d
feat(CategoryTheory): colimits of objects satisfying a property
joelriou Sep 20, 2025
d6676bd
fix
joelriou Sep 20, 2025
a57afac
typo
joelriou Sep 20, 2025
31376ce
fix
joelriou Sep 20, 2025
fd70884
better syntax
joelriou Sep 20, 2025
73661c2
typo
joelriou Sep 20, 2025
41d6537
fixing imports
joelriou Sep 20, 2025
89f7db3
feat(CategoryTheory): limit presentations
joelriou Sep 21, 2025
34da8ad
Merge branch 'object-property-colimits-of-shape' into object-property…
joelriou Sep 21, 2025
627eb98
wip
joelriou Sep 21, 2025
35c1354
feat(CategoryTheory/ObjectProperty): closure under limits
joelriou Sep 21, 2025
581970c
typo
joelriou Sep 21, 2025
6b20d72
wip
joelriou Sep 21, 2025
b5c6c94
wip
joelriou Sep 21, 2025
f2e0f5c
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Sep 22, 2025
d940d3b
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Sep 22, 2025
54e8d01
wip
joelriou Sep 22, 2025
796f4b0
wip
joelriou Sep 22, 2025
d912563
wip
joelriou Sep 22, 2025
71eea38
wip
joelriou Sep 22, 2025
01df6fa
generalising universes
joelriou Sep 22, 2025
d328e58
wip
joelriou Sep 22, 2025
f7f1478
fixing the build
joelriou Sep 22, 2025
2b7b1ce
fix
joelriou Sep 22, 2025
d3c4a13
fixing the build
joelriou Sep 23, 2025
57c6400
chore(CategoryTheory): split Limits.Presentation
joelriou Sep 23, 2025
14ca7ef
added comment
joelriou Sep 23, 2025
43c5d3b
fix
joelriou Sep 23, 2025
d8abdda
updated Mathlib.lean
joelriou Sep 23, 2025
4a16754
wip
joelriou Sep 23, 2025
ebfbf0b
Merge branch 'split-limits-presentation' into refactor-object-propert…
joelriou Sep 23, 2025
98b8c68
Update Mathlib/CategoryTheory/Limits/Presentation.lean
joelriou Sep 23, 2025
733dbd9
Update Mathlib/CategoryTheory/Limits/Presentation.lean
joelriou Sep 23, 2025
3c9f5e8
Update Mathlib/CategoryTheory/Limits/Presentation.lean
joelriou Sep 23, 2025
cfa5139
Update Mathlib/CategoryTheory/ObjectProperty/ColimitsOfShape.lean
joelriou Sep 23, 2025
8945e38
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Sep 23, 2025
579a4cc
removed unnecessary universe
joelriou Sep 23, 2025
37d7868
Merge remote-tracking branch 'origin/master' into limit-presentation
joelriou Sep 23, 2025
316fe41
Merge remote-tracking branch 'origin/limit-presentation' into object-…
joelriou Sep 23, 2025
6e01466
suggestions by chrisflav
joelriou Sep 23, 2025
e55e768
move definitions to a file with fewer imports
joelriou Sep 23, 2025
ce92beb
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Sep 26, 2025
97379ae
Update Mathlib/CategoryTheory/ObjectProperty/ColimitsOfShape.lean
joelriou Sep 28, 2025
1d4d02b
Update Mathlib/CategoryTheory/ObjectProperty/ColimitsOfShape.lean
joelriou Sep 28, 2025
a3e86ad
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Sep 28, 2025
b0c3cb9
Small.of_le
joelriou Sep 28, 2025
87ad9d8
added docstring
joelriou Sep 28, 2025
e987d4a
Merge branch 'object-property-colimits-of-shape' into object-property…
joelriou Sep 28, 2025
34e7f38
small fixes
joelriou Sep 28, 2025
742c302
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Sep 28, 2025
9e31e42
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Sep 29, 2025
d9ae191
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Oct 2, 2025
10f966a
Merge remote-tracking branch 'origin/object-property-limits-of-shape'…
joelriou Oct 2, 2025
c3622af
Merge remote-tracking branch 'origin/split-limits-presentation' into …
joelriou Oct 2, 2025
db20612
fix
joelriou Oct 2, 2025
042df44
Merge remote-tracking branch 'origin/master' into refactor-object-pro…
joelriou Oct 2, 2025
36bfb71
fixing imports
joelriou Oct 2, 2025
60e563b
Merge remote-tracking branch 'origin/refactor-object-property-closed-…
joelriou Oct 2, 2025
df36a4c
feat(CategoryTheory/ObjectProperty): closure under colimits
joelriou Oct 3, 2025
8ccc916
typo
joelriou Oct 3, 2025
bb4d4f7
wip
joelriou Oct 3, 2025
d7c12f5
fix
joelriou Oct 3, 2025
3fa344a
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Oct 5, 2025
5aea955
Merge remote-tracking branch 'origin/master' into split-limits-presen…
joelriou Oct 5, 2025
fba5a70
Merge remote-tracking branch 'origin/split-limits-presentation' into …
joelriou Oct 5, 2025
45cb05f
Merge remote-tracking branch 'origin/refactor-object-property-closed-…
joelriou Oct 6, 2025
d12c71c
Merge remote-tracking branch 'origin/object-property-limits-closure' …
joelriou Oct 6, 2025
7a39c53
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 6, 2025
e585c37
Merge remote-tracking branch 'origin/master' into split-limits-presen…
joelriou Oct 8, 2025
854a78b
Merge remote-tracking branch 'origin/master' into split-limits-presen…
joelriou Oct 11, 2025
552c1ab
Merge remote-tracking branch 'origin/split-limits-presentation' into …
joelriou Oct 11, 2025
8dd48c2
Merge remote-tracking branch 'origin/refactor-object-property-closed-…
joelriou Oct 11, 2025
37253e1
Merge remote-tracking branch 'origin/object-property-limits-closure' …
joelriou Oct 11, 2025
814574f
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 11, 2025
604b61f
wip
joelriou Oct 11, 2025
3afb514
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 11, 2025
52e7c0e
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Oct 13, 2025
7412fde
Merge remote-tracking branch 'origin/master' into refactor-object-pro…
joelriou Oct 13, 2025
6ec9b89
Apply suggestion from @joelriou
joelriou Oct 13, 2025
6da7d95
fix
joelriou Oct 16, 2025
5ed0d36
Merge remote-tracking branch 'origin/master' into refactor-object-pro…
joelriou Oct 16, 2025
a8d9e19
Merge remote-tracking branch 'origin/master' into refactor-object-pro…
joelriou Oct 20, 2025
a5eca07
Merge remote-tracking branch 'origin/refactor-object-property-closed-…
joelriou Oct 20, 2025
55d5269
Merge remote-tracking branch 'origin/object-property-limits-closure' …
joelriou Oct 20, 2025
29815e8
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 20, 2025
e2a124a
wip
joelriou Oct 23, 2025
63db950
Merge remote-tracking branch 'origin/object-property-limits-closure' …
joelriou Oct 23, 2025
985ea6c
wip
joelriou Oct 23, 2025
d2c3397
wip
joelriou Oct 23, 2025
472ee70
wip
joelriou Oct 23, 2025
87e2d14
wip
joelriou Oct 23, 2025
105e4ed
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 23, 2025
b305f69
wip
joelriou Oct 23, 2025
e858756
typo
joelriou Oct 23, 2025
b817ecf
typo
joelriou Oct 23, 2025
966b688
wip
joelriou Oct 23, 2025
01f1e21
Merge remote-tracking branch 'origin/master' into refactor-object-pro…
joelriou Oct 25, 2025
6755b2b
apply (config := { allowSynthFailures := true })
joelriou Oct 25, 2025
fa01e0c
removed unnecessary line
joelriou Oct 25, 2025
be9f65b
Update Mathlib/CategoryTheory/Limits/MorphismProperty.lean
joelriou Oct 27, 2025
cd54e27
Merge remote-tracking branch 'origin/refactor-object-property-closed-…
joelriou Oct 27, 2025
5ca0c28
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Oct 27, 2025
b25562b
Merge remote-tracking branch 'origin/master' into object-property-lim…
joelriou Oct 28, 2025
6c1146b
Merge remote-tracking branch 'origin/object-property-limits-closure' …
joelriou Oct 28, 2025
45b994d
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 28, 2025
0c510e1
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 28, 2025
65f7729
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Oct 29, 2025
241aaa6
Apply suggestion from @joelriou
joelriou Oct 29, 2025
52ce56c
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Oct 29, 2025
80d6f07
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 29, 2025
e026f7e
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Oct 29, 2025
1910327
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Nov 8, 2025
3e76d18
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Nov 8, 2025
5803752
Merge remote-tracking branch 'origin/master' into object-property-col…
joelriou Nov 17, 2025
8464420
Merge remote-tracking branch 'origin/object-property-colimits-closure…
joelriou Nov 17, 2025
9bb7ca3
Merge remote-tracking branch 'origin/master' into cardinal-cocontinuous
joelriou Nov 20, 2025
d78f3ab
wip
joelriou Nov 20, 2025
c5d7a6b
Merge remote-tracking branch 'origin/master' into cardinal-cocontinuous
joelriou Nov 24, 2025
2e04ace
Merge remote-tracking branch 'origin/master' into cardinal-cocontinuous
joelriou Dec 2, 2025
b5704cd
Merge remote-tracking branch 'origin/master' into cardinal-cocontinuous
joelriou Dec 4, 2025
930f86b
fix
joelriou Dec 4, 2025
24989cd
cleaning up
joelriou Dec 4, 2025
1bbfe07
feat(CategoryTheory): more preservation properties of functors
joelriou Dec 4, 2025
658e18c
feat(CategoryTheory): the yoneda embedding for a locally small category
joelriou Dec 4, 2025
ea7ea9a
fix
joelriou Dec 4, 2025
4bfa6df
Merge remote-tracking branch 'origin/cardinal-cocontinuous-1' into ca…
joelriou Dec 4, 2025
81a522c
Merge remote-tracking branch 'origin/cardinal-cocontinuous-2' into ca…
joelriou Dec 4, 2025
82ec360
fix
joelriou Dec 4, 2025
9ca416a
Merge remote-tracking branch 'origin/master' into cardinal-cocontinuous
joelriou Dec 11, 2025
2d683f0
fix
joelriou Dec 11, 2025
80d6af3
Merge remote-tracking branch 'origin/cardinal-cocontinuous-3' into ca…
joelriou Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2885,6 +2885,7 @@ public import Mathlib.CategoryTheory.ObjectProperty.Equivalence
public import Mathlib.CategoryTheory.ObjectProperty.Extensions
public import Mathlib.CategoryTheory.ObjectProperty.FullSubcategory
public import Mathlib.CategoryTheory.ObjectProperty.FunctorCategory.PreservesLimits
public import Mathlib.CategoryTheory.ObjectProperty.FunctorCategory.Presheaf
public import Mathlib.CategoryTheory.ObjectProperty.HasCardinalLT
public import Mathlib.CategoryTheory.ObjectProperty.Ind
public import Mathlib.CategoryTheory.ObjectProperty.InheritedFromHom
Expand Down Expand Up @@ -2937,6 +2938,7 @@ public import Mathlib.CategoryTheory.Presentable.Adjunction
public import Mathlib.CategoryTheory.Presentable.Basic
public import Mathlib.CategoryTheory.Presentable.CardinalFilteredPresentation
public import Mathlib.CategoryTheory.Presentable.ColimitPresentation
public import Mathlib.CategoryTheory.Presentable.Continuous
public import Mathlib.CategoryTheory.Presentable.Dense
public import Mathlib.CategoryTheory.Presentable.Directed
public import Mathlib.CategoryTheory.Presentable.EssentiallyLarge
Expand Down
1 change: 1 addition & 0 deletions Mathlib/CategoryTheory/Limits/Types/Limits.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def coneOfSection {s} (hs : s ∈ F.sections) : Cone F where

/-- Given a cone over a functor F into `Type*` and an element in the cone point,
construct a section of F. -/
@[simps]
def sectionOfCone (c : Cone F) (x : c.pt) : F.sections :=
⟨fun j ↦ c.π.app j x, fun f ↦ congr_fun (c.π.naturality f).symm x⟩

Expand Down
3 changes: 3 additions & 0 deletions Mathlib/CategoryTheory/MorphismProperty/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ lemma ofHoms_homFamily (P : MorphismProperty C) : ofHoms P.homFamily = P := by
· intro hf
exact ⟨(⟨f, hf⟩ : P.toSet)⟩

/-- The class of morphisms containing a single morphism. -/
abbrev single {X Y : C} (f : X ⟶ Y) : MorphismProperty C := .ofHoms (fun (_ : Unit) ↦ f)

end

section
Expand Down
12 changes: 12 additions & 0 deletions Mathlib/CategoryTheory/MorphismProperty/IsSmall.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ lemma isSmall_iff_eq_ofHoms :
· rintro ⟨_, _, _, _, rfl⟩
infer_instance

lemma iSup_ofHoms {α : Type*} {ι : α → Type t} {A B : ∀ a, ι a → C}
(f : ∀ a, ∀ i, A a i ⟶ B a i) :
⨆ (a : α), ofHoms (f a) = ofHoms (fun (j : Σ (a : α), ι a) ↦ f j.1 j.2) := by
ext f
simp [ofHoms_iff]

instance {ι : Type t} [Small.{w} ι] (W : ι → MorphismProperty C) [∀ i, IsSmall.{w} (W i)] :
IsSmall.{w} (⨆ i, W i) := by
choose α A B f hf using fun i ↦ (isSmall_iff_eq_ofHoms.{w} (W i)).1 inferInstance
simp only [hf, iSup_ofHoms]
infer_instance

end MorphismProperty

end CategoryTheory
150 changes: 150 additions & 0 deletions Mathlib/CategoryTheory/ObjectProperty/FunctorCategory/Presheaf.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/-
Copyright (c) 2025 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.ObjectProperty.FunctorCategory.PreservesLimits
public import Mathlib.CategoryTheory.ObjectProperty.Local
public import Mathlib.CategoryTheory.Limits.FunctorCategory.Basic
public import Mathlib.CategoryTheory.Limits.Types.Colimits
public import Mathlib.CategoryTheory.Limits.Types.Limits
public import Mathlib.CategoryTheory.ShrinkYoneda

/-!
# Presheaves of types which preserves a limit

Let `F : J ⥤ Cᵒᵖ` be a functor. We show that a presheaf `P : Cᵒᵖ ⥤ Type w`
preserves the limit of `F` iff `P` is a local object with respect to a suitable
family of morphisms in `Cᵒᵖ ⥤ Type w` (this family contains `1` or `0` morphism
depending on whether the limit of `F` exists or not).

-/

@[expose] public section

universe w w' v v' u u'

namespace CategoryTheory

open Limits Opposite

namespace Presheaf

section

variable {C : Type u} [Category.{v} C]
{J : Type u'} [Category.{v'} J] [LocallySmall.{w} C]
{F : J ⥤ Cᵒᵖ} (c : Cone F) {c' : Cocone (F.leftOp ⋙ shrinkYoneda.{w})}
(hc : IsLimit c) (hc' : IsColimit c') (P : Cᵒᵖ ⥤ Type w)

variable {P} in
/-- Let `F : J ⥤ Cᵒᵖ` be a functor, `c'` a colimit cocone for `F.leftOp ⋙ shrinkYoneda.{w}`.
For any `P : Cᵒᵖ ⥤ Type w`, this is the bijection between `c'.pt ⟶ P` and the type
of sections of `F ⋙ P`. -/
@[simps -isSimp symm_apply apply_coe]
noncomputable def coconeCompShrinkYonedaHomEquiv :
(c'.pt ⟶ P) ≃ (F ⋙ P).sections where
toFun f :=
{ val j := shrinkYonedaEquiv (c'.ι.app (op j) ≫ f)
property {X X'} g := by
have h₁ := c'.w g.op
dsimp at h₁ ⊢
rw [← h₁, Category.assoc]
conv_rhs => rw [shrinkYonedaEquiv_comp]
rw [shrinkYonedaEquiv_shrinkYoneda_map]
apply map_shrinkYonedaEquiv }
invFun s := hc'.desc (Cocone.mk _
{ app j := shrinkYonedaEquiv.symm (s.val j.unop)
naturality j₁ j₂ f := by
rw [← s.property f.unop]
dsimp
rw [shrinkYonedaEquiv_symm_map, Category.comp_id] })
left_inv f := hc'.hom_ext (by simp)
right_inv u := by ext; simp


/-- Let `F : J ⥤ Cᵒᵖ` be a functor, `c'` a colimit cocone for `F.leftOp ⋙ shrinkYoneda.{w}`.
For any cone `c` for `F`, this is the canonical natural transformation
`c'.pt ⟶ shrinkYoneda.{w}.obj c.pt.unop`. -/
noncomputable def coconePtToShrinkYoneda :
c'.pt ⟶ shrinkYoneda.{w}.obj c.pt.unop :=
hc'.desc (shrinkYoneda.{w}.mapCocone (coconeLeftOpOfCone c))

variable {P} in
@[reassoc]
lemma coconePtToShrinkYoneda_comp (x : P.obj c.pt) :
coconePtToShrinkYoneda c hc' ≫ shrinkYonedaEquiv.symm x =
(coconeCompShrinkYonedaHomEquiv hc').symm
(Types.sectionOfCone (P.mapCone c) x) := by
refine hc'.hom_ext (fun j ↦ ?_)
dsimp [coconePtToShrinkYoneda, coconeCompShrinkYonedaHomEquiv_symm_apply]
rw [hc'.fac_assoc, hc'.fac]
exact (shrinkYonedaEquiv_symm_map _ _).symm

lemma nonempty_isLimit_mapCone_iff :
Nonempty (IsLimit (P.mapCone c)) ↔
(MorphismProperty.single (coconePtToShrinkYoneda c hc')).isLocal P := by
rw [Types.isLimit_iff_bijective_sectionOfCone,
MorphismProperty.isLocal_single_iff_bijective,
← Function.Bijective.of_comp_iff' (coconeCompShrinkYonedaHomEquiv hc').symm.bijective,
← Function.Bijective.of_comp_iff _ shrinkYonedaEquiv.bijective]
convert Iff.rfl using 2
ext : 1
simp [← coconePtToShrinkYoneda_comp]

variable {c}

include hc in
lemma preservesLimit_eq_isLocal_single :
ObjectProperty.preservesLimit F =
(MorphismProperty.single (coconePtToShrinkYoneda c hc')).isLocal := by
ext P
rw [← nonempty_isLimit_mapCone_iff c hc' P]
exact ⟨fun _ ↦ ⟨isLimitOfPreserves P hc⟩,
fun ⟨h⟩ ↦ preservesLimit_of_preserves_limit_cone hc h⟩

variable (F) [Small.{w} J]

/-- Auxiliary definition for `Presheaf.preservesLimitHomFamily`. -/
noncomputable def preservesLimitHomFamilySrc :=
colimit (F.leftOp ⋙ shrinkYoneda)

/-- Auxiliary definition for `Presheaf.preservesLimitHomFamily`. -/
noncomputable def preservesLimitHomFamilyTgt (h : PLift (HasLimit F)) :=
letI := h.down
shrinkYoneda.obj (limit F).unop

/-- Let `F : J ⥤ Cᵒᵖ` be a functor. This is the family of morphisms
which consists of the single morphism
`colimit (F.leftOp ⋙ shrinkYoneda) ⟶ shrinkYoneda.obj (limit F).unop`
if `F` has a limit, or is the empty family otherwise. -/
noncomputable def preservesLimitHomFamily (h : PLift (HasLimit F)) :
preservesLimitHomFamilySrc F ⟶ preservesLimitHomFamilyTgt F h :=
letI := h.down
coconePtToShrinkYoneda (limit.cone F) (colimit.isColimit _)

lemma preservesLimit_eq_isLocal :
ObjectProperty.preservesLimit F =
(MorphismProperty.ofHoms (preservesLimitHomFamily F)).isLocal := by
ext G
by_cases hF : HasLimit F
· rw [preservesLimit_eq_isLocal_single (limit.isLimit F) (colimit.isColimit _)]
convert Iff.rfl
ext _ _ f
exact ⟨fun ⟨_⟩ ↦ ⟨⟨⟩⟩, fun ⟨_⟩ ↦ ⟨⟨hF⟩⟩⟩
· exact ⟨fun _ _ _ _ ⟨h⟩ ↦ (hF h.down).elim,
fun _ ↦ ⟨fun hc ↦ (hF ⟨_, hc⟩).elim⟩⟩

lemma preservesLimitsOfShape_eq_isLocal :
ObjectProperty.preservesLimitsOfShape J =
(⨆ (F : J ⥤ Cᵒᵖ), MorphismProperty.ofHoms (preservesLimitHomFamily F)).isLocal := by
simp only [ObjectProperty.preservesLimitsOfShape_eq_iSup,
MorphismProperty.isLocal_iSup, preservesLimit_eq_isLocal]

end

end Presheaf

end CategoryTheory
22 changes: 22 additions & 0 deletions Mathlib/CategoryTheory/ObjectProperty/Local.lean
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,28 @@ instance (J : Type u') [Category.{v'} J] :
(by simp [h]) }),
p.isColimit.hom_ext (fun j ↦ by simp [p.isColimit.fac_assoc, h])⟩

attribute [local simp] isLocal_iff in
@[simp]
lemma isLocal_iSup {ι : Sort*} (W : ι → MorphismProperty C) :
(⨆ (i : ι), W i).isLocal = ⨅ (i : ι), (W i).isLocal := by
aesop

attribute [local simp] isColocal_iff in
@[simp]
lemma isColocal_iSup {ι : Sort*} (W : ι → MorphismProperty C) :
(⨆ (i : ι), W i).isColocal = ⨅ (i : ι), (W i).isColocal := by
aesop

lemma isLocal_single_iff_bijective {X Y : C} (f : X ⟶ Y) (Z : C) :
(MorphismProperty.single f).isLocal Z ↔
(Function.Bijective (fun (g : _ ⟶ Z) ↦ f ≫ g)) :=
⟨fun h ↦ h _ ⟨⟨⟩⟩, fun h ↦ by rintro _ _ _ ⟨_⟩; exact h⟩

lemma isColocal_single_iff_bijective {X Y : C} (f : X ⟶ Y) (Z : C) :
(MorphismProperty.single f).isColocal Z ↔
(Function.Bijective (fun (g : Z ⟶ _) ↦ g ≫ f)) :=
⟨fun h ↦ h _ ⟨⟨⟩⟩, fun h ↦ by rintro _ _ _ ⟨_⟩; exact h⟩

end MorphismProperty

end CategoryTheory
102 changes: 102 additions & 0 deletions Mathlib/CategoryTheory/Presentable/Continuous.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/-
Copyright (c) 2025 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.ObjectProperty.FunctorCategory.Presheaf
public import Mathlib.CategoryTheory.MorphismProperty.IsSmall
public import Mathlib.CategoryTheory.SmallRepresentatives
public import Mathlib.SetTheory.Cardinal.HasCardinalLT

/-!
# `κ`-continuous functors

Given categories `C`, `D` and a regular cardinal `κ : Cardinal.{w}`, we define
`isCardinalContinuous C D κ : ObjectProperty (C ⥤ D)` as the property
of functors which preserves limits indexed by categories `J`
such that `HasCardinalLT (Arrow J) κ`.

When `C : Type w` is a small category, we show that `κ`-continuous
functors `Cᵒᵖ ⥤ Type w` are exactly the objects that are local with
respect to a suitable `w`-small family of morphisms.

## TODO (@joelriou)
* Show that `(isCardinalContinuous Cᵒᵖ (Type w) κ).FullSubcategory` is
locally `κ`-presentable, and that any locally `κ`-presentable category
is equivalent to a category of `κ`-continuous presheaves.

-/

@[expose] public section

universe w v v' u u'

namespace CategoryTheory

open Limits

namespace Functor

section

variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
(κ : Cardinal.{w}) [Fact κ.IsRegular]

variable (C D) in
def isCardinalContinuous : ObjectProperty (C ⥤ D) :=

Check failure on line 48 in Mathlib/CategoryTheory/Presentable/Continuous.lean

View workflow job for this annotation

GitHub Actions / Build (fork)

CategoryTheory.Functor.isCardinalContinuous definition missing documentation string
⨅ (J : Type w) (_ : Category.{w} J) (_ : HasCardinalLT (Arrow J) κ),
ObjectProperty.preservesLimitsOfShape J

lemma isCardinalContinuous_iff (F : C ⥤ D) (κ : Cardinal.{w}) [Fact κ.IsRegular] :

Check failure on line 52 in Mathlib/CategoryTheory/Presentable/Continuous.lean

View workflow job for this annotation

GitHub Actions / Build (fork)

@CategoryTheory.Functor.isCardinalContinuous_iff argument 7 inst✝ : Fact
isCardinalContinuous C D κ F ↔
∀ (J : Type w) [SmallCategory J] (_ : HasCardinalLT (Arrow J) κ),
PreservesLimitsOfShape J F := by
simp [isCardinalContinuous]

variable {κ} in
lemma isCardinalContinuous.preservesColimitsOfShape {F : C ⥤ D}
(hF : isCardinalContinuous C D κ F)
(J : Type w) [SmallCategory.{w} J] (hκ : HasCardinalLT (Arrow J) κ) :
PreservesLimitsOfShape J F :=
(isCardinalContinuous_iff F κ).1 hF J hκ

end

end Functor

namespace Presheaf

open Functor

variable (C : Type w) [SmallCategory C] (κ : Cardinal.{w}) [Fact κ.IsRegular]

abbrev isCardinalContinuousMorphismProperty : MorphismProperty (Cᵒᵖ ⥤ Type w) :=

Check failure on line 75 in Mathlib/CategoryTheory/Presentable/Continuous.lean

View workflow job for this annotation

GitHub Actions / Build (fork)

CategoryTheory.Presheaf.isCardinalContinuousMorphismProperty definition missing documentation string
⨆ (J) (F : SmallCategoryCardinalLT.categoryFamily κ J ⥤ Cᵒᵖ),
MorphismProperty.ofHoms (Presheaf.preservesLimitHomFamily F)

example : MorphismProperty.IsSmall.{w}
(isCardinalContinuousMorphismProperty C κ) := by
infer_instance

lemma isCardinalContinuous_eq_isLocal :
isCardinalContinuous Cᵒᵖ (Type w) κ =
(isCardinalContinuousMorphismProperty.{w} C κ).isLocal := by
trans ⨅ (J : SmallCategoryCardinalLT κ),
ObjectProperty.preservesLimitsOfShape (SmallCategoryCardinalLT.categoryFamily κ J)
· refine le_antisymm ?_ ?_
· simp only [le_iInf_iff]
intro J P hP
simpa using hP.preservesColimitsOfShape _ (SmallCategoryCardinalLT.hasCardinalLT κ J)
· dsimp [isCardinalContinuous]
simp only [le_iInf_iff]
intro J _ hJ
obtain ⟨J', ⟨e⟩⟩ := SmallCategoryCardinalLT.exists_equivalence κ J hJ
rw [← ObjectProperty.congr_preservesLimitsOfShape _ _ e]
apply iInf_le
· simp [preservesLimitsOfShape_eq_isLocal]

end Presheaf

end CategoryTheory
Loading