Skip to content

Commit 1fe92bf

Browse files
committed
feat(CategoryTheory): finite-product preserving presheaves are sheaves for extensive presieves (#7949)
We prove that finite-product preserving presheaves on extensive categories are sheaves for `extensive` presieves. - [x] depends on: #7804 Co-authored-by: Riccardo Brasca @riccardobrasca [[email protected]](mailto:[email protected]) Co-authored-by: Filippo A E Nuccio @faenuccio [[email protected]](mailto:[email protected])
1 parent 51d2ec9 commit 1fe92bf

File tree

1 file changed

+98
-10
lines changed

1 file changed

+98
-10
lines changed

Mathlib/CategoryTheory/Sites/RegularExtensive.lean

Lines changed: 98 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ Copyright (c) 2023 Dagur Asgeirsson. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Dagur Asgeirsson, Filippo A. E. Nuccio, Riccardo Brasca
55
-/
6+
import Mathlib.CategoryTheory.Extensive
67
import Mathlib.CategoryTheory.Preadditive.Projective
78
import Mathlib.CategoryTheory.Sites.Coherent
8-
import Mathlib.CategoryTheory.Extensive
9-
import Mathlib.CategoryTheory.Sites.EqualizerSheafCondition
10-
import Mathlib.Tactic.ApplyFun
9+
import Mathlib.CategoryTheory.Sites.Preserves
1110
/-!
1211
1312
# The Regular and Extensive Coverages
@@ -23,19 +22,29 @@ The second one is called the *extensive* coverage and for that to exist, the cat
2322
satisfy a condition called `FinitaryPreExtensive C`. This means `C` has finite coproducts and that
2423
those are preserved by pullbacks. The covering sieves of this coverage are generated by presieves
2524
consisting finitely many arrows that together induce an isomorphism from the coproduct to the
26-
target.
25+
target. This condition is weaker than `FinitaryExtensive`, where in addition finite coproducts are
26+
disjoint.
27+
28+
## Main results
2729
28-
In `extensive_union_regular_generates_coherent`, we prove that the union of these two coverages
29-
generates the coherent topology on `C` if `C` is precoherent, extensive and regular.
30+
* `extensive_union_regular_generates_coherent`: the union of the regular and extensive coverages
31+
generates the coherent topology on `C` if `C` is precoherent, preextensive and preregular.
3032
31-
In `isSheafFor_regular_of_hasPullbacks` we prove that a presheaf satisfying an "equaliser condition"
32-
satisfies the sheaf condition for a presieve consisting of a single effective epimorphism. In
33-
`isSheafFor_regular_of_projective`, we prove that every presheaf satisfies the sheaf condition for
34-
such presieves with projective target.
33+
* `isSheaf_iff_equalizerCondition`: In a preregular category with pullbacks, the sheaves for the
34+
regular topology are precisely the presheaves satisfying an equaliser condition with respect to
35+
effective epimorphisms.
36+
37+
* `isSheaf_of_projective`: In a preregular category in which every object is projective, every
38+
presheaf is a sheaf for the regular topology.
39+
40+
* `isSheaf_iff_preservesFiniteProducts`: In a finitary extensive category, the sheaves for the
41+
extensive topology are precisely those preserving finite products.
3542
3643
TODO: figure out under what conditions `Preregular` and `Extensive` are implied by `Precoherent` and
3744
vice versa.
3845
46+
TODO: refactor the section `RegularSheaves` to use the new `Arrows` sheaf API.
47+
3948
-/
4049

4150
universe v u w
@@ -89,6 +98,8 @@ def regularCoverage [Preregular C] : Coverage C where
8998

9099
/--
91100
The extensive coverage on an extensive category `C`
101+
102+
TODO: use general colimit API instead of `IsIso (Sigma.desc π)`
92103
-/
93104
def extensiveCoverage [FinitaryPreExtensive C] : Coverage C where
94105
covering B := { S | ∃ (α : Type) (_ : Fintype α) (X : α → C) (π : (a : α) → (X a ⟶ B)),
@@ -256,4 +267,81 @@ lemma isSheaf_of_projective (F : Cᵒᵖ ⥤ Type (max u v)) [Preregular C] [∀
256267

257268
end RegularSheaves
258269

270+
section ExtensiveSheaves
271+
272+
variable [FinitaryPreExtensive C] {C}
273+
274+
/-- A presieve is *extensive* if it is finite and its arrows induce an isomorphism from the
275+
coproduct to the target. -/
276+
class Presieve.extensive {X : C} (R : Presieve X) :
277+
Prop where
278+
/-- `R` consists of a finite collection of arrows that together induce an isomorphism from the
279+
coproduct of their sources. -/
280+
arrows_nonempty_isColimit : ∃ (α : Type) (_ : Fintype α) (Z : α → C) (π : (a : α) → (Z a ⟶ X)),
281+
R = Presieve.ofArrows Z π ∧ Nonempty (IsColimit (Cofan.mk X π))
282+
283+
instance {X : C} (S : Presieve X) [S.extensive] : S.hasPullbacks where
284+
has_pullbacks := by
285+
obtain ⟨_, _, _, _, rfl, ⟨hc⟩⟩ := Presieve.extensive.arrows_nonempty_isColimit (R := S)
286+
intro _ _ _ _ _ hg
287+
cases hg
288+
apply FinitaryPreExtensive.hasPullbacks_of_is_coproduct hc
289+
290+
instance {α : Type} [Fintype α] {Z : α → C} {F : C ⥤ Type w}
291+
[PreservesFiniteProducts F] : PreservesLimit (Discrete.functor fun a => (Z a)) F :=
292+
(PreservesFiniteProducts.preserves α).preservesLimit
293+
294+
open Presieve Opposite
295+
296+
/--
297+
A finite product preserving presheaf is a sheaf for the extensive topology on a category which is
298+
`FinitaryPreExtensive`.
299+
-/
300+
theorem isSheafFor_extensive_of_preservesFiniteProducts {X : C} (S : Presieve X) [S.extensive]
301+
(F : Cᵒᵖ ⥤ Type max u v) [PreservesFiniteProducts F] : S.IsSheafFor F := by
302+
obtain ⟨_, _, Z, π, rfl, ⟨hc⟩⟩ := extensive.arrows_nonempty_isColimit (R := S)
303+
have : (ofArrows Z (Cofan.mk X π).inj).hasPullbacks :=
304+
(inferInstance : (ofArrows Z π).hasPullbacks)
305+
exact isSheafFor_of_preservesProduct _ _ hc
306+
307+
instance {α : Type} [Fintype α] (Z : α → C) : (ofArrows Z (fun i ↦ Sigma.ι Z i)).extensive :=
308+
⟨⟨α, inferInstance, Z, (fun i ↦ Sigma.ι Z i), rfl, ⟨coproductIsCoproduct _⟩⟩⟩
309+
310+
/--
311+
A presheaf on a category which is `FinitaryExtensive` is a sheaf iff it preserves finite products.
312+
-/
313+
theorem isSheaf_iff_preservesFiniteProducts [FinitaryExtensive C] (F : Cᵒᵖ ⥤ Type max u v) :
314+
Presieve.IsSheaf (extensiveCoverage C).toGrothendieck F ↔
315+
Nonempty (PreservesFiniteProducts F) := by
316+
refine ⟨fun hF ↦ ⟨⟨fun α _ ↦ ⟨fun {K} ↦ ?_⟩⟩⟩, fun hF ↦ ?_⟩
317+
· rw [Presieve.isSheaf_coverage] at hF
318+
let Z : α → C := fun i ↦ unop (K.obj ⟨i⟩)
319+
have : (Presieve.ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks :=
320+
(inferInstance : (Presieve.ofArrows Z (Sigma.ι Z)).hasPullbacks)
321+
have : ∀ (i : α), Mono (Cofan.inj (Cofan.mk (∐ Z) (Sigma.ι Z)) i) :=
322+
(inferInstance : ∀ (i : α), Mono (Sigma.ι Z i))
323+
let i : K ≅ Discrete.functor (fun i ↦ op (Z i)) := Discrete.natIsoFunctor
324+
let _ : PreservesLimit (Discrete.functor (fun i ↦ op (Z i))) F :=
325+
Presieve.preservesProductOfIsSheafFor F ?_ initialIsInitial _ (coproductIsCoproduct Z)
326+
(FinitaryExtensive.isPullback_initial_to_sigma_ι Z)
327+
(hF (Presieve.ofArrows Z (fun i ↦ Sigma.ι Z i)) ?_)
328+
· exact preservesLimitOfIsoDiagram F i.symm
329+
· apply hF
330+
refine ⟨Empty, inferInstance, Empty.elim, IsEmpty.elim inferInstance, rfl, ⟨default,?_, ?_⟩⟩
331+
· ext b
332+
cases b
333+
· simp only [eq_iff_true_of_subsingleton]
334+
· refine ⟨α, inferInstance, Z, (fun i ↦ Sigma.ι Z i), rfl, ?_⟩
335+
suffices Sigma.desc (fun i ↦ Sigma.ι Z i) = 𝟙 _ by rw [this]; infer_instance
336+
ext
337+
simp
338+
· let _ := hF.some
339+
rw [Presieve.isSheaf_coverage]
340+
intro X R ⟨Y, α, Z, π, hR, hi⟩
341+
have : IsIso (Sigma.desc (Cofan.inj (Cofan.mk X π))) := hi
342+
have : R.extensive := ⟨Y, α, Z, π, hR, ⟨Cofan.isColimitOfIsIsoSigmaDesc (Cofan.mk X π)⟩⟩
343+
exact isSheafFor_extensive_of_preservesFiniteProducts R F
344+
345+
end ExtensiveSheaves
346+
259347
end CategoryTheory

0 commit comments

Comments
 (0)