Skip to content

Commit ee4307d

Browse files
committed
feat: port Topology.Sheaves.Limits (#4096)
1 parent 01f4692 commit ee4307d

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,7 @@ import Mathlib.Topology.Sets.Opens
22252225
import Mathlib.Topology.Sets.Order
22262226
import Mathlib.Topology.Sheaves.Abelian
22272227
import Mathlib.Topology.Sheaves.Init
2228+
import Mathlib.Topology.Sheaves.Limits
22282229
import Mathlib.Topology.Sheaves.Presheaf
22292230
import Mathlib.Topology.Sheaves.PresheafOfFunctions
22302231
import Mathlib.Topology.Sheaves.Sheaf

Mathlib/CategoryTheory/Sites/Limits.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ instance : HasLimitsOfShape K (Sheaf J D) :=
171171

172172
end
173173

174-
instance [HasLimits D] : CreatesLimits (sheafToPresheaf J D) :=
174+
instance createsLimits [HasLimits D] : CreatesLimits (sheafToPresheaf J D) :=
175175
⟨createsLimitsOfShape⟩
176176

177177
instance [HasLimits D] : HasLimits (Sheaf J D) :=
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/-
2+
Copyright (c) 2020 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Scott Morrison
5+
6+
! This file was ported from Lean 3 source module topology.sheaves.limits
7+
! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.Topology.Sheaves.Sheaf
12+
import Mathlib.CategoryTheory.Sites.Limits
13+
import Mathlib.CategoryTheory.Limits.FunctorCategory
14+
15+
/-!
16+
# Presheaves in `C` have limits and colimits when `C` does.
17+
-/
18+
19+
20+
noncomputable section
21+
22+
universe v u
23+
24+
open CategoryTheory
25+
26+
open CategoryTheory.Limits
27+
28+
variable {C : Type u} [Category.{v} C] {J : Type v} [SmallCategory J]
29+
30+
namespace TopCat
31+
32+
instance [HasLimits C] (X : TopCat) : HasLimits (Presheaf C X) :=
33+
Limits.functorCategoryHasLimitsOfSize.{v, v}
34+
35+
instance [HasColimits C] (X : TopCat) : HasColimitsOfSize.{v} (Presheaf C X) :=
36+
Limits.functorCategoryHasColimitsOfSize
37+
38+
instance [HasLimits C] (X : TopCat) : CreatesLimits (Sheaf.forget C X) :=
39+
Sheaf.createsLimits.{u, v, v}
40+
41+
instance [HasLimits C] (X : TopCat) : HasLimitsOfSize.{v} (Sheaf.{v} C X) :=
42+
has_limits_of_has_limits_creates_limits (Sheaf.forget C X)
43+
44+
theorem isSheaf_of_isLimit [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
45+
(H : ∀ j, (F.obj j).IsSheaf) {c : Cone F} (hc : IsLimit c) : c.pt.IsSheaf := by
46+
let F' : J ⥤ Sheaf C X :=
47+
{ obj := fun j => ⟨F.obj j, H j⟩
48+
map := fun f => ⟨F.map f⟩ }
49+
let e : F' ⋙ Sheaf.forget C X ≅ F := NatIso.ofComponents (fun _ => Iso.refl _) (by aesop_cat)
50+
exact Presheaf.isSheaf_of_iso
51+
((isLimitOfPreserves (Sheaf.forget C X) (limit.isLimit F')).conePointsIsoOfNatIso hc e)
52+
(limit F').2
53+
set_option linter.uppercaseLean3 false in
54+
#align Top.is_sheaf_of_is_limit TopCat.isSheaf_of_isLimit
55+
56+
theorem limit_isSheaf [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
57+
(H : ∀ j, (F.obj j).IsSheaf) : (limit F).IsSheaf :=
58+
isSheaf_of_isLimit F H (limit.isLimit F)
59+
set_option linter.uppercaseLean3 false in
60+
#align Top.limit_is_sheaf TopCat.limit_isSheaf
61+
62+
end TopCat

0 commit comments

Comments
 (0)