|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Christian Merten. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Christian Merten |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.AlgebraicGeometry.Morphisms.Basic |
| 9 | +public import Mathlib.CategoryTheory.MorphismProperty.Comma |
| 10 | + |
| 11 | +/-! |
| 12 | +# (Co)limits in over categories |
| 13 | +
|
| 14 | +We show that if `P` is a morphism property in `Scheme` that is local at the source, then |
| 15 | +colimits in `P.Over ⊤ X` for `X : Scheme` of locally directed diagrams of open immersions |
| 16 | +exist and agree with the colimit in `Scheme`. |
| 17 | +-/ |
| 18 | + |
| 19 | +@[expose] public section |
| 20 | + |
| 21 | +universe u |
| 22 | + |
| 23 | +open CategoryTheory Limits |
| 24 | + |
| 25 | +namespace AlgebraicGeometry |
| 26 | + |
| 27 | +variable (X : Scheme.{u}) |
| 28 | + |
| 29 | +variable (P : MorphismProperty Scheme.{u}) |
| 30 | + |
| 31 | +section Over |
| 32 | + |
| 33 | +variable {S : Scheme.{u}} {J : Type*} [Category J] (F : J ⥤ Over S) |
| 34 | + [∀ {i j} (f : i ⟶ j), IsOpenImmersion (F.map f).left] |
| 35 | + [(F ⋙ Over.forget S ⋙ Scheme.forget).IsLocallyDirected] |
| 36 | + [Quiver.IsThin J] [Small.{u} J] |
| 37 | + |
| 38 | +noncomputable instance : HasColimit F := |
| 39 | + have {i j} (f : i ⟶ j) : IsOpenImmersion ((F ⋙ Over.forget S).map f) := |
| 40 | + inferInstanceAs <| IsOpenImmersion (F.map f).left |
| 41 | + have : ((F ⋙ Over.forget S) ⋙ Scheme.forget).IsLocallyDirected := ‹_› |
| 42 | + hasColimit_of_created _ (Over.forget S) |
| 43 | + |
| 44 | +end Over |
| 45 | + |
| 46 | +section OverProp |
| 47 | + |
| 48 | +instance {S : Scheme.{u}} {U X Y : P.Over ⊤ S} (f : U ⟶ X) (g : U ⟶ Y) |
| 49 | + [IsOpenImmersion f.left] [IsOpenImmersion g.left] (i : WalkingPair) : |
| 50 | + Mono ((span f g ⋙ MorphismProperty.Over.forget P ⊤ S ⋙ Over.forget S ⋙ Scheme.forget).map |
| 51 | + (WidePushoutShape.Hom.init i)) := by |
| 52 | + rw [mono_iff_injective] |
| 53 | + cases i |
| 54 | + · simpa using f.left.isOpenEmbedding.injective |
| 55 | + · simpa using g.left.isOpenEmbedding.injective |
| 56 | + |
| 57 | +instance {S : Scheme.{u}} {U X Y : P.Over ⊤ S} (f : U ⟶ X) (g : U ⟶ Y) |
| 58 | + [IsOpenImmersion f.left] [IsOpenImmersion g.left] |
| 59 | + {i j : WalkingSpan} (t : i ⟶ j) : |
| 60 | + IsOpenImmersion ((span f g).map t).left := by |
| 61 | + obtain (a|(a|a)) := t |
| 62 | + · simp only [WidePushoutShape.hom_id, CategoryTheory.Functor.map_id] |
| 63 | + infer_instance |
| 64 | + · simpa |
| 65 | + · simpa |
| 66 | + |
| 67 | +variable [IsZariskiLocalAtSource P] {S : Scheme.{u}} {J : Type*} [Category J] (F : J ⥤ P.Over ⊤ S) |
| 68 | + [∀ {i j} (f : i ⟶ j), IsOpenImmersion (F.map f).left] |
| 69 | + [(F ⋙ MorphismProperty.Over.forget P ⊤ S ⋙ Over.forget S ⋙ Scheme.forget).IsLocallyDirected] |
| 70 | + [Quiver.IsThin J] [Small.{u} J] |
| 71 | + |
| 72 | +local instance : |
| 73 | + (((F ⋙ MorphismProperty.Over.forget P ⊤ S) ⋙ Over.forget S) ⋙ |
| 74 | + Scheme.forget).IsLocallyDirected := |
| 75 | + ‹_› |
| 76 | + |
| 77 | +local instance {i j} (f : i ⟶ j) : |
| 78 | + IsOpenImmersion <| |
| 79 | + ((F ⋙ MorphismProperty.Over.forget P ⊤ S) ⋙ Over.forget S).map f := |
| 80 | + inferInstanceAs <| IsOpenImmersion (F.map f).left |
| 81 | + |
| 82 | +noncomputable instance : CreatesColimit F (MorphismProperty.Over.forget P ⊤ S) := by |
| 83 | + have : HasColimit (F ⋙ MorphismProperty.Over.forget P ⊤ S) := |
| 84 | + hasColimit_of_created _ (Over.forget S) |
| 85 | + refine createsColimitOfFullyFaithfulOfIso |
| 86 | + { toComma := colimit (F ⋙ MorphismProperty.Over.forget P ⊤ S) |
| 87 | + prop := ?_ } (Iso.refl _) |
| 88 | + let e : (colimit (F ⋙ MorphismProperty.Over.forget P ⊤ S)).left ≅ |
| 89 | + colimit ((F ⋙ MorphismProperty.Over.forget P ⊤ S) ⋙ Over.forget S) := |
| 90 | + preservesColimitIso (Over.forget S) _ |
| 91 | + let 𝒰 : (colimit (F ⋙ MorphismProperty.Over.forget P ⊤ S)).left.OpenCover := |
| 92 | + (Scheme.IsLocallyDirected.openCover _).pushforwardIso e.inv |
| 93 | + rw [IsZariskiLocalAtSource.iff_of_openCover (P := P) 𝒰] |
| 94 | + intro i |
| 95 | + simpa [𝒰, e] using (F.obj i).prop |
| 96 | + |
| 97 | +instance : HasColimit F := hasColimit_of_created _ (MorphismProperty.Over.forget P ⊤ S) |
| 98 | + |
| 99 | +instance : PreservesColimit F (MorphismProperty.Over.forget P ⊤ S) := |
| 100 | + -- this is only `inferInstance` with the local instances above |
| 101 | + inferInstance |
| 102 | + |
| 103 | +instance (j : J) : IsOpenImmersion (colimit.ι F j).left := by |
| 104 | + rw [← MorphismProperty.Over.forget_comp_forget_map] |
| 105 | + let e : (colimit F).left ≅ colimit (F ⋙ _) := |
| 106 | + preservesColimitIso (MorphismProperty.Over.forget P ⊤ S ⋙ Over.forget S) F |
| 107 | + rw [← MorphismProperty.cancel_right_of_respectsIso (P := @IsOpenImmersion) _ e.hom] |
| 108 | + simp only [e, CategoryTheory.ι_preservesColimitIso_hom] |
| 109 | + exact inferInstanceAs <| IsOpenImmersion |
| 110 | + (colimit.ι ((F ⋙ MorphismProperty.Over.forget P ⊤ S) ⋙ Over.forget S) j) |
| 111 | + |
| 112 | +instance {ι : Type*} [Small.{u} ι] : HasCoproductsOfShape ι (P.Over ⊤ S) where |
| 113 | + |
| 114 | +instance : HasFiniteCoproducts (P.Over ⊤ S) where |
| 115 | + out := inferInstance |
| 116 | + |
| 117 | +noncomputable instance (J : Type*) [Small.{u} J] : |
| 118 | + CreatesColimitsOfShape (Discrete J) (MorphismProperty.Over.forget P ⊤ S) where |
| 119 | + |
| 120 | +end OverProp |
| 121 | + |
| 122 | +end AlgebraicGeometry |
0 commit comments