|
| 1 | +/- |
| 2 | +Copyright (c) 2026 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.CategoryTheory.MorphismProperty.Limits |
| 9 | +public import Mathlib.CategoryTheory.Localization.Bousfield |
| 10 | + |
| 11 | +/-! |
| 12 | +# Local epimorphisms with respect to an object property |
| 13 | +
|
| 14 | +Let `P` be an object property on a category `C`. We say that `f : X ⟶ Y` |
| 15 | +is a local epimorphism wrt. `P` if `f` cancels on the left for morphisms with |
| 16 | +codomain in `P`. |
| 17 | +
|
| 18 | +If `C` is the category of presheafs on some category with Grothendieck topology `J` and `P` the |
| 19 | +property of being a sheaf for `J`, then being a local epimorphism wrt. `P` is being |
| 20 | +an epimorphism after sheafification. |
| 21 | +
|
| 22 | +## Main declarations |
| 23 | +
|
| 24 | +- `CategoryTheory.ObjectProperty.localEpi`: The morphism property of local epimorphisms. |
| 25 | +- `CategoryTheory.ObjectProperty.localEpi_mem_range_iff_epi`: If `F ⊣ G` and `G` |
| 26 | + is fully faithful, then `f : X ⟶ Y` is a local epimorphism if and only if `F.map f` is an |
| 27 | + epimorphism. |
| 28 | +
|
| 29 | +## References |
| 30 | +
|
| 31 | +The terminology is from [M. Kashiwara, P. Schapira, *Categories and Sheaves*, 16.1][Kashiwara2006]. |
| 32 | +-/ |
| 33 | + |
| 34 | +@[expose] public section |
| 35 | + |
| 36 | +namespace CategoryTheory |
| 37 | + |
| 38 | +open Limits |
| 39 | + |
| 40 | +variable {C : Type*} [Category* C] {P : ObjectProperty C} |
| 41 | + |
| 42 | +namespace ObjectProperty |
| 43 | + |
| 44 | +/-- A morphism `f` is a local epimorphism wrt. the object property `P` |
| 45 | +if it satisfies left cancellation for morphisms with codomain in `P`. -/ |
| 46 | +def localEpi (P : ObjectProperty C) : MorphismProperty C := fun _ _ f ↦ |
| 47 | + ∀ ⦃Z⦄, P Z → Function.Injective fun (g : _ ⟶ Z) ↦ f ≫ g |
| 48 | + |
| 49 | +instance : P.localEpi.IsMultiplicative where |
| 50 | + id_mem X Z _ := by simpa using Function.injective_id |
| 51 | + comp_mem f g hf hg T hT _ _ huv := hg hT (hf hT <| by simpa using huv) |
| 52 | + |
| 53 | +lemma localEpi.of_epi {X Y : C} (f : X ⟶ Y) [Epi f] : P.localEpi f := by |
| 54 | + intro Z hZ u v huv |
| 55 | + rwa [← cancel_epi f] |
| 56 | + |
| 57 | +@[simp] |
| 58 | +lemma localEpi_top_apply_iff {X Y : C} {f : X ⟶ Y} : |
| 59 | + (⊤ : ObjectProperty C).localEpi f ↔ Epi f := |
| 60 | + ⟨fun h ↦ ⟨fun _ _ huv ↦ h trivial huv⟩, fun _ ↦ .of_epi _⟩ |
| 61 | + |
| 62 | +lemma localEpi_top_eq_epimorphisms : (⊤ : ObjectProperty C).localEpi = .epimorphisms C := by |
| 63 | + ext |
| 64 | + simp |
| 65 | + |
| 66 | +lemma localEpi_antitone : Antitone (localEpi (C := C)) := |
| 67 | + fun _ _ hPQ _ _ _ hf _ hZ _ _ huv ↦ hf (hPQ _ hZ) huv |
| 68 | + |
| 69 | +lemma localEpi_isoClosure : P.isoClosure.localEpi = P.localEpi := by |
| 70 | + refine le_antisymm (localEpi_antitone <| le_isoClosure P) ?_ |
| 71 | + intro X Y f hf Z ⟨T, hT, ⟨e⟩⟩ u v huv |
| 72 | + rw [← cancel_mono e.hom] |
| 73 | + apply hf hT |
| 74 | + simpa |
| 75 | + |
| 76 | +lemma isLocal_le_localEpi : P.isLocal ≤ P.localEpi := |
| 77 | + fun _ _ _ hf Z hZ ↦ (hf Z hZ).injective |
| 78 | + |
| 79 | +instance : P.localEpi.RespectsIso := |
| 80 | + MorphismProperty.respectsIso_of_isStableUnderComposition fun _ _ _ _ ↦ .of_epi _ |
| 81 | + |
| 82 | +instance (W : MorphismProperty C) : P.localEpi.HasOfPrecompProperty W where |
| 83 | + of_precomp {X Y Z} f g _ hfg T hT u v huv := hfg hT (by simp [huv]) |
| 84 | + |
| 85 | +instance : P.localEpi.HasOfPostcompProperty P.isLocal where |
| 86 | + of_postcomp {X Y Z} f g hg hfg T hT u v huv := by |
| 87 | + obtain ⟨u, rfl⟩ := (hg _ hT).surjective u |
| 88 | + obtain ⟨v, rfl⟩ := (hg _ hT).surjective v |
| 89 | + simp [hfg hT (by simpa using huv)] |
| 90 | + |
| 91 | +instance : P.localEpi.IsStableUnderCobaseChange := by |
| 92 | + refine .mk' fun X Y S f g _ hg T hT u v huv ↦ ?_ |
| 93 | + refine pushout.hom_ext (hg hT ?_) huv |
| 94 | + simp [pushout.condition_assoc, huv] |
| 95 | + |
| 96 | +instance : P.localEpi.Respects P.isLocal where |
| 97 | + precomp _ hf _ hg := MorphismProperty.comp_mem _ _ _ (isLocal_le_localEpi _ hf) hg |
| 98 | + postcomp _ hf _ hg := MorphismProperty.comp_mem _ _ _ hg (isLocal_le_localEpi _ hf) |
| 99 | + |
| 100 | +variable {D : Type*} [Category* D] {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G) |
| 101 | + [G.Faithful] [G.Full] |
| 102 | +include adj |
| 103 | + |
| 104 | +lemma localEpi_mem_range_iff_epi {X Y : C} (f : X ⟶ Y) : |
| 105 | + localEpi (· ∈ Set.range G.obj) f ↔ Epi (F.map f) := by |
| 106 | + rw [← dsimp% (localEpi (· ∈ Set.range G.obj)).postcomp_iff _ _ (isLocal_adj_unit_app adj Y), |
| 107 | + dsimp% adj.unit.naturality f, |
| 108 | + dsimp% (localEpi (· ∈ Set.range G.obj)).precomp_iff _ _ (isLocal_adj_unit_app adj X)] |
| 109 | + refine ⟨fun h ↦ ⟨fun {Z} u v huv ↦ ?_⟩, ?_⟩ |
| 110 | + · refine G.map_injective ?_ |
| 111 | + apply h ⟨Z, rfl⟩ |
| 112 | + simp [← Functor.map_comp, huv] |
| 113 | + · rintro h _ ⟨Z, rfl⟩ u v huv |
| 114 | + obtain ⟨u, rfl⟩ := G.map_surjective u |
| 115 | + obtain ⟨v, rfl⟩ := G.map_surjective v |
| 116 | + simp only [← G.map_comp, G.map_injective_iff, cancel_epi] at huv |
| 117 | + rw [huv] |
| 118 | + |
| 119 | +lemma localEpi_mem_range_eq_inverseImage_epimorphisms : |
| 120 | + localEpi (· ∈ Set.range G.obj) = (MorphismProperty.epimorphisms _).inverseImage F := by |
| 121 | + ext X Y f |
| 122 | + rw [localEpi_mem_range_iff_epi adj] |
| 123 | + simp |
| 124 | + |
| 125 | +lemma localEpi_essImage : |
| 126 | + G.essImage.localEpi = (MorphismProperty.epimorphisms _).inverseImage F := by |
| 127 | + rw [← Functor.isoClosure_eq_essImage, localEpi_isoClosure, |
| 128 | + localEpi_mem_range_eq_inverseImage_epimorphisms adj] |
| 129 | + |
| 130 | +end ObjectProperty |
| 131 | + |
| 132 | +end CategoryTheory |
0 commit comments