|
| 1 | +/- |
| 2 | +Copyright (c) 2023 Joël Riou. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Joël Riou |
| 5 | +-/ |
| 6 | +import Mathlib.CategoryTheory.Localization.Predicate |
| 7 | + |
| 8 | +/-! Morphism properties equipped with a localized category |
| 9 | +
|
| 10 | +If `C : Type u` is a category (with `[Category.{v} C]`), and |
| 11 | +`W : MorphismProperty C`, then the constructed localized |
| 12 | +category `W.Localization` is in `Type u` (the objects are |
| 13 | +essentially the same as that of `C`), but the morphisms |
| 14 | +are in `Type (max u v)`. In particular situations, it |
| 15 | +may happen that there is a localized category for `W` |
| 16 | +whose morphisms are in a lower universe like `v`: it shall |
| 17 | +be so for the homotopy categories of model categories (TODO), |
| 18 | +and it should also be so for the derived categories of |
| 19 | +Grothendieck abelian categories (TODO: but this shall be |
| 20 | +very technical). |
| 21 | +
|
| 22 | +Then, in order to allow the user to provide a localized |
| 23 | +category with specific universe parameters when it exists, |
| 24 | +we introduce a typeclass `MorphismProperty.HasLocalization.{w} W` |
| 25 | +which contains the data of a localized category `D` for `W` |
| 26 | +with `D : Type u` and `[Category.{w} D]`. Then, all |
| 27 | +definitions which involve "the" localized category |
| 28 | +for `W` should contain a `[MorphismProperty.HasLocalization.{w} W]` |
| 29 | +assumption for a suitable `w`. The functor `W.Q' : C ⥤ W.Localization'` |
| 30 | +shall be the localization functor for this fixed choice of the |
| 31 | +localized category. If the statement of a theorem does not |
| 32 | +involve the localized category, but the proof does, |
| 33 | +it is no longer necessary to use a `HasLocalization` |
| 34 | +assumption, but one may use |
| 35 | +`HasLocalization.standard` in the proof instead. |
| 36 | +
|
| 37 | +-/ |
| 38 | + |
| 39 | +universe w v u |
| 40 | + |
| 41 | +namespace CategoryTheory |
| 42 | + |
| 43 | +variable {C : Type u} [Category.{v} C] |
| 44 | + |
| 45 | +variable (W : MorphismProperty C) |
| 46 | + |
| 47 | +namespace MorphismProperty |
| 48 | + |
| 49 | +/-- The data of a localized category with a given universe |
| 50 | +for the morphisms. -/ |
| 51 | +class HasLocalization where |
| 52 | + /-- the objects of the localized category. -/ |
| 53 | + {D : Type u} |
| 54 | + /-- the category structure. -/ |
| 55 | + [hD : Category.{w} D] |
| 56 | + /-- the localization functor. -/ |
| 57 | + L : C ⥤ D |
| 58 | + [hL : L.IsLocalization W] |
| 59 | + |
| 60 | +variable [HasLocalization.{w} W] |
| 61 | + |
| 62 | +/-- The localized category for `W : MorphismProperty C` |
| 63 | +that is fixed by the `[HasLocalization W]` instance. -/ |
| 64 | +def Localization' := HasLocalization.D W |
| 65 | + |
| 66 | +instance : Category W.Localization' := HasLocalization.hD |
| 67 | + |
| 68 | +/-- The localization functor `C ⥤ W.Localization'` |
| 69 | +that is fixed by the `[HasLocalization W]` instance. -/ |
| 70 | +def Q' : C ⥤ W.Localization' := HasLocalization.L |
| 71 | + |
| 72 | +instance : W.Q'.IsLocalization W := HasLocalization.hL |
| 73 | + |
| 74 | +/-- The constructed localized category. -/ |
| 75 | +def HasLocalization.standard : HasLocalization.{max u v} W where |
| 76 | + L := W.Q |
| 77 | + |
| 78 | +end MorphismProperty |
| 79 | + |
| 80 | +end CategoryTheory |
0 commit comments