88public import Mathlib.CategoryTheory.Sites.Subsheaf
99public import Mathlib.CategoryTheory.Sites.CompatibleSheafification
1010public import Mathlib.CategoryTheory.Sites.LocallyInjective
11+ public import Mathlib.CategoryTheory.ShrinkYoneda
1112/-!
1213
1314# Locally surjective morphisms
@@ -29,9 +30,9 @@ public import Mathlib.CategoryTheory.Sites.LocallyInjective
2930@[expose] public section
3031
3132
32- universe v u w v' u' w'
33+ universe w v u v' u' w'
3334
34- open Opposite CategoryTheory CategoryTheory.GrothendieckTopology CategoryTheory.Functor
35+ open Opposite CategoryTheory CategoryTheory.GrothendieckTopology CategoryTheory.Functor Limits
3536
3637namespace CategoryTheory
3738
@@ -52,6 +53,13 @@ def imageSieve {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : ToType (G.obj (o
5253 refine ⟨F.map j.op t, ?_⟩
5354 rw [op_comp, G.map_comp, ConcreteCategory.comp_apply, ← ht, NatTrans.naturality_apply f]
5455
56+ lemma pullback_imageSieve
57+ {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : ToType (G.obj (op U)))
58+ {V : C} (g : V ⟶ U) :
59+ (imageSieve f s).pullback g = imageSieve f (G.map g.op s) := by
60+ ext W g
61+ simp [imageSieve]
62+
5563theorem imageSieve_eq_sieveOfSection {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C}
5664 (s : ToType (G.obj (op U))) :
5765 imageSieve f s = (Subfunctor.range (whiskerRight f (forget A))).sieveOfSection s :=
@@ -399,4 +407,96 @@ lemma isAmalgamation_map_localPreimage :
399407
400408end Presieve.FamilyOfElements
401409
410+ namespace Presheaf
411+
412+ variable {S : C} {ι : Type *} [Small.{w} ι] {X : ι → C} (f : ∀ i, X i ⟶ S)
413+
414+ variable [LocallySmall.{w} C]
415+
416+ lemma imageSieve_cofanIsColimitDesc_shrinkYoneda_map
417+ {c : Cofan (fun i ↦ shrinkYoneda.{w}.obj (X i))} (hc : IsColimit c)
418+ {U : C} (g : U ⟶ S) :
419+ Presheaf.imageSieve
420+ (Cofan.IsColimit.desc hc (fun i ↦ shrinkYoneda.{w}.map (f i))) (U := U)
421+ (shrinkYonedaObjObjEquiv.symm g) = Sieve.pullback g (Sieve.ofArrows X f) := by
422+ ext V v
423+ simp only [Sieve.pullback_apply, Sieve.generate_apply]
424+ refine ⟨fun hv ↦ ?_, ?_⟩
425+ · obtain ⟨w, hw⟩ := hv
426+ obtain ⟨⟨i⟩, a, rfl⟩ := Types.jointly_surjective_of_isColimit
427+ (isColimitOfPreserves ((evaluation _ _).obj (op V)) hc) w
428+ obtain ⟨a : V ⟶ X i, rfl⟩ := shrinkYonedaObjObjEquiv.symm.surjective a
429+ refine ⟨_, a, _, ⟨i⟩, shrinkYonedaObjObjEquiv.symm.injective ?_⟩
430+ rw [← shrinkYoneda_map_app_shrinkYonedaObjObjEquiv_symm]
431+ convert hw using 1
432+ · exact (congr_fun (NatTrans.congr_app
433+ ((Cofan.IsColimit.fac hc (fun i ↦ shrinkYoneda.{w}.map (f i))) i) (op V))
434+ (shrinkYonedaObjObjEquiv.symm a)).symm
435+ · exact (shrinkYoneda_obj_map_shrinkYonedaObjObjEquiv_symm v.op g).symm
436+ · rintro ⟨_, a, _, ⟨i⟩, fac⟩
437+ refine ⟨(c.inj i).app (op V) (shrinkYonedaObjObjEquiv.symm a),
438+ (congr_fun (NatTrans.congr_app
439+ ((Cofan.IsColimit.fac hc (fun i ↦ shrinkYoneda.{w}.map (f i))) i) (op V))
440+ (shrinkYonedaObjObjEquiv.symm a)).trans ?_⟩
441+ rw [shrinkYoneda_map_app_shrinkYonedaObjObjEquiv_symm a (f i), fac]
442+ exact (shrinkYoneda_obj_map_shrinkYonedaObjObjEquiv_symm v.op g).symm
443+
444+ end Presheaf
445+
446+ namespace GrothendieckTopology
447+
448+ lemma ofArrows_mem_iff_isLocallySurjective_cofanIsColimitDesc_shrinkYoneda_map
449+ [LocallySmall.{w} C] {S : C} {ι : Type *} [Small.{w} ι] {X : ι → C}
450+ (f : ∀ i, X i ⟶ S)
451+ {c : Cofan (fun i ↦ shrinkYoneda.{w}.obj (X i))} (hc : IsColimit c) :
452+ Sieve.ofArrows _ f ∈ J S ↔
453+ Presheaf.IsLocallySurjective J
454+ (Cofan.IsColimit.desc hc (fun i ↦ shrinkYoneda.{w}.map (f i))) := by
455+ refine ⟨fun hf ↦ ⟨fun {U u} ↦ ?_⟩, fun hf ↦ ?_⟩
456+ · obtain ⟨u, rfl⟩ := shrinkYonedaObjObjEquiv.symm.surjective u
457+ replace hf := J.pullback_stable u hf
458+ rwa [← Presheaf.imageSieve_cofanIsColimitDesc_shrinkYoneda_map f hc u] at hf
459+ · rw [← Sieve.pullback_id (S := Sieve.ofArrows X f),
460+ ← Presheaf.imageSieve_cofanIsColimitDesc_shrinkYoneda_map f hc (𝟙 S)]
461+ exact Presheaf.imageSieve_mem J (Cofan.IsColimit.desc hc (fun i ↦ shrinkYoneda.{w}.map (f i)))
462+ (shrinkYonedaObjObjEquiv.symm (𝟙 S))
463+
464+ lemma ofArrows_mem_iff_isLocallySurjective_cofanIsColimitDesc_uliftYoneda_map
465+ {S : C} {ι : Type *} [Small.{max w v} ι] {X : ι → C}
466+ (f : ∀ i, X i ⟶ S)
467+ {c : Cofan (fun i ↦ uliftYoneda.{w}.obj (X i))} (hc : IsColimit c) :
468+ Sieve.ofArrows _ f ∈ J S ↔
469+ Presheaf.IsLocallySurjective J
470+ (Cofan.IsColimit.desc hc (fun i ↦ uliftYoneda.{w}.map (f i))) := by
471+ let e : Discrete.functor (fun i ↦ uliftYoneda.{w}.obj (X i)) ≅
472+ Discrete.functor (fun i ↦ shrinkYoneda.{max w v}.obj (X i)) :=
473+ Discrete.natIso (fun i ↦ uliftYonedaIsoShrinkYoneda.{w}.app (X i.as))
474+ let hc' := (IsColimit.precomposeInvEquiv e _).2 hc
475+ rw [ofArrows_mem_iff_isLocallySurjective_cofanIsColimitDesc_shrinkYoneda_map.{max w v} J f hc']
476+ have :
477+ Cofan.IsColimit.desc hc (fun i ↦ uliftYoneda.map (f i)) ≫
478+ uliftYonedaIsoShrinkYoneda.hom.app _ =
479+ Cofan.IsColimit.desc hc' (fun i ↦ shrinkYoneda.map (f i)) :=
480+ Cofan.IsColimit.hom_ext hc _ _ (fun i ↦ by
481+ rw [Cofan.IsColimit.fac_assoc, NatTrans.naturality,
482+ ← Cofan.IsColimit.fac hc' (fun i ↦ shrinkYoneda.map (f i)) i]
483+ simp [Cofan.inj, e])
484+ rw [← this , Presheaf.isLocallySurjective_comp_iff J]
485+
486+ lemma ofArrows_mem_iff_isLocallySurjective_sigmaDesc_shrinkYoneda_map [LocallySmall.{w} C]
487+ {S : C} {ι : Type *} [Small.{w} ι] {X : ι → C} (f : ∀ i, X i ⟶ S) :
488+ Sieve.ofArrows _ f ∈ J S ↔
489+ Presheaf.IsLocallySurjective J (Sigma.desc (fun i ↦ shrinkYoneda.{w}.map (f i))) :=
490+ ofArrows_mem_iff_isLocallySurjective_cofanIsColimitDesc_shrinkYoneda_map J f
491+ (coproductIsCoproduct _)
492+
493+ lemma ofArrows_mem_iff_isLocallySurjective_sigmaDesc_uliftYoneda_map
494+ {S : C} {ι : Type *} [Small.{max w v} ι] {X : ι → C} (f : ∀ i, X i ⟶ S) :
495+ Sieve.ofArrows _ f ∈ J S ↔
496+ Presheaf.IsLocallySurjective J (Sigma.desc (fun i ↦ uliftYoneda.{w}.map (f i))) :=
497+ ofArrows_mem_iff_isLocallySurjective_cofanIsColimitDesc_uliftYoneda_map J f
498+ (coproductIsCoproduct _)
499+
500+ end GrothendieckTopology
501+
402502end CategoryTheory
0 commit comments