@@ -3,14 +3,14 @@ Copyright (c) 2022 Markus Himmel. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Markus Himmel
55-/
6- import Mathlib.CategoryTheory.Limits.Creates
7- import Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms
6+ import Mathlib.CategoryTheory.ObjectProperty.LimitsOfShape
7+ import Mathlib.CategoryTheory.ObjectProperty.ColimitsOfShape
88
99/-!
1010# Limits in full subcategories
1111
12- We introduce the notion of a property closed under taking limits and show that if `P` is closed
13- under taking limits, then limits in `FullSubcategory P` can be constructed from limits in `C`.
12+ If a property of objects `P` is closed under taking limits,
13+ then limits in `FullSubcategory P` can be constructed from limits in `C`.
1414More precisely, the inclusion creates such limits.
1515
1616-/
@@ -24,46 +24,6 @@ open CategoryTheory
2424
2525namespace CategoryTheory.Limits
2626
27- /-- We say that a property is closed under limits of shape `J` if whenever all objects in a
28- `J`-shaped diagram have the property, any limit of this diagram also has the property. -/
29- def ClosedUnderLimitsOfShape {C : Type u} [Category.{v} C] (J : Type w) [Category.{w'} J]
30- (P : ObjectProperty C) : Prop :=
31- ∀ ⦃F : J ⥤ C⦄ ⦃c : Cone F⦄ (_hc : IsLimit c), (∀ j, P (F.obj j)) → P c.pt
32-
33- /-- We say that a property is closed under colimits of shape `J` if whenever all objects in a
34- `J`-shaped diagram have the property, any colimit of this diagram also has the property. -/
35- def ClosedUnderColimitsOfShape {C : Type u} [Category.{v} C] (J : Type w) [Category.{w'} J]
36- (P : ObjectProperty C) : Prop :=
37- ∀ ⦃F : J ⥤ C⦄ ⦃c : Cocone F⦄ (_hc : IsColimit c), (∀ j, P (F.obj j)) → P c.pt
38-
39- section
40-
41- variable {C : Type u} [Category.{v} C] {J : Type w} [Category.{w'} J] {P : ObjectProperty C}
42-
43- theorem closedUnderLimitsOfShape_of_limit [P.IsClosedUnderIsomorphisms]
44- (h : ∀ {F : J ⥤ C} [HasLimit F], (∀ j, P (F.obj j)) → P (limit F)) :
45- ClosedUnderLimitsOfShape J P := by
46- intro F c hc hF
47- have : HasLimit F := ⟨_, hc⟩
48- exact P.prop_of_iso ((limit.isLimit _).conePointUniqueUpToIso hc) (h hF)
49-
50- theorem closedUnderColimitsOfShape_of_colimit [P.IsClosedUnderIsomorphisms]
51- (h : ∀ {F : J ⥤ C} [HasColimit F], (∀ j, P (F.obj j)) → P (colimit F)) :
52- ClosedUnderColimitsOfShape J P := by
53- intro F c hc hF
54- have : HasColimit F := ⟨_, hc⟩
55- exact P.prop_of_iso ((colimit.isColimit _).coconePointUniqueUpToIso hc) (h hF)
56-
57- protected lemma ClosedUnderLimitsOfShape.limit (h : ClosedUnderLimitsOfShape J P) {F : J ⥤ C}
58- [HasLimit F] : (∀ j, P (F.obj j)) → P (limit F) :=
59- h (limit.isLimit _)
60-
61- protected lemma ClosedUnderColimitsOfShape.colimit (h : ClosedUnderColimitsOfShape J P) {F : J ⥤ C}
62- [HasColimit F] : (∀ j, P (F.obj j)) → P (colimit F) :=
63- h (colimit.isColimit _)
64-
65- end
66-
6727section
6828
6929variable {J : Type w} [Category.{w'} J] {C : Type u} [Category.{v} C] {P : ObjectProperty C}
@@ -97,47 +57,49 @@ def createsColimitFullSubcategoryInclusion (F : J ⥤ P.FullSubcategory)
9757 CreatesColimit F P.ι :=
9858 createsColimitFullSubcategoryInclusion' F (colimit.isColimit _) h
9959
60+ variable (P J)
61+
10062/-- If `P` is closed under limits of shape `J`, then the inclusion creates such limits. -/
101- def createsLimitFullSubcategoryInclusionOfClosed (h : ClosedUnderLimitsOfShape J P)
63+ def createsLimitFullSubcategoryInclusionOfClosed [P.IsClosedUnderLimitsOfShape J]
10264 (F : J ⥤ P.FullSubcategory) [HasLimit (F ⋙ P.ι)] :
10365 CreatesLimit F P.ι :=
104- createsLimitFullSubcategoryInclusion F (h.limit fun j => (F.obj j).property)
66+ createsLimitFullSubcategoryInclusion F (P.prop_limit _ fun j => (F.obj j).property)
10567
10668/-- If `P` is closed under limits of shape `J`, then the inclusion creates such limits. -/
107- def createsLimitsOfShapeFullSubcategoryInclusion (h : ClosedUnderLimitsOfShape J P)
69+ instance createsLimitsOfShapeFullSubcategoryInclusion [P.IsClosedUnderLimitsOfShape J]
10870 [HasLimitsOfShape J C] : CreatesLimitsOfShape J P.ι where
109- CreatesLimit := @fun F => createsLimitFullSubcategoryInclusionOfClosed h F
71+ CreatesLimit := @fun F => createsLimitFullSubcategoryInclusionOfClosed J P F
11072
111- theorem hasLimit_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)
73+ theorem hasLimit_of_closedUnderLimits [P.IsClosedUnderLimitsOfShape J]
11274 (F : J ⥤ P.FullSubcategory) [HasLimit (F ⋙ P.ι)] : HasLimit F :=
11375 have : CreatesLimit F P.ι :=
114- createsLimitFullSubcategoryInclusionOfClosed h F
76+ createsLimitFullSubcategoryInclusionOfClosed J P F
11577 hasLimit_of_created F P.ι
11678
117- theorem hasLimitsOfShape_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)
79+ instance hasLimitsOfShape_of_closedUnderLimits [P.IsClosedUnderLimitsOfShape J]
11880 [HasLimitsOfShape J C] : HasLimitsOfShape J P.FullSubcategory :=
119- { has_limit := fun F => hasLimit_of_closedUnderLimits h F }
81+ { has_limit := fun F => hasLimit_of_closedUnderLimits J P F }
12082
12183/-- If `P` is closed under colimits of shape `J`, then the inclusion creates such colimits. -/
122- def createsColimitFullSubcategoryInclusionOfClosed (h : ClosedUnderColimitsOfShape J P)
84+ def createsColimitFullSubcategoryInclusionOfClosed [P.IsClosedUnderColimitsOfShape J]
12385 (F : J ⥤ P.FullSubcategory) [HasColimit (F ⋙ P.ι)] :
12486 CreatesColimit F P.ι :=
125- createsColimitFullSubcategoryInclusion F (h.colimit fun j => (F.obj j).property)
87+ createsColimitFullSubcategoryInclusion F (P.prop_colimit _ fun j => (F.obj j).property)
12688
12789/-- If `P` is closed under colimits of shape `J`, then the inclusion creates such colimits. -/
128- def createsColimitsOfShapeFullSubcategoryInclusion (h : ClosedUnderColimitsOfShape J P)
90+ instance createsColimitsOfShapeFullSubcategoryInclusion [P.IsClosedUnderColimitsOfShape J]
12991 [HasColimitsOfShape J C] : CreatesColimitsOfShape J P.ι where
130- CreatesColimit := @fun F => createsColimitFullSubcategoryInclusionOfClosed h F
92+ CreatesColimit := @fun F => createsColimitFullSubcategoryInclusionOfClosed J P F
13193
132- theorem hasColimit_of_closedUnderColimits (h : ClosedUnderColimitsOfShape J P)
94+ theorem hasColimit_of_closedUnderColimits [P.IsClosedUnderColimitsOfShape J]
13395 (F : J ⥤ P.FullSubcategory) [HasColimit (F ⋙ P.ι)] : HasColimit F :=
13496 have : CreatesColimit F P.ι :=
135- createsColimitFullSubcategoryInclusionOfClosed h F
97+ createsColimitFullSubcategoryInclusionOfClosed J P F
13698 hasColimit_of_created F P.ι
13799
138- theorem hasColimitsOfShape_of_closedUnderColimits (h : ClosedUnderColimitsOfShape J P)
100+ instance hasColimitsOfShape_of_closedUnderColimits [P.IsClosedUnderColimitsOfShape J]
139101 [HasColimitsOfShape J C] : HasColimitsOfShape J P.FullSubcategory :=
140- { has_colimit := fun F => hasColimit_of_closedUnderColimits h F }
102+ { has_colimit := fun F => hasColimit_of_closedUnderColimits J P F }
141103
142104end
143105
@@ -147,19 +109,23 @@ variable {D : Type u₂} [Category.{v₂} D]
147109variable (F : C ⥤ D)
148110
149111/-- The essential image of a functor is closed under the limits it preserves. -/
150- protected lemma ClosedUnderLimitsOfShape.essImage [HasLimitsOfShape J C]
151- [PreservesLimitsOfShape J F] [F.Full] [F.Faithful] :
152- ClosedUnderLimitsOfShape J F.essImage := fun G _c hc hG ↦
153- ⟨limit (Functor.essImage.liftFunctor G F hG),
154- ⟨IsLimit.conePointsIsoOfNatIso (isLimitOfPreserves F (limit.isLimit _)) hc
155- (Functor.essImage.liftFunctorCompIso _ _ _)⟩⟩
112+ instance [HasLimitsOfShape J C] [PreservesLimitsOfShape J F] [F.Full] [F.Faithful] :
113+ F.essImage.IsClosedUnderLimitsOfShape J :=
114+ .mk' (by
115+ rintro _ ⟨G, hG⟩
116+ exact ⟨limit (Functor.essImage.liftFunctor G F hG),
117+ ⟨IsLimit.conePointsIsoOfNatIso
118+ (isLimitOfPreserves F (limit.isLimit _)) (limit.isLimit _)
119+ (Functor.essImage.liftFunctorCompIso _ _ _)⟩⟩)
156120
157121/-- The essential image of a functor is closed under the colimits it preserves. -/
158- protected lemma ClosedUnderColimitsOfShape.essImage [HasColimitsOfShape J C]
159- [PreservesColimitsOfShape J F] [F.Full] [F.Faithful] :
160- ClosedUnderColimitsOfShape J F.essImage := fun G _c hc hG ↦
161- ⟨colimit (Functor.essImage.liftFunctor G F hG),
162- ⟨IsColimit.coconePointsIsoOfNatIso (isColimitOfPreserves F (colimit.isColimit _)) hc
163- (Functor.essImage.liftFunctorCompIso _ _ _)⟩⟩
122+ instance [HasColimitsOfShape J C] [PreservesColimitsOfShape J F] [F.Full] [F.Faithful] :
123+ F.essImage.IsClosedUnderColimitsOfShape J :=
124+ .mk' (by
125+ rintro _ ⟨G, hG⟩
126+ exact ⟨colimit (Functor.essImage.liftFunctor G F hG),
127+ ⟨IsColimit.coconePointsIsoOfNatIso
128+ (isColimitOfPreserves F (colimit.isColimit _)) (colimit.isColimit _)
129+ (Functor.essImage.liftFunctorCompIso _ _ _)⟩⟩)
164130
165131end CategoryTheory.Limits
0 commit comments