Skip to content

Commit d4a1d6e

Browse files
committed
feat(CategoryTheory/Sites): pullback point along flat functor (#35124)
For `F : C ⥤ D` a representably flat and cover preserving functor between sites, we construct a point on `C` from a point on `D` by precomposing the fiber functor with `F`.
1 parent e3e3ff8 commit d4a1d6e

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

Mathlib/CategoryTheory/Filtered/Basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ theorem of_isRightAdjoint (R : C ⥤ D) [R.IsRightAdjoint] : IsFiltered D :=
324324
theorem of_equivalence (h : C ≌ D) : IsFiltered D :=
325325
of_right_adjoint h.symm.toAdjunction
326326

327+
omit [IsFiltered C] in
328+
lemma iff_of_equivalence (e : C ≌ D) : IsFiltered C ↔ IsFiltered D :=
329+
fun _ ↦ .of_equivalence e, fun _ ↦ .of_equivalence e.symm⟩
330+
327331
end Nonempty
328332

329333
section OfCocone
@@ -841,6 +845,10 @@ theorem of_isLeftAdjoint (L : C ⥤ D) [L.IsLeftAdjoint] : IsCofiltered D :=
841845
theorem of_equivalence (h : C ≌ D) : IsCofiltered D :=
842846
of_left_adjoint h.toAdjunction
843847

848+
omit [IsCofiltered C] in
849+
lemma iff_of_equivalence (e : C ≌ D) : IsCofiltered C ↔ IsCofiltered D :=
850+
fun _ ↦ .of_equivalence e, fun _ ↦ .of_equivalence e.symm⟩
851+
844852
end Nonempty
845853

846854

@@ -935,6 +943,12 @@ lemma isCofiltered_of_isFiltered_op [IsFiltered Cᵒᵖ] : IsCofiltered C :=
935943
lemma isFiltered_of_isCofiltered_op [IsCofiltered Cᵒᵖ] : IsFiltered C :=
936944
IsFiltered.of_equivalence (opOpEquivalence _)
937945

946+
lemma isCofiltered_op_iff_isFiltered : IsCofiltered Cᵒᵖ ↔ IsFiltered C :=
947+
fun _ ↦ isFiltered_of_isCofiltered_op _, fun _ ↦ inferInstance⟩
948+
949+
lemma isFiltered_op_iff_isCofiltered : IsFiltered Cᵒᵖ ↔ IsCofiltered C :=
950+
fun _ ↦ isCofiltered_of_isFiltered_op _, fun _ ↦ inferInstance⟩
951+
938952
end Opposite
939953

940954
section ULift

Mathlib/CategoryTheory/Functor/Flat.lean

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,60 @@ lemma preservesFiniteLimits_iff_lan_preservesFiniteLimits (F : C ⥤ D) :
360360

361361
end SmallCategory
362362

363+
section
364+
365+
variable {C D E : Type*} [Category* C] [Category* D] [Category* E] (F : C ⥤ D) (G : D ⥤ E)
366+
367+
attribute [local instance] IsCofiltered.isConnected IsFiltered.isConnected
368+
369+
instance (X : E) [RepresentablyFlat F] : (StructuredArrow.pre X F G).Final :=
370+
⟨fun _ ↦ isConnected_of_equivalent (StructuredArrow.preEquivalence _ _).symm⟩
371+
372+
instance (X : E) [RepresentablyCoflat F] : (CostructuredArrow.pre F G X).Initial :=
373+
⟨fun _ ↦ isConnected_of_equivalent (CostructuredArrow.preEquivalence _ _).symm⟩
374+
375+
instance (X : E) [RepresentablyFlat F] [IsCofiltered (StructuredArrow X G)] :
376+
IsCofiltered (StructuredArrow X (F ⋙ G)) := by
377+
let T := StructuredArrow.pre X F G
378+
obtain ⟨Y⟩ := IsCofiltered.nonempty (C := StructuredArrow X G)
379+
obtain ⟨A⟩ := IsCofiltered.nonempty (C := StructuredArrow Y.right F)
380+
have : Nonempty (StructuredArrow X (F ⋙ G)) := ⟨.mk (Y.hom ≫ G.map A.hom)⟩
381+
suffices IsCofilteredOrEmpty (StructuredArrow X (F ⋙ G)) by constructor
382+
refine ⟨fun A B ↦ ?_, fun A B f g ↦ ?_⟩
383+
· let U := IsCofiltered.min (T.obj A) (T.obj B)
384+
let A' : StructuredArrow U.right F := .mk (IsCofiltered.minToLeft (T.obj A) (T.obj B)).right
385+
let B' : StructuredArrow U.right F := .mk (IsCofiltered.minToRight (T.obj A) (T.obj B)).right
386+
refine ⟨.mk <| U.hom ≫ G.map (IsCofiltered.min A' B').hom, ?_, ?_, trivial⟩
387+
· refine StructuredArrow.homMk (IsCofiltered.minToLeft A' B').right ?_
388+
simpa [← Functor.map_comp] using StructuredArrow.w _
389+
· refine StructuredArrow.homMk (IsCofiltered.minToRight A' B').right ?_
390+
simpa [← Functor.map_comp] using StructuredArrow.w _
391+
· let U := IsCofiltered.eq (T.map f) (T.map g)
392+
let A' : StructuredArrow _ F := .mk (IsCofiltered.eqHom (T.map f) (T.map g)).right
393+
let B' : StructuredArrow _ F := .mk (IsCofiltered.eqHom (T.map f) (T.map g) ≫ T.map f).right
394+
let f' : A' ⟶ B' := StructuredArrow.homMk f.right rfl
395+
let g' : A' ⟶ B' := StructuredArrow.homMk g.right
396+
congr($(IsCofiltered.eq_condition (T.map f) (T.map g)).right).symm
397+
refine ⟨.mk <| U.hom ≫ G.map (IsCofiltered.eq f' g').hom, ?_, ?_⟩
398+
· refine StructuredArrow.homMk (IsCofiltered.eqHom f' g').right ?_
399+
simpa [← Functor.map_comp] using StructuredArrow.w _
400+
· ext
401+
exact congr($(IsCofiltered.eq_condition f' g').right)
402+
403+
instance (X : E) [RepresentablyCoflat F] [h : IsFiltered (CostructuredArrow G X)] :
404+
IsFiltered (CostructuredArrow (F ⋙ G) X) := by
405+
rw [← isCofiltered_op_iff_isFiltered, IsCofiltered.iff_of_equivalence
406+
(costructuredArrowOpEquivalence _ _)] at h ⊢
407+
exact inferInstanceAs <| IsCofiltered (StructuredArrow (op X) (F.op ⋙ G.op))
408+
409+
instance (G : D ⥤ Type*) [RepresentablyFlat F] [IsCofiltered G.Elements] :
410+
IsCofiltered (F ⋙ G).Elements := by
411+
suffices h : IsCofiltered (StructuredArrow PUnit (F ⋙ G)) from
412+
.of_equivalence (CategoryOfElements.structuredArrowEquivalence _).symm
413+
have : IsCofiltered (StructuredArrow PUnit G) :=
414+
.of_equivalence (CategoryOfElements.structuredArrowEquivalence _)
415+
infer_instance
416+
417+
end
418+
363419
end CategoryTheory

Mathlib/CategoryTheory/Sites/Point/Basic.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module
88
public import Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Basic
99
public import Mathlib.CategoryTheory.Filtered.FinallySmall
1010
public import Mathlib.CategoryTheory.Limits.Preserves.Filtered
11+
public import Mathlib.CategoryTheory.Sites.CoverPreserving
1112
public import Mathlib.CategoryTheory.Sites.LocallyBijective
13+
public import Mathlib.CategoryTheory.Functor.Flat
1214

1315
/-!
1416
# Points of a site
@@ -310,6 +312,26 @@ noncomputable def sheafFiberCompIso [J.HasSheafCompose F] :
310312
Functor.isoWhiskerLeft (sheafToPresheaf J A) (Φ.presheafFiberCompIso F) ≪≫
311313
(Functor.associator _ _ _).symm
312314

315+
section Comap
316+
317+
variable {C D : Type*} [Category* C] [Category* D]
318+
{J : GrothendieckTopology C} {K : GrothendieckTopology D}
319+
320+
/-- If `F : C ⥤ D` is a representably flat and cover preserving functor between sites, then
321+
any point on `D` induces a point on `C` by precomposing the fiber functor with `F`. -/
322+
@[simps]
323+
def comap (F : C ⥤ D) [RepresentablyFlat F] (H : CoverPreserving J K F) (Φ : Point.{w} K)
324+
[InitiallySmall (F ⋙ Φ.fiber).Elements] :
325+
Point.{w} J where
326+
fiber := F ⋙ Φ.fiber
327+
jointly_surjective {X} {R} hR x := by
328+
obtain ⟨Y, f, ⟨W, g, h, hg, rfl⟩, y, rfl⟩ :=
329+
Φ.jointly_surjective (Sieve.functorPushforward F R) (H.1 hR) x
330+
use W, g, hg, Φ.fiber.map h y
331+
simp
332+
333+
end Comap
334+
313335
end Point
314336

315337
end GrothendieckTopology

0 commit comments

Comments
 (0)