|
| 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